Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef EXTAMP_RS_Process_H
0002 #define EXTAMP_RS_Process_H
0003 
0004 #include "EXTAMP/Process.H"
0005 
0006 namespace PHASIC {
0007   class Tree_ME2_Base;
0008 }
0009 
0010 namespace ATOOLS {
0011   class NLO_subevtlist;
0012 }
0013 
0014 namespace EXTAMP {
0015 
0016   class CS_Dipole;
0017   class Dipole_Wrapper_Process;
0018 
0019   class RS_Process : public Process {
0020 
0021     friend class Dipole_Wrapper_Process;
0022 
0023     typedef std::vector<CS_Dipole*>              Dipole_Vector;
0024     typedef std::vector<Dipole_Wrapper_Process*> Dipole_Wrappers;
0025 
0026   public:
0027 
0028     RS_Process(const PHASIC::Process_Info& pi);
0029     
0030     ~RS_Process();
0031 
0032     double Partonic(const ATOOLS::Vec4D_Vector&,
0033                     ATOOLS::Variations_Mode varmode,
0034                     int mode);
0035 
0036     /* Inherited virtual from PHASIC::Process_Base. Returns NULL by
0037        default and needs to be overwritten in such a way as to return
0038        a list to ATOOLS::NLO_subevts representing the differential
0039        dipole terms */
0040     ATOOLS::NLO_subevtlist *GetSubevtList() { return &m_subevents; }
0041     ATOOLS::NLO_subevtlist *GetRSSubevtList() { return &m_subevents; }
0042 
0043     /* Inherited virtual from PHASIC::Process_Base. Need to overwrite
0044        this to generically return true because real emission term and
0045        subtraction terms have to be triggered separately. This is done
0046        in RS::Process::Partonic. */
0047     bool Trigger(const ATOOLS::Vec4D_Vector &p) { return true; }
0048 
0049     /* Overloaded from PHASIC::Process_Base such that dipole dummy
0050        processes are initialized as well */
0051     void Init(const PHASIC::Process_Info &pi,
0052           BEAM::Beam_Spectra_Handler *const beamhandler,
0053           PDF::ISR_Handler *const isrhandler,
0054           YFS::YFS_Handler *const yfshandler, const int mode=0);
0055 
0056     /* Overload the following methods of PHASIC::Process_Base in such
0057        a way as to forward calls to dipole wrappers as well. */
0058     void SetScale(const PHASIC::Scale_Setter_Arguments &args);
0059     void SetKFactor(const PHASIC::KFactor_Setter_Arguments &args);
0060     void SetSelector(const PHASIC::Selector_Key &key);
0061     void SetNLOMC(PDF::NLOMC_Base* const nlomc);
0062     void SetShower(PDF::Shower_Base *const ps);
0063     void SetGenerator(PHASIC::ME_Generator_Base *const gen);
0064     void FillProcessMap(PHASIC::NLOTypeStringProcessMap_Map *apmap);
0065     size_t SetMCMode(const size_t mcmode);
0066 
0067   private:
0068 
0069     PHASIC::Tree_ME2_Base* p_real_me;
0070 
0071     /* Construct a complete vector of CS dipoles. m_dipoles holds
0072        pointers instead of objects because EXTAMP::Dipole is
0073        abstract */
0074     Dipole_Vector ConstructDipoles();
0075     Dipole_Vector m_dipoles;
0076 
0077     /* Legacy structure: Sherpa needs a representation of dipoles in
0078        terms of PHASIC::Single_Processes in the MC@NLO
0079        implementation. */
0080     Dipole_Wrappers ConstructDipoleWrappers(const Dipole_Vector& dv) const;
0081     Dipole_Wrappers m_dipole_wrappers;
0082     void DeleteDipoleWrappers();
0083 
0084     /* Legacy structure: Sherpa needs a representation of dipoles in
0085        terms of ATOOLS::NLO_subevents. Since this is a vector of
0086        stupid raw pointers, need some memory management here as
0087        well. */
0088     ATOOLS::NLO_subevtlist ConstructSubevents(size_t n_dipoles) const;
0089     ATOOLS::NLO_subevtlist m_subevents;
0090     void DeleteSubevents();
0091 
0092     /* Kinematics of dipole terms and update the kinematics of
0093        NLO_subevents accordingly, thus making the momenta available
0094        for e.g. the scale setter */
0095     void CalculateKinematics(const ATOOLS::Vec4D_Vector& p);
0096 
0097     /* Check if any of the dipole misses the minimum alpha
0098        criterion */
0099     bool PassesAlphaMin(const Dipole_Vector& dv) const;
0100 
0101     /* If alpha_min cut is not passed, use this method to set all
0102        subevents to zero */
0103     void SetSubEventsToZero(ATOOLS::NLO_subevtlist subevents) const;
0104 
0105     /* Populate running coupling multimap of Coupling_Data's (one for
0106        each NLO_subevent) */
0107     void ConstructRunningCouplings(MODEL::Coupling_Map& cpls,
0108                    const ATOOLS::NLO_subevtlist& evts,
0109                    const Dipole_Vector& dipoles) const;
0110 
0111     static void SmearSubEvents(const Dipole_Vector& dipoles,
0112                    ATOOLS::NLO_subevtlist& subs,
0113                    const double& alpha_0,
0114                    const double& power);
0115     double m_alpha_0, m_smear_power;
0116 
0117   };
0118 
0119 }
0120 
0121 #endif