Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:10:08

0001 #ifndef PHASIC_Main_BBar_Emission_Generator_H
0002 #define PHASIC_Main_BBar_Emission_Generator_H
0003 
0004 #include "PHASIC++/Channels/CS_Dipole.H"
0005 #include "PHASIC++/Process/Process_Base.H"
0006 
0007 namespace ATOOLS { class Integration_Info; }
0008 
0009 namespace PHASIC {
0010 
0011   class BBar_Process;
0012   class Phase_Space_Handler;
0013 
0014   struct Dipole_Params {
0015     CS_Dipole *p_dip;
0016     Process_Vector m_procs;
0017     ATOOLS::Vec4D_Vector m_p;
0018     double m_weight;
0019     inline Dipole_Params(CS_Dipole *const dip=NULL,
0020              const Process_Vector &procs=Process_Vector(),
0021              const ATOOLS::Vec4D_Vector &p=ATOOLS::Vec4D_Vector(),
0022              const double weight=0.0):
0023       p_dip(dip), m_procs(procs), m_p(p), m_weight(weight) {}
0024   };// end of struct Dipole_Params
0025 
0026   std::ostream &operator<<(std::ostream &ostr,const Dipole_Params &dp);
0027 
0028   class BBar_Emission_Generator {
0029   private:
0030 
0031     CSDipole_Vector  m_dipoles;
0032     CS_Dipole       *p_active;
0033 
0034     ATOOLS::Vec4D_Vector m_p;
0035 
0036     size_t m_nin, m_opt, m_omode;
0037     double m_weight, m_amin, m_Q2min;
0038 
0039     std::map<Process_Base*,CS_Dipole*> m_dmap;
0040 
0041     std::map<CS_Dipole*,std::map<Process_Base*,Process_Vector> > m_pmap;
0042 
0043     bool AddDipole(Process_Base *const bviproc,CS_Dipole *const dip);
0044 
0045   public:
0046 
0047     BBar_Emission_Generator();
0048 
0049     ~BBar_Emission_Generator();
0050 
0051     // members
0052     bool InitDipoles(Process_Base *const bviproc,Process_Base *const sproc,
0053              Phase_Space_Handler *const psh);
0054 
0055     bool GeneratePoint(const ATOOLS::Vec4D_Vector &p,Cut_Data *const cuts);
0056     bool GenerateWeight(Cut_Data *const cuts, bool activeonly=false);
0057 
0058     void AddPoint(const double &value);
0059 
0060     void Optimize();
0061     void EndOptimize();
0062     void MPISync();
0063 
0064     void WriteOut(std::string pid);
0065     bool ReadIn(std::string pid);
0066 
0067     void Print();
0068 
0069     Dipole_Params Active(Process_Base *const bviproc) const;
0070 
0071     inline double Weight() const { return m_weight; }
0072 
0073   };// end of class BBar_Emission_Generator
0074 
0075 }// end of namespace PHASIC
0076 
0077 #endif