1 // Bose-Einstein.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2013 Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL version 2, see COPYING for details.
4 // Please respect the MCnet Guidelines, see GUIDELINES for details.
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.
10 #ifndef Pythia8_BoseEinstein_H
11 #define Pythia8_BoseEinstein_H
15 #include "ParticleData.h"
16 #include "PythiaStdlib.h"
21 //==========================================================================
23 // The BoseEinsteinHadron class is a simple container for studied hadrons.
25 class BoseEinsteinHadron {
30 BoseEinsteinHadron() : id(0), iPos(0), p(0.), pShift(0.), pComp(0.),
32 BoseEinsteinHadron(int idIn, int iPosIn, Vec4 pIn, double mIn) :
33 id(idIn), iPos(iPosIn), p(pIn), pShift(0.), pComp(0.) {m2 = mIn*mIn;}
35 // Information on hadron - all public.
37 Vec4 p, pShift, pComp;
42 //==========================================================================
44 // The BoseEinstein class shifts the momenta of identical particles relative
45 // to each other, to simulate Bose-Einstein effects to some approximation.
54 // Find settings. Precalculate table used to find momentum shifts.
55 bool init(Info* infoPtrIn, Settings& settings, ParticleData& particleData);
57 // Perform Bose-Einstein corrections on an event.
58 bool shiftEvent( Event& event);
62 // Constants: could only be changed in the code itself.
63 static const int IDHADRON[9], ITABLE[9], NCOMPSTEP;
64 static const double STEPSIZE, Q2MIN, COMPRELERR, COMPFACMAX;
66 // Initialization data, read from Settings.
67 bool doPion, doKaon, doEta;
70 // Pointer to various information on the generation.
73 // Table of momentum shifts for different hadron species.
74 int nStep[4], nStep3[4], nStored[10];
75 double QRef2, QRef3, R2Ref, R2Ref2, R2Ref3, mHadron[9],
76 mPair[4], m2Pair[4], deltaQ[4], deltaQ3[4], maxQ[4], maxQ3[4];
77 double shift[4][200], shift3[4][200];
79 // Vector of hadrons to study.
80 vector<BoseEinsteinHadron> hadronBE;
82 // Calculate shift and (unnormalized) compensation for pair.
83 void shiftPair(int i1, int i2, int iHad);
87 //==========================================================================
89 } // end namespace Pythia8
91 #endif // Pythia8_BoseEinstein_H