Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef AMEGIC_Main_Single_Process_Combined_H
0002 #define AMEGIC_Main_Single_Process_Combined_H
0003 
0004 #include "AMEGIC++/Main/Process_Base.H"
0005 
0006 #include "AMEGIC++/Main/Polarisation.H"
0007 #include "AMEGIC++/Amplitude/Amplitude_Handler.H"
0008 #include "PHASIC++/Process/Tree_ME2_Base.H"
0009 // #include "ATOOLS/Phys/Spin_Correlation_Tensor.H"
0010 #include <vector>
0011 
0012 namespace AMEGIC {
0013   class Helicity;
0014   class Phase_Space_Generator;
0015 
0016   typedef std::set<std::pair<size_t,size_t> >     Combination_Set;
0017   typedef std::map<size_t,ATOOLS::Flavour_Vector> CFlavVector_Map;
0018 
0019   class Single_Process_Combined: public Process_Base {
0020   private:
0021     int                     m_gen_str;
0022     std::string             m_ptypename,m_libname,m_pslibname;
0023     Polarisation            m_pol;
0024     bool                    m_newlib;
0025     double                  m_iresult;
0026     int                     m_libnumb;
0027 
0028     Helicity              * p_hel;
0029     Basic_Sfuncs          * p_BS;
0030     Amplitude_Handler     * p_ampl;
0031     String_Handler        * p_shand;
0032     Phase_Space_Generator * p_psgen;
0033 
0034     Single_Process_Combined * p_partner;
0035 
0036     PHASIC::Tree_ME2_Base * p_me2;
0037 
0038     Combination_Set m_ccombs;
0039     CFlavVector_Map m_cflavs;
0040 
0041     void FillCombinations(Point *const p,size_t &id);
0042     void FillCombinations();
0043     /*------------------------------------------------------------------------------
0044 
0045       Constructors
0046 
0047       ------------------------------------------------------------------------------*/
0048   public:
0049 
0050     Single_Process_Combined();
0051     ~Single_Process_Combined();
0052 
0053     bool FillIntegrator(PHASIC::Phase_Space_Handler *const psh);
0054 
0055     bool Combinable(const size_t &idi,const size_t &idj);
0056 
0057     const ATOOLS::Flavour_Vector &CombinedFlavour(const size_t &idij);
0058 
0059   private:
0060     void           PolarizationNorm();
0061 
0062     /*------------------------------------------------------------------------------
0063 
0064       Initializing libraries, amplitudes, etc.
0065 
0066       ------------------------------------------------------------------------------*/
0067   protected :
0068     int                 Tests();
0069     int                 TestLib();
0070     int                 CheckLibraries();
0071     int                 CheckStrings(Single_Process_Combined*);
0072     void                WriteLibrary();
0073     void                CreateMappingFile(Single_Process_Combined*);
0074     void                UpdateMappingFile(std::string,std::map<std::string,Complex> &); 
0075     bool                CreateChannelLibrary();
0076     void                WriteAlternativeName(std::string aname);
0077     bool                CheckAlternatives(std::vector<Process_Base *> & links,
0078                       std::string procname);
0079   public:
0080     void                AddChannels(std::list<std::string>*);
0081     bool                NewLibs() {return m_newlib;}
0082     bool                FoundMappingFile(std::string &,std::string &);
0083     int                 InitAmplitude(Amegic_Model *,Topology *,
0084                       std::vector<Process_Base *> &,
0085                       std::vector<Process_Base *> &);
0086     bool                SetUpIntegrator();
0087     String_Handler    * GetStringHandler()             { return p_shand;}
0088     Amplitude_Handler * GetAmplitudeHandler()          { return p_ampl;}
0089     Helicity *          GetHelicity()                  { return p_hel; }    
0090     double              Result()                       { return m_iresult; } 
0091 
0092     int                             NumberOfDiagrams();
0093     AMEGIC::Point                 * Diagram(int i);
0094     bool                IsFreeOfFourVertex(Point * _p) { return 1-p_ampl->ExistFourVertex(_p); }
0095     /*------------------------------------------------------------------------------
0096 
0097       Process management
0098 
0099       ------------------------------------------------------------------------------*/
0100   public:
0101     std::string      LibName()         { return m_libname;     }
0102     std::string      PSLibName()       { return m_pslibname;   }
0103     AMEGIC::Process_Base   * Partner() const { return p_partner;     }
0104     void             Minimize();
0105 
0106     /*------------------------------------------------------------------------------
0107 
0108       Calculating total cross sections
0109 
0110       ------------------------------------------------------------------------------*/
0111   public:
0112     double Partonic(const ATOOLS::Vec4D_Vector&,
0113                     ATOOLS::Variations_Mode varmode,
0114                     int mode);
0115     double         DSigma(const ATOOLS::Vec4D_Vector &,bool);
0116     double         operator()(const ATOOLS::Vec4D *);
0117 
0118   };
0119 }
0120 
0121 
0122 
0123 #endif