Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:09:45

0001 #ifndef AMEGIC_Amplitude_Zfunctions_Zfunc_Calc_H
0002 #define AMEGIC_Amplitude_Zfunctions_Zfunc_Calc_H
0003 
0004 #include <vector>
0005 #include "MODEL/Main/Model_Base.H"
0006 #include "AMEGIC++/Amplitude/Zfunctions/Basic_Func.H"
0007 #include "AMEGIC++/Amplitude/Lorentz_Function.H"
0008 #include "ATOOLS/Org/Getter_Function.H"
0009 
0010 #define Scalar_Args
0011 
0012 namespace AMEGIC {
0013 
0014   class Basic_Sfuncs;
0015   class Zfunc_Generator;
0016   class Point;
0017   class Zfunc;
0018 
0019   struct ZFCalc_Key {
0020     Virtual_String_Generator *p_sgen;
0021     Basic_Sfuncs *p_bs;
0022     MODEL::Model_Base *p_model;
0023     ZFCalc_Key(Virtual_String_Generator *const sgen,Basic_Sfuncs *const bs,
0024            MODEL::Model_Base *const model):
0025       p_sgen(sgen), p_bs(bs), p_model(model) {}
0026   };
0027 
0028   class Zfunc_Calc : public virtual Basic_Func {
0029   public:
0030     int                      ncoupl,narg,pn;
0031     std::vector<MODEL::Lorentz_Function*> lorentzlist;
0032     std::string type; 
0033 
0034     Zfunc_Calc(Virtual_String_Generator* _sgen,Basic_Sfuncs* _BS) : Basic_Func(_sgen,_BS)  {} 
0035     virtual ~Zfunc_Calc();
0036 
0037     Zfunc_Calc *GetCopy() const;
0038     virtual ATOOLS::Kabbala Do(); 
0039     
0040     virtual int GetScalarNumb();
0041     virtual void SetArgs(Zfunc_Generator *const zfc,Zfunc *const zf,
0042              Point *const p,Point *const pf,Point *&pb,
0043              int *lfnumb,int *canumb);
0044   };
0045   
0046   typedef ATOOLS::Getter_Function<Zfunc_Calc,ZFCalc_Key> ZFCalc_Getter;
0047 
0048   /*!
0049     \class zl
0050     \brief Calculator type codes.
0051   */
0052 
0053   /*!
0054     \class Zfunc_Calc
0055     The mother class of all calculator classes.
0056   */
0057   /*!
0058     \fn virtual ATOOLS::Kabbala Zfunc_Calc::Do()
0059     Pure virtual method, must be overloaded!
0060 
0061     Performs the actual calculation in derived classes.
0062   */
0063   /*!
0064     \fn virtual int Zfunc_Calc::GetScalarNumb()
0065     Virtual method, returns 0.
0066 
0067     Used to return the number of dummy scalar arguments.
0068   */
0069   /*!
0070     \var int Zfunc_Calc::ncoupl
0071     Number of complex coupling constants
0072   */
0073   /*!
0074     \var int Zfunc_Calc::narg
0075     Number of arguments
0076   */
0077   /*!
0078     \var int Zfunc_Calc::pn
0079     Number of internal propagators
0080   */
0081   /*!
0082     \var std::vector<Lorentz_Function> Zfunc_Calc::lorentzlist
0083     The Lorentz structure of the calculated function
0084   */
0085   /*!
0086     \var zl::code Zfunc_Calc::type
0087     Unique identifier for the calculator.
0088   */
0089 }
0090 
0091 #define DEFINE_ZFCALC_GETTER(CLASS,TAG,INFO)                \
0092   DECLARE_GETTER(CLASS,TAG,Zfunc_Calc,ZFCalc_Key);          \
0093   Zfunc_Calc *ATOOLS::Getter<Zfunc_Calc,ZFCalc_Key,CLASS>::     \
0094   operator()(const ZFCalc_Key &key) const               \
0095   { return new CLASS(key.p_sgen,key.p_bs); }                \
0096   void ATOOLS::Getter<Zfunc_Calc,ZFCalc_Key,CLASS>::            \
0097   PrintInfo(std::ostream &str,const size_t width) const         \
0098   { str<<INFO; }
0099 #define DEFINE_ZFLOOPCALC_GETTER(CLASS,TAG,INFO)            \
0100   DECLARE_GETTER(CLASS,TAG,Zfunc_Calc,ZFCalc_Key);          \
0101   Zfunc_Calc *ATOOLS::Getter<Zfunc_Calc,ZFCalc_Key,CLASS>::     \
0102   operator()(const ZFCalc_Key &key) const               \
0103   { return new CLASS(key.p_sgen,key.p_bs); }                \
0104   void ATOOLS::Getter<Zfunc_Calc,ZFCalc_Key,CLASS>::            \
0105   PrintInfo(std::ostream &str,const size_t width) const         \
0106   { str<<INFO; }
0107 #define DEFINE_ZFTENSORCALC_GETTER(CLASS,TAG,INFO)          \
0108   DECLARE_GETTER(CLASS,TAG,Zfunc_Calc,ZFCalc_Key);          \
0109   Zfunc_Calc *ATOOLS::Getter<Zfunc_Calc,ZFCalc_Key,CLASS>::     \
0110   operator()(const ZFCalc_Key &key) const               \
0111   { return new CLASS(key.p_sgen,key.p_bs); }                \
0112   void ATOOLS::Getter<Zfunc_Calc,ZFCalc_Key,CLASS>::            \
0113   PrintInfo(std::ostream &str,const size_t width) const         \
0114   { str<<INFO; }
0115 #define DEFINE_ZFAGCCALC_GETTER(CLASS,TAG,INFO)             \
0116   DECLARE_GETTER(CLASS,TAG,Zfunc_Calc,ZFCalc_Key);          \
0117   Zfunc_Calc *ATOOLS::Getter<Zfunc_Calc,ZFCalc_Key,CLASS>::     \
0118   operator()(const ZFCalc_Key &key) const               \
0119   { return new CLASS(key.p_sgen,key.p_bs); }                \
0120   void ATOOLS::Getter<Zfunc_Calc,ZFCalc_Key,CLASS>::            \
0121   PrintInfo(std::ostream &str,const size_t width) const         \
0122   { str<<INFO; }
0123 
0124 #endif
0125 
0126 
0127 
0128 
0129 
0130 
0131 
0132 
0133 
0134 
0135 
0136 
0137 
0138 
0139 
0140 
0141 
0142 
0143 
0144 
0145 
0146 
0147 
0148 
0149 
0150 
0151