Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / EVGEN / AliGenEMlib.cxx
CommitLineData
e40b9538 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/* $Id: AliGenEMlib.cxx 30052 2008-11-25 14:54:18Z morsch $ */
17
18/////////////////////////////////////////////////////////////////////////////
19// //
20// Implementation of AliGenEMlib for electron, di-electron, and photon //
21// cocktail calculations. //
22// It is based on AliGenGSIlib. //
23// //
24// Responsible: R.Averbeck@gsi.de //
25// //
26/////////////////////////////////////////////////////////////////////////////
27
28
4ae1c9f0 29#include <Riostream.h>
e40b9538 30#include "TMath.h"
31#include "TRandom.h"
32#include "TString.h"
33#include "AliGenEMlib.h"
34
35
36ClassImp(AliGenEMlib)
37
4ae1c9f0 38//Initializers for static members
39Int_t AliGenEMlib::fgSelectedPtParam=AliGenEMlib::kPizero7TeVpp;
40Int_t AliGenEMlib::fgSelectedCentrality=AliGenEMlib::kpp;
41Int_t AliGenEMlib::fgSelectedV2Systematic=AliGenEMlib::kNoV2Sys;
6078e216 42
5a516e0a 43Double_t AliGenEMlib::CrossOverLc(double a, double b, double x){
4ae1c9f0 44 if(x<b-a/2) return 1.0;
6078e216 45 else if(x>b+a/2) return 0.0;
46 else return cos(((x-b)/a+0.5)*TMath::Pi())/2+0.5;
47}
5a516e0a 48Double_t AliGenEMlib::CrossOverRc(double a, double b, double x){
6078e216 49 return 1-CrossOverLc(a,b,x);
50}
51
4ae1c9f0 52const Double_t AliGenEMlib::fgkV2param[16][15] = {
6a8b015a 53 // charged pion cent, based on: https://twiki.cern.ch/twiki/bin/viewauth/ALICE/FlowPAGQM2012talkIdentified
4ae1c9f0 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
6a8b015a 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
4ae1c9f0 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
70};
71
71443190 72const 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
89};
90
91const 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
6a8b015a 95 ,{ 3.447105e+01, 3.416818e+00 } // 10-20 //based on: https://aliceinfo.cern.ch/Notes/node/249
71443190 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
6a8b015a 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
71443190 102 ,{ 0.0000000000, 0.0000000000 } // 40-60
103 ,{ 0.0000000000, 0.0000000000 } // 60-80
6a8b015a 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
71443190 106 ,{ 0.0000000000, 0.0000000000 } // 20-80
107 ,{ 0.0000000000, 0.0000000000 } // 40-80
108};
109
4ae1c9f0 110// MASS 0=>PIZERO, 1=>ETA, 2=>RHO, 3=>OMEGA, 4=>ETAPRIME, 5=>PHI, 6=>JPSI
71443190 111const Double_t AliGenEMlib::fgkHM[8] = {0.13498, 0.54751, 0.7755, 0.78265, 0.95778, 1.01946, 3.0969, 0.0};
4ae1c9f0 112
71443190 113const Double_t AliGenEMlib::fgkMtFactor[2][8] = {
4ae1c9f0 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
71443190 122 //https://aliceinfo.cern.ch/Notes/node/87
4ae1c9f0 123 //best guess:
6a8b015a 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
4ae1c9f0 126};
6078e216 127
e40b9538 128//==========================================================================
129//
130// Definition of Particle Distributions
131//
132//==========================================================================
133
134//--------------------------------------------------------------------------
135//
4ae1c9f0 136// General functions
137//
138//--------------------------------------------------------------------------
5a516e0a 139Double_t AliGenEMlib::PtModifiedHagedornThermal(Double_t pt,
140 Double_t c,
141 Double_t p0,
142 Double_t p1,
143 Double_t n,
144 Double_t cT,
145 Double_t T)
4ae1c9f0 146{
147 // Modified Hagedorn Thermal fit to Picharged for PbPb:
148 Double_t invYield;
149 invYield = c/TMath::Power(p0+pt/p1,n) + cT*exp(-1.0*pt/T);
150
151 return invYield*(2*TMath::Pi()*pt);
152}
153
154
155
5a516e0a 156Double_t AliGenEMlib::PtModifiedHagedornExp(Double_t pt,
157 Double_t c,
158 Double_t p1,
159 Double_t p2,
160 Double_t p0,
161 Double_t n)
4ae1c9f0 162{
163 // Modified Hagedorn exponentiel fit to Pizero for PbPb:
164 Double_t invYield;
165 invYield = c*TMath::Power(exp(-1*(p1*pt-p2*pt*pt))+pt/p0,-n);
166
167 return invYield*(2*TMath::Pi()*pt);
168}
169
170
5a516e0a 171Double_t AliGenEMlib::PtModifiedHagedornExp2(Double_t pt,
172 Double_t c,
173 Double_t a,
174 Double_t b,
175 Double_t p0,
176 Double_t p1,
177 Double_t d,
178 Double_t n)
4ae1c9f0 179{
180 // Modified Hagedorn exponential fit to charged pions for pPb:
181 Double_t invYield;
182 invYield = c*TMath::Power(exp(-a*pt-b*pt*pt)+pt/p0+TMath::Power(pt/p1,d),-n);
183
184 return invYield*(2*TMath::Pi()*pt);
185}
186
5a516e0a 187Double_t AliGenEMlib::PtTsallis(Double_t pt,
188 Double_t m,
189 Double_t c,
190 Double_t T,
191 Double_t n)
4ae1c9f0 192{
193 // Tsallis fit to Pizero for pp:
194 Double_t mt;
195 Double_t invYield;
196
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);
199
200 return invYield*(2*TMath::Pi()*pt);
201}
202
71443190 203// Exponential
204Double_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]);
207
208 return invYield*(2*TMath::Pi()*pt);
209}
210
211// Hagedorn with additional Powerlaw
212Double_t AliGenEMlib::PtModifiedHagedornPowerlaw(const Double_t *px, const Double_t *c){
6a8b015a 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
71443190 215
216 return invYield*(2*TMath::Pi()*pt);
217}
218
6a8b015a 219// double powerlaw for J/Psi yield
220Double_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]);
223
224 return yield;
225}
226
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
229Double_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();
71443190 232}
233
234//--------------------------------------------------------------------------
235//
6a8b015a 236// DirectRealGamma
71443190 237//
238//--------------------------------------------------------------------------
71443190 239Double_t AliGenEMlib::PtPromptRealGamma( const Double_t *px, const Double_t */*dummy*/ )
240{
6a8b015a 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 };
71443190 242
243 return PtModifiedHagedornPowerlaw(px,promptGammaPtParam)*GetTAA(fgSelectedCentrality);
244}
245
6a8b015a 246Double_t AliGenEMlib::PtThermalRealGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 247{
6a8b015a 248 return PtExponential(px,fgkThermPtParam[fgSelectedCentrality]);
71443190 249}
250
6a8b015a 251Double_t AliGenEMlib::PtDirectRealGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 252{
6a8b015a 253 return PtPromptRealGamma(px,px)+PtThermalRealGamma(px,px);
71443190 254}
255
6a8b015a 256Int_t AliGenEMlib::IpDirectRealGamma(TRandom *)
71443190 257{
6a8b015a 258 return 22;
71443190 259}
260
6a8b015a 261Double_t AliGenEMlib::YDirectRealGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 262{
263 return YFlat(*px);
264}
265
6a8b015a 266Double_t AliGenEMlib::V2DirectRealGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 267{
6a8b015a 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
272 };
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;
277 }
278 return 0;
71443190 279}
280
6a8b015a 281
71443190 282//--------------------------------------------------------------------------
283//
6a8b015a 284// DirectVirtGamma
71443190 285//
286//--------------------------------------------------------------------------
6a8b015a 287Double_t AliGenEMlib::PtPromptVirtGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 288{
6a8b015a 289 return IntegratedKrollWada(px,px)*PtPromptRealGamma(px,px);
71443190 290}
291
6a8b015a 292Double_t AliGenEMlib::PtThermalVirtGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 293{
6a8b015a 294 return IntegratedKrollWada(px,px)*PtThermalRealGamma(px,px);
71443190 295}
296
6a8b015a 297Double_t AliGenEMlib::PtDirectVirtGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 298{
6a8b015a 299 return IntegratedKrollWada(px,px)*(PtPromptRealGamma(px,px)+PtThermalRealGamma(px,px));
71443190 300}
301
6a8b015a 302Int_t AliGenEMlib::IpDirectVirtGamma(TRandom *)
71443190 303{
6a8b015a 304 return 220000;
71443190 305}
306
6a8b015a 307Double_t AliGenEMlib::YDirectVirtGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 308{
309 return YFlat(*px);
310}
4ae1c9f0 311
6a8b015a 312Double_t AliGenEMlib::V2DirectVirtGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 313{
6a8b015a 314 return V2DirectRealGamma(px,px);
71443190 315}
4ae1c9f0 316
317//--------------------------------------------------------------------------
318//
e40b9538 319// Pizero
320//
321//--------------------------------------------------------------------------
322Int_t AliGenEMlib::IpPizero(TRandom *)
323{
4ae1c9f0 324 // Return pizero pdg code
e40b9538 325 return 111;
326}
327
328Double_t AliGenEMlib::PtPizero( const Double_t *px, const Double_t */*dummy*/ )
329{
6a8b015a 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
71443190 336
4ae1c9f0 337 // fit functions and corresponding parameter of Pizero pT for pp @ 2.76 TeV and @ 7 TeV and for PbPb @ 2.76 TeV
338
339 Double_t km=0.;
340 Double_t kc=0.;
341 Double_t kn=0.;
342 Double_t kcT=0.;
343 Double_t kT=0.;
344 Double_t kp0=0.;
345 Double_t kp1=0.;
346 Double_t kp2=0.;
347 Double_t ka=0.;
348 Double_t kb=0.;
349 Double_t kd=0.;
350
6a8b015a 351 double n1,n2,n3;
352 int oldCent;
353
4ae1c9f0 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);
361 break;
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);
365 break;
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);
369 break;
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);
373 break;
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);
378 break;
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);
382 break;
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);
386 break;
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);
390 break;
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);
394 break;
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);
398 break;
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);
402 break;
6a8b015a 403 case kPichargedPbPb|k0020:
404 oldCent=fgSelectedCentrality;
405 fgSelectedCentrality=k0010;
406 n1=PtPizero(px,px);
407 fgSelectedCentrality=k1020;
408 n2=PtPizero(px,px);
409 fgSelectedCentrality=oldCent;
410 return (n1+n2)/2;
411 break;
412 case kPichargedPbPb|k0040:
413 oldCent=fgSelectedCentrality;
414 fgSelectedCentrality=k0010;
415 n1=PtPizero(px,px);
416 fgSelectedCentrality=k1020;
417 n2=PtPizero(px,px);
418 fgSelectedCentrality=k2040;
419 n3=PtPizero(px,px);
420 fgSelectedCentrality=oldCent;
421 return (n1+n2+2*n3)/4;
422 break;
6078e216 423
4ae1c9f0 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);
430 break;
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);
434 break;
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);
438 break;
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);
442 break;
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);
446 break;
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);
450 break;
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);
454 break;
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);
458 break;
459
460
461 // fit to charged pions for p-Pb @ 5.02TeV
462 case kPichargedPPb:
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);
465 break;
466
467
468 // Tsallis fit to final pizero (PHOS+PCM) -> used for publication
469 // for pp @ 7 TeV
470 case kPizero7TeVpp:
471 case kPizeroEta7TeVpp:
472 km=0.13498; kc=28.01; kT=0.139; kn=6.875;
473 return PtTsallis(*px,km,kc,kT,kn);
474 break;
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);
479 break;
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);
484 break;
485 // Tsallis fit to pizero: preliminary result from PCM and PHOS (QM'11)
486 // for pp @ 2.76 TeV
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);
491 break;
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);
496 break;
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);
501 break;
502
503 default:
504 return NULL;
505 }
506
e40b9538 507}
508
509Double_t AliGenEMlib::YPizero( const Double_t *py, const Double_t */*dummy*/ )
510{
511 return YFlat(*py);
512
513}
514
6078e216 515Double_t AliGenEMlib::V2Pizero( const Double_t *px, const Double_t */*dummy*/ )
516{
6a8b015a 517 double n1,n2,n3,n4,n5;
518 double v1,v2,v3,v4,v5;
4ae1c9f0 519 switch(fgSelectedCentrality) {
520 case k0010:
71443190 521 n1=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k0005]);
522 v1=V2Param(px,fgkV2param[k0005]);
523 n2=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k0510]);
524 v2=V2Param(px,fgkV2param[k0510]);
4ae1c9f0 525 return (n1*v1+n2*v2)/(n1+n2);
526 break;
6a8b015a 527 case k0020:
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);
535 break;
4ae1c9f0 536 case k2040:
71443190 537 n1=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k2030]);
538 v1=V2Param(px,fgkV2param[k2030]);
539 n2=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k3040]);
540 v2=V2Param(px,fgkV2param[k3040]);
4ae1c9f0 541 return (n1*v1+n2*v2)/(n1+n2);
542 break;
6a8b015a 543 case k0040:
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);
555 break;
4ae1c9f0 556
557 default:
558 return V2Param(px,fgkV2param[fgSelectedCentrality]);
559 }
6078e216 560}
561
e40b9538 562//--------------------------------------------------------------------------
563//
564// Eta
565//
566//--------------------------------------------------------------------------
567Int_t AliGenEMlib::IpEta(TRandom *)
568{
4ae1c9f0 569 // Return eta pdg code
e40b9538 570 return 221;
571}
572
573Double_t AliGenEMlib::PtEta( const Double_t *px, const Double_t */*dummy*/ )
574{
4ae1c9f0 575
576 // fit functions and corresponding parameter of Eta pT for pp @ 2.76 TeV and @ 7 TeV
577 // and mtscaled pT
578
579 Double_t km = 0.;
580 Double_t kc = 0.;
581 Double_t kT = 0.;
582 Double_t kn = 0.;
583
584 switch(fgSelectedPtParam){
585 // Tsallis fit to final eta (PHOS+PCM) -> used for final publication
586 // for pp @ 7 TeV
587 case kPizeroEta7TeVpp:
588 km = 0.547853; kc = 2.496; kT = 0.229; kn = 6.985;
589 return PtTsallis(*px,km,kc,kT,kn);
590 break;
591 case kPizeroEta7TeVpplow:
592 km = 0.547853; kc = 1.970; kT = 0.253; kn = 7.591;
593 return PtTsallis(*px,km,kc,kT,kn);
594 break;
595 case kPizeroEta7TeVpphigh:
596 km = 0.547853; kc = 3.060; kT = 0.212; kn = 6.578;
597 return PtTsallis(*px,km,kc,kT,kn);
598 break;
599 // Tsallis fit to preliminary eta (QM'11)
600 // for pp @ 2.76 TeV
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);
607 break;
608 case kPizeroEta2760GeVpphigh:
609 km = 0.547853; kc = 2.802; kT = 0.164; kn = 5.815;
610 return PtTsallis(*px,km,kc,kT,kn);
611 break;
612
613 default:
0db2f441 614 return MtScal(*px,1);
4ae1c9f0 615 break;
616
617 }
618
e40b9538 619}
620
621Double_t AliGenEMlib::YEta( const Double_t *py, const Double_t */*dummy*/ )
622{
623 return YFlat(*py);
6078e216 624}
e40b9538 625
6078e216 626Double_t AliGenEMlib::V2Eta( const Double_t *px, const Double_t */*dummy*/ )
627{
4ae1c9f0 628 return KEtScal(*px,1); //V2Param(px,fgkV2param[1][fgSelectedV2Param]);
e40b9538 629}
630
631//--------------------------------------------------------------------------
632//
633// Rho
634//
635//--------------------------------------------------------------------------
636Int_t AliGenEMlib::IpRho(TRandom *)
637{
4ae1c9f0 638 // Return rho pdg code
e40b9538 639 return 113;
640}
641
642Double_t AliGenEMlib::PtRho( const Double_t *px, const Double_t */*dummy*/ )
643{
4ae1c9f0 644 // Rho pT
0db2f441 645 return MtScal(*px,2);
e40b9538 646}
647
648Double_t AliGenEMlib::YRho( const Double_t *py, const Double_t */*dummy*/ )
649{
650 return YFlat(*py);
4ae1c9f0 651}
e40b9538 652
4ae1c9f0 653Double_t AliGenEMlib::V2Rho( const Double_t *px, const Double_t */*dummy*/ )
654{
655 return KEtScal(*px,2);
e40b9538 656}
657
658//--------------------------------------------------------------------------
659//
660// Omega
661//
662//--------------------------------------------------------------------------
663Int_t AliGenEMlib::IpOmega(TRandom *)
664{
4ae1c9f0 665 // Return omega pdg code
e40b9538 666 return 223;
667}
668
669Double_t AliGenEMlib::PtOmega( const Double_t *px, const Double_t */*dummy*/ )
670{
4ae1c9f0 671 // Omega pT
0db2f441 672 return MtScal(*px,3);
e40b9538 673}
674
675Double_t AliGenEMlib::YOmega( const Double_t *py, const Double_t */*dummy*/ )
676{
677 return YFlat(*py);
4ae1c9f0 678}
e40b9538 679
4ae1c9f0 680Double_t AliGenEMlib::V2Omega( const Double_t *px, const Double_t */*dummy*/ )
681{
682 return KEtScal(*px,3);
e40b9538 683}
684
4ae1c9f0 685
e40b9538 686//--------------------------------------------------------------------------
687//
688// Etaprime
689//
690//--------------------------------------------------------------------------
691Int_t AliGenEMlib::IpEtaprime(TRandom *)
692{
4ae1c9f0 693 // Return etaprime pdg code
e40b9538 694 return 331;
695}
696
697Double_t AliGenEMlib::PtEtaprime( const Double_t *px, const Double_t */*dummy*/ )
698{
4ae1c9f0 699 // Eta pT
0db2f441 700 return MtScal(*px,4);
e40b9538 701}
702
703Double_t AliGenEMlib::YEtaprime( const Double_t *py, const Double_t */*dummy*/ )
704{
705 return YFlat(*py);
706
707}
708
4ae1c9f0 709Double_t AliGenEMlib::V2Etaprime( const Double_t *px, const Double_t */*dummy*/ )
710{
711 return KEtScal(*px,4);
712}
713
e40b9538 714//--------------------------------------------------------------------------
715//
716// Phi
717//
718//--------------------------------------------------------------------------
719Int_t AliGenEMlib::IpPhi(TRandom *)
720{
4ae1c9f0 721 // Return phi pdg code
e40b9538 722 return 333;
723}
724
725Double_t AliGenEMlib::PtPhi( const Double_t *px, const Double_t */*dummy*/ )
726{
4ae1c9f0 727 // Phi pT
0db2f441 728 return MtScal(*px,5);
e40b9538 729}
730
731Double_t AliGenEMlib::YPhi( const Double_t *py, const Double_t */*dummy*/ )
732{
733 return YFlat(*py);
e40b9538 734}
735
4ae1c9f0 736Double_t AliGenEMlib::V2Phi( const Double_t *px, const Double_t */*dummy*/ )
e40b9538 737{
4ae1c9f0 738 return KEtScal(*px,5);
739}
740
e40b9538 741//--------------------------------------------------------------------------
742//
4ae1c9f0 743// Jpsi
e40b9538 744//
745//--------------------------------------------------------------------------
4ae1c9f0 746Int_t AliGenEMlib::IpJpsi(TRandom *)
747{
748 // Return phi pdg code
749 return 443;
750}
751
752Double_t AliGenEMlib::PtJpsi( const Double_t *px, const Double_t */*dummy*/ )
753{
754 // Jpsi pT
6a8b015a 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 }
759 };
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;
765 }
766 return 0;
4ae1c9f0 767}
768
769Double_t AliGenEMlib::YJpsi( const Double_t *py, const Double_t */*dummy*/ )
770{
771 return YFlat(*py);
772}
773
774Double_t AliGenEMlib::V2Jpsi( const Double_t *px, const Double_t */*dummy*/ )
775{
776 const int oldSys=fgSelectedV2Systematic;
777 fgSelectedV2Systematic=kNoV2Sys;
778 double ret=0;
779
780 switch(oldSys){
781 case kLoV2Sys: ret=0; break;
782 case kNoV2Sys: ret=KEtScal(*px,6)/2; break;
783 case kUpV2Sys: ret=KEtScal(*px,6); break;
784 }
785
786 fgSelectedV2Systematic=oldSys;
787 return ret;
788}
789
790Double_t AliGenEMlib::YFlat(Double_t /*y*/)
791{
792 //--------------------------------------------------------------------------
793 //
794 // flat rapidity distribution
795 //
796 //--------------------------------------------------------------------------
e40b9538 797
798 Double_t dNdy = 1.;
799
800 return dNdy;
801
802}
803
804//=============================================================
805//
806// Mt-scaling
807//
808//=============================================================
809//
4ae1c9f0 810Double_t AliGenEMlib::MtScal(Double_t pt, Int_t np)
e40b9538 811{
4ae1c9f0 812 // Function for the calculation of the Pt distribution for a
813 // given particle np, from the pizero Pt distribution using
814 // mt scaling.
e40b9538 815
4ae1c9f0 816 Double_t scaledPt = sqrt(pt*pt + fgkHM[np]*fgkHM[np] - fgkHM[0]*fgkHM[0]);
e40b9538 817 Double_t scaledYield = PtPizero(&scaledPt, (Double_t*) 0);
818
4ae1c9f0 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]);
e40b9538 822
4ae1c9f0 823 Double_t norm = fgkMtFactor[int(bool(fgSelectedCentrality))][np] * (PtPizero(&NormPt, (Double_t*) 0) / PtPizero(&scaledNormPt, (Double_t*) 0));
e40b9538 824
825 return norm*(pt/scaledPt)*scaledYield;
826}
827
5a516e0a 828Double_t AliGenEMlib::KEtScal(Double_t pt, Int_t np)
4ae1c9f0 829{
830 const int nq=2; //number of quarks for particle np, here always 2
71443190 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];
6a8b015a 835 // return std::max(val+sys,0.0);
71443190 836 return V2Pizero(&scaledPt, (Double_t*) 0);
4ae1c9f0 837}
838
6078e216 839Double_t AliGenEMlib::V2Param(const Double_t *px, const Double_t *par)
840{
841 // Very general parametrization of the v2
842
4ae1c9f0 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]);
6a8b015a 846 return std::max(val+sys,0.0);
6078e216 847}
848
849Double_t AliGenEMlib::V2Flat(const Double_t */*px*/, const Double_t */*param*/)
850{
851 // Flat v2
852
71443190 853 return 0.0;
6078e216 854}
855
71443190 856Double_t AliGenEMlib::GetTAA(Int_t cent){
857 const static Double_t taa[16] = { 1.0, // pp
858 26.32, // 0-5
859 20.56, // 5-10
860 14.39, // 10-20
861 8.70, // 20-30
862 5.001, // 30-40
863 2.675, // 40-50
864 1.317, // 50-60
865 23.44, // 0-10
866 6.85, // 20-40
867 1.996, // 40-60
868 0.4174, // 60-80
869 18.91, // 0-20
870 12.88, // 0-40
871 3.088, // 20-80
872 1.207}; // 40-80
873 return taa[cent];
874}
4ae1c9f0 875
e40b9538 876//==========================================================================
877//
878// Set Getters
879//
880//==========================================================================
881
882typedef Double_t (*GenFunc) (const Double_t*, const Double_t*);
883
884typedef Int_t (*GenFuncIp) (TRandom *);
885
886GenFunc AliGenEMlib::GetPt(Int_t param, const char * tname) const
887{
4ae1c9f0 888 // Return pointer to pT parameterisation
e40b9538 889 GenFunc func=0;
890 TString sname(tname);
891
892 switch (param)
893 {
6a8b015a 894 case kDirectRealGamma:
895 func=PtDirectRealGamma;
71443190 896 break;
6a8b015a 897 case kDirectVirtGamma:
898 func=PtDirectVirtGamma;
71443190 899 break;
e40b9538 900 case kPizero:
901 func=PtPizero;
902 break;
903 case kEta:
904 func=PtEta;
905 break;
906 case kRho:
907 func=PtRho;
908 break;
909 case kOmega:
910 func=PtOmega;
911 break;
912 case kEtaprime:
913 func=PtEtaprime;
914 break;
915 case kPhi:
916 func=PtPhi;
917 break;
4ae1c9f0 918 case kJpsi:
919 func=PtJpsi;
920 break;
e40b9538 921
922 default:
923 func=0;
924 printf("<AliGenEMlib::GetPt> unknown parametrisation\n");
925 }
926 return func;
927}
928
929GenFunc AliGenEMlib::GetY(Int_t param, const char * tname) const
930{
4ae1c9f0 931 // Return pointer to y- parameterisation
e40b9538 932 GenFunc func=0;
933 TString sname(tname);
934
935 switch (param)
936 {
6a8b015a 937 case kDirectRealGamma:
938 func=YDirectRealGamma;
71443190 939 break;
6a8b015a 940 case kDirectVirtGamma:
941 func=YDirectVirtGamma;
71443190 942 break;
e40b9538 943 case kPizero:
944 func=YPizero;
945 break;
946 case kEta:
947 func=YEta;
948 break;
949 case kRho:
950 func=YRho;
951 break;
952 case kOmega:
953 func=YOmega;
954 break;
955 case kEtaprime:
956 func=YEtaprime;
957 break;
958 case kPhi:
959 func=YPhi;
960 break;
4ae1c9f0 961 case kJpsi:
962 func=YJpsi;
963 break;
e40b9538 964
965 default:
966 func=0;
967 printf("<AliGenEMlib::GetY> unknown parametrisation\n");
968 }
969 return func;
970}
971
972GenFuncIp AliGenEMlib::GetIp(Int_t param, const char * tname) const
973{
4ae1c9f0 974 // Return pointer to particle type parameterisation
e40b9538 975 GenFuncIp func=0;
976 TString sname(tname);
977
978 switch (param)
979 {
6a8b015a 980 case kDirectRealGamma:
981 func=IpDirectRealGamma;
71443190 982 break;
6a8b015a 983 case kDirectVirtGamma:
984 func=IpDirectVirtGamma;
71443190 985 break;
e40b9538 986 case kPizero:
987 func=IpPizero;
988 break;
989 case kEta:
990 func=IpEta;
991 break;
992 case kRho:
993 func=IpRho;
994 break;
995 case kOmega:
996 func=IpOmega;
997 break;
998 case kEtaprime:
999 func=IpEtaprime;
1000 break;
1001 case kPhi:
1002 func=IpPhi;
1003 break;
4ae1c9f0 1004 case kJpsi:
1005 func=IpJpsi;
1006 break;
e40b9538 1007
1008 default:
1009 func=0;
1010 printf("<AliGenEMlib::GetIp> unknown parametrisation\n");
1011 }
1012 return func;
1013}
1014
6078e216 1015GenFunc AliGenEMlib::GetV2(Int_t param, const char * tname) const
1016{
1017 // Return pointer to v2-parameterisation
1018 GenFunc func=0;
1019 TString sname(tname);
e40b9538 1020
6078e216 1021 switch (param)
1022 {
6a8b015a 1023 case kDirectRealGamma:
1024 func=V2DirectRealGamma;
71443190 1025 break;
6a8b015a 1026 case kDirectVirtGamma:
1027 func=V2DirectVirtGamma;
71443190 1028 break;
6078e216 1029 case kPizero:
1030 func=V2Pizero;
1031 break;
1032 case kEta:
1033 func=V2Eta;
1034 break;
1035 case kRho:
1036 func=V2Pizero;
1037 break;
1038 case kOmega:
1039 func=V2Pizero;
1040 break;
1041 case kEtaprime:
1042 func=V2Pizero;
1043 break;
1044 case kPhi:
1045 func=V2Pizero;
1046 break;
4ae1c9f0 1047 case kJpsi:
1048 func=V2Jpsi;
1049 break;
e40b9538 1050
6078e216 1051 default:
1052 func=0;
1053 printf("<AliGenEMlib::GetV2> unknown parametrisation\n");
1054 }
1055 return func;
1056}
4ae1c9f0 1057