StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ShowerModel.h
1 // ShowerModel.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2020 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() {}
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);
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() { return true; }
100 
101 };
102 
103 } // end namespace Pythia8
104 
105 #endif // Pythia8_ShowerModel_H