Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef AMISIC_Main_Amisic_H
0002 #define AMISIC_Main_Amisic_H
0003 
0004 #include "AMISIC++/Perturbative/Single_Collision_Handler.H"
0005 #include "AMISIC++/Tools/Over_Estimator.H"
0006 #include "AMISIC++/Tools/Impact_Parameter.H"
0007 #include "AMISIC++/Tools/Hadronic_XSec_Calculator.H"
0008 #include "AMISIC++/Tools/MI_Parameters.H"
0009 #include "BEAM/Main/Beam_Spectra_Handler.H"
0010 #include "PDF/Main/ISR_Handler.H"
0011 #include "YFS/Main/YFS_Handler.H"
0012 #include "ATOOLS/Phys/Blob_List.H"
0013 #include "ATOOLS/Org/File_IO_Base.H"
0014 #include "ATOOLS/Math/Histogram.H"
0015 #include <map>
0016 #include <string>
0017 
0018 /*!
0019   \file Amisic.H
0020   \brief Declares the class Amisic
0021 */
0022 
0023 namespace ATOOLS {
0024   class Cluster_Amplitude;
0025   class MI_Processes;
0026 }
0027 
0028 namespace AMISIC {
0029   /*!
0030     \namespace AMISIC
0031     \brief The module for the generation of a perturbative underlying
0032     event according to the Sjostrand-van der Zijl model.
0033 
0034     AMISIC++ is an accronym for <em>A</em> <em>M</em>ultiple
0035     <em>I</em>nteraction <em>S</em>imulation <em>I</em>n
0036     <em>C++</em>.
0037 
0038     The AMISIC namespace contains the module for the generation of a
0039     perturbative underlying event according to the Sjostrand-van der Zijl
0040     model.  The original model is based on perturbative QCD 2->2 scatters
0041     modified through a simple IR regularisation and convoluted with regular
0042     PDFs and and a matter-overlap function between the incident hadronic
0043     states which gives rise to an interaction probability.
0044 
0045     In SHERPA we added/plan to add other 2->2 scatters, for example for photon
0046     and quarkonia production.
0047   */
0048 
0049   class Amisic: public ATOOLS::File_IO_Base, ATOOLS::Mass_Selector {
0050   private:
0051     MI_Processes             * p_processes;
0052     Hadronic_XSec_Calculator * p_xsecs;
0053     Over_Estimator             m_overestimator;
0054     Impact_Parameter           m_impact;
0055     Single_Collision_Handler   m_singlecollision;
0056 
0057     mitype::code m_type;
0058     bool         m_variable_s;
0059     double       m_sigmaND_norm;
0060     double       m_b, m_bfac, m_S, m_Y, m_pt2;
0061 
0062     bool         m_isMinBias, m_isFirst, m_ana;
0063     size_t       m_nscatters;
0064     std::map<std::string,ATOOLS::Histogram *> m_histos;
0065 
0066     void InitParametersAndType(PDF::ISR_Handler *const isr);
0067     void UpdateForNewS();
0068     void CreateAmplitudeLegs(ATOOLS::Cluster_Amplitude * ampl,
0069                  ATOOLS::Blob * blob);
0070     void FillAmplitudeSettings(ATOOLS::Cluster_Amplitude * ampl);
0071     void InitAnalysis();
0072     void FinishAnalysis();
0073     void Analyse(const bool & last);
0074  public:
0075     Amisic();
0076     ~Amisic();
0077 
0078     bool Initialize(MODEL::Model_Base *const model,
0079             PDF::ISR_Handler *const isr,
0080             YFS::YFS_Handler *const yfs,
0081                     REMNANTS::Remnant_Handler * remnant_handler);
0082 
0083     bool InitMPIs(PDF::ISR_Handler *const isr, const double & scale);
0084     bool VetoEvent(const double & scale=-1.) const;
0085     int  InitMinBiasEvent();
0086     int  InitRescatterEvent();
0087     void SetB(const double & b=-1.);
0088 
0089     void Reset();
0090     void CleanUpMinBias();
0091     void Test();
0092     ATOOLS::Blob * GenerateScatter();
0093     ATOOLS::Cluster_Amplitude * ClusterConfiguration(ATOOLS::Blob * blob);
0094 
0095     void Update(const PDF::ISR_Handler *isr);
0096     inline void SetMaxEnergies(const double & E0,const double & E1) {
0097       m_singlecollision.SetResidualX(E0,E1);
0098     }
0099     inline void SetMaxScale(const double & scale) {
0100       m_pt2 = ATOOLS::sqr(scale);
0101       m_singlecollision.SetLastPT2(m_pt2);
0102     }
0103     inline void SetMassMode(const int & mode) {
0104       p_processes->SetMassMode(mode);
0105     }
0106     inline int ShiftMasses(ATOOLS::Cluster_Amplitude * ampl) {
0107         return p_processes->ShiftMasses(ampl);
0108     }
0109     inline void SetPosition(const size_t & beam,const ATOOLS::Vec4D & pos) {
0110       m_singlecollision.SetPosition(beam,pos);
0111     }
0112     inline void CalculateImpact() {
0113       m_b    = m_singlecollision.B();
0114       m_bfac = ATOOLS::Max(0.,m_impact(m_S, m_b));
0115     }
0116     inline ATOOLS::Vec4D SelectPositionForScatter(const double & b) const {
0117       return m_impact.SelectPositionForScatter(b);
0118     }
0119     inline ATOOLS::Vec4D  SelectRelativePositionForParton() const {
0120       return m_impact.SelectRelativePositionForParton();
0121     }
0122     inline const double ScaleMin()    const { return (*mipars)("pt_min"); }
0123     inline const double ScaleMax()    const { return sqrt(m_pt2); }
0124     inline const bool   & IsMinBias() const { return m_isMinBias; }
0125     inline const double & B()         const { return m_b; }
0126     inline double Mass(const ATOOLS::Flavour &fl) const {
0127       return p_processes->Mass(fl);
0128     }
0129     inline void CleanUp()                   { m_isFirst = true; }
0130   };
0131 
0132 }
0133 
0134 #endif