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.
6 // This file contains the main class for parton-level event generation
7 // PartonLevel: administrates showers, multiple interactions and remnants.
9 #ifndef Pythia8_PartonLevel_H
10 #define Pythia8_PartonLevel_H
13 #include "BeamParticle.h"
14 #include "BeamRemnants.h"
17 #include "MultipleInteractions.h"
18 #include "ParticleData.h"
19 #include "PythiaStdlib.h"
21 #include "SigmaTotal.h"
22 #include "SpaceShower.h"
23 #include "TimeShower.h"
24 #include "UserHooks.h"
28 //**************************************************************************
30 // The PartonLevel class contains the top-level routines to generate
31 // the partonic activity of an event.
38 PartonLevel() : userHooksPtr(0) {}
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);
46 // Generate the next parton-level process.
47 bool next( Event& process, Event& event);
49 // Tell whether failure was due to vetoing.
50 bool hasVetoed() const {return doVeto;}
52 // Accumulate and print statistics.
53 void accumulate() {multi.accumulate();}
54 void statistics(bool reset = false) {if (doMI) multi.statistics(reset);}
58 // Constants: could only be changed in the code itself.
59 static const int NTRY;
61 // Initialization data, mainly read from Settings.
62 bool doMI, doISR, doFSRduringProcess, doFSRafterProcess,
63 doFSRinResonances, doRemnants, doSecondHard, doMIinit,
64 hasLeptonBeams, hasPointLeptons, canVetoPT, canVetoStep;
66 // Event generation strategy. Number of steps. Maximum pT scales.
68 int nMI, nISR, nFSRinProc, nFSRinRes, nISRhard, nFSRhard,
69 typeLatest, nVetoStep, typeVetoStep, iSysNow;
70 double pTsaveMI, pTsaveISR, pTsaveFSR, pTvetoPT;
72 // Pointer to various information on the generation.
75 // Pointers to the two incoming beams.
76 BeamParticle* beamAPtr;
77 BeamParticle* beamBPtr;
79 // Pointer to userHooks object for user interaction with program.
80 UserHooks* userHooksPtr;
82 // Pointers to timelike showers for resonance decays and the rest.
83 TimeShower* timesDecPtr;
86 // Pointer to spacelike showers.
87 SpaceShower* spacePtr;
89 // The generator class for multiple interactions.
90 MultipleInteractions multi;
92 // The generator class to construct beam-remnant kinematics.
93 BeamRemnants remnants;
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.
100 // Set up an unresolved process, i.e. elastic or diffractive.
101 bool setupUnresolvedSys( Event& process, Event& event);
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;
110 //**************************************************************************
112 } // end namespace Pythia8
114 #endif // Pythia8_PartonLevel_H