PYTHIA  8.312
DireSplittingLibrary.h
1 // DireSplittingLibrary.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2024 Stefan Prestel, 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 Dire splitting library.
7 
8 #ifndef Pythia8_DireSplittingLibrary_H
9 #define Pythia8_DireSplittingLibrary_H
10 
11 #define DIRE_SPLITTINGLIBRARY_VERSION "2.002"
12 
13 #include "Pythia8/Basics.h"
14 #include "Pythia8/BeamParticle.h"
15 #include "Pythia8/ParticleData.h"
16 #include "Pythia8/PythiaStdlib.h"
17 #include "Pythia8/Settings.h"
18 #include "Pythia8/StandardModel.h"
19 
20 #include "Pythia8/DireSplittings.h"
21 #include "Pythia8/DireSplittingsQCD.h"
22 #include "Pythia8/DireSplittingsQED.h"
23 #include "Pythia8/DireSplittingsEW.h"
24 #include "Pythia8/DireSplittingsU1new.h"
25 #include "Pythia8/DireBasics.h"
26 #include "Pythia8/DireHooks.h"
27 
28 namespace Pythia8 {
29 
30 class DireSpace;
31 class DireTimes;
32 
33 //==========================================================================
34 
36 
37 public:
38 
39  // Constructor and destructor.
40  DireSplittingLibrary() : infoPtr(0), settingsPtr(0), particleDataPtr(0),
41  rndmPtr(0), beamAPtr(0), beamBPtr(0), coupSMPtr(0), hooksPtr(0),
42  hasExternalHook(false) {}
44 
45  // Initialisation.
46  void init(Info* infoPtr, BeamParticle* beamA, BeamParticle* beamB,
47  DireInfo* direInfo, DireHooks* hooks = NULL);
48  void initFSR();
49  void initISR();
50  void clear();
51 
52  void setTimesPtr (shared_ptr<DireTimes> fsrIn) {
53  for (unordered_map<string,DireSplitting*>::iterator
54  it = splittings.begin(); it != splittings.end(); ++it )
55  it->second->setTimesPtr(fsrIn);
56  }
57  void setTimesDecPtr (shared_ptr<DireTimes> fsrIn) {
58  for (unordered_map<string,DireSplitting*>::iterator
59  it = splittings.begin(); it != splittings.end(); ++it )
60  it->second->setTimesDecPtr(fsrIn);
61  }
62  void setSpacePtr (shared_ptr<DireSpace> isrIn) {
63  for (unordered_map<string,DireSplitting*>::iterator
64  it = splittings.begin(); it != splittings.end(); ++it )
65  it->second->setSpacePtr(isrIn);
66  }
67 
68  unordered_map< string, DireSplitting* > getSplittings() { return splittings;}
69 
70  // Overload index operator to access element of splitting vector.
71  DireSplitting* operator[](string id);
72  const DireSplitting* operator[](string id) const;
73 
74  // Generate name for a splitting
75  vector<int> getSplittingRadBefID(const Event& event, int rad, int emt);
76  vector<int> getSplittingRadBefID_new(const Event& event, int rad, int emt);
77 
78  // Generate name for a splitting
79  vector<string> getSplittingName(const Event& event, int rad, int emt);
80  vector<string> getSplittingName_new(const Event& event, int rad, int emt);
81 
82  // Check number of particles produced in splitting.
83  int nEmissions(string name);
84 
85  void setKernelHooks(DireHooks* hooks) {hooksPtr = hooks;}
86 
87  // Some string name hashes, to avoid string conparisons.
89  fsrQCD_1_to_21_and_1,
90  fsrQCD_21_to_21_and_21a,
91  fsrQCD_21_to_21_and_21b,
92  fsrQCD_21_to_1_and_1a,
93  fsrQCD_21_to_1_and_1b,
94  fsrQCD_1_to_2_and_1_and_2,
95  fsrQCD_1_to_1_and_1_and_1,
96  fsrQCD_1_to_1_and_21_notPartial,
97  fsrQCD_21_to_21_and_21_notPartial,
98  fsrQCD_21_to_1_and_1_notPartial,
99  fsrQCD_1_to_1_and_21_and_21,
100  fsrQCD_1_to_1_and_1_and_1a,
101  fsrQCD_1_to_1_and_1_and_1b,
102  fsrQCD_1_to_1_and_2_and_2a,
103  fsrQCD_1_to_1_and_2_and_2b,
104  fsrQCD_1_to_1_and_3_and_3a,
105  fsrQCD_1_to_1_and_3_and_3b,
106  fsrQCD_1_to_1_and_4_and_4a,
107  fsrQCD_1_to_1_and_4_and_4b,
108  fsrQCD_1_to_1_and_5_and_5a,
109  fsrQCD_1_to_1_and_5_and_5b,
110  fsrQCD_21_to_21_and_21_and_21,
111  fsrQCD_21_to_21_and_1_and_1a,
112  fsrQCD_21_to_21_and_1_and_1b,
113  fsrQCD_21_to_21_and_2_and_2a,
114  fsrQCD_21_to_21_and_2_and_2b,
115  fsrQCD_21_to_21_and_3_and_3a,
116  fsrQCD_21_to_21_and_3_and_3b,
117  fsrQCD_21_to_21_and_4_and_4a,
118  fsrQCD_21_to_21_and_4_and_4b,
119  fsrQCD_21_to_21_and_5_and_5a,
120  fsrQCD_21_to_21_and_5_and_5b,
121  isrQCD_1_to_1_and_21,
122  isrQCD_21_to_1_and_1,
123  isrQCD_21_to_21_and_21a,
124  isrQCD_21_to_21_and_21b,
125  isrQCD_1_to_21_and_1,
126  isrQCD_1_to_2_and_1_and_2,
127  isrQCD_1_to_1_and_1_and_1;
128 
129  // Some string name hashes, to avoid string conparisons.
131  fsrQED_1_to_22_and_1,
132  fsrQED_11_to_11_and_22,
133  fsrQED_11_to_22_and_11,
134  fsrQED_22_to_1_and_1a,
135  fsrQED_22_to_1_and_1b,
136  fsrQED_22_to_2_and_2a,
137  fsrQED_22_to_2_and_2b,
138  fsrQED_22_to_3_and_3a,
139  fsrQED_22_to_3_and_3b,
140  fsrQED_22_to_4_and_4a,
141  fsrQED_22_to_4_and_4b,
142  fsrQED_22_to_5_and_5a,
143  fsrQED_22_to_5_and_5b,
144  fsrQED_22_to_11_and_11a,
145  fsrQED_22_to_11_and_11b,
146  fsrQED_22_to_13_and_13a,
147  fsrQED_22_to_13_and_13b,
148  fsrQED_22_to_15_and_15a,
149  fsrQED_22_to_15_and_15b,
150  fsrQED_1_to_1_and_22_notPartial,
151  fsrQED_11_to_11_and_22_notPartial,
152  isrQED_1_to_1_and_22,
153  isrQED_11_to_11_and_22,
154  isrQED_1_to_22_and_1,
155  isrQED_11_to_22_and_11,
156  isrQED_22_to_1_and_1,
157  isrQED_22_to_11_and_11;
158 
159  ulong fsrEWK_1_to_1_and_23,
160  fsrEWK_1_to_23_and_1,
161  fsrEWK_23_to_1_and_1a,
162  fsrEWK_23_to_1_and_1b,
163  fsrEWK_24_to_1_and_1a,
164  fsrEWK_24_to_1_and_1b,
165  fsrEWK_25_to_24_and_24,
166  fsrEWK_25_to_22_and_22,
167  fsrEWK_25_to_21_and_21,
168  fsrEWK_24_to_24_and_22,
169  isrEWK_1_to_1_and_23;
170 
171  ulong fsrU1N_1_to_1_and_22,
172  fsrU1N_1_to_22_and_1,
173  fsrU1N_11_to_11_and_22,
174  fsrU1N_11_to_22_and_11,
175  fsrU1N_22_to_1_and_1a,
176  fsrU1N_22_to_1_and_1b,
177  fsrU1N_22_to_2_and_2a,
178  fsrU1N_22_to_2_and_2b,
179  fsrU1N_22_to_3_and_3a,
180  fsrU1N_22_to_3_and_3b,
181  fsrU1N_22_to_4_and_4a,
182  fsrU1N_22_to_4_and_4b,
183  fsrU1N_22_to_5_and_5a,
184  fsrU1N_22_to_5_and_5b,
185  fsrU1N_22_to_11_and_11a,
186  fsrU1N_22_to_11_and_11b,
187  fsrU1N_22_to_13_and_13a,
188  fsrU1N_22_to_13_and_13b,
189  fsrU1N_22_to_15_and_15a,
190  fsrU1N_22_to_15_and_15b,
191  fsrU1N_22_to_211_and_211a,
192  fsrU1N_22_to_211_and_211b,
193  isrU1N_1_to_1_and_22,
194  isrU1N_1_to_22_and_1,
195  isrU1N_22_to_1_and_1,
196  isrU1N_11_to_11_and_22,
197  isrU1N_11_to_22_and_11,
198  isrU1N_22_to_11_and_11;
199 
200 private:
201 
202  unordered_map< string, DireSplitting* > splittings;
203  Info* infoPtr;
204  Settings* settingsPtr;
205  ParticleData* particleDataPtr;
206  Rndm* rndmPtr;
207  BeamParticle* beamAPtr;
208  BeamParticle* beamBPtr;
209  CoupSM* coupSMPtr;
210  DireInfo* direInfoPtr;
211 
212  // User may load additional kernels.
213  DireHooks* hooksPtr;
214  bool hasExternalHook;
215 
216 };
217 
218 //==========================================================================
219 
220 } // end namespace Pythia8
221 
222 #endif // Pythia8_DireSplittingLibrary_H
void init(Info *infoPtr, BeamParticle *beamA, BeamParticle *beamB, DireInfo *direInfo, DireHooks *hooks=NULL)
Initialisation.
Definition: DireSplittingLibrary.cc:30
Definition: Info.h:45
void clear()
class SplittingLibrary
Definition: DireSplittingLibrary.cc:20
The Event class holds all info on the generated event.
Definition: Event.h:453
Definition: BeamParticle.h:133
ulong fsrQED_1_to_1_and_22
Some string name hashes, to avoid string conparisons.
Definition: DireSplittingLibrary.h:130
ulong fsrQCD_1_to_1_and_21
Some string name hashes, to avoid string conparisons.
Definition: DireSplittingLibrary.h:88
vector< int > getSplittingRadBefID(const Event &event, int rad, int emt)
Generate name for a splitting.
Definition: DireSplittingLibrary.cc:614
Definition: DireBasics.h:374
DireSplitting * operator[](string id)
Overload index operator to access element of splitting vector.
Definition: DireSplittingLibrary.cc:600
Definition: Basics.h:386
Definition: DireSplittings.h:53
int nEmissions(string name)
Check number of particles produced in splitting.
Definition: DireSplittingLibrary.cc:688
Definition: StandardModel.h:135
DireSplittingLibrary()
Constructor and destructor.
Definition: DireSplittingLibrary.h:40
void initISR()
Definition: DireSplittingLibrary.cc:516
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
Hooks is base class for user access to program execution.
Definition: DireHooks.h:20
vector< string > getSplittingName_new(const Event &event, int rad, int emt)
Generate name for a splitting.
Definition: DireSplittingLibrary.cc:638
void initFSR()
Definition: DireSplittingLibrary.cc:173
Definition: DireSplittingLibrary.h:35
vector< string > getSplittingName(const Event &event, int rad, int emt)
Generate name for a splitting.
Definition: DireSplittingLibrary.cc:681
This class holds a map of all ParticleDataEntries.
Definition: ParticleData.h:422
Definition: Settings.h:195