1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 /* $Id: AliGenEMlib.cxx 30052 2008-11-25 14:54:18Z morsch $ */
18 /////////////////////////////////////////////////////////////////////////////
20 // Implementation of AliGenEMlib for electron, di-electron, and photon //
21 // cocktail calculations. //
22 // It is based on AliGenGSIlib. //
24 // Responsible: R.Averbeck@gsi.de //
26 /////////////////////////////////////////////////////////////////////////////
29 #include <Riostream.h>
33 #include "AliGenEMlib.h"
38 //Initializers for static members
39 Int_t AliGenEMlib::fgSelectedPtParam=AliGenEMlib::kPizero7TeVpp;
40 Int_t AliGenEMlib::fgSelectedCentrality=AliGenEMlib::kpp;
41 Int_t AliGenEMlib::fgSelectedV2Systematic=AliGenEMlib::kNoV2Sys;
43 Double_t AliGenEMlib::CrossOverLc(double a, double b, double x){
44 if(x<b-a/2) return 1.0;
45 else if(x>b+a/2) return 0.0;
46 else return cos(((x-b)/a+0.5)*TMath::Pi())/2+0.5;
48 Double_t AliGenEMlib::CrossOverRc(double a, double b, double x){
49 return 1-CrossOverLc(a,b,x);
52 const Double_t AliGenEMlib::fgkV2param[16][15] = {
53 // charged pion cent, based on: https://twiki.cern.ch/twiki/bin/viewauth/ALICE/FlowPAGQM2012talkIdentified
54 { 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 2.0000000000, 0.0000000000, 1.0000000000, 0, 1, 0.0000000000, 1.0000000000 } // pp no V2
55 ,{ 6.551541e-02, 1.438274e+00, 4.626379e-02, 2.512477e+00, 1.371824e+00, 2.964543e-02, 4.630670e+00, 4.228889e+00, 6.037970e-02, 1.425269e-03, 1.144124e+00, 0, 1, 9.154016e-04, 1.288285e+00 } // 0-5
56 ,{ 1.171360e-01, 1.333046e+00, 4.536752e-02, 3.046448e+00, 3.903714e+00, 4.407124e-02, 9.122534e-01, 4.834519e+00, 1.186237e-01, 2.179274e-03, 8.968478e-01, 0, 1, 1.501201e-03, 9.902785e-01 } // 5-10
57 ,{ 1.748423e-01, 1.285211e+00, 4.219624e-02, 4.019148e+00, 4.255047e+00, 7.956751e-03, 1.184731e-01,-9.211391e+00, 5.768716e-01, 3.127110e-03, 6.808650e-01, 0, 1, 2.786807e-03, 6.159338e-01 } // 10-20
58 ,{ 2.152937e-01, 1.405391e+00, 5.037925e-02, 3.214458e+00, 3.991894e+00, 3.655882e-02, 1.968766e-01,-1.637650e+01, 7.023397e+00, 4.573453e-03, 6.031381e-01, 0, 1, 3.564348e-03, 5.748053e-01 } // 20-30
59 ,{ 2.409800e-01, 1.476557e+00, 5.759362e-02, 3.339713e+00, 3.642386e+00,-1.544366e-02, 1.098611e-01,-1.373154e+01, 1.471955e+00, 5.200180e-03, 6.315474e-01, 0, 1, 3.776112e-03, 6.298605e-01 } // 30-40
60 ,{ 2.495087e-01, 1.543711e+00, 6.217817e-02, 3.517101e+00, 4.558221e+00, 6.021316e-02, 1.486822e-01,-5.769155e+00, 5.576843e-01, 5.348029e-03, 7.255976e-01, 0, 1, 3.531350e-03, 7.661694e-01 } // 40-50
61 ,{ 2.166449e-01, 1.931014e+00, 8.195656e-02, 2.226742e+00, 3.106472e+00, 1.058786e-01, 8.558786e-01, 4.006680e+00, 2.476313e-01, 5.137623e-03, 9.104401e-01, 0, 1, 2.477450e-03, 1.109649e+00 } // 50-60
62 ,{ 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 2.0000000000, 0.0000000000, 1.0000000000, 0, 1, 0.0000000000, 1.0000000000 } // 0-10
63 ,{ 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 2.0000000000, 0.0000000000, 1.0000000000, 0, 1, 0.0000000000, 1.0000000000 } // 20-40
64 ,{ 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 2.0000000000, 0.0000000000, 1.0000000000, 0, 1, 0.0000000000, 1.0000000000 } // 40-60
65 ,{ 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 2.0000000000, 0.0000000000, 1.0000000000, 0, 1, 0.0000000000, 1.0000000000 } // 60-80
66 ,{ 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 2.0000000000, 0.0000000000, 1.0000000000, 0, 1, 0.0000000000, 1.0000000000 } // 0-20
67 ,{ 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 2.0000000000, 0.0000000000, 1.0000000000, 0, 1, 0.0000000000, 1.0000000000 } // 0-40
68 ,{ 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 2.0000000000, 0.0000000000, 1.0000000000, 0, 1, 0.0000000000, 1.0000000000 } // 20-80
69 ,{ 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 2.0000000000, 0.0000000000, 1.0000000000, 0, 1, 0.0000000000, 1.0000000000 } // 40-80
72 const Double_t AliGenEMlib::fgkRawPtOfV2Param[16][10] = {
73 { 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // pp no V2
74 ,{ 2.181446e+08, 9.412925e-01, 1.158774e-01, 3.020303e+01, 6.790828e+00, 9.999996e+01, 2.616827e+00, 3.980492e+00, 1.225169e+07, 5.575243e+00 } // 0-5
75 ,{ 3.006215e+08, 9.511881e-01, 1.192788e-01, 2.981931e+01, 5.068175e+01, 9.999993e+01, 2.650635e+00, 4.073982e+00, 2.508045e+07, 5.621039e+00 } // 5-10
76 ,{ 1.643438e+09, 9.604242e-01, 1.218512e-01, 2.912684e+01, 1.164242e+00, 9.999709e+01, 2.662326e+00, 4.027795e+00, 7.020810e+07, 5.696860e+00 } // 10-20
77 ,{ 8.109985e+08, 9.421935e-01, 1.328020e-01, 2.655910e+01, 1.053677e+00, 9.999812e+01, 2.722949e+00, 3.964547e+00, 6.104096e+07, 5.694703e+00 } // 20-30
78 ,{ 5.219789e+08, 9.417339e-01, 1.417541e-01, 2.518080e+01, 7.430803e-02, 9.303295e+01, 2.780227e+00, 3.909570e+00, 4.723116e+07, 5.778375e+00 } // 30-40
79 ,{ 2.547159e+08, 9.481459e-01, 2.364858e-01, 1.689288e+01, 3.858883e+00, 6.352619e+00, 2.742270e+00, 3.855226e+00, 3.120535e+07, 5.878677e+00 } // 40-50
80 ,{ 9.396097e+07, 9.304491e-01, 3.244940e-01, 1.291696e+01, 2.854367e+00, 6.325908e+00, 2.828258e+00, 4.133699e+00, 1.302739e+07, 5.977896e+00 } // 50-60
81 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 0-10
82 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 20-40
83 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 40-60
84 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 60-80
85 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 0-20
86 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 0-40
87 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 20-80
88 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 40-80
91 const Double_t AliGenEMlib::fgkThermPtParam[16][2] = {
92 { 0.0000000000, 0.0000000000 } // pp no V2
93 ,{ 0.0000000000, 0.0000000000 } // 0-5
94 ,{ 0.0000000000, 0.0000000000 } // 5-10
95 ,{ 3.447105e+01, 3.416818e+00 } // 10-20 //based on: https://aliceinfo.cern.ch/Notes/node/249
96 ,{ 0.0000000000, 0.0000000000 } // 20-30
97 ,{ 0.0000000000, 0.0000000000 } // 30-40
98 ,{ 0.0000000000, 0.0000000000 } // 40-50
99 ,{ 0.0000000000, 0.0000000000 } // 50-60
100 ,{ 3.888847e+02, 4.502683e+00 } // 0-10 //based on: https://aliceinfo.cern.ch/Notes/node/249
101 ,{ 1.766210e+00, 2.473812e+00 } // 20-40 //based on: https://twiki.cern.ch/twiki/pub/ALICE/ALICEDirectPhotonSpectrumPaper/directPbPb.pdf
102 ,{ 0.0000000000, 0.0000000000 } // 40-60
103 ,{ 0.0000000000, 0.0000000000 } // 60-80
104 ,{ 1.576151e+01, 2.841202e+00 } // 0-20 //based on: https://twiki.cern.ch/twiki/pub/ALICE/ALICEDirectPhotonSpectrumPaper/directPbPb.pdf
105 ,{ 4.263499e+01, 3.249843e+00 } // 0-40 //based on: https://aliceinfo.cern.ch/Figure/node/2866
106 ,{ 0.0000000000, 0.0000000000 } // 20-80
107 ,{ 0.0000000000, 0.0000000000 } // 40-80
110 // MASS 0=>PIZERO, 1=>ETA, 2=>RHO, 3=>OMEGA, 4=>ETAPRIME, 5=>PHI, 6=>JPSI
111 const Double_t AliGenEMlib::fgkHM[8] = {0.13498, 0.54751, 0.7755, 0.78265, 0.95778, 1.01946, 3.0969, 0.0};
113 const Double_t AliGenEMlib::fgkMtFactor[2][8] = {
114 // {1.0, 0.5, 1.0, 0.9, 0.4, 0.23, 0.054}, // factor for pp from arXiv:1110.3929
115 // {1.0, 0.55, 1.0, 0.9, 0.4, 0.25, 0.004} // factor for PbPb from arXiv:1110.3929
116 //{1., 0.48, 1.0, 0.9, 0.25, 0.4}, (old values)
117 //{1., 0.48, 1.0, 0.9, 0.4, 0.25}, (nlo values)
118 //{1., 0.48, 1.0, 0.8, 0.4, 0.2, 0.06} (combination of nlo and LHC measurements)
119 //https://aliceinfo.cern.ch/Figure/node/2634
120 //https://aliceinfo.cern.ch/Figure/node/2788
121 //https://aliceinfo.cern.ch/Figure/node/4403
122 //https://aliceinfo.cern.ch/Notes/node/87
124 {1., 0.48, 1.0, 0.9, 0.4, 0.25, 0., 0.}, //pp
125 {1., 0.48, 1.0, 0.9, 0.4, 0.25, 0., 0.} //PbPb
128 //==========================================================================
130 // Definition of Particle Distributions
132 //==========================================================================
134 //--------------------------------------------------------------------------
138 //--------------------------------------------------------------------------
139 Double_t AliGenEMlib::PtModifiedHagedornThermal(Double_t pt,
147 // Modified Hagedorn Thermal fit to Picharged for PbPb:
149 invYield = c/TMath::Power(p0+pt/p1,n) + cT*exp(-1.0*pt/T);
151 return invYield*(2*TMath::Pi()*pt);
156 Double_t AliGenEMlib::PtModifiedHagedornExp(Double_t pt,
163 // Modified Hagedorn exponentiel fit to Pizero for PbPb:
165 invYield = c*TMath::Power(exp(-1*(p1*pt-p2*pt*pt))+pt/p0,-n);
167 return invYield*(2*TMath::Pi()*pt);
171 Double_t AliGenEMlib::PtModifiedHagedornExp2(Double_t pt,
180 // Modified Hagedorn exponential fit to charged pions for pPb:
182 invYield = c*TMath::Power(exp(-a*pt-b*pt*pt)+pt/p0+TMath::Power(pt/p1,d),-n);
184 return invYield*(2*TMath::Pi()*pt);
187 Double_t AliGenEMlib::PtTsallis(Double_t pt,
193 // Tsallis fit to Pizero for pp:
197 mt = sqrt(m*m + pt*pt);
198 invYield = c*((n-1.)*(n-2.))/(n*T*(n*T+m*(n-2.)))*pow(1.+(mt-m)/(n*T),-n);
200 return invYield*(2*TMath::Pi()*pt);
204 Double_t AliGenEMlib::PtExponential(const Double_t *px, const Double_t *c){
205 const double &pt=px[0];
206 Double_t invYield = c[0]*exp(-pt*c[1]);
208 return invYield*(2*TMath::Pi()*pt);
211 // Hagedorn with additional Powerlaw
212 Double_t AliGenEMlib::PtModifiedHagedornPowerlaw(const Double_t *px, const Double_t *c){
213 const double &pt=px[0];
214 Double_t invYield = c[0]*pow(c[1]+pt*c[2],-c[3])*CrossOverLc(c[5],c[4],pt)+CrossOverRc(c[7],c[6],pt)*c[8]*pow(pt+0.001,-c[9]); //pt+0.001: prevent powerlaw from exploding for pt->0
216 return invYield*(2*TMath::Pi()*pt);
219 // double powerlaw for J/Psi yield
220 Double_t AliGenEMlib::PtDoublePowerlaw(const Double_t *px, const Double_t *c){
221 const double &pt=px[0];
222 Double_t yield = c[0]*pt*pow(1+pow(pt*c[1],2),-c[2]);
227 // integral over krollwada with S=1^2*(1-mee^2/mh^2)^3 from mee=0 up to mee=mh
228 // approximation is perfect for mh>20MeV
229 Double_t AliGenEMlib::IntegratedKrollWada(const Double_t *mh, const Double_t *){
230 if(*mh<0.002941) return 0;
231 return 2*log(*mh/0.000511/exp(1.75))/411.11/TMath::Pi();
234 //--------------------------------------------------------------------------
238 //--------------------------------------------------------------------------
239 Double_t AliGenEMlib::PtPromptRealGamma( const Double_t *px, const Double_t */*dummy*/ )
241 const static Double_t promptGammaPtParam[10] = { 8.715017e-02, 4.439243e-01, 1.011650e+00, 5.193789e+00, 2.194442e+01, 1.062124e+01, 2.469876e+01, 6.052479e-02, 5.611410e-02, 5.169743e+00 };
243 return PtModifiedHagedornPowerlaw(px,promptGammaPtParam)*GetTAA(fgSelectedCentrality);
246 Double_t AliGenEMlib::PtThermalRealGamma( const Double_t *px, const Double_t */*dummy*/ )
248 return PtExponential(px,fgkThermPtParam[fgSelectedCentrality]);
251 Double_t AliGenEMlib::PtDirectRealGamma( const Double_t *px, const Double_t */*dummy*/ )
253 return PtPromptRealGamma(px,px)+PtThermalRealGamma(px,px);
256 Int_t AliGenEMlib::IpDirectRealGamma(TRandom *)
261 Double_t AliGenEMlib::YDirectRealGamma( const Double_t *px, const Double_t */*dummy*/ )
266 Double_t AliGenEMlib::V2DirectRealGamma( const Double_t *px, const Double_t */*dummy*/ )
268 const static Double_t v2Param[3][15] = {
269 { 1.211795e-01, 9.813671e-01, 0.000000e+00, 3.056960e+00, 2.380183e+00, -7.833212e-02, 5.000000e-01, 3.056960e+00, 1.195000e-01, 1.183293e-02, 1.252249e+00, 0, 1, 4.876263e-03, 1.518526e+00 } // 00-20, based on: https://aliceinfo.cern.ch/Notes/node/249
270 ,{ 1.619000e-01, 2.185695e+00, 0.000000e+00, 1.637681e+00, 1.000000e+00, -1.226399e-06, 3.092027e+00, 3.064692e+00, 1.619000e-01, 2.264320e-02, 1.028641e+00, 0, 1, 8.172203e-03, 1.271637e+00 } // 20-40
271 ,{ 1.335000e-01, 1.331963e+00, 0.000000e+00, 2.252315e+00, 1.198383e+00, -5.861987e-02, 7.132859e-01, 2.252315e+00, 2.934249e-01, 1.571589e-02, 1.001131e+00, 0, 1, 5.179715e-03, 1.329344e+00 } // 00-40
273 switch(fgSelectedCentrality) {
274 case k0020: return V2Param(px,v2Param[0]); break;
275 case k2040: return V2Param(px,v2Param[1]); break;
276 case k0040: return V2Param(px,v2Param[2]); break;
282 //--------------------------------------------------------------------------
286 //--------------------------------------------------------------------------
287 Double_t AliGenEMlib::PtPromptVirtGamma( const Double_t *px, const Double_t */*dummy*/ )
289 return IntegratedKrollWada(px,px)*PtPromptRealGamma(px,px);
292 Double_t AliGenEMlib::PtThermalVirtGamma( const Double_t *px, const Double_t */*dummy*/ )
294 return IntegratedKrollWada(px,px)*PtThermalRealGamma(px,px);
297 Double_t AliGenEMlib::PtDirectVirtGamma( const Double_t *px, const Double_t */*dummy*/ )
299 return IntegratedKrollWada(px,px)*(PtPromptRealGamma(px,px)+PtThermalRealGamma(px,px));
302 Int_t AliGenEMlib::IpDirectVirtGamma(TRandom *)
307 Double_t AliGenEMlib::YDirectVirtGamma( const Double_t *px, const Double_t */*dummy*/ )
312 Double_t AliGenEMlib::V2DirectVirtGamma( const Double_t *px, const Double_t */*dummy*/ )
314 return V2DirectRealGamma(px,px);
317 //--------------------------------------------------------------------------
321 //--------------------------------------------------------------------------
322 Int_t AliGenEMlib::IpPizero(TRandom *)
324 // Return pizero pdg code
328 Double_t AliGenEMlib::PtPizero( const Double_t *px, const Double_t */*dummy*/ )
330 // double pigammacorr=1; //misuse pion for direct gammas, tuned for 0040, iteration 0
331 // pigammacorr*=2.258900e-01*log(*px+0.001)+1.591291e+00; //iteration 1
332 // pigammacorr*=6.601943e-03*log(*px+0.001)+9.593698e-01; //iteration 2
333 // pigammacorr*=4.019933e-03*log(*px+0.001)+9.843412e-01; //iteration 3
334 // pigammacorr*=-4.543991e-03*log(*px+0.001)+1.010886e+00; //iteration 4
335 // return pigammacorr*PtPromptRealGamma(px,px); //now the gammas from the pi->gg decay have the pt spectrum of prompt real gammas
337 // fit functions and corresponding parameter of Pizero pT for pp @ 2.76 TeV and @ 7 TeV and for PbPb @ 2.76 TeV
354 switch(fgSelectedPtParam|fgSelectedCentrality) {
355 // fit to pi charged v1
356 // charged pion from ToF, unidentified hadrons scaled with pion from TPC
357 // for Pb-Pb @ 2.76 TeV
358 case kPichargedPbPb|k0005:
359 kc=1347.5; kp0=0.9393; kp1=2.254; kn=11.294; kcT=0.002537; kT=2.414;
360 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
362 case kPichargedPbPb|k0510:
363 kc=1256.1; kp0=0.9545; kp1=2.248; kn=11.291; kcT=0.002662; kT=2.326;
364 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
366 case kPichargedPbPb|k2030:
367 kc=7421.6; kp0=1.2059; kp1=1.520; kn=10.220; kcT=0.002150; kT=2.196;
368 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
370 case kPichargedPbPb|k3040:
371 kc=1183.2; kp0=1.0478; kp1=1.623; kn=9.8073; kcT=0.00198333; kT=2.073;
372 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
374 // the following is what went into the Pb-Pb preliminary approval (0-10%)
375 case kPichargedPbPb|k0010:
376 kc=1296.0; kp0=0.968; kp1=2.567; kn=12.27; kcT=0.004219; kT=2.207;
377 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
379 case kPichargedPbPb|k1020:
380 kc=986.0; kp0=0.9752; kp1=2.376; kn=11.62; kcT=0.003116; kT=2.213;
381 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
383 case kPichargedPbPb|k2040:
384 kc=17337.0; kp0=1.337; kp1=1.507; kn=10.629; kcT=0.00184; kT=2.234;
385 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
387 case kPichargedPbPb|k4050:
388 kc=6220.0; kp0=1.322; kp1=1.224; kn=9.378; kcT=0.000595; kT=2.383;
389 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
391 case kPichargedPbPb|k5060:
392 kc=2319.0; kp0=1.267; kp1=1.188; kn=9.044; kcT=0.000437; kT=2.276;
393 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
395 case kPichargedPbPb|k4060:
396 kc=4724.0; kp0=1.319; kp1=1.195; kn=9.255; kcT=0.000511; kT=2.344;
397 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
399 case kPichargedPbPb|k6080:
400 kc=2842.0; kp0=1.465; kp1=0.8324; kn=8.167; kcT=0.0001049; kT=2.29;
401 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
403 case kPichargedPbPb|k0020:
404 oldCent=fgSelectedCentrality;
405 fgSelectedCentrality=k0010;
407 fgSelectedCentrality=k1020;
409 fgSelectedCentrality=oldCent;
412 case kPichargedPbPb|k0040:
413 oldCent=fgSelectedCentrality;
414 fgSelectedCentrality=k0010;
416 fgSelectedCentrality=k1020;
418 fgSelectedCentrality=k2040;
420 fgSelectedCentrality=oldCent;
421 return (n1+n2+2*n3)/4;
424 // fit to pizero from conversion analysis
425 // for PbPb @ 2.76 TeV
426 // Pi0 spectra --> not final results
427 case kPizeroPbPb|k0005:
428 kc=1952.832; kp1=0.264; kp2=0.069; kp0=1.206; kn=9.732;
429 return PtModifiedHagedornExp(*px,kc,kp1,kp2,kp0,kn);
431 case kPizeroPbPb|k0010:
432 kc=1810.029; kp1=0.291; kp2=0.059; kp0=1.170; kn=9.447;
433 return PtModifiedHagedornExp(*px,kc,kp1,kp2,kp0,kn);
435 case kPizeroPbPb|k0020:
436 kc=856.241; kp1=-0.409; kp2=-0.127; kp0=1.219; kn=9.030;
437 return PtModifiedHagedornExp(*px,kc,kp1,kp2,kp0,kn);
439 case kPizeroPbPb|k1020:
440 kc=509.781; kp1=-0.784; kp2=-0.120; kp0=0.931; kn=7.299;
441 return PtModifiedHagedornExp(*px,kc,kp1,kp2,kp0,kn);
443 case kPizeroPbPb|k2040:
444 kc=541.049; kp1=0.542; kp2=-0.069; kp0=0.972; kn=7.866;
445 return PtModifiedHagedornExp(*px,kc,kp1,kp2,kp0,kn);
447 case kPizeroPbPb|k2080:
448 kc=222.577; kp1=0.634; kp2=0.009; kp0=0.915; kn=7.431;
449 return PtModifiedHagedornExp(*px,kc,kp1,kp2,kp0,kn);
451 case kPizeroPbPb|k4080:
452 kc=120.153; kp1=0.7; kp2=-0.14; kp0=0.835; kn=6.980;
453 return PtModifiedHagedornExp(*px,kc,kp1,kp2,kp0,kn);
455 case kPizeroPbPb|k0040:
456 kc=560.532; kp1=0.548; kp2=-0.048; kp0=1.055; kn=8.132;
457 return PtModifiedHagedornExp(*px,kc,kp1,kp2,kp0,kn);
461 // fit to charged pions for p-Pb @ 5.02TeV
463 kc=235.5; ka=0.6903; kb=0.06864; kp0=2.289; kp1=0.5872; kd=0.6474; kn=7.842;
464 return PtModifiedHagedornExp2(*px,kc,ka,kb,kp0,kp1,kd,kn);
468 // Tsallis fit to final pizero (PHOS+PCM) -> used for publication
471 case kPizeroEta7TeVpp:
472 km=0.13498; kc=28.01; kT=0.139; kn=6.875;
473 return PtTsallis(*px,km,kc,kT,kn);
475 case kPizero7TeVpplow:
476 case kPizeroEta7TeVpplow:
477 km=0.13498; kc=23.84; kT=0.147; kn=7.025;
478 return PtTsallis(*px,km,kc,kT,kn);
480 case kPizero7TeVpphigh:
481 case kPizeroEta7TeVpphigh:
482 km=0.13498; kc=32.47; kT=0.132; kn=6.749;
483 return PtTsallis(*px,km,kc,kT,kn);
485 // Tsallis fit to pizero: preliminary result from PCM and PHOS (QM'11)
487 case kPizero2760GeVpp:
488 case kPizeroEta2760GeVpp:
489 km = 0.13498; kc = 19.75; kT = 0.130; kn = 7.051;
490 return PtTsallis(*px,km,kc,kT,kn);
492 case kPizero2760GeVpplow:
493 case kPizeroEta2760GeVpplow:
494 km = 0.13498; kc = 16.12; kT = 0.142; kn = 7.327;
495 return PtTsallis(*px,km,kc,kT,kn);
497 case kPizero2760GeVpphigh:
498 case kPizeroEta2760GeVpphigh:
499 km = 0.13498; kc = 25.18; kT = 0.118; kn = 6.782;
500 return PtTsallis(*px,km,kc,kT,kn);
509 Double_t AliGenEMlib::YPizero( const Double_t *py, const Double_t */*dummy*/ )
515 Double_t AliGenEMlib::V2Pizero( const Double_t *px, const Double_t */*dummy*/ )
517 double n1,n2,n3,n4,n5;
518 double v1,v2,v3,v4,v5;
519 switch(fgSelectedCentrality) {
521 n1=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k0005]);
522 v1=V2Param(px,fgkV2param[k0005]);
523 n2=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k0510]);
524 v2=V2Param(px,fgkV2param[k0510]);
525 return (n1*v1+n2*v2)/(n1+n2);
528 n1=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k0005]);
529 v1=V2Param(px,fgkV2param[k0005]);
530 n2=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k0510]);
531 v2=V2Param(px,fgkV2param[k0510]);
532 n3=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k1020]);
533 v3=V2Param(px,fgkV2param[k1020]);
534 return (n1*v1+n2*v2+2*n3*v3)/(n1+n2+2*n3);
537 n1=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k2030]);
538 v1=V2Param(px,fgkV2param[k2030]);
539 n2=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k3040]);
540 v2=V2Param(px,fgkV2param[k3040]);
541 return (n1*v1+n2*v2)/(n1+n2);
544 n1=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k0005]);
545 v1=V2Param(px,fgkV2param[k0005]);
546 n2=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k0510]);
547 v2=V2Param(px,fgkV2param[k0510]);
548 n3=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k1020]);
549 v3=V2Param(px,fgkV2param[k1020]);
550 n4=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k2030]);
551 v4=V2Param(px,fgkV2param[k2030]);
552 n5=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k3040]);
553 v5=V2Param(px,fgkV2param[k3040]);
554 return (n1*v1+n2*v2+2*n3*v3+2*n4*v4+2*n5*v5)/(n1+n2+2*n3+2*n4+2*n5);
558 return V2Param(px,fgkV2param[fgSelectedCentrality]);
562 //--------------------------------------------------------------------------
566 //--------------------------------------------------------------------------
567 Int_t AliGenEMlib::IpEta(TRandom *)
569 // Return eta pdg code
573 Double_t AliGenEMlib::PtEta( const Double_t *px, const Double_t */*dummy*/ )
576 // fit functions and corresponding parameter of Eta pT for pp @ 2.76 TeV and @ 7 TeV
584 switch(fgSelectedPtParam){
585 // Tsallis fit to final eta (PHOS+PCM) -> used for final publication
587 case kPizeroEta7TeVpp:
588 km = 0.547853; kc = 2.496; kT = 0.229; kn = 6.985;
589 return PtTsallis(*px,km,kc,kT,kn);
591 case kPizeroEta7TeVpplow:
592 km = 0.547853; kc = 1.970; kT = 0.253; kn = 7.591;
593 return PtTsallis(*px,km,kc,kT,kn);
595 case kPizeroEta7TeVpphigh:
596 km = 0.547853; kc = 3.060; kT = 0.212; kn = 6.578;
597 return PtTsallis(*px,km,kc,kT,kn);
599 // Tsallis fit to preliminary eta (QM'11)
601 case kPizeroEta2760GeVpp:
602 km = 0.547853; kc = 1.971; kT = 0.188; kn = 6.308;
603 return PtTsallis(*px,km,kc,kT,kn);
604 case kPizeroEta2760GeVpplow:
605 km = 0.547853; kc = 1.228; kT = 0.220; kn = 7.030;
606 return PtTsallis(*px,km,kc,kT,kn);
608 case kPizeroEta2760GeVpphigh:
609 km = 0.547853; kc = 2.802; kT = 0.164; kn = 5.815;
610 return PtTsallis(*px,km,kc,kT,kn);
614 return MtScal(*px,1);
621 Double_t AliGenEMlib::YEta( const Double_t *py, const Double_t */*dummy*/ )
626 Double_t AliGenEMlib::V2Eta( const Double_t *px, const Double_t */*dummy*/ )
628 return KEtScal(*px,1); //V2Param(px,fgkV2param[1][fgSelectedV2Param]);
631 //--------------------------------------------------------------------------
635 //--------------------------------------------------------------------------
636 Int_t AliGenEMlib::IpRho(TRandom *)
638 // Return rho pdg code
642 Double_t AliGenEMlib::PtRho( const Double_t *px, const Double_t */*dummy*/ )
645 return MtScal(*px,2);
648 Double_t AliGenEMlib::YRho( const Double_t *py, const Double_t */*dummy*/ )
653 Double_t AliGenEMlib::V2Rho( const Double_t *px, const Double_t */*dummy*/ )
655 return KEtScal(*px,2);
658 //--------------------------------------------------------------------------
662 //--------------------------------------------------------------------------
663 Int_t AliGenEMlib::IpOmega(TRandom *)
665 // Return omega pdg code
669 Double_t AliGenEMlib::PtOmega( const Double_t *px, const Double_t */*dummy*/ )
672 return MtScal(*px,3);
675 Double_t AliGenEMlib::YOmega( const Double_t *py, const Double_t */*dummy*/ )
680 Double_t AliGenEMlib::V2Omega( const Double_t *px, const Double_t */*dummy*/ )
682 return KEtScal(*px,3);
686 //--------------------------------------------------------------------------
690 //--------------------------------------------------------------------------
691 Int_t AliGenEMlib::IpEtaprime(TRandom *)
693 // Return etaprime pdg code
697 Double_t AliGenEMlib::PtEtaprime( const Double_t *px, const Double_t */*dummy*/ )
700 return MtScal(*px,4);
703 Double_t AliGenEMlib::YEtaprime( const Double_t *py, const Double_t */*dummy*/ )
709 Double_t AliGenEMlib::V2Etaprime( const Double_t *px, const Double_t */*dummy*/ )
711 return KEtScal(*px,4);
714 //--------------------------------------------------------------------------
718 //--------------------------------------------------------------------------
719 Int_t AliGenEMlib::IpPhi(TRandom *)
721 // Return phi pdg code
725 Double_t AliGenEMlib::PtPhi( const Double_t *px, const Double_t */*dummy*/ )
728 return MtScal(*px,5);
731 Double_t AliGenEMlib::YPhi( const Double_t *py, const Double_t */*dummy*/ )
736 Double_t AliGenEMlib::V2Phi( const Double_t *px, const Double_t */*dummy*/ )
738 return KEtScal(*px,5);
741 //--------------------------------------------------------------------------
745 //--------------------------------------------------------------------------
746 Int_t AliGenEMlib::IpJpsi(TRandom *)
748 // Return phi pdg code
752 Double_t AliGenEMlib::PtJpsi( const Double_t *px, const Double_t */*dummy*/ )
755 // based on: //https://aliceinfo.cern.ch/Notes/node/242, https://aliceinfo.cern.ch/Figure/node/3457, www.sciencedirect.com/science/article/pii/S0370269312011446
756 const static Double_t jpsiPtParam[2][3] = {
757 { 9.686337e-03, 2.629441e-01, 4.552044e+00 }
758 ,{ 3.403549e-03, 2.897061e-01, 3.644278e+00 }
760 const double pt=px[0]*2.28/2.613;
761 switch(fgSelectedCentrality) {
762 case k0020: return 2.405*PtDoublePowerlaw(&pt,jpsiPtParam[0]); break;
763 case k2040: return 2.405*PtDoublePowerlaw(&pt,jpsiPtParam[1]); break;
764 case k0040: return 0.5*2.405*(PtDoublePowerlaw(&pt,jpsiPtParam[0])+PtDoublePowerlaw(&pt,jpsiPtParam[1])); break;
769 Double_t AliGenEMlib::YJpsi( const Double_t *py, const Double_t */*dummy*/ )
774 Double_t AliGenEMlib::V2Jpsi( const Double_t *px, const Double_t */*dummy*/ )
776 const int oldSys=fgSelectedV2Systematic;
777 fgSelectedV2Systematic=kNoV2Sys;
781 case kLoV2Sys: ret=0; break;
782 case kNoV2Sys: ret=KEtScal(*px,6)/2; break;
783 case kUpV2Sys: ret=KEtScal(*px,6); break;
786 fgSelectedV2Systematic=oldSys;
790 Double_t AliGenEMlib::YFlat(Double_t /*y*/)
792 //--------------------------------------------------------------------------
794 // flat rapidity distribution
796 //--------------------------------------------------------------------------
804 //=============================================================
808 //=============================================================
810 Double_t AliGenEMlib::MtScal(Double_t pt, Int_t np)
812 // Function for the calculation of the Pt distribution for a
813 // given particle np, from the pizero Pt distribution using
816 Double_t scaledPt = sqrt(pt*pt + fgkHM[np]*fgkHM[np] - fgkHM[0]*fgkHM[0]);
817 Double_t scaledYield = PtPizero(&scaledPt, (Double_t*) 0);
819 // VALUE MESON/PI AT 5 GeV/c
820 Double_t NormPt = 5.;
821 Double_t scaledNormPt = sqrt(NormPt*NormPt + fgkHM[np]*fgkHM[np] - fgkHM[0]*fgkHM[0]);
823 Double_t norm = fgkMtFactor[int(bool(fgSelectedCentrality))][np] * (PtPizero(&NormPt, (Double_t*) 0) / PtPizero(&scaledNormPt, (Double_t*) 0));
825 return norm*(pt/scaledPt)*scaledYield;
828 Double_t AliGenEMlib::KEtScal(Double_t pt, Int_t np)
830 const int nq=2; //number of quarks for particle np, here always 2
831 Double_t scaledPt = sqrt(pow(2.0/nq*(sqrt(pt*pt+fgkHM[np]*fgkHM[np])-fgkHM[np])+fgkHM[0],2)-fgkHM[0]*fgkHM[0]);
832 // double val=V2Pizero(&scaledPt, (Double_t*) 0);
833 // static const double syserr[12]={0., 0.09, 0.07, 0.06, 0.04, 0.04, 0.04, 0.05, 0., 0., 0., 0.}; //based on pi vs kaon
834 // double sys=fgSelectedV2Systematic*min(fgkV2param[fgSelectedCentrality][0],fgkV2param[fgSelectedCentrality][8])*syserr[fgSelectedCentrality];
835 // return std::max(val+sys,0.0);
836 return V2Pizero(&scaledPt, (Double_t*) 0);
839 Double_t AliGenEMlib::V2Param(const Double_t *px, const Double_t *par)
841 // Very general parametrization of the v2
843 const double &pt=px[0];
844 double val=CrossOverLc(par[4],par[3],pt)*(2*par[0]/(1+TMath::Exp(par[1]*(par[2]-pt)))-par[0])+CrossOverRc(par[4],par[3],pt)*((par[8]-par[5])/(1+TMath::Exp(par[6]*(pt-par[7])))+par[5]);
845 double sys=fgSelectedV2Systematic*par[11+fgSelectedV2Systematic*2]*pow(pt,par[12+fgSelectedV2Systematic*2]);
846 return std::max(val+sys,0.0);
849 Double_t AliGenEMlib::V2Flat(const Double_t */*px*/, const Double_t */*param*/)
856 Double_t AliGenEMlib::GetTAA(Int_t cent){
857 const static Double_t taa[16] = { 1.0, // pp
876 //==========================================================================
880 //==========================================================================
882 typedef Double_t (*GenFunc) (const Double_t*, const Double_t*);
884 typedef Int_t (*GenFuncIp) (TRandom *);
886 GenFunc AliGenEMlib::GetPt(Int_t param, const char * tname) const
888 // Return pointer to pT parameterisation
890 TString sname(tname);
894 case kDirectRealGamma:
895 func=PtDirectRealGamma;
897 case kDirectVirtGamma:
898 func=PtDirectVirtGamma;
924 printf("<AliGenEMlib::GetPt> unknown parametrisation\n");
929 GenFunc AliGenEMlib::GetY(Int_t param, const char * tname) const
931 // Return pointer to y- parameterisation
933 TString sname(tname);
937 case kDirectRealGamma:
938 func=YDirectRealGamma;
940 case kDirectVirtGamma:
941 func=YDirectVirtGamma;
967 printf("<AliGenEMlib::GetY> unknown parametrisation\n");
972 GenFuncIp AliGenEMlib::GetIp(Int_t param, const char * tname) const
974 // Return pointer to particle type parameterisation
976 TString sname(tname);
980 case kDirectRealGamma:
981 func=IpDirectRealGamma;
983 case kDirectVirtGamma:
984 func=IpDirectVirtGamma;
1010 printf("<AliGenEMlib::GetIp> unknown parametrisation\n");
1015 GenFunc AliGenEMlib::GetV2(Int_t param, const char * tname) const
1017 // Return pointer to v2-parameterisation
1019 TString sname(tname);
1023 case kDirectRealGamma:
1024 func=V2DirectRealGamma;
1026 case kDirectVirtGamma:
1027 func=V2DirectVirtGamma;
1053 printf("<AliGenEMlib::GetV2> unknown parametrisation\n");