]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PYTHIA8/pythia8130/include/TimeShower.h
Missing ; added.
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8130 / include / TimeShower.h
CommitLineData
5ad4eb21 1// TimeShower.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// Header file for the timelike final-state showers.
7// TimeDipoleEnd: data on a radiating dipole end.
8// TimeShower: handles the showering description.
9
10#ifndef Pythia8_TimeShower_H
11#define Pythia8_TimeShower_H
12
13#include "Basics.h"
14#include "BeamParticle.h"
15#include "Event.h"
16#include "Info.h"
17#include "ParticleData.h"
18#include "PythiaStdlib.h"
19#include "Settings.h"
20#include "StandardModel.h"
21
22namespace Pythia8 {
23
24//**************************************************************************
25
26// Data on radiating dipole ends; only used inside TimeShower class.
27
28class TimeDipoleEnd {
29
30public:
31
32 // Constructors.
33 TimeDipoleEnd() : iRadiator(-1), iRecoiler(-1), pTmax(0.), colType(0),
34 chgType(0), gamType(0), isrType(0), system(0), MEtype(0),
35 iMEpartner(-1), isOctetOnium(false), MEmix(0.), MEorder(true),
36 MEsplit(true), MEgluinoRec(false) { }
37 TimeDipoleEnd(int iRadiatorIn, int iRecoilerIn, double pTmaxIn = 0.,
38 int colIn = 0, int chgIn = 0, int gamIn = 0, int isrIn = 0,
39 int systemIn = 0, int MEtypeIn = 0, int iMEpartnerIn = -1,
40 bool isOctetOniumIn = false, double MEmixIn = 0., bool MEorderIn = true,
41 bool MEsplitIn = true, bool MEgluinoRecIn = false) :
42 iRadiator(iRadiatorIn), iRecoiler(iRecoilerIn), pTmax(pTmaxIn),
43 colType(colIn), chgType(chgIn), gamType(gamIn), isrType(isrIn),
44 system(systemIn), MEtype(MEtypeIn), iMEpartner(iMEpartnerIn),
45 isOctetOnium(isOctetOniumIn), MEmix(MEmixIn), MEorder (MEorderIn),
46 MEsplit(MEsplitIn), MEgluinoRec(MEgluinoRecIn) { }
47
48 // Basic properties related to dipole and matrix element corrections.
49 int iRadiator, iRecoiler;
50 double pTmax;
51 int colType, chgType, gamType, isrType, system, MEtype, iMEpartner;
52 bool isOctetOnium;
53 double MEmix;
54 bool MEorder, MEsplit, MEgluinoRec;
55
56 // Properties specific to current trial emission.
57 int flavour, iAunt;
58 double mRad, m2Rad, mRec, m2Rec, mDip, m2Dip, m2DipCorr,
59 pT2, m2, z, mFlavour, asymPol;
60
61} ;
62
63//**************************************************************************
64
65// The TimeShower class does timelike showers.
66
67class TimeShower {
68
69public:
70
71 // Constructor.
72 TimeShower() {}
73
74 // Destructor.
75 virtual ~TimeShower() {}
76
77 // Initialize pointer to Info for error messages.
78 // (Separated from rest of init since not virtual.)
79 void initPtr(Info* infoPtrIn) {infoPtr = infoPtrIn;}
80
81 // Initialize alphaStrong and related pTmin parameters.
82 virtual void init( BeamParticle* beamAPtrIn = 0,
83 BeamParticle* beamBPtrIn = 0);
84
85 // Potential enhancement factor of pTmax scale for hardest emission.
86 virtual double enhancePTmax() {return pTmaxFudge;}
87
88 // Top-level routine to do a full time-like shower in resonance decay.
89 virtual int shower( int iBeg, int iEnd, Event& event, double pTmax);
90
91 // Prepare system for evolution after each new interaction; identify ME.
92 virtual void prepare( int iSys, Event& event);
93
94 // Update dipole list after each ISR emission.
95 virtual void update( int iSys, Event& event);
96
97 // Select next pT in downwards evolution.
98 virtual double pTnext( Event& event, double pTbegAll, double pTendAll);
99
100 // ME corrections and kinematics that may give failure,
101 virtual bool branch( Event& event);
102
103 // Tell which system was the last processed one.
104 int system() const {return iSysSel;};
105
106 // Print dipole list; for debug mainly.
107 virtual void list( ostream& os = cout);
108
109protected:
110
111 // Pointer to various information on the generation.
112 Info* infoPtr;
113
114 // Pointers to the two incoming beams.
115 BeamParticle* beamAPtr;
116 BeamParticle* beamBPtr;
117
118 // Store index of last processed system.
119 int iSysSel;
120
121private:
122
123 // Constants: could only be changed in the code itself.
124 static const double SIMPLIFYROOT, XMARGIN, XMARGINCOMB, TINYPDF, LARGEM2,
125 THRESHM2, LAMBDA3MARGIN;
126
127 // Initialization data, normally only set once.
128 bool doQCDshower, doQEDshowerByQ, doQEDshowerByL, doQEDshowerByGamma,
129 doMEcorrections, doPhiPolAsym, allowBeamRecoil;
130 int alphaSorder, nGluonToQuark, alphaEMorder, nGammaToQuark,
131 nGammaToLepton;
132 double pTmaxFudge, mc, mb, m2c, m2b, alphaSvalue, alphaS2pi,
133 Lambda3flav, Lambda4flav, Lambda5flav, Lambda3flav2, Lambda4flav2,
134 Lambda5flav2, pTcolCutMin, pTcolCut, pT2colCut, pTchgQCut,
135 pT2chgQCut, pTchgLCut, pT2chgLCut, mMaxGamma, m2MaxGamma,
136 octetOniumFraction, octetOniumColFac, mZ, gammaZ, thetaWRat;
137
138 // alphaStrong and alphaEM calculations.
139 AlphaStrong alphaS;
140 AlphaEM alphaEM;
141
142 // All dipole ends and a pointer to the selected hardest dipole end.
143 vector<TimeDipoleEnd> dipEnd;
144 TimeDipoleEnd* dipSel;
145
146 // Setup a dipole end, either QCD or QED/photon one.
147 void setupQCDdip( int iSys, int i, int colTag, int colSign, Event& event,
148 bool isOctetOnium = false);
149 void setupQEDdip( int iSys, int i, int chgType, int gamType, Event& event);
150
151 // Evolve a QCD dipole end.
152 void pT2nextQCD( double pT2begDip, double pT2sel, TimeDipoleEnd& dip,
153 Event& event);
154
155 // Evolve a QED dipole end (except photon).
156 void pT2nextQED( double pT2begDip, double pT2sel, TimeDipoleEnd& dip,
157 Event& event);
158
159 // Find kind of QCD ME correction.
160 void findMEtype( Event& event, TimeDipoleEnd& dip);
161
162 // Find type of particle; used by findMEtype.
163 int findMEparticle( int id);
164
165 // Find mixture of V and A in gamma/Z: energy- and flavour-dependent.
166 double gammaZmix( Event& event, int iRes, int iDau1, int iDau2);
167
168 // Set up to calculate QCD ME correction with calcMEcorr.
169 double findMEcorr(TimeDipoleEnd* dip, Particle& rad, Particle& partner,
170 Particle& emt);
171
172 // Calculate value of QCD ME correction.
173 double calcMEcorr( int kind, int combiIn, double mixIn, double x1,
174 double x2, double r1, double r2);
175
176 // Find coefficient of azimuthal asymmetry from gluon polarization.
177 void findAsymPol( Event& event, TimeDipoleEnd* dip);
178
179};
180
181//**************************************************************************
182
183} // end namespace Pythia8
184
185#endif // Pythia8_TimeShower_H