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