]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PYTHIA8/pythia8175/include/HadronLevel.h
- remove descriptors and classes with obsolete TRD inputs
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8175 / include / HadronLevel.h
1 // HadronLevel.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.
5
6 // This file contains the main class for hadron-level generation.
7 // HadronLevel: handles administration of fragmentation and decay.
8
9 #ifndef Pythia8_HadronLevel_H
10 #define Pythia8_HadronLevel_H
11
12 #include "Basics.h"
13 #include "BoseEinstein.h"
14 #include "Event.h"
15 #include "FragmentationFlavZpT.h"
16 #include "FragmentationSystems.h"
17 #include "HadronScatter.h"
18 #include "HiddenValleyFragmentation.h"
19 #include "Info.h"
20 #include "MiniStringFragmentation.h"
21 #include "ParticleData.h"
22 #include "ParticleDecays.h"
23 #include "PythiaStdlib.h"
24 #include "RHadrons.h"
25 #include "Settings.h"
26 #include "StringFragmentation.h"
27 #include "TimeShower.h"
28
29 namespace Pythia8 {
30  
31 //==========================================================================
32
33 // The HadronLevel class contains the top-level routines to generate
34 // the transition from the partonic to the hadronic stage of an event.
35
36 class HadronLevel {
37
38 public:
39
40   // Constructor. 
41   HadronLevel() {}
42
43   // Initialize HadronLevel classes as required.
44   bool init(Info* infoPtrIn, Settings& settings, 
45     ParticleData* particleDataPtrIn, Rndm* rndmPtrIn, 
46     Couplings* couplingsPtrIn, TimeShower* timesDecPtr, 
47     RHadrons* rHadronsPtrIn, DecayHandler* decayHandlePtr, 
48     vector<int> handledParticles);
49
50   // Get pointer to StringFlav instance (needed by BeamParticle).
51   StringFlav* getStringFlavPtr() {return &flavSel;}
52  
53   // Generate the next event.
54   bool next(Event& event); 
55
56   // Special routine to allow more decays if on/off switches changed.
57   bool moreDecays(Event& event);
58
59 private: 
60
61   // Constants: could only be changed in the code itself.
62   static const int    NTRYJNREST;
63   static const double JJSTRINGM2MAX, JJSTRINGM2FRAC, CONVJNREST, MTHAD;
64
65   // Initialization data, read from Settings.
66   bool   doHadronize, doDecay, doBoseEinstein, allowRH;
67   double mStringMin, eNormJunction, widthSepBE;
68
69   // Settings for hadron scattering --rjc
70   bool   doHadronScatter, hsAfterDecay;
71
72   // Pointer to various information on the generation.
73   Info*         infoPtr;
74
75   // Pointer to the particle data table.
76   ParticleData* particleDataPtr;
77
78   // Pointer to the random number generator.
79   Rndm*         rndmPtr;
80
81   // Pointers to Standard Model couplings.
82   Couplings*    couplingsPtr;
83
84   // Configuration of colour-singlet systems.
85   ColConfig     colConfig;   
86
87   // Colour information.
88   vector<int>    iColEnd, iAcolEnd, iColAndAcol, iParton, iPartonJun, 
89                  iPartonAntiJun, iJunLegA, iJunLegB, iJunLegC,  
90                  iAntiLegA, iAntiLegB, iAntiLegC, iGluLeg;
91   vector<double> m2Pair; 
92
93   // The generator class for normal string fragmentation.
94   StringFragmentation stringFrag;
95
96   // The generator class for special low-mass string fragmentation.
97   MiniStringFragmentation ministringFrag;
98
99   // The generator class for normal decays.
100   ParticleDecays decays;
101
102   // The generator class for hadron scattering --rjc
103   HadronScatter hadronScatter;
104
105   // The generator class for Bose-Einstein effects. 
106   BoseEinstein boseEinstein;
107
108   // Classes for flavour, pT and z generation.
109   StringFlav flavSel;
110   StringPT   pTSel;
111   StringZ    zSel;
112
113   // The RHadrons class is used to fragment off and decay R-hadrons.
114   RHadrons*  rHadronsPtr;
115
116   // Special class for Hidden-Valley hadronization. Not always used.
117   HiddenValleyFragmentation hiddenvalleyFrag;
118   bool useHiddenValley;
119
120   // Special case: colour-octet onium decays, to be done initially.
121   bool decayOctetOnia(Event& event);
122  
123   // Trace colour flow in the event to form colour singlet subsystems.
124   bool findSinglets(Event& event);
125  
126   // Trace a colour line, from a colour, from an anticolour, or in loop.
127   bool traceFromCol(int indxCol, Event& event, int iJun = -1, int iCol = -1);
128   bool traceFromAcol(int indxCol, Event& event, int iJun = -1, int iCol = -1); 
129   bool traceInLoop(int indxCol, int indxAcol, Event& event);
130
131   // Split junction-antijunction system into two, or simplify other way.
132   bool splitJunctionPair(Event& event);
133   
134 };
135  
136 //==========================================================================
137
138 } // end namespace Pythia8
139
140 #endif // Pythia8_HadronLevel_H