]>
Commit | Line | Data |
---|---|---|
5ad4eb21 | 1 | // ProcessLevel.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 process-level event generation. | |
7 | // ProcessLevel: administrates the selection of "hard" process. | |
8 | ||
9 | #ifndef Pythia8_ProcessLevel_H | |
10 | #define Pythia8_ProcessLevel_H | |
11 | ||
12 | #include "Basics.h" | |
13 | #include "BeamParticle.h" | |
14 | #include "Event.h" | |
15 | #include "Info.h" | |
16 | #include "ParticleData.h" | |
17 | #include "PartonDistributions.h" | |
18 | #include "ProcessContainer.h" | |
19 | #include "PythiaStdlib.h" | |
20 | #include "ResonanceDecays.h" | |
21 | #include "Settings.h" | |
22 | #include "SigmaTotal.h" | |
23 | #include "SusyLesHouches.h" | |
24 | #include "UserHooks.h" | |
25 | ||
26 | namespace Pythia8 { | |
27 | ||
28 | //************************************************************************** | |
29 | ||
30 | // The ProcessLevel class contains the top-level routines to generate | |
31 | // the characteristic "hard" process of an event. | |
32 | ||
33 | class ProcessLevel { | |
34 | ||
35 | public: | |
36 | ||
37 | // Constructor. | |
38 | ProcessLevel() : iLHACont(-1) {} | |
39 | ||
40 | // Destructor to delete processes in containers. | |
41 | ~ProcessLevel(); | |
42 | ||
43 | // Initialization. | |
44 | bool init( Info* infoPtrIn, BeamParticle* beamAPtrIn, | |
45 | BeamParticle* beamBPtrIn, SigmaTotal* sigmaTotPtrIn, bool doLHAin, | |
46 | SusyLesHouches* slhaPtrIn, UserHooks* userHooksPtrIn, | |
47 | vector<SigmaProcess*>& sigmaPtrs, ostream& os = cout); | |
48 | ||
49 | // Store or replace Les Houches pointer. | |
50 | void setLHAPtr( LHAup* lhaUpPtrIn) {lhaUpPtr = lhaUpPtrIn; | |
51 | if (iLHACont >= 0) containerPtrs[iLHACont]->setLHAPtr(lhaUpPtr);} | |
52 | ||
53 | // Generate the next "hard" process. | |
54 | bool next( Event& process); | |
55 | ||
56 | // Accumulate and update statistics (after possible user veto). | |
57 | void accumulate(); | |
58 | ||
59 | // Print statistics on cross sections and number of events. | |
60 | void statistics(bool reset = false, ostream& os = cout); | |
61 | ||
62 | // Add any junctions to the process event record list. | |
63 | void findJunctions( Event& junEvent); | |
64 | ||
65 | private: | |
66 | ||
67 | // Generic info for process generation. | |
68 | bool doSecondHard, allHardSame, noneHardSame, someHardSame, doResDecays; | |
69 | int nImpact, startColTag2; | |
70 | double sigmaND, sumImpactFac, sum2ImpactFac; | |
71 | ||
72 | // Vector of containers of internally-generated processes. | |
73 | vector<ProcessContainer*> containerPtrs; | |
74 | int iContainer, iLHACont; | |
75 | double sigmaMaxSum; | |
76 | ||
77 | // Ditto for optional choice of a second hard process. | |
78 | vector<ProcessContainer*> container2Ptrs; | |
79 | int i2Container; | |
80 | double sigma2MaxSum; | |
81 | ||
82 | // Pointer to various information on the generation. | |
83 | Info* infoPtr; | |
84 | ||
85 | // Pointers to the two incoming beams. | |
86 | BeamParticle* beamAPtr; | |
87 | BeamParticle* beamBPtr; | |
88 | ||
89 | // Pointer to SigmaTotal object needed to handle soft QCD processes. | |
90 | SigmaTotal* sigmaTotPtr; | |
91 | ||
92 | // Pointer to SusyLesHouches object for interface to SUSY spectra. | |
93 | SusyLesHouches* slhaPtr; | |
94 | ||
95 | // Pointer to userHooks object for user interaction with program. | |
96 | UserHooks* userHooksPtr; | |
97 | ||
98 | // Pointer to LHAup for generating external events. | |
99 | LHAup* lhaUpPtr; | |
100 | ||
101 | // Common alphaStrong and alphaElectromagnetic calculation for SigmaProcess. | |
102 | AlphaStrong alphaS; | |
103 | AlphaEM alphaEM; | |
104 | ||
105 | // Initialization routine for SUSY spectra. | |
106 | bool initSLHA(); | |
107 | ||
108 | // ResonanceDecay object does sequential resonance decays. | |
109 | ResonanceDecays resonanceDecays; | |
110 | ||
111 | // Generate the next event with one interaction. | |
112 | bool nextOne( Event& process); | |
113 | ||
114 | // Generate the next event with two hard interactions. | |
115 | bool nextTwo( Event& process); | |
116 | ||
117 | // Append the second to the first process list. | |
118 | void combineProcessRecords( Event& process, Event& process2); | |
119 | ||
120 | // Check that colours match up. | |
121 | bool checkColours( Event& process); | |
122 | ||
123 | // Print statistics when two hard processes allowed. | |
124 | void statistics2(bool reset, ostream& os = cout); | |
125 | ||
126 | // Statistics for Les Houches event classification. | |
127 | vector<int> codeLHA, nEvtLHA; | |
128 | ||
129 | }; | |
130 | ||
131 | //************************************************************************** | |
132 | ||
133 | } // end namespace Pythia8 | |
134 | ||
135 | #endif // Pythia8_ProcessLevel_H |