]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PYTHIA8/pythia8130/include/PartonLevel.h
pythia8130 distributed with AliRoot
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8130 / include / PartonLevel.h
1 // PartonLevel.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 parton-level event generation
7 // PartonLevel: administrates showers, multiple interactions and remnants.
8
9 #ifndef Pythia8_PartonLevel_H
10 #define Pythia8_PartonLevel_H
11
12 #include "Basics.h"
13 #include "BeamParticle.h"
14 #include "BeamRemnants.h"
15 #include "Event.h"
16 #include "Info.h"
17 #include "MultipleInteractions.h"
18 #include "ParticleData.h"
19 #include "PythiaStdlib.h"
20 #include "Settings.h"
21 #include "SigmaTotal.h"
22 #include "SpaceShower.h"
23 #include "TimeShower.h"
24 #include "UserHooks.h"
25
26 namespace Pythia8 {
27  
28 //**************************************************************************
29
30 // The PartonLevel class contains the top-level routines to generate
31 // the partonic activity of an event.
32
33 class PartonLevel {
34
35 public:
36
37   // Constructor. 
38   PartonLevel() : userHooksPtr(0) {} 
39  
40   // Initialization of all classes at the parton level.
41   bool init( Info* infoPtrIn, BeamParticle* beamAPtrIn, 
42     BeamParticle* beamBPtrIn, SigmaTotal* sigmaTotPtr, 
43     TimeShower* timesDecPtrIn, TimeShower* timesPtrIn, 
44     SpaceShower* spacePtrIn, UserHooks* userHooksPtrIn);
45  
46   // Generate the next parton-level process.
47   bool next( Event& process, Event& event); 
48
49   // Tell whether failure was due to vetoing.
50   bool hasVetoed() const {return doVeto;}
51
52   // Accumulate and print statistics.
53   void accumulate() {multi.accumulate();}
54   void statistics(bool reset = false) {if (doMI) multi.statistics(reset);}
55
56 private: 
57
58   // Constants: could only be changed in the code itself.
59   static const int NTRY;
60
61   // Initialization data, mainly read from Settings.
62   bool   doMI, doISR, doFSRduringProcess, doFSRafterProcess, 
63          doFSRinResonances, doRemnants, doSecondHard, doMIinit, 
64          hasLeptonBeams, hasPointLeptons, canVetoPT, canVetoStep;
65
66   // Event generation strategy. Number of steps. Maximum pT scales.
67   bool   doVeto;
68   int    nMI, nISR, nFSRinProc, nFSRinRes, nISRhard, nFSRhard, 
69          typeLatest, nVetoStep, typeVetoStep, iSysNow;
70   double pTsaveMI, pTsaveISR, pTsaveFSR, pTvetoPT;
71
72   // Pointer to various information on the generation.
73   Info* infoPtr;
74
75   // Pointers to the two incoming beams.
76   BeamParticle* beamAPtr;
77   BeamParticle* beamBPtr;
78
79   // Pointer to userHooks object for user interaction with program.
80   UserHooks* userHooksPtr;
81
82   // Pointers to timelike showers for resonance decays and the rest.
83   TimeShower* timesDecPtr;
84   TimeShower* timesPtr;
85
86   // Pointer to spacelike showers.
87   SpaceShower* spacePtr;
88
89   // The generator class for multiple interactions.
90   MultipleInteractions multi;
91
92   // The generator class to construct beam-remnant kinematics. 
93   BeamRemnants remnants;
94
95   // Set up the hard process, excluding subsequent resonance decays.
96   void setupHardSys( Event& process, Event& event);
97   // Keep track of how much of hard process has been handled.
98   int nHardDone;
99
100   // Set up an unresolved process, i.e. elastic or diffractive.
101   bool setupUnresolvedSys( Event& process, Event& event);
102
103   // Perform showers in resonance decay chains.
104   int resonanceShowers( Event& process, Event& event); 
105   // Position in main event record of hard partons before showers.
106   vector<int> iPosBefShow;
107   
108 };
109
110 //**************************************************************************
111
112 } // end namespace Pythia8
113
114 #endif // Pythia8_PartonLevel_H