using option '-treename HLTesdTree' for EsdCollector, adding default parameter for...
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8130 / include / Info.h
CommitLineData
5ad4eb21 1// Info.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 a class that keep track of generic event info.
7// Info: contains information on the generation process and errors.
8
9#ifndef Pythia8_Info_H
10#define Pythia8_Info_H
11
12#include "PythiaStdlib.h"
13
14namespace Pythia8 {
15
16//**************************************************************************
17
18// The Info class contains a mixed bag of information on the event
19// generation activity, especially on the current subprocess properties,
20// and on the number of errors encountered. This is used by the
21// generation machinery, but can also be read by the user.
22
23class Info {
24
25public:
26
27 // Constructor.
28 Info() {}
29
30 // Listing of most available information on current event.
31 void list(ostream& os = cout);
32
33 // Beam particles (in rest frame). CM energy of event.
34 int idA() const {return idASave;}
35 int idB() const {return idBSave;}
36 double pzA() const {return pzASave;}
37 double pzB() const {return pzBSave;}
38 double eA() const {return eASave;}
39 double eB() const {return eBSave;}
40 double mA() const {return mASave;}
41 double mB() const {return mBSave;}
42 double eCM() const {return eCMSave;}
43 double s() const {return sSave;}
44
45 // Process name and code, and the number of final-state particles.
46 string name() const {return nameSave;}
47 int code() const {return codeSave;}
48 int nFinal() const {return nFinalSave;}
49
50 // Are beam particles resolved, with pdf's? Are they diffractive?
51 bool isResolved() const {return isRes;}
52 bool isDiffractiveA() const {return isDiffA;}
53 bool isDiffractiveB() const {return isDiffB;}
54 bool isMinBias() const {return isMB;}
55
56 // Information for Les Houches Accord and reading files.
57 bool isLHA() const {return isLH;}
58 bool atEndOfFile() const {return atEOF;}
59
60 // For minbias and Les Houches Accord identify hardest subprocess.
61 bool hasSub() const {return hasSubSave;}
62 string nameSub() const {return nameSubSave;}
63 int codeSub() const {return codeSubSave;}
64 int nFinalSub() const {return nFinalSubSave;}
65
66 // Incoming parton flavours and x values.
67 int id1() const {return id1Save;}
68 int id2() const {return id2Save;}
69 double x1() const {return x1Save;}
70 double x2() const {return x2Save;}
71 double y() const {return 0.5 * log( x1Save / x2Save );}
72 double tau() const {return x1Save * x2Save;}
73
74 // Incoming parton densities, hard process couplings, Q2 scales.
75 double pdf1() const {return pdf1Save;}
76 double pdf2() const {return pdf2Save;}
77 double QFac() const {return sqrtpos(Q2FacSave);}
78 double Q2Fac() const {return Q2FacSave;}
79 bool isValence1() const {return isVal1;}
80 bool isValence2() const {return isVal2;}
81 double alphaS() const {return alphaSSave;}
82 double alphaEM() const {return alphaEMSave;}
83 double QRen() const {return sqrtpos(Q2RenSave);}
84 double Q2Ren() const {return Q2RenSave;}
85
86 // Mandelstam variables (notation as if subcollision).
87 double mHat() const {return sqrt(sH);}
88 double sHat() const {return sH;}
89 double tHat() const {return tH;}
90 double uHat() const {return uH;}
91 double pTHat() const {return pTH;}
92 double pT2Hat() const {return pTH*pTH;}
93 double m3Hat() const {return m3H;}
94 double m4Hat() const {return m4H;}
95 double thetaHat() const {return thetaH;}
96 double phiHat() const {return phiH;}
97
98 // Weight of current event; normally 1, but used for Les Houches events.
99 double weight() const {return weightSave;}
100
101 // Cross section estimate.
102 long nTried() const {return nTry;}
103 long nSelected() const {return nSel;}
104 long nAccepted() const {return nAcc;}
105 double sigmaGen() const {return sigGen;}
106 double sigmaErr() const {return sigErr;}
107
108 // Impact parameter picture.
109 double bMI() const {return (bIsSet) ? bMISave : 1.;}
110 double enhanceMI() const {return (bIsSet) ? enhanceMISave : 1.;}
111
112 // Maximum pT scales for MI, ISR and FSR (in hard process).
113 double pTmaxMI() const {return pTmaxMISave;}
114 double pTmaxISR() const {return pTmaxISRSave;}
115 double pTmaxFSR() const {return pTmaxFSRSave;}
116
117 // Number of multiple interactions, with code and pT for them.
118 int nMI() const {return nMISave;}
119 int codeMI(int i) const {return codeMISave[i];}
120 double pTMI(int i) const {return pTMISave[i];}
121
122 // Number of times other steps have been carried out.
123 int nISR() const {return nISRSave;}
124 int nFSRinProc() const {return nFSRinProcSave;}
125 int nFSRinRes() const {return nFSRinResSave;}
126
127 // Reset to empty map of error messages.
128 void errorReset() {messages.clear();}
129
130 // Print a message the first few times. Insert in database.
131 void errorMsg(string messageIn, string extraIn = " ",
132 ostream& os = cout);
133
134 // Provide total number of errors/aborts/warnings experienced to date.
135 int errorTotalNumber();
136
137 // Print statistics on errors/aborts/warnings.
138 void errorStatistics(ostream& os = cout);
139
140private:
141
142 // Store common beam quantities.
143 int idASave, idBSave;
144 double pzASave, eASave,mASave, pzBSave, eBSave, mBSave, eCMSave, sSave;
145
146 // Store common integrated cross section quantities.
147 long nTry, nSel, nAcc;
148 double sigGen, sigErr;
149
150 // Store current-event quantities.
151 bool isRes, isDiffA, isDiffB, isMB, isLH, hasSubSave, bIsSet, evolIsSet,
152 atEOF, isVal1, isVal2;
153 int codeSave, codeSubSave, nFinalSave, nFinalSubSave, nTotal,
154 id1Save, id2Save, nMISave, nISRSave, nFSRinProcSave, nFSRinResSave;
155 double x1Save, x2Save, pdf1Save, pdf2Save, Q2FacSave, alphaEMSave,
156 alphaSSave, Q2RenSave, sH, tH, uH, pTH, m3H, m4H, thetaH, phiH,
157 weightSave, bMISave, enhanceMISave, pTmaxMISave, pTmaxISRSave,
158 pTmaxFSRSave;
159 string nameSave, nameSubSave;
160 vector<int> codeMISave;
161 vector<double> pTMISave;
162
163 // Friend classes allowed to set info.
164 friend class Pythia;
165 friend class ProcessLevel;
166 friend class ProcessContainer;
167 friend class PartonLevel;
168 friend class MultipleInteractions;
169
170 // Set info on the two incoming beams: only from Pythia class.
171 void setBeamA( int idAin, double pzAin, double eAin, double mAin) {
172 idASave = idAin; pzASave = pzAin; eASave = eAin; mASave = mAin;}
173 void setBeamB( int idBin, double pzBin, double eBin, double mBin) {
174 idBSave = idBin; pzBSave = pzBin; eBSave = eBin; mBSave = mBin;}
175 void setECM( double eCMin) {eCMSave = eCMin; sSave = eCMSave * eCMSave;}
176
177 // Reset info for current event: only from Pythia class.
178 void clear() { isRes = isDiffA = isDiffB = isMB = isLH = atEOF = bIsSet
179 = isVal1 =isVal2 = false; codeSave = nFinalSave = nTotal = id1Save
180 = id2Save = nMISave = nISRSave = nFSRinProcSave = nFSRinResSave = 0;
181 x1Save = x2Save = pdf1Save = pdf2Save = Q2FacSave = alphaEMSave
182 = alphaSSave = Q2RenSave = sH = tH = uH = pTH = m3H = m4H = thetaH
183 = phiH = 0.; nameSave = " "; weightSave = bMISave = enhanceMISave = 1.;
184 codeMISave.resize(0); pTMISave.resize(0);}
185
186 // Set info on the (sub)process: from ProcessLevel, ProcessContainer or
187 // MultipleInteractions classes.
188 void setType( string nameIn, int codeIn, int nFinalIn,
189 bool isMinBiasIn = false, bool isResolvedIn = true,
190 bool isDiffractiveAin = false, bool isDiffractiveBin = false,
191 bool isLHAin = false) {nameSave = nameIn; codeSave = codeIn;
192 nFinalSave = nFinalIn; isMB = isMinBiasIn; isRes = isResolvedIn;
193 isDiffA = isDiffractiveAin; isDiffB = isDiffractiveBin; isLH = isLHAin;
194 nTotal = 2 + nFinalSave; bIsSet = false; hasSubSave = false;
195 nameSubSave = " "; codeSubSave = 0; nFinalSubSave = 0; evolIsSet = false;}
196 void setSubType( string nameSubIn, int codeSubIn, int nFinalSubIn) {
197 hasSubSave = true; nameSubSave = nameSubIn; codeSubSave = codeSubIn;
198 nFinalSubSave = nFinalSubIn;}
199 void setPDFalpha( int id1In, int id2In, double pdf1In, double pdf2In,
200 double Q2FacIn, double alphaEMIn, double alphaSIn, double Q2RenIn)
201 {id1Save = id1In; id2Save = id2In; pdf1Save = pdf1In; pdf2Save = pdf2In;
202 Q2FacSave = Q2FacIn; alphaEMSave = alphaEMIn; alphaSSave = alphaSIn;
203 Q2RenSave = Q2RenIn;}
204 void setKin( double x1In, double x2In, double sHatIn, double tHatIn,
205 double uHatIn, double pTHatIn, double m3HatIn, double m4HatIn,
206 double thetaHatIn, double phiHatIn) {x1Save = x1In; x2Save = x2In;
207 sH = sHatIn; tH = tHatIn; uH = uHatIn; pTH = pTHatIn; m3H = m3HatIn;
208 m4H = m4HatIn; thetaH = thetaHatIn; phiH = phiHatIn;}
209 void setTypeMI( int codeMIIn, double pTMIIn) {
210 codeMISave.push_back(codeMIIn); pTMISave.push_back(pTMIIn);}
211
212 // Set info on cross section: from ProcessLevel.
213 void setSigma( long nTryIn, long nSelIn, long nAccIn, double sigGenIn,
214 double sigErrIn) { nTry = nTryIn; nSel = nSelIn; nAcc = nAccIn;
215 sigGen = sigGenIn; sigErr = sigErrIn;}
216
217 // Set info on valence character of hard collision partons: from PartonLevel.
218 void setValence( bool isVal1In, bool isVal2In) {isVal1 = isVal1In;
219 isVal2 = isVal2In;}
220
221 // Set info on impact parameter: from PartonLevel.
222 void setImpact( double bMIIn, double enhanceMIIn) {bMISave = bMIIn;
223 enhanceMISave = enhanceMIIn, bIsSet = true;}
224
225 // Set info on pTmax scales and number of evolution steps: from PartonLevel.
226 void setEvolution( double pTmaxMIIn, double pTmaxISRIn, double pTmaxFSRIn,
227 int nMIIn, int nISRIn, int nFSRinProcIn, int nFSRinResIn) {
228 pTmaxMISave = pTmaxMIIn; pTmaxISRSave = pTmaxISRIn;
229 pTmaxFSRSave = pTmaxFSRIn; nMISave = nMIIn; nISRSave = nISRIn;
230 nFSRinProcSave = nFSRinProcIn; nFSRinResSave = nFSRinResIn;
231 evolIsSet = true;}
232
233 // Set info whether reading of Les Houches Accord file at end.
234 void setEndOfFile( bool atEOFin) {atEOF = atEOFin;}
235
236 // Set event weight; currently only for Les Houches description.
237 void setWeight( double weightIn) {weightSave = weightIn;}
238
239 // Number of times the same error message is repeated.
240 static const int TIMESTOPRINT;
241
242 // Map for all error messages.
243 map<string, int> messages;
244
245};
246
247//**************************************************************************
248
249} // end namespace Pythia8
250
251#endif // Pythia8_Info_H