source: HiSusy/trunk/Pythia8/pythia8170/include/SpaceShower.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: 7.7 KB
Line 
1// SpaceShower.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// Header file for the spacelike initial-state showers.
7// SpaceDipoleEnd: radiating dipole end in ISR.
8// SpaceShower: handles the showering description.
9
10#ifndef Pythia8_SpaceShower_H
11#define Pythia8_SpaceShower_H
12
13#include "Basics.h"
14#include "BeamParticle.h"
15#include "Event.h"
16#include "Info.h"
17#include "ParticleData.h"
18#include "PartonSystems.h"
19#include "PythiaStdlib.h"
20#include "Settings.h"
21#include "StandardModel.h"
22#include "UserHooks.h"
23
24namespace Pythia8 {
25 
26//==========================================================================
27
28// Data on radiating dipole ends, only used inside SpaceShower.
29
30class SpaceDipoleEnd {
31 
32public:
33
34  // Constructor.
35  SpaceDipoleEnd( int systemIn = 0, int sideIn = 0, int iRadiatorIn = 0, 
36    int iRecoilerIn = 0, double pTmaxIn = 0., int colTypeIn = 0, 
37    int chgTypeIn = 0,  int MEtypeIn = 0, bool normalRecoilIn = true) : 
38    system(systemIn), side(sideIn), iRadiator(iRadiatorIn), 
39    iRecoiler(iRecoilerIn), pTmax(pTmaxIn), colType(colTypeIn), 
40    chgType(chgTypeIn), MEtype(MEtypeIn), normalRecoil(normalRecoilIn), 
41    nBranch(0), pT2Old(0.), zOld(0.5) { }
42 
43  // Store values for trial emission.
44  void store( int idDaughterIn, int idMotherIn, int idSisterIn,   
45    double x1In, double x2In, double m2DipIn, double pT2In, double zIn,
46    double xMoIn, double Q2In, double mSisterIn, double m2SisterIn, 
47    double pT2corrIn) {idDaughter = idDaughterIn; idMother = idMotherIn; 
48    idSister = idSisterIn; x1 = x1In; x2 = x2In; m2Dip = m2DipIn; 
49    pT2 = pT2In; z = zIn; xMo = xMoIn; Q2 = Q2In; mSister = mSisterIn; 
50    m2Sister = m2SisterIn; pT2corr = pT2corrIn;}
51 
52  // Basic properties related to evolution and matrix element corrections.
53  int    system, side, iRadiator, iRecoiler;
54  double pTmax;
55  int    colType, chgType, MEtype;
56  bool   normalRecoil;
57 
58  // Properties specific to current trial emission.
59  int    nBranch, idDaughter, idMother, idSister, iFinPol; 
60  double x1, x2, m2Dip, pT2, z, xMo, Q2, mSister, m2Sister, pT2corr, 
61         pT2Old, zOld, asymPol;
62
63} ;
64 
65//==========================================================================
66
67// The SpaceShower class does spacelike showers.
68
69class SpaceShower {
70
71public:
72
73  // Constructor.
74  SpaceShower() {beamOffset = 0;}
75
76  // Destructor.
77  virtual ~SpaceShower() {}
78
79  // Initialize various pointers.
80  // (Separated from rest of init since not virtual.)
81  void initPtr(Info* infoPtrIn, Settings* settingsPtrIn, 
82    ParticleData* particleDataPtrIn, Rndm* rndmPtrIn,
83    PartonSystems* partonSystemsPtrIn, UserHooks* userHooksPtrIn)  {
84    infoPtr = infoPtrIn; settingsPtr = settingsPtrIn; 
85    particleDataPtr = particleDataPtrIn; rndmPtr = rndmPtrIn; 
86    partonSystemsPtr = partonSystemsPtrIn; userHooksPtr = userHooksPtrIn;}
87
88  // Initialize generation. Possibility to force re-initialization by hand.
89  virtual void init(BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn);
90
91  // New beams possible for handling of hard diffraction. (Not virtual.)
92  void reassignBeamPtrs( BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
93    int beamOffsetIn = 0) {beamAPtr = beamAPtrIn; beamBPtr = beamBPtrIn;
94    beamOffset = beamOffsetIn;}
95
96  // Find whether to limit maximum scale of emissions, and whether to dampen.
97  virtual bool limitPTmax( Event& event, double Q2Fac = 0., 
98    double Q2Ren = 0.);
99
100  // Potential enhancement factor of pTmax scale for hardest emission.
101  virtual double enhancePTmax() const {return pTmaxFudge;}
102
103  // Prepare system for evolution; identify ME.
104  virtual void prepare( int iSys, Event& event, bool limitPTmaxIn = true);
105
106  // Update dipole list after each FSR emission. Currently superfluous.
107  // Usage: update( iSys, event). 
108  virtual void update( int , Event& ) {}
109
110  // Select next pT in downwards evolution.
111  virtual double pTnext( Event& event, double pTbegAll, double pTendAll,
112    int nRadIn = -1);
113
114  // ME corrections and kinematics that may give failure.
115  virtual bool branch( Event& event); 
116
117  // Tell which system was the last processed one.
118  int system() const {return iSysSel;} 
119
120  // Flag for failure in branch(...) that will force a retry of parton level.
121  bool doRestart() const {return rescatterFail;}
122
123  // Print dipole list; for debug mainly.
124  virtual void list(ostream& os = cout) const;
125
126protected:
127
128  // Pointer to various information on the generation.
129  Info*          infoPtr;
130
131  // Pointer to the settings database.
132  Settings*      settingsPtr;
133
134  // Pointer to the particle data table.
135  ParticleData*  particleDataPtr;
136
137  // Pointer to the random number generator.
138  Rndm*          rndmPtr;
139
140  // Pointers to the two incoming beams. Offset their location in event.
141  BeamParticle*  beamAPtr;
142  BeamParticle*  beamBPtr;
143  int            beamOffset;
144
145  // Pointer to information on subcollision parton locations.
146  PartonSystems* partonSystemsPtr;
147
148  // Pointer to userHooks object for user interaction with program.
149  UserHooks*     userHooksPtr;
150
151  // Store properties to be returned by methods.
152  bool   rescatterFail;
153  int    iSysSel;
154  double pTmaxFudge;
155
156private: 
157
158  // Constants: could only be changed in the code itself.
159  static const int    MAXLOOPTINYPDF;
160  static const double CTHRESHOLD, BTHRESHOLD, EVALPDFSTEP, TINYPDF, 
161         TINYKERNELPDF, TINYPT2, HEAVYPT2EVOL, HEAVYXEVOL, EXTRASPACEQ, 
162         LAMBDA3MARGIN, PT2MINWARN, LEPTONXMIN, LEPTONXMAX, LEPTONPT2MIN, 
163         LEPTONFUDGE;
164
165  // Initialization data, normally only set once.
166  bool   doQCDshower, doQEDshowerByQ, doQEDshowerByL, useSamePTasMPI,
167         doMEcorrections, doMEafterFirst, doPhiPolAsym, doPhiIntAsym, 
168         doRapidityOrder, canVetoEmission;
169  int    pTmaxMatch, pTdampMatch, alphaSorder, alphaEMorder, nQuarkIn, 
170         enhanceScreening;
171  double pTdampFudge, mc, mb, m2c, m2b, renormMultFac, factorMultFac, 
172         alphaSvalue, alphaS2pi, Lambda3flav, Lambda4flav, Lambda5flav, 
173         Lambda3flav2, Lambda4flav2, Lambda5flav2, pT0Ref, ecmRef, ecmPow, 
174         pTmin, sCM, eCM, pT0, pTminChgQ, pTminChgL, pT20, pT2min, 
175         pT2minChgQ, pT2minChgL, pTmaxFudgeMPI, strengthIntAsym; 
176
177  // alphaStrong and alphaEM calculations.
178  AlphaStrong alphaS;
179  AlphaEM alphaEM;
180
181  // Some current values.
182  bool   sideA, dopTdamp;
183  int    iNow, iRec, idDaughter, nRad, idResFirst, idResSecond;
184  double xDaughter, x1Now, x2Now, m2Dip, m2Rec, pT2damp, pTbegRef;
185
186  // All dipole ends
187  vector<SpaceDipoleEnd> dipEnd;
188
189  // Pointers to the current and hardest (so far) dipole ends.
190  int iDipNow, iSysNow;
191  SpaceDipoleEnd* dipEndNow; 
192  int iDipSel;
193  SpaceDipoleEnd* dipEndSel; 
194 
195  // Evolve a QCD dipole end.
196  void pT2nextQCD( double pT2begDip, double pT2endDip);
197
198  // Evolve a QCD dipole end near heavy quark threshold region.
199  void pT2nearQCDthreshold( BeamParticle& beam, double m2Massive, 
200    double m2Threshold, double xMaxAbs, double zMinAbs, 
201    double zMaxMassive);
202
203  // Evolve a QED dipole end.
204  void pT2nextQED( double pT2begDip, double pT2endDip);
205
206  // Find class of ME correction.
207  int findMEtype( int iSys, Event& event);
208
209  // Provide maximum of expected ME weight; for preweighting of evolution.
210  double calcMEmax( int MEtype, int idMother, int idDaughterIn);
211
212  // Provide actual ME weight for current branching.
213  double calcMEcorr(int MEtype, int idMother, int idDaughterIn, double M2, 
214    double z, double Q2); 
215
216  // Find coefficient of azimuthal asymmetry from gluon polarization.
217  void findAsymPol( Event& event, SpaceDipoleEnd* dip);
218
219};
220 
221//==========================================================================
222
223} // end namespace Pythia8
224
225#endif // Pythia8_SpaceShower_H
Note: See TracBrowser for help on using the repository browser.