source: HiSusy/trunk/Pythia8/pythia8170/include/ProcessLevel.h @ 1

Last change on this file since 1 was 1, checked in by zerwas, 11 years ago

first import of structure, PYTHIA8 and DELPHES

File size: 5.1 KB
Line 
1// ProcessLevel.h is a part of the PYTHIA event generator.
2// Copyright (C) 2012 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 "SusyCouplings.h"
24#include "SusyLesHouches.h"
25#include "StandardModel.h"
26#include "UserHooks.h"
27
28namespace Pythia8 {
29 
30//==========================================================================
31
32// The ProcessLevel class contains the top-level routines to generate
33// the characteristic "hard" process of an event.
34
35class ProcessLevel {
36
37public:
38
39  // Constructor.
40  ProcessLevel() : iLHACont(-1) {} 
41
42  // Destructor to delete processes in containers.
43  ~ProcessLevel();
44 
45  // Initialization.
46  bool init( Info* infoPtrIn, Settings& settings,
47    ParticleData* particleDataPtrIn, Rndm* rndmPtrIn, 
48    BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn, 
49    Couplings* couplingsPtrIn, SigmaTotal* sigmaTotPtrIn, bool doLHAin, 
50    SusyLesHouches* slhaPtrIn, UserHooks* userHooksPtrIn, 
51    vector<SigmaProcess*>& sigmaPtrs, ostream& os = cout);
52
53  // Store or replace Les Houches pointer.
54  void setLHAPtr( LHAup* lhaUpPtrIn) {lhaUpPtr = lhaUpPtrIn;
55  if (iLHACont >= 0) containerPtrs[iLHACont]->setLHAPtr(lhaUpPtr);}
56 
57  // Generate the next "hard" process.
58  bool next( Event& process); 
59
60  // Special case: LHA input of resonance decay only.
61  bool nextLHAdec( Event& process); 
62
63  // Accumulate and update statistics (after possible user veto).
64  void accumulate();
65
66  // Print statistics on cross sections and number of events.
67  void statistics(bool reset = false, ostream& os = cout);
68
69  // Reset statistics.
70  void resetStatistics();
71
72  // Add any junctions to the process event record list.
73  void findJunctions( Event& junEvent);
74
75  // Initialize and call resonance decays separately.
76  void initDecays( Info* infoPtrIn, ParticleData* particleDataPtrIn, 
77    Rndm* rndmPtrIn, LHAup* lhaUpPtrIn) { infoPtr = infoPtrIn;
78    resonanceDecays.init( infoPtrIn, particleDataPtrIn, rndmPtrIn); 
79    containerLHAdec.setLHAPtr(lhaUpPtrIn, particleDataPtrIn); }
80  bool nextDecays( Event& process) { return resonanceDecays.next( process);} 
81
82private: 
83
84  // Constants: could only be changed in the code itself.
85  static const int MAXLOOP;
86
87  // Generic info for process generation.
88  bool   doSecondHard, doSameCuts, allHardSame, noneHardSame, 
89         someHardSame, cutsAgree, cutsOverlap, doResDecays;
90  int    nImpact, startColTag;
91  double mHatMin1, mHatMax1, pTHatMin1, pTHatMax1, mHatMin2, mHatMax2, 
92         pTHatMin2, pTHatMax2, sigmaND, sumImpactFac, sum2ImpactFac;
93
94  // Vector of containers of internally-generated processes.
95  vector<ProcessContainer*> containerPtrs;
96  int    iContainer, iLHACont;
97  double sigmaMaxSum;
98
99  // Ditto for optional choice of a second hard process.
100  vector<ProcessContainer*> container2Ptrs;
101  int    i2Container;
102  double sigma2MaxSum;
103
104  // Single half-dummy container for LHA input of resonance decay only.
105  ProcessContainer containerLHAdec;
106
107  // Pointer to various information on the generation.
108  Info*           infoPtr;
109
110  // Pointer to the particle data table.
111  ParticleData*   particleDataPtr;
112
113  // Pointer to the random number generator.
114  Rndm*           rndmPtr;
115
116  // Pointers to the two incoming beams.
117  BeamParticle*   beamAPtr;
118  BeamParticle*   beamBPtr;
119
120  // Pointer to Standard Model couplings, including alphaS and alphaEM.
121  Couplings*      couplingsPtr;
122
123  // Pointer to SigmaTotal object needed to handle soft QCD processes.
124  SigmaTotal*     sigmaTotPtr;
125
126  // Pointer to SusyLesHouches object for interface to SUSY spectra.
127  SusyLesHouches* slhaPtr;
128
129  // Pointer to userHooks object for user interaction with program.
130  UserHooks*      userHooksPtr;
131
132  // Pointer to LHAup for generating external events.
133  LHAup*          lhaUpPtr;
134
135  // Initialization of some SLHA blocks.
136  void initSLHA();
137
138  // ResonanceDecay object does sequential resonance decays.
139  ResonanceDecays resonanceDecays;
140
141  // Generate the next event with one interaction.
142  bool nextOne( Event& process);
143
144  // Generate the next event with two hard interactions.
145  bool nextTwo( Event& process);
146
147  // Append the second to the first process list.
148  void combineProcessRecords( Event& process, Event& process2);
149
150  // Check that colours match up.
151  bool checkColours( Event& process);
152
153  // Print statistics when two hard processes allowed.
154  void statistics2(bool reset, ostream& os = cout);
155
156  // Statistics for Les Houches event classification.
157  vector<int> codeLHA, nEvtLHA;
158
159};
160
161//==========================================================================
162
163} // end namespace Pythia8
164
165#endif // Pythia8_ProcessLevel_H
Note: See TracBrowser for help on using the repository browser.