PYTHIA  8.312
BoseEinstein.h
1 // Bose-Einstein.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 // This file contains the classes to handle Bose-Einstein effects.
7 // BoseEinsteinHadron: simple working container for particle momenta.
8 // BoseEinstein: main class to perform the task.
9 
10 #ifndef Pythia8_BoseEinstein_H
11 #define Pythia8_BoseEinstein_H
12 
13 #include "Pythia8/Basics.h"
14 #include "Pythia8/Event.h"
15 #include "Pythia8/ParticleData.h"
16 #include "Pythia8/PhysicsBase.h"
17 #include "Pythia8/PythiaStdlib.h"
18 #include "Pythia8/Settings.h"
19 
20 namespace Pythia8 {
21 
22 //==========================================================================
23 
24 // The BoseEinsteinHadron class is a simple container for studied hadrons.
25 
27 
28 public:
29 
30  // Constructors.
31  BoseEinsteinHadron() : id(0), iPos(0), p(0.), pShift(0.), pComp(0.),
32  m2(0.) {}
33  BoseEinsteinHadron(int idIn, int iPosIn, Vec4 pIn, double mIn) :
34  id(idIn), iPos(iPosIn), p(pIn), pShift(0.), pComp(0.) {m2 = mIn*mIn;}
35 
36  // Information on hadron - all public.
37  int id, iPos;
38  Vec4 p, pShift, pComp;
39  double m2;
40 
41 };
42 
43 //==========================================================================
44 
45 // The BoseEinstein class shifts the momenta of identical particles relative
46 // to each other, to simulate Bose-Einstein effects to some approximation.
47 
48 class BoseEinstein : public PhysicsBase {
49 
50 public:
51 
52  // Constructor.
53  BoseEinstein() : doPion(), doKaon(), doEta(), lambda(), QRef(),
54  nStep(), nStep3(), nStored(), QRef2(), QRef3(), R2Ref(), R2Ref2(),
55  R2Ref3(), mHadron(), mPair(), m2Pair(), deltaQ(), deltaQ3(), maxQ(),
56  maxQ3(), shift(), shift3() {}
57 
58  // Find settings. Precalculate table used to find momentum shifts.
59  bool init();
60 
61  // Perform Bose-Einstein corrections on an event.
62  bool shiftEvent( Event& event);
63 
64 private:
65 
66  // Constants: could only be changed in the code itself.
67  static const int IDHADRON[9], ITABLE[9], NCOMPSTEP;
68  static const double STEPSIZE, Q2MIN, COMPRELERR, COMPFACMAX;
69 
70  // Initialization data, read from Settings.
71  bool doPion, doKaon, doEta;
72  double lambda, QRef;
73 
74  // Table of momentum shifts for different hadron species.
75  int nStep[4], nStep3[4], nStored[10];
76  double QRef2, QRef3, R2Ref, R2Ref2, R2Ref3, mHadron[9],
77  mPair[4], m2Pair[4], deltaQ[4], deltaQ3[4], maxQ[4], maxQ3[4];
78  double shift[4][200], shift3[4][200];
79 
80  // Vector of hadrons to study.
81  vector<BoseEinsteinHadron> hadronBE;
82 
83  // Calculate shift and (unnormalized) compensation for pair.
84  void shiftPair(int i1, int i2, int iHad);
85 
86 };
87 
88 //==========================================================================
89 
90 } // end namespace Pythia8
91 
92 #endif // Pythia8_BoseEinstein_H
BoseEinstein()
Constructor.
Definition: BoseEinstein.h:53
Definition: PhysicsBase.h:27
The Event class holds all info on the generated event.
Definition: Event.h:453
The BoseEinsteinHadron class is a simple container for studied hadrons.
Definition: BoseEinstein.h:26
BoseEinsteinHadron()
Constructors.
Definition: BoseEinstein.h:31
Definition: BoseEinstein.h:48
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
int id
Information on hadron - all public.
Definition: BoseEinstein.h:37
Definition: Basics.h:32