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