PYTHIA  8.312
SigmaOnia.h
1 // SigmaOnia.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 charmonia/bottomonia process differential cross sections.
7 // Contains classes derived from SigmaProcess via Sigma2Process.
8 
9 #ifndef Pythia8_SigmaOnia_H
10 #define Pythia8_SigmaOnia_H
11 
12 #include "Pythia8/SigmaProcess.h"
13 
14 namespace Pythia8 {
15 
16 //==========================================================================
17 
18 // A helper class used to check onia settings. Used for the parton shower
19 // and hard process.
20 
21 class OniaSetup {
22 
23 protected:
24 
25  // Constructors.
26  OniaSetup() = default;
27  OniaSetup(Info* infoPtrIn, int flavourIn, string pre = "");
28 
29  // Intialise and check settings.
30  void initStates(string wave, const vector<int> &states,
31  vector<int> &jnums, bool &valid, bool duplicate = true);
32  void initSettings(string wave, unsigned int size,
33  const vector<string> &names, vector< vector<double> > &pvecs, bool &valid);
34  void initSettings(string wave, unsigned int size,
35  const vector<string> &names, vector< vector<bool> > &fvecs, bool &valid);
36 
37  // Stored pointers.
38  Info* infoPtr = {};
39  Logger* loggerPtr = {};
40  Settings* settingsPtr = {};
41  ParticleData* particleDataPtr = {};
42 
43  // Stored vectors of settings.
44  vector<int> states3S1, states3PJ, spins3S1, spins3PJ;
45  vector<string> meNames3S1, meNames3PJ;
46  vector< vector<double> > mes3S1, mes3PJ;
47 
48  // Stored validity and production flags.
49  bool onia{}, onia3S1{}, onia3PJ{}, oniaFlavour{},
50  valid3S1{true}, valid3PJ{true};
51  int flavour{};
52  string cat, key;
53 
54  // Stored parameters.
55  double mSplit{};
56 
57 };
58 
59 //==========================================================================
60 
61 // A helper class used to setup the onia processes.
62 
63 class SigmaOniaSetup : public OniaSetup {
64 
65 public:
66 
67  // Constructors.
68  SigmaOniaSetup() = default;
69  SigmaOniaSetup(Info* infoPtrIn, int flavourIn);
70 
71  // Initialise the SigmaProcesses for gg, qg, qqbar.
72  void setupSigma2gg(vector<SigmaProcessPtr> &procs, bool oniaIn = false);
73  void setupSigma2qg(vector<SigmaProcessPtr> &procs, bool oniaIn = false);
74  void setupSigma2qq(vector<SigmaProcessPtr> &procs, bool oniaIn = false);
75 
76 private:
77 
78  // Additional stored validity and production flags.
79  bool onia3DJ{true}, valid3DJ{true}, validDbl3S1{true};
80 
81  // Stored vectors of settings.
82  vector<int> states3DJ, spins3DJ, states1Dbl3S1, states2Dbl3S1, spins1Dbl3S1,
83  spins2Dbl3S1;
84  vector<string> meNames3DJ, meNamesDbl3S1;
85  vector< vector<double> > mes3DJ, mesDbl3S1;
86  vector<string> ggNames3S1, qgNames3S1, qqNames3S1,
87  ggNames3PJ, qgNames3PJ, qqNames3PJ, ggNames3DJ, qgNames3DJ, qqNames3DJ,
88  dblNames3S1;
89  vector< vector<bool> > ggs3S1, qgs3S1, qqs3S1, ggs3PJ, qgs3PJ, qqs3PJ,
90  ggs3DJ, qgs3DJ, qqs3DJ, dbls3S1;
91 
92 };
93 
94 //==========================================================================
95 
96 // A derived class for g g -> QQbar[3S1(1)] g (Q = c or b).
97 
99 
100 public:
101 
102  // Constructor.
103  Sigma2gg2QQbar3S11g(int idHadIn, double oniumMEIn, int codeIn) :
104  idHad(abs(idHadIn)), codeSave(codeIn), oniumME(oniumMEIn), sigma() {}
105 
106  // Initialize process.
107  virtual void initProc();
108 
109  // Calculate flavour-independent parts of cross section.
110  virtual void sigmaKin();
111 
112  // Evaluate d(sigmaHat)/d(tHat).
113  virtual double sigmaHat() {return sigma;}
114 
115  // Select flavour, colour and anticolour.
116  virtual void setIdColAcol();
117 
118  // Info on the subprocess.
119  virtual string name() const {return nameSave;}
120  virtual int code() const {return codeSave;}
121  virtual string inFlux() const {return "gg";}
122  virtual int id3Mass() const {return idHad;}
123 
124  private:
125 
126  // Values stored for process type and colour flow selection.
127  int idHad, codeSave;
128  string nameSave;
129  double oniumME, sigma;
130 
131 };
132 
133 //==========================================================================
134 
135 // A derived class for g g -> QQbar[3S1(1)] gamma (Q = c or b).
136 
138 
139 public:
140 
141  // Constructor.
142  Sigma2gg2QQbar3S11gm(int idHadIn, double oniumMEIn, int codeIn) :
143  idHad(abs(idHadIn)), codeSave(codeIn), qEM2(), oniumME(oniumMEIn),
144  sigma() {}
145 
146  // Initialize process.
147  virtual void initProc();
148 
149  // Calculate flavour-independent parts of cross section.
150  virtual void sigmaKin();
151 
152  // Evaluate d(sigmaHat)/d(tHat).
153  virtual double sigmaHat() {return sigma;}
154 
155  // Select flavour, colour and anticolour.
156  virtual void setIdColAcol();
157 
158  // Info on the subprocess.
159  virtual string name() const {return nameSave;}
160  virtual int code() const {return codeSave;}
161  virtual string inFlux() const {return "gg";}
162  virtual int id3Mass() const {return idHad;}
163 
164  private:
165 
166  // Values stored for process type and colour flow selection.
167  int idHad, codeSave;
168  string nameSave;
169  double qEM2, oniumME, sigma;
170 
171 };
172 
173 //==========================================================================
174 
175 // A derived class for g g -> QQbar[3PJ(1)] g (Q = c or b, J = 0, 1 or 2).
176 
178 
179 public:
180 
181  // Constructor.
182  Sigma2gg2QQbar3PJ1g(int idHadIn, double oniumMEIn, int jIn, int codeIn) :
183  idHad(idHadIn), jSave(jIn), codeSave(codeIn), oniumME(oniumMEIn), sigma()
184  {}
185 
186  // Initialize process.
187  virtual void initProc();
188 
189  // Calculate flavour-independent parts of cross section.
190  virtual void sigmaKin();
191 
192  // Evaluate d(sigmaHat)/d(tHat).
193  virtual double sigmaHat() {return sigma;}
194 
195  // Select flavour, colour and anticolour.
196  virtual void setIdColAcol();
197 
198  // Info on the subprocess.
199  virtual string name() const {return nameSave;}
200  virtual int code() const {return codeSave;}
201  virtual string inFlux() const {return "gg";}
202  virtual int id3Mass() const {return idHad;}
203 
204 protected:
205 
206  // Name pre-, post-, and mid-fix.
207  virtual string namePrefix() const {return "g g";}
208  virtual string namePostfix() const {return "g";}
209  string nameMidfix() const {return (codeSave - codeSave%100)/100
210  == 4 ? "ccbar" : "bbbar";}
211 
212  // Values stored for process type and colour flow selection.
213  int idHad, jSave, codeSave;
214  string nameSave;
215  double oniumME, sigma;
216 
217 };
218 
219 //==========================================================================
220 
221 // A derived class for q g -> QQbar[3PJ(1)] q (Q = c or b, J = 0, 1 or 2).
222 
224 
225 public:
226 
227  // Constructor.
228  Sigma2qg2QQbar3PJ1q(int idHadIn, double oniumMEIn, int jIn, int codeIn) :
229  Sigma2gg2QQbar3PJ1g(idHadIn, oniumMEIn, jIn, codeIn) {}
230 
231  // Calculate flavour-independent parts of cross section.
232  virtual void sigmaKin();
233 
234  // Select flavour, colour and anticolour.
235  virtual void setIdColAcol();
236 
237  // Info on the subprocess.
238  virtual string inFlux() const {return "qg";}
239 
240 protected:
241 
242  // Name pre- and post-fix.
243  string namePrefix() const {return "q g";}
244  string namePostfix() const {return "q";}
245 
246 };
247 
248 //==========================================================================
249 
250 // A derived class for q qbar -> QQbar[3PJ(1)] g (Q = c or b, J = 0, 1 or 2).
251 
253 
254 public:
255 
256  // Constructor.
257  Sigma2qqbar2QQbar3PJ1g(int idHadIn, double oniumMEIn, int jIn, int codeIn) :
258  Sigma2gg2QQbar3PJ1g(idHadIn, oniumMEIn, jIn, codeIn) {}
259 
260  // Calculate flavour-independent parts of cross section.
261  virtual void sigmaKin();
262 
263  // Select flavour, colour and anticolour.
264  virtual void setIdColAcol();
265 
266  // Info on the subprocess.
267  virtual string inFlux() const {return "qqbarSame";}
268 
269 protected:
270 
271  // Name pre- and post-fix.
272  string namePrefix() const {return "q qbar";}
273  string namePostfix() const {return "g";}
274 
275 };
276 
277 //==========================================================================
278 
279 // A derived class for g g -> QQbar[3DJ(1)] g (Q = c or b).
280 
282 
283 public:
284 
285  // Constructor.
286  Sigma2gg2QQbar3DJ1g(int idHadIn, double oniumMEIn, int jIn, int codeIn) :
287  Sigma2gg2QQbar3PJ1g(idHadIn, oniumMEIn, jIn, codeIn) {}
288 
289  // Initialize process.
290  virtual void initProc();
291 
292  // Calculate flavour-independent parts of cross section.
293  virtual void sigmaKin();
294 
295 };
296 
297 //==========================================================================
298 
299 // A derived class for g g -> QQbar[X(8)] g (Q = c or b, X = 3S1, 1S0 or 3PJ).
300 
302 
303 public:
304 
305  // Constructor.
306  Sigma2gg2QQbarX8g(int idHadIn, double oniumMEIn, int stateIn,
307  double mSplitIn, int codeIn) : idHad(idHadIn), stateSave(stateIn),
308  codeSave(codeIn), oniumME(oniumMEIn), sigma(), mSplit(mSplitIn) {}
309 
310  // Initialize process.
311  virtual void initProc();
312 
313  // Calculate flavour-independent parts of cross section.
314  virtual void sigmaKin();
315 
316  // Evaluate d(sigmaHat)/d(tHat).
317  virtual double sigmaHat() {return sigma;}
318 
319  // Select flavour, colour and anticolour.
320  virtual void setIdColAcol();
321 
322  // Info on the subprocess.
323  virtual string name() const {return nameSave;}
324  virtual int code() const {return codeSave;}
325  virtual string inFlux() const {return "gg";}
326  virtual int id3Mass() const {return idHad;}
327 
328 protected:
329 
330  // Name pre- and post-fix.
331  virtual string namePrefix() const {return "g g";}
332  virtual string namePostfix() const {return "g";}
333 
334  // Values stored for process type and colour flow selection.
335  int idHad, stateSave, codeSave;
336  string nameSave;
337  double oniumME, sigma, mSplit;
338 
339 };
340 
341 //==========================================================================
342 
343 // A derived class for q g -> QQbar[X(8)] q (Q = c or b, X = 3S1, 1S0 or 3PJ).
344 
346 
347 public:
348 
349  // Constructor.
350  Sigma2qg2QQbarX8q(int idHadIn, double oniumMEIn, int stateIn,
351  double mSplitIn, int codeIn) :
352  Sigma2gg2QQbarX8g(idHadIn, oniumMEIn, stateIn, mSplitIn, codeIn) {}
353 
354  // Calculate flavour-independent parts of cross section.
355  virtual void sigmaKin();
356 
357  // Select flavour, colour and anticolour.
358  virtual void setIdColAcol();
359 
360  // Info on the subprocess.
361  virtual string inFlux() const {return "qg";}
362 
363 protected:
364 
365  // Name pre- and post-fix.
366  virtual string namePrefix() const {return "q g";}
367  virtual string namePostfix() const {return "q";}
368 
369 };
370 
371 //==========================================================================
372 
373 // A derived class for q qbar -> QQbar[X(8)] g (Q = c or b,
374 // X = 3S1, 1S0 or 3PJ).
375 
377 
378 public:
379 
380  // Constructor.
381  Sigma2qqbar2QQbarX8g(int idHadIn, double oniumMEIn, int stateIn,
382  double mSplitIn, int codeIn) :
383  Sigma2gg2QQbarX8g(idHadIn, oniumMEIn, stateIn, mSplitIn, codeIn) {}
384 
385  // Calculate flavour-independent parts of cross section.
386  virtual void sigmaKin();
387 
388  // Select flavour, colour and anticolour.
389  virtual void setIdColAcol();
390 
391  // Info on the subprocess.
392  virtual string inFlux() const {return "qqbarSame";}
393 
394 protected:
395 
396  // Name pre- and post-fix.
397  virtual string namePrefix() const {return "q qbar";}
398  virtual string namePostfix() const {return "g";}
399 
400 };
401 
402 //==========================================================================
403 
404 // A derived class for g g -> QQbar[3S1(1)] QQbar[3S1(1)] (Q = c or b).
405 
407 
408 public:
409 
410  // Constructor.
411  Sigma2gg2QQbar3S11QQbar3S11(int idHad1In, int idHad2In,
412  double oniumME1In, double oniumME2In, int codeIn) :
413  idHad1(abs(idHad1In)), idHad2(abs(idHad2In)), codeSave(codeIn),
414  oniumME1(oniumME1In), oniumME2(oniumME2In), sigma() {}
415 
416  // Initialize process.
417  virtual void initProc();
418 
419  // Calculate flavour-independent parts of cross section.
420  virtual void sigmaKin();
421 
422  // Evaluate d(sigmaHat)/d(tHat).
423  virtual double sigmaHat() {return sigma;}
424 
425  // Select flavour, colour and anticolour.
426  virtual void setIdColAcol();
427 
428  // Info on the subprocess.
429  virtual string name() const {return nameSave;}
430  virtual int code() const {return codeSave;}
431  virtual string inFlux() const {return "gg";}
432  virtual int id3Mass() const {return idHad1;}
433  virtual int id4Mass() const {return idHad2;}
434 
435  private:
436 
437  // Values stored for process type and colour flow selection.
438  int idHad1, idHad2, codeSave;
439  string nameSave;
440  double oniumME1, oniumME2, sigma;
441  vector<double> m2V;
442 
443 };
444 
445 //==========================================================================
446 
447 // A derived class for q qbar -> QQbar[3S1(1)] QQbar[3S1(1)] (Q = c or b).
448 
450 
451 public:
452 
453  // Constructor.
454  Sigma2qqbar2QQbar3S11QQbar3S11(int idHad1In, int idHad2In,
455  double oniumME1In, double oniumME2In, int codeIn) :
456  idHad1(abs(idHad1In)), idHad2(abs(idHad2In)), codeSave(codeIn), m2(),
457  oniumME1(oniumME1In), oniumME2(oniumME2In), sigma() {}
458 
459  // Initialize process.
460  virtual void initProc();
461 
462  // Calculate flavour-independent parts of cross section.
463  virtual void sigmaKin();
464 
465  // Evaluate d(sigmaHat)/d(tHat).
466  virtual double sigmaHat() {return sigma;}
467 
468  // Select flavour, colour and anticolour.
469  virtual void setIdColAcol();
470 
471  // Info on the subprocess.
472  virtual string name() const {return nameSave;}
473  virtual int code() const {return codeSave;}
474  virtual string inFlux() const {return "qqbarSame";}
475  virtual int id3Mass() const {return idHad1;}
476  virtual int id4Mass() const {return idHad2;}
477 
478  private:
479 
480  // Values stored for process type and colour flow selection.
481  int idHad1, idHad2, codeSave;
482  string nameSave;
483  double m2, oniumME1, oniumME2, sigma;
484 
485 };
486 
487 //==========================================================================
488 
489 } // end namespace Pythia8
490 
491 #endif // Pythia8_SigmaOnia_H
virtual string namePrefix() const
Name pre-, post-, and mid-fix.
Definition: SigmaOnia.h:207
virtual string inFlux() const
Need to know which incoming partons to set up interaction for.
Definition: SigmaOnia.h:161
A derived class for q g -> QQbar[X(8)] q (Q = c or b, X = 3S1, 1S0 or 3PJ).
Definition: SigmaOnia.h:345
Sigma2gg2QQbar3DJ1g(int idHadIn, double oniumMEIn, int jIn, int codeIn)
Constructor.
Definition: SigmaOnia.h:286
Sigma2qg2QQbarX8q(int idHadIn, double oniumMEIn, int stateIn, double mSplitIn, int codeIn)
Constructor.
Definition: SigmaOnia.h:350
Sigma2qg2QQbar3PJ1q(int idHadIn, double oniumMEIn, int jIn, int codeIn)
Constructor.
Definition: SigmaOnia.h:228
virtual string namePrefix() const
Name pre- and post-fix.
Definition: SigmaOnia.h:397
virtual string name() const
Info on the subprocess.
Definition: SigmaOnia.h:119
Definition: Info.h:45
A derived class for q qbar -> QQbar[3S1(1)] QQbar[3S1(1)] (Q = c or b).
Definition: SigmaOnia.h:449
virtual double sigmaHat()
Evaluate d(sigmaHat)/d(tHat).
Definition: SigmaOnia.h:193
virtual int id3Mass() const
Definition: SigmaOnia.h:202
virtual int id3Mass() const
Definition: SigmaOnia.h:326
virtual string inFlux() const
Need to know which incoming partons to set up interaction for.
Definition: SigmaOnia.h:121
double mSplit
Stored parameters.
Definition: SigmaOnia.h:55
virtual int id3Mass() const
Definition: SigmaOnia.h:475
virtual string inFlux() const
Need to know which incoming partons to set up interaction for.
Definition: SigmaOnia.h:474
int idHad
Values stored for process type and colour flow selection.
Definition: SigmaOnia.h:213
Sigma2qqbar2QQbar3PJ1g(int idHadIn, double oniumMEIn, int jIn, int codeIn)
Constructor.
Definition: SigmaOnia.h:257
virtual double sigmaHat()
Evaluate d(sigmaHat)/d(tHat).
Definition: SigmaOnia.h:153
A helper class used to setup the onia processes.
Definition: SigmaOnia.h:63
virtual string inFlux() const
Need to know which incoming partons to set up interaction for.
Definition: SigmaOnia.h:201
A derived class for q qbar -> QQbar[3PJ(1)] g (Q = c or b, J = 0, 1 or 2).
Definition: SigmaOnia.h:252
virtual string namePrefix() const
Name pre- and post-fix.
Definition: SigmaOnia.h:331
Definition: Logger.h:23
Definition: SigmaOnia.h:21
A derived class for g g -> QQbar[3S1(1)] QQbar[3S1(1)] (Q = c or b).
Definition: SigmaOnia.h:406
virtual int id3Mass() const
Definition: SigmaOnia.h:432
virtual string inFlux() const
Info on the subprocess.
Definition: SigmaOnia.h:392
string namePrefix() const
Name pre- and post-fix.
Definition: SigmaOnia.h:243
vector< int > states3S1
Stored vectors of settings.
Definition: SigmaOnia.h:44
Definition: SigmaOnia.h:376
Sigma2qqbar2QQbarX8g(int idHadIn, double oniumMEIn, int stateIn, double mSplitIn, int codeIn)
Constructor.
Definition: SigmaOnia.h:381
Info * infoPtr
Stored pointers.
Definition: SigmaOnia.h:38
Sigma2gg2QQbar3PJ1g(int idHadIn, double oniumMEIn, int jIn, int codeIn)
Constructor.
Definition: SigmaOnia.h:182
Sigma2gg2QQbar3S11gm(int idHadIn, double oniumMEIn, int codeIn)
Constructor.
Definition: SigmaOnia.h:142
A derived class for g g -> QQbar[3PJ(1)] g (Q = c or b, J = 0, 1 or 2).
Definition: SigmaOnia.h:177
OniaSetup()=default
Constructors.
A derived class for g g -> QQbar[3S1(1)] g (Q = c or b).
Definition: SigmaOnia.h:98
A derived class for g g -> QQbar[3S1(1)] gamma (Q = c or b).
Definition: SigmaOnia.h:137
Definition: SigmaProcess.h:479
virtual string inFlux() const
Info on the subprocess.
Definition: SigmaOnia.h:238
virtual int id3Mass() const
Definition: SigmaOnia.h:122
void initSettings(string wave, unsigned int size, const vector< string > &names, vector< vector< double > > &pvecs, bool &valid)
Initialise and check a group of PVec settings.
Definition: SigmaOnia.cc:125
string namePrefix() const
Name pre- and post-fix.
Definition: SigmaOnia.h:272
int idHad
Values stored for process type and colour flow selection.
Definition: SigmaOnia.h:335
Sigma2gg2QQbarX8g(int idHadIn, double oniumMEIn, int stateIn, double mSplitIn, int codeIn)
Constructor.
Definition: SigmaOnia.h:306
virtual string name() const
Info on the subprocess.
Definition: SigmaOnia.h:323
virtual string inFlux() const
Need to know which incoming partons to set up interaction for.
Definition: SigmaOnia.h:325
virtual string inFlux() const
Info on the subprocess.
Definition: SigmaOnia.h:361
double m2(const Vec4 &v1)
The squared invariant mass of one or more four-vectors.
Definition: Basics.cc:605
bool onia
Stored validity and production flags.
Definition: SigmaOnia.h:49
virtual string inFlux() const
Need to know which incoming partons to set up interaction for.
Definition: SigmaOnia.h:431
virtual string namePrefix() const
Name pre- and post-fix.
Definition: SigmaOnia.h:366
Sigma2qqbar2QQbar3S11QQbar3S11(int idHad1In, int idHad2In, double oniumME1In, double oniumME2In, int codeIn)
Constructor.
Definition: SigmaOnia.h:454
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
A derived class for q g -> QQbar[3PJ(1)] q (Q = c or b, J = 0, 1 or 2).
Definition: SigmaOnia.h:223
virtual string name() const
Info on the subprocess.
Definition: SigmaOnia.h:429
virtual double sigmaHat()
Evaluate d(sigmaHat)/d(tHat).
Definition: SigmaOnia.h:466
virtual double sigmaHat()
Evaluate d(sigmaHat)/d(tHat).
Definition: SigmaOnia.h:423
A derived class for g g -> QQbar[3DJ(1)] g (Q = c or b).
Definition: SigmaOnia.h:281
virtual string inFlux() const
Info on the subprocess.
Definition: SigmaOnia.h:267
virtual string name() const
Info on the subprocess.
Definition: SigmaOnia.h:159
A derived class for g g -> QQbar[X(8)] g (Q = c or b, X = 3S1, 1S0 or 3PJ).
Definition: SigmaOnia.h:301
virtual double sigmaHat()
Evaluate d(sigmaHat)/d(tHat).
Definition: SigmaOnia.h:317
Sigma2gg2QQbar3S11g(int idHadIn, double oniumMEIn, int codeIn)
Constructor.
Definition: SigmaOnia.h:103
virtual int id3Mass() const
Definition: SigmaOnia.h:162
void initStates(string wave, const vector< int > &states, vector< int > &jnums, bool &valid, bool duplicate=true)
Intialise and check settings.
Definition: SigmaOnia.cc:50
This class holds a map of all ParticleDataEntries.
Definition: ParticleData.h:422
virtual string name() const
Info on the subprocess.
Definition: SigmaOnia.h:199
virtual double sigmaHat()
Evaluate d(sigmaHat)/d(tHat).
Definition: SigmaOnia.h:113
Sigma2gg2QQbar3S11QQbar3S11(int idHad1In, int idHad2In, double oniumME1In, double oniumME2In, int codeIn)
Constructor.
Definition: SigmaOnia.h:411
virtual string name() const
Info on the subprocess.
Definition: SigmaOnia.h:472
Definition: Settings.h:195