Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:06:29

0001 // ShowerModel.h is a part of the PYTHIA event generator.
0002 // Copyright (C) 2024 Torbjorn Sjostrand.
0003 // PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
0004 // Please respect the MCnet Guidelines, see GUIDELINES for details.
0005 
0006 // Header file for the classes involved in the modelling of parton showers.
0007 // A ShowerModel object is supposed to keep track of and give Pythia
0008 // access to objects implementing space-like and time-like showers
0009 // (also separately in resonance decays). Pointers related to the
0010 // matrix-element merging may be overwritten in the derived classes.
0011 // The SimpleShowerModel implements the default Pythia behavior
0012 // with SimpleTimeShower and SimpleSpaceShower.
0013 
0014 #ifndef Pythia8_ShowerModel_H
0015 #define Pythia8_ShowerModel_H
0016 
0017 #include "Pythia8/SharedPointers.h"
0018 #include "Pythia8/PhysicsBase.h"
0019 #include "Pythia8/FragmentationSystems.h"
0020 
0021 namespace Pythia8 {
0022 
0023 //==========================================================================
0024 
0025 // ShowerModel is the base class for handling parton-shower algorithms,
0026 // including merging methods.
0027 
0028 class ShowerModel : public PhysicsBase {
0029 
0030 public:
0031 
0032   // Empty constructor.
0033   ShowerModel() = default;
0034 
0035   // Empty virtual destructor
0036   virtual ~ShowerModel() {}
0037 
0038   // Function called from Pythia after the basic pointers has been set.
0039   // Derived classes should create objects of the specific model objects
0040   // to be used. Pointers to merging and merging hooks may be overwritten
0041   // in derived classes.
0042   virtual bool init(MergingPtr mergPtrIn, MergingHooksPtr mergHooksPtrIn,
0043     PartonVertexPtr partonVertexPtrIn,
0044     WeightContainer* weightContainerPtrIn) = 0;
0045 
0046   // Function called from Pythia after the beam particles have been set up,
0047   // so that showers may be initialized after the beams are initialized.
0048   virtual bool initAfterBeams() = 0;
0049 
0050   // Access the pointers to the different model components.
0051   virtual TimeShowerPtr   getTimeShower() const { return timesPtr; }
0052   virtual TimeShowerPtr   getTimeDecShower() const { return timesDecPtr; }
0053   virtual SpaceShowerPtr  getSpaceShower() const { return spacePtr; }
0054   virtual MergingPtr      getMerging() const { return mergingPtr; }
0055   virtual MergingHooksPtr getMergingHooks() const { return mergingHooksPtr; }
0056 
0057 protected:
0058 
0059   // The object responsible for generating time-like showers.
0060   TimeShowerPtr   timesPtr{};
0061 
0062   // The object responsible for generating time-like showers in decays.
0063   TimeShowerPtr   timesDecPtr{};
0064 
0065   // The object responsible for generating space-like showers.
0066   SpaceShowerPtr  spacePtr{};
0067 
0068   // The object responsible for merging with matrix elements.
0069   MergingPtr      mergingPtr{};
0070 
0071   // The object responsible for user modifications to the merging.
0072   MergingHooksPtr mergingHooksPtr{};
0073 
0074 };
0075 
0076 //==========================================================================
0077 
0078 // The shower model class handling the default Pythia shower model
0079 // with SimpleTimeShower and SimpleSpaceShower classes.
0080 
0081 class SimpleShowerModel : public ShowerModel {
0082 
0083 public:
0084 
0085   // Empty constructor.
0086   SimpleShowerModel() = default;
0087 
0088   // Empty virtual destructor
0089   virtual ~SimpleShowerModel() override {}
0090 
0091   // Function called from Pythia after the basic pointers has been set.
0092   virtual bool init(MergingPtr mergPtrIn, MergingHooksPtr mergHooksPtrIn,
0093                     PartonVertexPtr partonVertexPtrIn,
0094                     WeightContainer* weightContainerPtrIn) override;
0095 
0096   // Function called from Pythia after the beam particles have been set up,
0097   // so that showers may be initialized after the beams are initialized.
0098   // Currently only dummy dunction.
0099   virtual bool initAfterBeams() override { return true; }
0100 
0101 };
0102 
0103 //==========================================================================
0104 
0105 } // end namespace Pythia8
0106 
0107 #endif // Pythia8_ShowerModel_H