File indexing completed on 2025-04-19 09:10:15
0001 #ifndef SHRIMPS_Main_Event_Generator_H
0002 #define SHRIMPS_Main_Event_Generator_H
0003
0004 #include "SHRiMPS/Cross_Sections/Cross_Sections.H"
0005 #include "SHRiMPS/Event_Generation/Elastic_Event_Generator.H"
0006 #include "SHRiMPS/Event_Generation/Soft_Diffractive_Event_Generator.H"
0007 #include "SHRiMPS/Event_Generation/Inelastic_Event_Generator.H"
0008 #include "ATOOLS/Phys/Blob_List.H"
0009 #include "ATOOLS/Org/CXXFLAGS.H"
0010 #include "ATOOLS/Org/Message.H"
0011
0012 namespace PDF { class ISR_Handler; }
0013
0014 namespace SHRIMPS {
0015 class Cluster_Algorithm;
0016
0017 class Event_Generator {
0018 private:
0019 run_mode::code m_runmode;
0020 weight_mode::code m_weightmode;
0021
0022 Inelastic_Event_Generator * p_inelastic;
0023 Elastic_Event_Generator * p_elastic;
0024 Soft_Diffractive_Event_Generator * p_soft_diffractive;
0025 Event_Generator_Base * p_active;
0026
0027 double m_xsec, m_xsec_inel, m_xsec_elas, m_xsec_diff;
0028 bool m_eventsuccessful, m_mustinit;
0029
0030 void InitGenerator(Cross_Sections * xsecs,const bool & test);
0031 public:
0032 Event_Generator(Cross_Sections * xsecs,const bool & test);
0033 ~Event_Generator();
0034
0035 void Initialise(Remnant_Handler * remnants,Cluster_Algorithm * cluster);
0036 void Reset();
0037 bool DressShowerBlob(ATOOLS::Blob * blob);
0038 int InitMinimumBiasEvent(ATOOLS::Blob_List * blobs);
0039 ATOOLS::Blob * GenerateEvent();
0040
0041 void Test(const std::string & dirname);
0042
0043
0044 inline Colour_Generator * GetColourGenerator() {
0045 return (p_inelastic!=NULL)?p_inelastic->GetColourGenerator():NULL;
0046 }
0047 inline Omega_ik * GetEikonal() const { return p_active->GetEikonal(); }
0048 inline const double & XSec() const { return m_xsec; }
0049
0050
0051 inline void SetMaxEnergies(const double & E1,const double & E2) {
0052 if (p_active==p_inelastic && p_inelastic!=NULL)
0053 p_inelastic->SetMaxEnergies(E1,E2);
0054 }
0055
0056 inline double B() const { return p_active?p_active->B():-1.; }
0057 inline int NLadders() const { return p_active?p_active->NLadders():1; }
0058 inline bool IsMinBias() const { return p_active?p_active->IsMinBias():false; }
0059 inline bool IsLastRescatter() const { return p_active?p_active->IsLastRescatter():false; }
0060 inline double Smin() const { return p_active?p_active->Smin():-1.; }
0061 inline double MinKT2() const { return p_active?p_active->KT2min():-1.; }
0062 inline double Yhat() const { return p_active?p_active->Yhat():0.; }
0063 inline double Ymax() const { return p_active?p_active->Ymax():0.; }
0064 inline double TMax() const { return p_active?p_active->TMax():0.; }
0065 };
0066 }
0067 #endif