Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef SHRIMPS_Main_Shrimps_H
0002 #define SHRIMPS_Main_Shrimps_H
0003 
0004 #include "SHRiMPS/Main/Cluster_Algorithm.H"
0005 #include "SHRiMPS/Tools/MinBias_Parameters.H"
0006 #include "SHRiMPS/Cross_Sections/Cross_Sections.H"
0007 #include "SHRiMPS/Event_Generation/Event_Generator.H"
0008 #include "SHRiMPS/Beam_Remnants/Remnant_Handler.H"
0009 #include "ATOOLS/Phys/Blob_List.H"
0010 #include "ATOOLS/Phys/Flavour.H"
0011 #include "ATOOLS/Math/Histogram.H"
0012 #include "ATOOLS/Org/CXXFLAGS.H"
0013 #include "ATOOLS/Org/Message.H"
0014 #include <list>
0015 
0016 namespace PDF    { class ISR_Handler; }
0017 namespace ATOOLS { class Cluster_Amplitude; }
0018 
0019 namespace SHRIMPS {
0020   /*!
0021     \class Shrimps
0022     \brief Central class
0023   */
0024   class Shrimps {
0025   private:
0026     weight_mode::code m_weightmode;
0027     deqmode::code     m_deq;
0028     /*!
0029       Steers the testing (with SHRIMPS::m_test):
0030       -  m_test=-2:  Prints values of various Bessel functions from
0031                      SHRIMPS::Special_Functions to file.
0032          Test method in SHRIMPS::Form_Factor
0033       -  m_test=-1:  Checks the SHRIMPS::Form_Factor, and in particular the
0034                      Fourier Transform, some results on screen, some on
0035          file.  Test method in SHRIMPS::Form_Factor.
0036       -  m_test=1:   Checks the eikonal evaluation with a Gaussian form
0037                      factor and no damping/recombination in the DEqs 
0038          (lambda=0).  Then the results are fully analytic.
0039          Test function in SHRIMPS::Eikonal_Creator.
0040     */
0041     int               m_test;
0042     Cross_Sections  * p_xsecs;
0043     Remnant_Handler * p_remnants;
0044     Event_Generator * p_generator;
0045     Cluster_Algorithm m_cluster;
0046 
0047     bool m_ana;
0048     std::map<std::string,ATOOLS::Histogram * > m_histos;
0049 
0050     
0051     void GenerateXsecs();
0052     void ReadEnergiesFromFile(std::set<double> & energies,
0053                   std::string infile);
0054     void WriteOutElasticsYodaFile(const double & energy,std::string dirname);
0055     void WriteOutXSecsYodaFile(const std::set<double> & energies_tot,
0056                    const std::set<double> & energies_inel,
0057                    const std::set<double> & energies_el,
0058                    const std::set<double> & energies_sd,
0059                    const std::set<double> & energies_dd,
0060                    const std::vector<double> & xsectot,
0061                    const std::vector<double> & xsecinel,
0062                    const std::vector<double> & xsecelas,
0063                    const std::vector<double> & xsecsd,
0064                    const std::vector<double> & xsecdd,
0065                    std::string dirname);
0066     
0067     void InitialiseTheRun(PDF::ISR_Handler *const isr);
0068     void InitialiseFormFactors();
0069     void InitialiseSingleChannelEikonals();
0070     void InitialiseRemnants(PDF::ISR_Handler *const isr);
0071     void InitialiseTheEventGenerator();
0072     
0073     void TestShrimps(PDF::ISR_Handler *const isr);
0074     void PrintAlphaS(const std::string & dirname);
0075     void PrintPDFs(const std::string & dirname);
0076     void TestEikonalGrids(const std::string & dirname);
0077     void TestCrossSections(const std::string & dirname);
0078     void TestEventGeneration(const std::string & dirname);
0079     void Analyse(ATOOLS::Blob_List * blobs);
0080     void Analyse(ATOOLS::Blob * blob,std::string tag);
0081   public:
0082     Shrimps(PDF::ISR_Handler *const);
0083     ~Shrimps();
0084 
0085     int  InitMinBiasEvent(ATOOLS::Blob_List * blobs);
0086     ATOOLS::Blob * GenerateEvent();
0087     ATOOLS::Cluster_Amplitude * ClusterConfiguration(ATOOLS::Blob *const blob);
0088     void CleanUp(const size_t & mode=0);
0089 
0090     ATOOLS::Return_Value::code MakeBeamBlobs(ATOOLS::Blob_List * blobs);
0091     
0092     inline void SetMaxEnergies(const double & E1,const double & E2) {
0093       p_generator->SetMaxEnergies(E1,E2);
0094     }
0095     inline int    ShowerMode()       const { return 1; }// MBpars("shower_mode"); }
0096     inline double ShowerFac()        const { return 1; }//MBpars("kt2_factor"); }
0097     inline double ShowerMinKT2()     const { return p_generator->MinKT2(); }
0098     inline const double XSec()       const { return p_generator->XSec(); }
0099     inline const double ScaleMin()   const { return p_generator->MinKT2(); }
0100     inline const double ScaleMax()   const { return p_generator->Smin(); }
0101     inline const double Smin()       const { return p_generator->Smin(); }
0102     inline const double B()          const { return p_generator->B(); }
0103     inline bool   IsLastRescatter()  const { return p_generator->IsLastRescatter(); }
0104     inline bool   IsMinBias()        const { return p_generator->IsMinBias(); }
0105     inline double LadderTMax()       const { return p_generator->TMax(); }  
0106     inline int    NLadders()         const { return p_generator->NLadders(); }  
0107     inline Cluster_Algorithm * GetClusterAlgorithm() { return &m_cluster; }
0108   };
0109 }
0110 #endif