]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PYTHIA8/pythia8130/include/HadronLevel.h
pythia8130 distributed with AliRoot
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8130 / include / HadronLevel.h
1 // HadronLevel.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2008 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 "Info.h"
18 #include "MiniStringFragmentation.h"
19 #include "ParticleData.h"
20 #include "ParticleDecays.h"
21 #include "PythiaStdlib.h"
22 #include "Settings.h"
23 #include "StringFragmentation.h"
24 #include "TimeShower.h"
25
26 namespace Pythia8 {
27  
28 //**************************************************************************
29
30 // The HadronLevel class contains the top-level routines to generate
31 // the transition from the partonic to the hadronic stage of an event.
32
33 class HadronLevel {
34
35 public:
36
37   // Constructor. 
38   HadronLevel() {}
39
40   // Initialize HadronLevel classes as required.
41   bool init(Info* infoPtrIn, TimeShower* timesDecPtr,
42     DecayHandler* decayHandlePtr, vector<int> handledParticles);
43
44   // Get pointer to StringFlav instance (needed by BeamParticle).
45   StringFlav* getStringFlavPtr() {return &flavSel;}
46  
47   // Generate the next event.
48   bool next(Event& event); 
49
50   // Special routine to allow more decays if on/off switches changed.
51   bool moreDecays(Event& event);
52
53 private: 
54
55   // Constants: could only be changed in the code itself.
56   static const int    NTRYJNREST;
57   static const double JJSTRINGM2MAX, JJSTRINGM2FRAC, CONVJNREST, MTHAD;
58
59   // Initialization data, read from Settings.
60   bool   doHadronize, doDecay, doBoseEinstein;
61   double mStringMin, eNormJunction, widthSepBE;
62
63   // Pointer to various information on the generation.
64   Info* infoPtr;
65
66   // Configuration of colour-singlet systems.
67   ColConfig colConfig;   
68
69   // Colour information.
70   vector<int>    iColEnd, iAcolEnd, iColAndAcol, iParton, iPartonJun, 
71                  iPartonAntiJun, iJunLegA, iJunLegB, iJunLegC,  
72                  iAntiLegA, iAntiLegB, iAntiLegC, iGluLeg;
73   vector<double> m2Pair; 
74
75   // The generator class for normal string fragmentation.
76   StringFragmentation stringFrag;
77
78   // The generator class for special low-mass string fragmentation.
79   MiniStringFragmentation ministringFrag;
80
81   // The generator class for normal decays.
82   ParticleDecays decays;
83
84   // The generator class for Bose-Einstein effects. 
85   BoseEinstein boseEinstein;
86
87   // Classes for flavour, pT and z generation.
88   StringFlav flavSel;
89   StringPT   pTSel;
90   StringZ    zSel;
91
92   // Special case: colour-octet onium decays, to be done initially.
93   bool decayOctetOnia(Event& event);
94  
95   // Trace colour flow in the event to form colour singlet subsystems.
96   bool findSinglets(Event& event);
97  
98   // Trace a colour line, from a colour, from an anticolour, or in loop.
99   bool traceFromCol(int indxCol, Event& event, int iJun = -1, int iCol = -1);
100   bool traceFromAcol(int indxCol, Event& event, int iJun = -1, int iCol = -1); 
101   bool traceInLoop(int indxCol, int indxAcol, Event& event);
102
103   // Split junction-antijunction system into two, or simplify other way.
104   bool splitJunctionPair(Event& event);
105   
106 };
107  
108 //**************************************************************************
109
110 } // end namespace Pythia8
111
112 #endif // Pythia8_HadronLevel_H