Converting PWG/TRD to native cmake
[u/mrichter/AliRoot.git] / EVGEN / AliGenEMlib.h
CommitLineData
e40b9538 1#ifndef ALIGENEMLIB_H
2#define ALIGENEMLIB_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id: AliGenEMlib.h 30052 2008-11-25 14:54:18Z morsch $ */
7
8/////////////////////////////////////////////////////////////////////////////
9// //
10// Implementation of AliGenEMlib for electron, di-electron, and photon //
11// cocktail calculations. //
12// It is based on AliGenGSIlib. //
13// //
14// Responsible: R.Averbeck@gsi.de //
15// //
16/////////////////////////////////////////////////////////////////////////////
17
18#include "AliGenLib.h"
19class TRandom;
20
21class AliGenEMlib :public AliGenLib {
6e38a462 22 public:
23
24 enum Particle_t{kPizero=0x0, kEta=0x1, kRho0=0x2, kOmega=0x3, kEtaprime=0x4, kPhi=0x5, kJpsi=0x6, kSigma0=0x7, kK0s=0x8, kDeltaPlPl=0x9, kDeltaPl=0xA, kDeltaMi=0xB, kDeltaZero=0xC, kRhoPl = 0xD, kRhoMi = 0xE, kK0star = 0xF, kDirectRealGamma=0x10, kDirectVirtGamma=0x11 };
25 enum Centrality_t{ kpp = 0x0,
26 k0005=0x1, k0510=0x2, k1020=0x3, k2030=0x4, k3040=0x5, k4050=0x6, k5060=0x7, k0010=0x8, k2040=0x9, k4060=0xA, k6080=0xB, k0020=0xC, k0040=0xD, k2080=0xE, k4080=0xF, kCentralities=0x10};
27 enum CollisionSystem_t {kpp900GeV=0x0, kpp2760GeV=0x1, kpp7TeV=0x2, kpPb=0x3, kPbPb=0x4};
28 enum PtParamSetPi0_t{kPizeroParam=0x0, kPizeroParamlow=0x1, kPizeroParamhigh=0x2,
29 kPichargedParam=0x3, kPichargedParamlow=0x4, kPichargedParamhigh=0x5,
30 kPizeroParamAlter=0x6, kPizeroParamAlterlow=0x7, kPizeroParamAlterhigh=0x8,
31 kNPi0Param=0x9
32 };
33 enum PtParamSetEta_t{kEtaParampp=0x0, kEtaParampplow=0x1, kEtaParampphigh=0x2,
34 kEtaParamRatiopp=0x3, kEtaParamRatiopplow=0x4, kEtaParamRatiopphigh=0x5,
35 kEtaParamPbPb=0x6,
36 kEtaParamPPb=0x7
37 };
38 enum PtParamSetOmega_t{kOmegaParampp=0x0, kOmegaParampplow=0x1, kOmegaParampphigh=0x2,
39 kOmegaParamRatiopp=0x3, kOmegaParamRatiopplow=0x4, kOmegaParamRatiopphigh=0x5,
40 kOmegaParamPbPb=0x6,
41 kOmegaParamPPb=0x7
42 };
43 enum PtParamSetPhi_t{kPhiParampp=0x0, kPhiParampplow=0x1, kPhiParampphigh=0x2,
44 kPhiParamPbPb=0x3,
45 kPhiParamPPb=0x4
46 };
47
48
49 enum v2Sys_t{kLoV2Sys=-1, kNoV2Sys=0, kUpV2Sys=+1};
50
51 AliGenEMlib() { } ;
52
53 static void SelectParams( Int_t collisionSystem,
54 Int_t ptSelectPi0,
55 Int_t ptSelectEta,
56 Int_t ptSelectOmega,
57 Int_t ptSelectPhi,
58 Int_t centSelect=kpp,
59 Int_t v2sys=kNoV2Sys) {
60 fgSelectedCollisionsSystem = collisionSystem;
61 fgSelectedPtParamPi0=ptSelectPi0;
62 fgSelectedPtParamEta=ptSelectEta;
63 fgSelectedPtParamOmega=ptSelectOmega;
64 fgSelectedPtParamPhi=ptSelectPhi;
65 fgSelectedCentrality=centSelect;
66 fgSelectedV2Systematic=v2sys;
67
68 }
69
70 GenFunc GetPt(Int_t param, const char * tname=0) const;
71 GenFunc GetY(Int_t param, const char * tname=0) const;
72 GenFuncIp GetIp(Int_t param, const char * tname=0) const;
73 GenFunc GetV2(Int_t param, const char * tname=0) const;
74
75 //private:
76
77 // General functions
78
79 // General functions
80 static Int_t fgSelectedCollisionsSystem; // selected pT parameter
81 static Int_t fgSelectedPtParamPi0; // selected pT parameter
82 static Int_t fgSelectedPtParamEta; // selected pT parameter
83 static Int_t fgSelectedPtParamOmega; // selected pT parameter
84 static Int_t fgSelectedPtParamPhi; // selected pT parameter
85 static Int_t fgSelectedCentrality; // selected Centrality
86 static Int_t fgSelectedV2Systematic; // selected v2 systematics, usefully values: -1,0,1
87
88
89 static Double_t PtModifiedHagedornThermal(Double_t pt,
90 Double_t c,
91 Double_t p0,
92 Double_t p1,
93 Double_t n,
94 Double_t cT,
95 Double_t T);
96
97
98
99 static Double_t PtModifiedHagedornExp(Double_t pt,
100 Double_t c,
101 Double_t p0,
102 Double_t p1,
103 Double_t p2,
104 Double_t n);
105
106
107 static Double_t PtModifiedHagedornExp2(Double_t pt,
108 Double_t c,
109 Double_t a,
110 Double_t b,
111 Double_t p0,
112 Double_t p1,
113 Double_t d,
114 Double_t n);
115
116
117 static Double_t PtTsallis(Double_t pt,
118 Double_t m,
119 Double_t c,
120 Double_t T,
121 Double_t n);
122
123 static Double_t PtParticleRatiopp(Double_t pt,
124 Double_t m1,
125 Double_t m2,
126 Double_t c1,
127 Double_t c2,
128 Double_t T1,
129 Double_t T2,
130 Double_t n);
131
132 static Double_t PtXQCD( Double_t pt,
133 Double_t a,
134 Double_t b,
135 Double_t c,
136 Double_t d,
137 Double_t e,
138 Double_t f);
139
140 static Double_t PtModTsallis( Double_t pt,
141 Double_t a,
142 Double_t b,
143 Double_t c,
144 Double_t d,
145 Double_t e,
146 Double_t f,
147 Double_t g,
148 Double_t mass);
149
150 static Double_t PtQCD( Double_t pt,
151 Double_t a,
152 Double_t b,
153 Double_t c,
154 Double_t d,
155 Double_t e);
156
157 static Double_t PtExponential(const Double_t *pt, const Double_t *param);
158 static Double_t PtModifiedHagedornPowerlaw(const Double_t *pt, const Double_t *param);
159 static Double_t PtDoublePowerlaw(const Double_t *pt, const Double_t *param);
160 static Double_t IntegratedKrollWada(const Double_t *mh, const Double_t *);
161
162 // direct gamma
163 static Double_t PtPromptRealGamma(const Double_t *px, const Double_t *dummy);
164 static Double_t PtPromptVirtGamma(const Double_t *px, const Double_t *dummy);
165 static Double_t PtThermalRealGamma(const Double_t *px, const Double_t *dummy);
166 static Double_t PtThermalVirtGamma(const Double_t *px, const Double_t *dummy);
167
168 static Int_t IpDirectRealGamma(TRandom *ran);
169 static Double_t PtDirectRealGamma(const Double_t *px, const Double_t *dummy);
170 static Double_t YDirectRealGamma(const Double_t *py, const Double_t *dummy);
171 static Double_t V2DirectRealGamma(const Double_t *px, const Double_t *dummy);
172
173 static Int_t IpDirectVirtGamma(TRandom *ran);
174 static Double_t PtDirectVirtGamma(const Double_t *px, const Double_t *dummy);
175 static Double_t YDirectVirtGamma(const Double_t *py, const Double_t *dummy);
176 static Double_t V2DirectVirtGamma(const Double_t *px, const Double_t *dummy);
177
178 // Pizero
179 static Int_t IpPizero(TRandom *ran);
180 static Double_t PtPizero(const Double_t *px, const Double_t *dummy);
181 static Double_t YPizero(const Double_t *py, const Double_t *dummy);
182 static Double_t V2Pizero(const Double_t *px, const Double_t *dummy);
183
184 // Eta
185 static Int_t IpEta(TRandom *ran);
186 static Double_t PtEta(const Double_t *px, const Double_t *dummy);
187 static Double_t YEta(const Double_t *py, const Double_t *dummy);
188 static Double_t V2Eta(const Double_t *px, const Double_t *dummy);
189
190 // Rho
191 static Int_t IpRho0(TRandom *ran);
192 static Double_t PtRho0(const Double_t *px, const Double_t *dummy);
193 static Double_t YRho0(const Double_t *py, const Double_t *dummy);
194 static Double_t V2Rho0(const Double_t *py, const Double_t *dummy);
195
196
197 // Omega
198 static Int_t IpOmega(TRandom *ran);
199 static Double_t PtOmega(const Double_t *px, const Double_t *dummy);
200 static Double_t YOmega(const Double_t *py, const Double_t *dummy);
201 static Double_t V2Omega(const Double_t *py, const Double_t *dummy);
202
203 // Etaprime
204 static Int_t IpEtaprime(TRandom *ran);
205 static Double_t PtEtaprime(const Double_t *px, const Double_t *dummy);
206 static Double_t YEtaprime(const Double_t *py, const Double_t *dummy);
207 static Double_t V2Etaprime(const Double_t *py, const Double_t *dummy);
208
209 // Phi
210 static Int_t IpPhi(TRandom *ran);
211 static Double_t PtPhi(const Double_t *px, const Double_t *dummy);
212 static Double_t YPhi(const Double_t *py, const Double_t *dummy);
213 static Double_t V2Phi(const Double_t *py, const Double_t *dummy);
214
215 // Jpsi
216 static Int_t IpJpsi(TRandom *ran);
217 static Double_t PtJpsi(const Double_t *px, const Double_t *dummy);
218 static Double_t YJpsi(const Double_t *py, const Double_t *dummy);
219 static Double_t V2Jpsi(const Double_t *py, const Double_t *dummy);
220
221 // Sigma
222 static Int_t IpSigma(TRandom *ran);
223 static Double_t PtSigma( const Double_t *px, const Double_t *dummy );
224 static Double_t YSigma(const Double_t *py, const Double_t *dummy);
225 static Double_t V2Sigma0( const Double_t *px, const Double_t *dummy );
226
227 // K0short
228 static Int_t IpK0short(TRandom *ran);
229 static Double_t PtK0short( const Double_t *px, const Double_t *dummy );
230 static Double_t YK0short(const Double_t *py, const Double_t *dummy);
231 static Double_t V2K0sshort( const Double_t *px, const Double_t *dummy );
232
233 // Delta++
234 static Int_t IpDeltaPlPl(TRandom *ran);
235 static Double_t PtDeltaPlPl( const Double_t *px, const Double_t *dummy );
236 static Double_t YDeltaPlPl(const Double_t *py, const Double_t *dummy);
237 static Double_t V2DeltaPlPl( const Double_t *px, const Double_t *dummy );
238
239 // Delta+
240 static Int_t IpDeltaPl(TRandom *ran);
241 static Double_t PtDeltaPl( const Double_t *px, const Double_t *dummy );
242 static Double_t YDeltaPl(const Double_t *py, const Double_t *dummy);
243 static Double_t V2DeltaPl( const Double_t *px, const Double_t *dummy );
244
245 // Delta-
246 static Int_t IpDeltaMi(TRandom *ran);
247 static Double_t PtDeltaMi( const Double_t *px, const Double_t *dummy );
248 static Double_t YDeltaMi(const Double_t *py, const Double_t *dummy);
249 static Double_t V2DeltaMi( const Double_t *px, const Double_t *dummy );
250
251 // Delta0
252 static Int_t IpDeltaZero(TRandom *ran);
253 static Double_t PtDeltaZero( const Double_t *px, const Double_t *dummy );
254 static Double_t YDeltaZero(const Double_t *py, const Double_t *dummy);
255 static Double_t V2DeltaZero( const Double_t *px, const Double_t *dummy );
256
257 // Rho+
258 static Int_t IpRhoPl(TRandom *ran);
259 static Double_t PtRhoPl( const Double_t *px, const Double_t *dummy );
260 static Double_t YRhoPl(const Double_t *py, const Double_t *dummy);
261 static Double_t V2RhoPl( const Double_t *px, const Double_t *dummy );
262
263 // Rho-
264 static Int_t IpRhoMi(TRandom *ran);
265 static Double_t PtRhoMi( const Double_t *px, const Double_t *dummy );
266 static Double_t YRhoMi(const Double_t *py, const Double_t *dummy);
267 static Double_t V2RhoMi( const Double_t *px, const Double_t *dummy );
268
269 // K0*
270 static Int_t IpK0star(TRandom *ran);
271 static Double_t PtK0star( const Double_t *px, const Double_t *dummy );
272 static Double_t YK0star(const Double_t *py, const Double_t *dummy);
273 static Double_t V2K0star( const Double_t *px, const Double_t *dummy );
274
275
276 // General
277 //static Double_t PtFlat(const Double_t *px, const Double_t *dummy);
278 static Double_t YFlat(Double_t y);
279 static Double_t MtScal(Double_t pt, Int_t np);
280 static Double_t V2Param(const Double_t *px, const Double_t *param);
281 static Double_t V2Flat(const Double_t *px, const Double_t *param);
282 static Double_t KEtScal(Double_t pt, Int_t np);
283 static Double_t GetTAA(Int_t cent);
284
285 static Double_t CrossOverLc(double a, double b, double x);
286 static Double_t CrossOverRc(double a, double b, double x);
287
288 static const Double_t fgkPtParam[kCentralities][10]; // parameters of pi pt spectrum
289 static const Double_t fgkModTsallisParamPi0PbPb[kCentralities][7]; // parameters for ModTsallis function for pi0 in PbPb
290 static const Double_t fgkModTsallisParamPiChargedPbPb[kCentralities][7]; // parameters for ModTsallis function for pi+- in PbPb
291 static const Double_t fgkV2param[kCentralities][16]; // parameters of pi v2
292 static const Double_t fgkRawPtOfV2Param[kCentralities][10]; // parameters of the raw pt spectrum of v2 analysys
293 static const Double_t fgkThermPtParam[kCentralities][2]; // parameters of thermal gamma pt
294 static const Double_t fgkHM[16]; // particle masses
295 static const Double_t fgkMtFactor[3][16]; // mt scaling factor
296 static const Double_t fgkParamSetPi07TeV[kNPi0Param][7]; // parameters for pi0 in 7 TeV
297 static const Double_t fgkParamSetPi02760GeV[kNPi0Param][7]; // parameters for pi0 in 2.76 TeV
298 static const Double_t fgkParamSetPi0900GeV[kNPi0Param][7]; // parameters for pi0 in 0.9 TeV
299
300 ClassDef(AliGenEMlib,1)
301
e40b9538 302};
303
4ae1c9f0 304
e40b9538 305#endif