PYTHIA  8.312
ShowerModel.h
1 // ShowerModel.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2024 Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
4 // Please respect the MCnet Guidelines, see GUIDELINES for details.
5 
6 // Header file for the classes involved in the modelling of parton showers.
7 // A ShowerModel object is supposed to keep track of and give Pythia
8 // access to objects implementing space-like and time-like showers
9 // (also separately in resonance decays). Pointers related to the
10 // matrix-element merging may be overwritten in the derived classes.
11 // The SimpleShowerModel implements the default Pythia behavior
12 // with SimpleTimeShower and SimpleSpaceShower.
13 
14 #ifndef Pythia8_ShowerModel_H
15 #define Pythia8_ShowerModel_H
16 
17 #include "Pythia8/SharedPointers.h"
18 #include "Pythia8/PhysicsBase.h"
19 #include "Pythia8/FragmentationSystems.h"
20 
21 namespace Pythia8 {
22 
23 //==========================================================================
24 
25 // ShowerModel is the base class for handling parton-shower algorithms,
26 // including merging methods.
27 
28 class ShowerModel : public PhysicsBase {
29 
30 public:
31 
32  // Empty constructor.
33  ShowerModel() = default;
34 
35  // Empty virtual destructor
36  virtual ~ShowerModel() {}
37 
38  // Function called from Pythia after the basic pointers has been set.
39  // Derived classes should create objects of the specific model objects
40  // to be used. Pointers to merging and merging hooks may be overwritten
41  // in derived classes.
42  virtual bool init(MergingPtr mergPtrIn, MergingHooksPtr mergHooksPtrIn,
43  PartonVertexPtr partonVertexPtrIn,
44  WeightContainer* weightContainerPtrIn) = 0;
45 
46  // Function called from Pythia after the beam particles have been set up,
47  // so that showers may be initialized after the beams are initialized.
48  virtual bool initAfterBeams() = 0;
49 
50  // Access the pointers to the different model components.
51  virtual TimeShowerPtr getTimeShower() const { return timesPtr; }
52  virtual TimeShowerPtr getTimeDecShower() const { return timesDecPtr; }
53  virtual SpaceShowerPtr getSpaceShower() const { return spacePtr; }
54  virtual MergingPtr getMerging() const { return mergingPtr; }
55  virtual MergingHooksPtr getMergingHooks() const { return mergingHooksPtr; }
56 
57 protected:
58 
59  // The object responsible for generating time-like showers.
60  TimeShowerPtr timesPtr{};
61 
62  // The object responsible for generating time-like showers in decays.
63  TimeShowerPtr timesDecPtr{};
64 
65  // The object responsible for generating space-like showers.
66  SpaceShowerPtr spacePtr{};
67 
68  // The object responsible for merging with matrix elements.
69  MergingPtr mergingPtr{};
70 
71  // The object responsible for user modifications to the merging.
72  MergingHooksPtr mergingHooksPtr{};
73 
74 };
75 
76 //==========================================================================
77 
78 // The shower model class handling the default Pythia shower model
79 // with SimpleTimeShower and SimpleSpaceShower classes.
80 
82 
83 public:
84 
85  // Empty constructor.
86  SimpleShowerModel() = default;
87 
88  // Empty virtual destructor
89  virtual ~SimpleShowerModel() override {}
90 
91  // Function called from Pythia after the basic pointers has been set.
92  virtual bool init(MergingPtr mergPtrIn, MergingHooksPtr mergHooksPtrIn,
93  PartonVertexPtr partonVertexPtrIn,
94  WeightContainer* weightContainerPtrIn) override;
95 
96  // Function called from Pythia after the beam particles have been set up,
97  // so that showers may be initialized after the beams are initialized.
98  // Currently only dummy dunction.
99  virtual bool initAfterBeams() override { return true; }
100 
101 };
102 
103 //==========================================================================
104 
105 } // end namespace Pythia8
106 
107 #endif // Pythia8_ShowerModel_H
virtual ~SimpleShowerModel() override
Empty virtual destructor.
Definition: ShowerModel.h:89
TimeShowerPtr timesPtr
The object responsible for generating time-like showers.
Definition: ShowerModel.h:60
Definition: PhysicsBase.h:27
Definition: ShowerModel.h:81
virtual TimeShowerPtr getTimeShower() const
Access the pointers to the different model components.
Definition: ShowerModel.h:51
Definition: Weights.h:394
SpaceShowerPtr spacePtr
The object responsible for generating space-like showers.
Definition: ShowerModel.h:66
ShowerModel()=default
Empty constructor.
virtual bool init(MergingPtr mergPtrIn, MergingHooksPtr mergHooksPtrIn, PartonVertexPtr partonVertexPtrIn, WeightContainer *weightContainerPtrIn)=0
virtual bool initAfterBeams()=0
virtual ~ShowerModel()
Empty virtual destructor.
Definition: ShowerModel.h:36
MergingHooksPtr mergingHooksPtr
The object responsible for user modifications to the merging.
Definition: ShowerModel.h:72
virtual bool initAfterBeams() override
Definition: ShowerModel.h:99
TimeShowerPtr timesDecPtr
The object responsible for generating time-like showers in decays.
Definition: ShowerModel.h:63
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
MergingPtr mergingPtr
The object responsible for merging with matrix elements.
Definition: ShowerModel.h:69
Definition: ShowerModel.h:28