[1] | 1 | // RHadrons.h is a part of the PYTHIA event generator. |
---|
| 2 | // Copyright (C) 2012 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. |
---|
| 5 | |
---|
| 6 | // This file contains a class for the production and decay |
---|
| 7 | // of long-lived heavy coloured particles, for now the gluino. |
---|
| 8 | |
---|
| 9 | #ifndef Pythia8_RHadrons_H |
---|
| 10 | #define Pythia8_RHadrons_H |
---|
| 11 | |
---|
| 12 | #include "Basics.h" |
---|
| 13 | #include "Event.h" |
---|
| 14 | #include "FragmentationFlavZpT.h" |
---|
| 15 | #include "FragmentationSystems.h" |
---|
| 16 | #include "Info.h" |
---|
| 17 | #include "ParticleData.h" |
---|
| 18 | #include "PythiaStdlib.h" |
---|
| 19 | #include "Settings.h" |
---|
| 20 | |
---|
| 21 | namespace Pythia8 { |
---|
| 22 | |
---|
| 23 | //========================================================================== |
---|
| 24 | |
---|
| 25 | // The RHadrons class contains the routines for the production and decay |
---|
| 26 | // of long-lived heavy coloured particles. |
---|
| 27 | |
---|
| 28 | class RHadrons { |
---|
| 29 | |
---|
| 30 | public: |
---|
| 31 | |
---|
| 32 | // Constructor. |
---|
| 33 | RHadrons() : nRHad(0) {} |
---|
| 34 | |
---|
| 35 | // Initialization of R-hadron handling. |
---|
| 36 | bool init( Info* infoPtrIn, Settings& settings, |
---|
| 37 | ParticleData* particleDataPtrIn, Rndm* rndmPtrIn); |
---|
| 38 | |
---|
| 39 | // Pointers to flavours and z sent from HadronLevel. |
---|
| 40 | void fragPtrs( StringFlav* flavSelPtrIn, StringZ* zSelPtrIn) |
---|
| 41 | { flavSelPtr = flavSelPtrIn; zSelPtr = zSelPtrIn;} |
---|
| 42 | |
---|
| 43 | // Produce R-hadrons. |
---|
| 44 | bool produce( ColConfig& colConfig, Event& event); |
---|
| 45 | |
---|
| 46 | // Decay R-hadrons. |
---|
| 47 | bool decay( Event& event); |
---|
| 48 | |
---|
| 49 | // Tell whether a given particle is supposed to form R-hadrons. |
---|
| 50 | bool givesRHadron(int id); |
---|
| 51 | |
---|
| 52 | // Tell whether any R-hadrons have been formed. |
---|
| 53 | bool exist() {return (nRHad > 0);} |
---|
| 54 | |
---|
| 55 | // Tell whether a R-hadron production+decay happened, and trace down. |
---|
| 56 | int trace(int i) { for (int iR = 0; iR < nRHad; ++iR) |
---|
| 57 | if (iBefRHad[iR] == i || iCreRHad[iR] == i) return iAftRHad[iR]; |
---|
| 58 | return 0;} |
---|
| 59 | |
---|
| 60 | private: |
---|
| 61 | |
---|
| 62 | // Constants: could only be changed in the code itself. |
---|
| 63 | static const int IDRHADSB[14], IDRHADST[14], IDRHADGO[38], NTRYMAX; |
---|
| 64 | static const double MSAFETY, EGBORROWMAX; |
---|
| 65 | |
---|
| 66 | // Initialization data, mainly read from Settings. |
---|
| 67 | bool allowRH, allowRSb, allowRSt, allowRGo, allowSomeR, setMassesRH; |
---|
| 68 | int idRSb, idRSt, idRGo; |
---|
| 69 | double maxWidthRH, probGluinoballRH, mOffsetCloudRH, mCollapseRH, |
---|
| 70 | diquarkSpin1RH, m0Sb, m0St, m0Go; |
---|
| 71 | |
---|
| 72 | // Current event properties. |
---|
| 73 | vector<int> iBefRHad, iCreRHad, iRHadron, iAftRHad; |
---|
| 74 | vector<bool> isTriplet; |
---|
| 75 | int nRHad, iRHad, iBef, iSys; |
---|
| 76 | ColSinglet* systemPtr; |
---|
| 77 | |
---|
| 78 | // Pointer to various information on the generation. |
---|
| 79 | Info* infoPtr; |
---|
| 80 | |
---|
| 81 | // Pointer to the particle data table. |
---|
| 82 | ParticleData* particleDataPtr; |
---|
| 83 | |
---|
| 84 | // Pointer to the random number generator. |
---|
| 85 | Rndm* rndmPtr; |
---|
| 86 | |
---|
| 87 | // Pointers to classes for flavour and z generation. |
---|
| 88 | StringFlav* flavSelPtr; |
---|
| 89 | StringZ* zSelPtr; |
---|
| 90 | |
---|
| 91 | // Split a system that contains both a sparticle and a junction. |
---|
| 92 | bool splitOffJunction( ColConfig& colConfig, Event& event); |
---|
| 93 | |
---|
| 94 | // Open up a closed gluon/gluino loop. |
---|
| 95 | bool openClosedLoop( ColConfig& colConfig, Event& event); |
---|
| 96 | |
---|
| 97 | // Split a single colour singlet that contains two sparticles. |
---|
| 98 | bool splitSystem( ColConfig& colConfig, Event& event); |
---|
| 99 | |
---|
| 100 | // Produce a R-hadron from a squark. |
---|
| 101 | bool produceSquark( ColConfig& colConfig, Event& event); |
---|
| 102 | |
---|
| 103 | // Produce a R-hadron from a gluino. |
---|
| 104 | bool produceGluino( ColConfig& colConfig, Event& event); |
---|
| 105 | |
---|
| 106 | // Construct R-hadron code from squark and (di)quark codes. |
---|
| 107 | int toIdWithSquark( int id1, int id2); |
---|
| 108 | |
---|
| 109 | // Construct squark and (di)quark codes from R-hadron code. |
---|
| 110 | pair<int,int> fromIdWithSquark( int idRHad); |
---|
| 111 | |
---|
| 112 | // Construct R-hadron code from endpoints and a gluino. |
---|
| 113 | int toIdWithGluino( int id1, int id2); |
---|
| 114 | |
---|
| 115 | // Construct endpoint codes from R-hadron code with a gluino. |
---|
| 116 | pair<int,int> fromIdWithGluino( int idRHad); |
---|
| 117 | |
---|
| 118 | // Construct modified four-vectors to match modified masses. |
---|
| 119 | bool newKin( Vec4 pOld1, Vec4 pOld2, double mNew1, double mNew2, |
---|
| 120 | Vec4& pNew1, Vec4& pNew2, bool checkMargin = true); |
---|
| 121 | |
---|
| 122 | }; |
---|
| 123 | |
---|
| 124 | //========================================================================== |
---|
| 125 | |
---|
| 126 | } // end namespace Pythia8 |
---|
| 127 | |
---|
| 128 | #endif // Pythia8_RHadrons_H |
---|