Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef AMEGIC_Amplitude_Amplitude_Handler_H
0002 #define AMEGIC_Amplitude_Amplitude_Handler_H
0003 
0004 #include "AMEGIC++/Main/Tools.H"
0005 #include "ATOOLS/Phys/Flavour.H"
0006 #include "AMEGIC++/Main/Polarisation.H"
0007 #include "AMEGIC++/Amplitude/Vertex.H"
0008 #include "AMEGIC++/Amplitude/Zfunctions/Basic_Sfuncs.H"
0009 #include "AMEGIC++/String/String_Handler.H"
0010 #include "ATOOLS/Math/MyComplex.H"
0011 #include "AMEGIC++/Main/Point.H"
0012 #include "AMEGIC++/Amplitude/CFColor.H"
0013 #include "AMEGIC++/Amplitude/Amplitude_Group.H"
0014 #include "AMEGIC++/Main/Helicity.H"
0015 #include "MODEL/Main/Coupling_Data.H"
0016 
0017 namespace METOOLS { class Spin_Amplitudes; }
0018 
0019 namespace AMEGIC {
0020 
0021   typedef std::map<int,CFColor*> CFC_map;
0022   typedef CFC_map::iterator CFC_iterator;
0023 
0024   //! This is the master class for the generation and calculation of an amplitude.
0025   class Process_Tags;
0026   class Amplitude_Handler : public Amplitude_Group {
0027     bool m_cutvecprop;
0028     String_Handler* shand;
0029     CFColor              * CFCol_Matrix;
0030     CFC_map                CFCol_MMatrixMap;
0031     int       ngraph,namplitude,ntotal;
0032     Complex * Mi;
0033     Single_Amplitude* firstgraph;
0034     std::vector<Point*> pointlist;
0035     std::string m_print_graph;
0036     std::vector<Amplitude_Base*> m_ramplist;
0037 
0038     std::map<std::string,ATOOLS::Flavour> m_flavourmap;
0039     std::vector<size_t> m_hm;
0040     std::vector<int> m_maxcpl, m_mincpl;
0041     std::vector<int> m_aon;
0042     std::vector<std::vector<std::vector<int> > > m_cplmatrix;
0043     std::vector<std::vector<int> > m_on;
0044     std::vector<std::vector<int> > m_possiblecplconfigs;
0045     std::set<std::pair<int,int> > m_valid;
0046 
0047     int  PropProject(Amplitude_Base*,int);
0048     int  CompareZfunc(Amplitude_Base*,Zfunc*,Amplitude_Base*,Zfunc*);
0049     void CheckEqual(Single_Amplitude*);
0050     void CheckEqualInGroup();
0051     void BuildGlobalString(Single_Amplitude*);
0052     void PreCluster(Single_Amplitude* firstgraph);
0053     void OptimizeProps(int,Single_Amplitude*);
0054     int  TOrder(Single_Amplitude* a);
0055     int  SingleCompare(Point*,Point*,double &, std::map<std::string,Complex> &);
0056     void RestoreAmplitudes(std::string path);
0057     bool CheckSingleEFM(Point*);
0058     
0059     MODEL::Coupling_Data *p_aqcd, *p_aqed;
0060     
0061   public:
0062     Amplitude_Handler(int,ATOOLS::Flavour *,int *,Process_Tags*,
0063               Amegic_Model *,Topology *,
0064               std::vector<double> &,std::vector<double> &,
0065               int,int,MODEL::Coupling_Map *const cpls,
0066               Basic_Sfuncs *,String_Handler *,
0067               std::string print_graph="", bool create_4V=true,
0068               bool cutvecprop=true,const std::string &path="");
0069     ~Amplitude_Handler();
0070     void ConstructSignalAmplitudes(int N,ATOOLS::Flavour* fl,int* b,
0071                                    Process_Tags* pinfo,
0072                                    Single_Amplitude** sglist,Basic_Sfuncs* BS);
0073     void CompleteAmplitudes(int,ATOOLS::Flavour*,int*,Polarisation*,
0074                 Topology*,Basic_Sfuncs*,std::string,char=0,char=0);
0075     void CompleteLibAmplitudes(int N,std::string,std::string,
0076                                char=0,char=0,ATOOLS::Flavour* =NULL);
0077     void StoreAmplitudeConfiguration(std::string lib);
0078 
0079     Complex Zvalue(int,int*);
0080     Complex Zvalue(int);
0081     Complex Zvalue(String_Handler*,int);
0082     Complex Zvalue(int,int,int);
0083     Complex Zvalue(int,int,int,const std::vector<double>&,const std::vector<double>&);
0084     Complex Zvalue(int,int,int,const std::vector<std::vector<int> >&);
0085     double Zvalue(Helicity* hel);
0086     Complex CommonColorFactor();
0087     double Differential(int ihel,int* signlist)
0088     { return (Zvalue(ihel,signlist)).real();}
0089     double Differential(int ihel)
0090     { return (Zvalue(ihel)).real();}
0091     double Differential(String_Handler * sh,int ihel)
0092     { return (Zvalue(sh,ihel)).real(); }
0093     double Differential(int ihel,int i,int k)
0094     { return (Zvalue(ihel,i,k)).real();}
0095     double Differential(int ihel,int i,int k,
0096                         const std::vector<double>& maxcpl,
0097                         const std::vector<double>& mincpl)
0098     { return (Zvalue(ihel,i,k,maxcpl,mincpl)).real();}
0099     void   FillAmplitudes(std::vector<METOOLS::Spin_Amplitudes>& amps,
0100                           std::vector<std::vector<Complex> >& cols,
0101                           Helicity* hel, double sfactor);
0102     inline int GetGraphNumber() {return ngraph;}  
0103     inline int GetRealGraphNumber() {return namplitude;}  
0104     inline int GetTotalGraphNumber() {return ntotal;}
0105 
0106     size_t PossibleConfigsExist(const std::vector<double>& maxcpl,
0107                                 const std::vector<double>& mincpl);
0108 
0109     Single_Amplitude* GetFirstGraph() {return firstgraph;}
0110     Point* GetPointlist(int);
0111     void   FillPointlist();
0112     int    FourVertex(int i) { return ExistFourVertex(GetPointlist(i)); } 
0113     bool   ExistFourVertex(Point *);
0114     int    CompareAmplitudes(Amplitude_Handler*,double &,
0115                              std::map<std::string,Complex> &);
0116     std::map<std::string,ATOOLS::Flavour>& GetFlavourmap()
0117     { return m_flavourmap; }
0118     bool   CheckEFMap();
0119   };
0120 
0121     //! The alternative color matrix, for more details see CFColor.
0122     //! Generates the Feynman diagrams.
0123     //! The number of amplitudes
0124     //! Not used.
0125     //! Not used.
0126     //! The list of results for the single amplitudes.
0127     //! Not used.
0128     //! The string handler supervises everything with strings. 
0129     //! list of pointers to the pointlists
0130     /*!
0131       This method provides a mapping of propagator numbers on momentum numbers.
0132     */
0133     /*!
0134       Compares whether two Zfunctions are completeley identical :
0135       types, number of propagators, arguments, coupling constants, 
0136       propagator momenta and flavours. For the handling of arguments
0137       and propagators, PropProject is used.
0138     */
0139     /*!
0140       Here it is checked whether two amplitudes are completely identical.
0141       This is used to prevent eventual double counting of amplitudes.
0142       It maps amplitudes on their Zfunctions which are then compared
0143       via CompareZfunc.
0144     */
0145     //! The whole generation of the amplitudes takes place in this constructor.
0146     //! Destructing stuff.....
0147     //! Kicking amplitudes... 
0148     //! Calculates the differential cross section 
0149     //! Calculates the differential cross section 
0150     //! Calculates the differential cross section with strings
0151     //    double Differential(int);
0152     //! Returns the number of graphs.
0153     //! Returns the point list of a certain graph.
0154     //! Currently not used.
0155     //! Currently not used.
0156     /*!
0157       Checks whether in the full Pointlist of the argument a
0158       four vertex is already present.
0159     */
0160     /*!
0161       ExistFourVertex actually checks recursively, whether starting form
0162       the point there is a middle leg. If so a true is returned, if not, the
0163       left and the right leg are checked via calling ExistFourVertex(p->left/right).
0164     */
0165 
0166 }
0167 #endif
0168 
0169 
0170 
0171 
0172 
0173 
0174