Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:06:19

0001 // Bose-Einstein.h is a part of the PYTHIA event generator.
0002 // Copyright (C) 2024 Torbjorn Sjostrand.
0003 // PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
0004 // Please respect the MCnet Guidelines, see GUIDELINES for details.
0005 
0006 // This file contains the classes to handle Bose-Einstein effects.
0007 // BoseEinsteinHadron: simple working container for particle momenta.
0008 // BoseEinstein: main class to perform the task.
0009 
0010 #ifndef Pythia8_BoseEinstein_H
0011 #define Pythia8_BoseEinstein_H
0012 
0013 #include "Pythia8/Basics.h"
0014 #include "Pythia8/Event.h"
0015 #include "Pythia8/ParticleData.h"
0016 #include "Pythia8/PhysicsBase.h"
0017 #include "Pythia8/PythiaStdlib.h"
0018 #include "Pythia8/Settings.h"
0019 
0020 namespace Pythia8 {
0021 
0022 //==========================================================================
0023 
0024 // The BoseEinsteinHadron class is a simple container for studied hadrons.
0025 
0026 class BoseEinsteinHadron {
0027 
0028 public:
0029 
0030   // Constructors.
0031   BoseEinsteinHadron() : id(0), iPos(0), p(0.), pShift(0.), pComp(0.),
0032     m2(0.) {}
0033   BoseEinsteinHadron(int idIn,  int iPosIn, Vec4 pIn, double mIn) :
0034     id(idIn), iPos(iPosIn), p(pIn), pShift(0.), pComp(0.) {m2 = mIn*mIn;}
0035 
0036   // Information on hadron - all public.
0037   int    id, iPos;
0038   Vec4   p, pShift, pComp;
0039   double m2;
0040 
0041 };
0042 
0043 //==========================================================================
0044 
0045 // The BoseEinstein class shifts the momenta of identical particles relative
0046 // to each other, to simulate Bose-Einstein effects to some approximation.
0047 
0048 class BoseEinstein : public PhysicsBase {
0049 
0050 public:
0051 
0052   // Constructor.
0053   BoseEinstein() : doPion(), doKaon(), doEta(), lambda(), QRef(),
0054     nStep(), nStep3(), nStored(), QRef2(), QRef3(), R2Ref(), R2Ref2(),
0055     R2Ref3(), mHadron(), mPair(), m2Pair(), deltaQ(), deltaQ3(), maxQ(),
0056     maxQ3(), shift(), shift3() {}
0057 
0058   // Find settings. Precalculate table used to find momentum shifts.
0059   bool init();
0060 
0061   // Perform Bose-Einstein corrections on an event.
0062   bool shiftEvent( Event& event);
0063 
0064 private:
0065 
0066   // Constants: could only be changed in the code itself.
0067   static const int    IDHADRON[9], ITABLE[9], NCOMPSTEP;
0068   static const double STEPSIZE, Q2MIN, COMPRELERR, COMPFACMAX;
0069 
0070   // Initialization data, read from Settings.
0071   bool   doPion, doKaon, doEta;
0072   double lambda, QRef;
0073 
0074   // Table of momentum shifts for different hadron species.
0075   int    nStep[4], nStep3[4], nStored[10];
0076   double QRef2, QRef3, R2Ref, R2Ref2, R2Ref3, mHadron[9],
0077          mPair[4], m2Pair[4], deltaQ[4], deltaQ3[4], maxQ[4], maxQ3[4];
0078   double shift[4][200], shift3[4][200];
0079 
0080   // Vector of hadrons to study.
0081   vector<BoseEinsteinHadron> hadronBE;
0082 
0083   // Calculate shift and (unnormalized) compensation for pair.
0084   void shiftPair(int i1, int i2, int iHad);
0085 
0086 };
0087 
0088 //==========================================================================
0089 
0090 } // end namespace Pythia8
0091 
0092 #endif // Pythia8_BoseEinstein_H