Converting PWG/TRD to native cmake
[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
6e38a462 39Int_t AliGenEMlib::fgSelectedCollisionsSystem=AliGenEMlib::kpp7TeV;
40Int_t AliGenEMlib::fgSelectedPtParamPi0=AliGenEMlib::kPizeroParam;
41Int_t AliGenEMlib::fgSelectedPtParamEta=AliGenEMlib::kEtaParamRatiopp;
42Int_t AliGenEMlib::fgSelectedPtParamOmega=AliGenEMlib::kOmegaParampp;
43Int_t AliGenEMlib::fgSelectedPtParamPhi=AliGenEMlib::kPhiParampp;
44Int_t AliGenEMlib::fgSelectedCentrality=AliGenEMlib::kpp;
4ae1c9f0 45Int_t AliGenEMlib::fgSelectedV2Systematic=AliGenEMlib::kNoV2Sys;
6078e216 46
5a516e0a 47Double_t AliGenEMlib::CrossOverLc(double a, double b, double x){
6e38a462 48 if(x<b-a/2) return 1.0;
49 else if(x>b+a/2) return 0.0;
50 else return cos(((x-b)/a+0.5)*TMath::Pi())/2+0.5;
6078e216 51}
5a516e0a 52Double_t AliGenEMlib::CrossOverRc(double a, double b, double x){
6e38a462 53 return 1-CrossOverLc(a,b,x);
6078e216 54}
55
1b589c8a 56const Double_t AliGenEMlib::fgkV2param[kCentralities][16] = {
6a8b015a 57 // charged pion cent, based on: https://twiki.cern.ch/twiki/bin/viewauth/ALICE/FlowPAGQM2012talkIdentified
1b589c8a 58 { 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, 10 } // pp no V2
59 ,{ 6.554571e-02, 1.436915e+00, 4.610598e-02, 2.554090e+00, 1.300948e+00, 2.970850e-02, 4.767877e+00, 4.228885e+00, 6.025959e-02, 1.570851e-03, 1.108941e+00, 0, 1, 1.715434e-03, 4.088070e-01, 25 } // 0-5
60 ,{ 1.171348e-01, 1.333067e+00, 4.537086e-02, 3.046348e+00, 3.903416e+00, 4.407152e-02, 9.123846e-01, 4.834531e+00, 1.186227e-01, 2.259463e-03, 8.916458e-01, 0, 1, 2.300647e-03, 4.531172e-01, 25 } // 5-10
61 ,{ 1.748434e-01, 1.285199e+00, 4.219881e-02, 4.018858e+00, 4.255082e+00, 7.955896e-03, 1.183264e-01,-9.329627e+00, 5.826570e-01, 3.368057e-03, 5.437668e-01, 0, 1, 3.178663e-03, 3.617552e-01, 25 } // 10-20
62 ,{ 2.149526e-01, 1.408792e+00, 5.062101e-02, 3.206279e+00, 3.988517e+00, 3.724655e-02, 1.995791e-01,-1.571536e+01, 6.494227e+00, 4.957874e-03, 4.903140e-01, 0, 1, 4.214626e-03, 3.457922e-01, 25 } // 20-30
63 ,{ 2.408942e-01, 1.477541e+00, 5.768983e-02, 3.333347e+00, 3.648508e+00,-2.044309e-02, 1.004145e-01,-2.386625e+01, 3.301913e+00, 5.666750e-03, 5.118686e-01, 0, 1, 4.626802e-03, 3.188974e-01, 25 } // 30-40
64 ,{ 2.495109e-01, 1.543680e+00, 6.217835e-02, 3.518863e+00, 4.557145e+00, 6.014553e-02, 1.491814e-01,-5.443647e+00, 5.403300e-01, 6.217285e-03, 5.580218e-01, 0, 1, 4.620486e-03, 3.792879e-01, 25 } // 40-50
65 ,{ 2.166399e-01, 1.931033e+00, 8.195390e-02, 2.226640e+00, 3.106649e+00, 1.058755e-01, 8.557791e-01, 4.006501e+00, 2.476449e-01, 6.720714e-03, 6.342966e-01, 0, 1, 4.449839e-03, 4.968750e-01, 25 } // 50-60
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, 10 } // 0-10
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, 10 } // 20-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, 10 } // 40-60
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, 10 } // 60-80
70 ,{ 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, 10 } // 0-20
71 ,{ 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, 10 } // 0-40
72 ,{ 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, 10 } // 20-80
73 ,{ 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, 10 } // 40-80
4ae1c9f0 74};
75
1b589c8a 76const Double_t AliGenEMlib::fgkRawPtOfV2Param[kCentralities][10] = {
71443190 77 { 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // pp no V2
78 ,{ 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
79 ,{ 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
80 ,{ 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
81 ,{ 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
82 ,{ 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
83 ,{ 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
84 ,{ 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
85 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 0-10
86 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 20-40
87 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 40-60
88 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 60-80
89 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 0-20
90 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 0-40
91 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 20-80
92 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 40-80
93};
94
1b589c8a 95const Double_t AliGenEMlib::fgkPtParam[kCentralities][10] = {
96 { 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // pp no V2
97 ,{ 7.641493e+01, 7.203468e-01, 3.651383e-01, 1.047542e+01, 3.494331e+00, 5.129019e+00, 3.081716e+00, 5.154525e+00, 3.065719e+01, 5.823718e+00 } // 0-5
98 ,{ 1.704676e+02, 7.852682e-01, 4.177172e-01, 1.014652e+01, 3.324409e+00, 4.825894e+00, 2.889738e+00, 4.772249e+00, 3.502627e+01, 5.938773e+00 } // 5-10
99 ,{ 1.823377e+02, 8.144309e-01, 4.291562e-01, 1.022767e+01, 3.585469e+00, 5.275078e+00, 3.144351e+00, 5.259097e+00, 2.675708e+01, 5.892506e+00 } // 10-20
100 ,{ 4.851407e+02, 9.341151e-01, 4.716673e-01, 1.058090e+01, 4.681218e+00, 7.261284e+00, 3.883227e+00, 6.638627e+00, 1.562806e+01, 5.772127e+00 } // 20-30
101 ,{ 3.157060e+01, 6.849451e-01, 4.868669e-01, 8.394558e+00, 3.539142e+00, 5.495280e+00, 4.102638e+00, 3.722991e+00, 1.638622e+01, 5.935963e+00 } // 30-40
6e38a462 102 ,{ 1.069397e+01, 5.816587e-01, 6.542961e-01, 6.472858e+00, 2.643870e+00, 3.929020e+00, 3.339224e+00, 2.410371e+00, 9.606748e+00, 6.116685e+00 } // 40-50
103 ,{ 1.857919e+01, 6.185989e-01, 5.878869e-01, 7.035064e+00, 2.892415e+00, 4.339383e+00, 3.549679e+00, 2.821061e+00, 1.529318e+01, 6.091388e+00} // 50-60
1b589c8a 104 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 0-10
105 ,{ 1.271594e+02, 7.790165e-01, 5.793214e-01, 8.050008e+00, 3.211312e+00, 4.825258e+00, 3.840509e+00, 3.046231e+00, 2.172177e+01, 5.983496e+00 } // 20-40
106 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 40-60
107 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 60-80
108 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 0-20
109 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 0-40
110 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 20-80
111 ,{ 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000,-1.0000000000, 1.0000000000,-1.0000000000, 1.0000000000, 0.0000000000, 0.0000000000 } // 40-80
112};
113
114const Double_t AliGenEMlib::fgkThermPtParam[kCentralities][2] = {
71443190 115 { 0.0000000000, 0.0000000000 } // pp no V2
116 ,{ 0.0000000000, 0.0000000000 } // 0-5
117 ,{ 0.0000000000, 0.0000000000 } // 5-10
1b589c8a 118 ,{ 3.335661e+01, 3.400585e+00 } // 10-20 //based on: https://aliceinfo.cern.ch/Notes/node/249
71443190 119 ,{ 0.0000000000, 0.0000000000 } // 20-30
120 ,{ 0.0000000000, 0.0000000000 } // 30-40
121 ,{ 0.0000000000, 0.0000000000 } // 40-50
122 ,{ 0.0000000000, 0.0000000000 } // 50-60
1b589c8a 123 ,{ 3.648327e+02, 4.477749e+00 } // 0-10 //based on: https://aliceinfo.cern.ch/Notes/node/249
124 ,{ 1.696223e+00, 2.429660e+00 } // 20-40 //based on: https://twiki.cern.ch/twiki/pub/ALICE/ALICEDirectPhotonSpectrumPaper/directPbPb.pdf
71443190 125 ,{ 0.0000000000, 0.0000000000 } // 40-60
126 ,{ 0.0000000000, 0.0000000000 } // 60-80
1b589c8a 127 ,{ 1.492160e+01, 2.805213e+00 } // 0-20 //based on: https://twiki.cern.ch/twiki/pub/ALICE/ALICEDirectPhotonSpectrumPaper/directPbPb.pdf
128 ,{ 4.215110e+01, 3.242719e+00 } // 0-40 //based on: https://aliceinfo.cern.ch/Figure/node/2866
71443190 129 ,{ 0.0000000000, 0.0000000000 } // 20-80
130 ,{ 0.0000000000, 0.0000000000 } // 40-80
131};
132
6e38a462 133const Double_t AliGenEMlib::fgkModTsallisParamPi0PbPb[kCentralities][7] = {
134 {0., 0., 0., 0., 0., 0., 0. }, // pp
135 {0., 0., 0., 0., 0., 0., 0. }, // 0-5
136 {0., 0., 0., 0., 0., 0., 0. }, // 5-10
137 {2.09114, 2.7482, 6.911, 51.1383, -10.6896, 1.30818, -1.59137 }, // 10-20
138 {0., 0., 0., 0., 0., 0., 0. }, // 20-30
139 {0., 0., 0., 0., 0., 0., 0. }, // 30-40
140 {0., 0., 0., 0., 0., 0., 0. }, // 40-50
141 {0., 0., 0., 0., 0., 0., 0. }, // 50-60
142 {970.684, 0.46451, 5.52064, 21.7707, -4.2495, 4.62292, -3.47699 }, // 00-10
143 {3.22534, 2.83717, 7.50505, 38.8015, -8.93242, 0.9842, -0.821508 }, // 20-40
144 {0., 0., 0., 0., 0., 0., 0. }, // 40-60
145 {0., 0., 0., 0., 0., 0., 0. }, // 60-80
146 {44.3972, 1.0644, 5.92254, 40.9254, -8.07759, 3.30333, -2.25078 }, // 00-20
147 {38.187, 1.58985, 6.81705, 31.2526, -8.35251, 3.39482, -1.56172 }, // 00-40
148 {0., 0., 0., 0., 0., 0., 0. }, // 20-80
149 {89.2412, 0.150509, 4.97424, 112.986, 643.257, 3.41969, -2.46034 }, // 40-80
150};
151
152const Double_t AliGenEMlib::fgkModTsallisParamPiChargedPbPb[kCentralities][7] = {
153 {0., 0., 0., 0., 0., 0., 0. }, // pp
154 {0., 0., 0., 0., 0., 0., 0. }, // 0-5
155 {0., 0., 0., 0., 0., 0., 0. }, // 5-10
156 {117.693, 1.20567, 6.57362, 29.2275, -7.71065, 4.50046, -1.91093 }, // 10-20
157 {0., 0., 0., 0., 0., 0., 0. }, // 20-30
158 {0., 0., 0., 0., 0., 0., 0. }, // 30-40
159 {0., 0., 0., 0., 0., 0., 0. }, // 40-50
160 {0., 0., 0., 0., 0., 0., 0. }, // 50-60
161 {229.035, 1.11283, 6.53404, 28.9739, -8.15381, 5.05703, -2.32825 }, // 00-10
162 {45.5686, 1.39268, 6.72519, 29.4513, -7.23335, 3.80987, -1.18599 }, // 20-40
163 {0., 0., 0., 0., 0., 0., 0. }, // 40-60
164 {0., 0., 0., 0., 0., 0., 0. }, // 60-80
165 {171.812, 1.14849, 6.54742, 29.0473, -7.96679, 4.82915, -2.15967 }, // 00-20
166 {108.083, 1.21125, 6.59362, 28.9651, -7.70072, 4.56583, -1.89318 }, // 00-40
167 {0., 0., 0., 0., 0., 0., 0. }, // 20-80
168 {3.14057, 0.329224, 4.8235, 491.145, 186.041, 2.91138, -2.20281 }, // 40-80
169};
170
171const Double_t AliGenEMlib::fgkParamSetPi07TeV[kNPi0Param][7] = {
172 {0.134977, 2.31335/(2*TMath::Pi()), 0.1433, 7.003, 0, 0, 0 }, //kPizeroParam
173 {-0.0580977, 0.580804, 5.0964, -669.913, -160.2, 4.45906, -0.465125 }, //kPizeroParamlow
174 {-7.09454, 0.218554, 5.2278, 77.9877, -359.457, 4.67862, -0.996938 }, //kPizeroParamhigh
175 {0., 0., 0., 0., 0., 0., 0. }, //kPichargedParam
176 {0., 0., 0., 0., 0., 0., 0. }, //kPichargedParamlow
177 {-0.000632204, 0.371249, 4.56778, -111488, -15573.4, 4.33064, -1.5506 }, //kPichargedParamhigh
178 {0., 0., 0., 0., 0., 0., 0. }, //kPizeroParamAlter
179 {0., 0., 0., 0., 0., 0., 0. }, //kPizeroParamAlterlow
180 {0., 0., 0., 0., 0., 0., 0. }, //kPizeroParamAlterhigh
181};
182
183const Double_t AliGenEMlib::fgkParamSetPi02760GeV[kNPi0Param][7] = {
184 {0.134977, 1.7/(2*TMath::Pi()), 0.135, 7.1, 0, 0, 0 }, //kPizeroParam
185 {-1.4583, 0.188108, 5.34499, 546.328, -2142.93, 4.55572, -1.82455 }, //kPizeroParamlow
186 {-0.0648943, 0.231029, 4.39238, -3705.4, -35.9761, 4.87127, -2.00983 }, //kPizeroParamhigh
187 {0.755554, 0.20772, 5.24167, 11.8279, 1492.53, 3.93863, -1.72404 }, //kPichargedParam
188 {0., 0., 0., 0., 0., 0., 0. }, //kPichargedParamlow
189 {0., 0., 0., 0., 0., 0., 0. }, //kPichargedParamhigh
190 {0.0610774, 5.86289, -7.83516, 1.29301, 2.62416, 0., 0. }, //kPizeroParamAlter
191 {0.065338, 5.86705, -9.05494, 1.38435, 3.58848, 0., 0. }, //kPizeroParamAlterlow
192 {0., 0., 0., 0., 0., 0., 0. }, //kPizeroParamAlterhigh
193};
194
195const Double_t AliGenEMlib::fgkParamSetPi0900GeV[kNPi0Param][7] = {
196 {0.134977, 1.5/(2*TMath::Pi()), 0.132, 7.8, 0, 0, 0 }, //kPizeroParam
197 {0., 0., 0., 0., 0., 0., 0. }, //kPizeroParamlow
198 {0., 0., 0., 0., 0., 0., 0. }, //kPizeroParamhigh
199 {0., 0., 0., 0., 0., 0., 0. }, //kPichargedParam
200 {0., 0., 0., 0., 0., 0., 0. }, //kPichargedParamlow
201 {0., 0., 0., 0., 0., 0., 0. }, //kPichargedParamhigh
202 {0.0467285, 59.6495, -212.865, 0.0584012, 2.83816, 0., 0. }, //kPizeroParamAlter
203 {0.0468173, 66.9511, -136.287, 0.0298099, 1.17147, 0., 0. }, //kPizeroParamAlterlow
204 {0., 0., 0., 0., 0., 0., 0. }, //kPizeroParamAlterhigh
205};
206
207
208// MASS 0=>PIZERO, 1=>ETA, 2=>RHO0, 3=>OMEGA, 4=>ETAPRIME, 5=>PHI, 6=>JPSI, 7=>SIGMA, 8=>K0s, 9=>DELTA++, 10=>DELTA+, 11=>DELTA-, 12=>DELTA0, 13=>Rho+, 14=>Rho-, 15=>K0*
209const Double_t AliGenEMlib::fgkHM[16] = {0.1349766, 0.547853, 0.77549, 0.78265, 0.95778, 1.019455, 3.096916, 1.192642, 0.497614, 1.2311, 1.2349, 1.2349, 1.23340, 0.77549, 0.77549, 0.896};
210
211const Double_t AliGenEMlib::fgkMtFactor[3][16] = {
212 // {1.0, 0.5, 1.0, 0.9, 0.4, 0.23, 0.054}, // factor for pp from arXiv:1110.3929
213 // {1.0, 0.55, 1.0, 0.9, 0.4, 0.25, 0.004} // factor for PbPb from arXiv:1110.3929
214 //{1., 0.48, 1.0, 0.9, 0.25, 0.4}, (old values)
215 //{1., 0.48, 1.0, 0.9, 0.4, 0.25}, (nlo values)
216 //{1., 0.48, 1.0, 0.8, 0.4, 0.2, 0.06} (combination of nlo and LHC measurements)
217 //https://aliceinfo.cern.ch/Figure/node/2634
218 //https://aliceinfo.cern.ch/Figure/node/2788
219 //https://aliceinfo.cern.ch/Figure/node/4403
220 //https://aliceinfo.cern.ch/Notes/node/87
221 /*best guess:
222 - pp values for eta/pi0 [arXiv:1205.5724], omega/pi0 [arXiv:1210.5749], phi/(pi+/-) [arXiv:1208.5717] from measured 7 Tev data
223 */
224 {1., 0.476, 1.0, 0.85, 0.4, 0.13, 1., 0.49, 0.575, 1, 1, 1, 1, 1.0, 1.0, 1.0}, //pp
225 {1., 0.476, 1.0, 0.85, 0.4, 0.25, 1., 0.49, 0.575, 1, 1, 1, 1, 1.0, 1.0, 1.0}, //pPb
226 {1., 0.476, 1.0, 0.85, 0.4, 0.25, 1., 0.49, 0.575, 1, 1, 1, 1, 1.0, 1.0, 1.0} //PbPb
4ae1c9f0 227};
6078e216 228
e40b9538 229//==========================================================================
230//
231// Definition of Particle Distributions
232//
233//==========================================================================
234
235//--------------------------------------------------------------------------
236//
4ae1c9f0 237// General functions
238//
239//--------------------------------------------------------------------------
5a516e0a 240Double_t AliGenEMlib::PtModifiedHagedornThermal(Double_t pt,
241 Double_t c,
242 Double_t p0,
243 Double_t p1,
244 Double_t n,
245 Double_t cT,
246 Double_t T)
4ae1c9f0 247{
6e38a462 248 // Modified Hagedorn Thermal fit to Picharged for PbPb:
249 Double_t invYield;
250 invYield = c/TMath::Power(p0+pt/p1,n) + cT*exp(-1.0*pt/T);
4ae1c9f0 251
6e38a462 252 return invYield*(2*TMath::Pi()*pt);
4ae1c9f0 253}
254
255
256
5a516e0a 257Double_t AliGenEMlib::PtModifiedHagedornExp(Double_t pt,
258 Double_t c,
259 Double_t p1,
260 Double_t p2,
261 Double_t p0,
262 Double_t n)
4ae1c9f0 263{
6e38a462 264 // Modified Hagedorn exponentiel fit to Pizero for PbPb:
265 Double_t invYield;
266 invYield = c*TMath::Power(exp(-1*(p1*pt-p2*pt*pt))+pt/p0,-n);
4ae1c9f0 267
6e38a462 268 return invYield*(2*TMath::Pi()*pt);
4ae1c9f0 269}
270
271
5a516e0a 272Double_t AliGenEMlib::PtModifiedHagedornExp2(Double_t pt,
273 Double_t c,
274 Double_t a,
275 Double_t b,
276 Double_t p0,
277 Double_t p1,
278 Double_t d,
279 Double_t n)
4ae1c9f0 280{
6e38a462 281 // Modified Hagedorn exponential fit to charged pions for pPb:
282 Double_t invYield;
283 invYield = c*TMath::Power(exp(-a*pt-b*pt*pt)+pt/p0+TMath::Power(pt/p1,d),-n);
4ae1c9f0 284
6e38a462 285 return invYield*(2*TMath::Pi()*pt);
4ae1c9f0 286}
287
5a516e0a 288Double_t AliGenEMlib::PtTsallis(Double_t pt,
289 Double_t m,
290 Double_t c,
291 Double_t T,
292 Double_t n)
4ae1c9f0 293{
6e38a462 294 // Tsallis fit to Pizero for pp:
295 Double_t mt;
296 Double_t invYield;
297
298 mt = sqrt(m*m + pt*pt);
299 invYield = c*((n-1.)*(n-2.))/(n*T*(n*T+m*(n-2.)))*pow(1.+(mt-m)/(n*T),-n);
300
301 return invYield*(2*TMath::Pi()*pt);
302}
303
4ae1c9f0 304
6e38a462 305Double_t AliGenEMlib::PtXQCD( Double_t pt,
306 Double_t a,
307 Double_t b,
308 Double_t c,
309 Double_t d,
310 Double_t e,
311 Double_t f)
312{
313 // QCD inspired function by Martin Wilde
314 // DISCLAIMER: Please be careful outside of the measured pT range
315 Double_t invYield = 0;
316 if(pt>0.05){
317 invYield = a*pow(pt,-1*(b+c/(pow(pt,d)+e*pow(pt,f))));
318 } else invYield = 100;
319 return invYield*(2*TMath::Pi()*pt);
4ae1c9f0 320}
321
6e38a462 322Double_t AliGenEMlib::PtQCD( Double_t pt,
323 Double_t a,
324 Double_t b,
325 Double_t c,
326 Double_t d,
327 Double_t e)
328{
329 // QCD inspired function by Martin Wilde
330 // DISCLAIMER: Please be careful outside of the measured pT range
331 Double_t invYield = 0;
332 if(pt>0.05){
333 invYield = a*pow(pt,-1*(b+c/(pow(pt,d)+e)));
334 } else invYield = 100;
335 return invYield*(2*TMath::Pi()*pt);
336}
337
338Double_t AliGenEMlib::PtModTsallis( Double_t pt,
339 Double_t a,
340 Double_t b,
341 Double_t c,
342 Double_t d,
343 Double_t e,
344 Double_t f,
345 Double_t g,
346 Double_t mass)
347{
348
349 Double_t invYield = 0;
350 Double_t mt = sqrt(mass*mass + pt*pt);
351 Double_t pt2 = pt*pt;
352 if(pt>0.05){
353 invYield = a*TMath::Power((1.+(mt-mass)/(b)),-c)*(d+e*pt+pt2)/(f+g*pt+pt2);
354 } else invYield = 100;
355 return invYield*(2*TMath::Pi()*pt);
356}
357
358Double_t AliGenEMlib::PtParticleRatiopp(Double_t pt,
359 Double_t m1,
360 Double_t m2,
361 Double_t c1,
362 Double_t c2,
363 Double_t T1,
364 Double_t T2,
365 Double_t n)
366{
367
368 Double_t ratio = 0;
369 if (PtTsallis (pt, m2, c2, T2, n)>0) ratio = PtTsallis (pt, m1, c1, T1, n)/ PtTsallis (pt, m2, c2, T2, n);
370 return ratio;
371}
372
373
71443190 374// Exponential
375Double_t AliGenEMlib::PtExponential(const Double_t *px, const Double_t *c){
6e38a462 376 const double &pt=px[0];
377 Double_t invYield = c[0]*exp(-pt*c[1]);
378
379 return invYield*(2*TMath::Pi()*pt);
71443190 380}
381
382// Hagedorn with additional Powerlaw
383Double_t AliGenEMlib::PtModifiedHagedornPowerlaw(const Double_t *px, const Double_t *c){
6e38a462 384 const double &pt=px[0];
385 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
386
387 return invYield*(2*TMath::Pi()*pt+0.001); //pt+0.001: be sure to be > 0
71443190 388}
389
6a8b015a 390// double powerlaw for J/Psi yield
391Double_t AliGenEMlib::PtDoublePowerlaw(const Double_t *px, const Double_t *c){
6e38a462 392 const double &pt=px[0];
393 Double_t yield = c[0]*pt*pow(1+pow(pt*c[1],2),-c[2]);
394
395 return yield;
6a8b015a 396}
397
398// integral over krollwada with S=1^2*(1-mee^2/mh^2)^3 from mee=0 up to mee=mh
399// approximation is perfect for mh>20MeV
400Double_t AliGenEMlib::IntegratedKrollWada(const Double_t *mh, const Double_t *){
6e38a462 401 if(*mh<0.002941) return 0;
402 return 2*log(*mh/0.000511/exp(1.75))/411.11/TMath::Pi();
71443190 403}
404
405//--------------------------------------------------------------------------
406//
6a8b015a 407// DirectRealGamma
71443190 408//
409//--------------------------------------------------------------------------
71443190 410Double_t AliGenEMlib::PtPromptRealGamma( const Double_t *px, const Double_t */*dummy*/ )
411{
6e38a462 412 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 413
6e38a462 414 return PtModifiedHagedornPowerlaw(px,promptGammaPtParam)*GetTAA(fgSelectedCentrality);
71443190 415}
416
6a8b015a 417Double_t AliGenEMlib::PtThermalRealGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 418{
6e38a462 419 return PtExponential(px,fgkThermPtParam[fgSelectedCentrality]);
71443190 420}
421
6a8b015a 422Double_t AliGenEMlib::PtDirectRealGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 423{
6e38a462 424 return PtPromptRealGamma(px,px)+PtThermalRealGamma(px,px);
71443190 425}
426
6a8b015a 427Int_t AliGenEMlib::IpDirectRealGamma(TRandom *)
71443190 428{
6e38a462 429 return 22;
71443190 430}
431
6a8b015a 432Double_t AliGenEMlib::YDirectRealGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 433{
6e38a462 434 return YFlat(*px);
71443190 435}
436
6a8b015a 437Double_t AliGenEMlib::V2DirectRealGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 438{
6e38a462 439 const static Double_t v2Param[3][16] = {
440 { 1.004245e-01, 1.057645e+00, 0.000000e+00, 2.836492e+00, 2.819767e+00, -6.231529e-02, 1.173054e+00, 2.836492e+00, 1.881590e-01, 1.183293e-02, 1.252249e+00, 0, 1, 4.876263e-03, 1.518526e+00, 4.5 } // 00-20, based on: https://aliceinfo.cern.ch/Notes/node/249
441 ,{ 1.619000e-01, 1.868201e+00, 6.983303e-15, 2.242170e+00, 4.484339e+00, -1.695734e-02, 2.301359e+00, 2.871469e+00, 1.619000e-01, 2.264320e-02, 1.028641e+00, 0, 1, 8.172203e-03, 1.271637e+00, 4.5 } // 20-40
442 ,{ 1.335000e-01, 1.076916e+00, 1.462605e-08, 2.785732e+00, 5.571464e+00, -2.356156e-02, 2.745437e+00, 2.785732e+00, 1.335000e-01, 1.571589e-02, 1.001131e+00, 0, 1, 5.179715e-03, 1.329344e+00, 4.5 } // 00-40
443 };
444 switch(fgSelectedCentrality){
445 case k0020: return V2Param(px,v2Param[0]); break;
446 case k2040: return V2Param(px,v2Param[1]); break;
447 case k0040: return V2Param(px,v2Param[2]); break;
448 // case k0010: return 0.43*V2Param(px,v2Param[1]); break; //V2Pizero(0010)/V2Pizero(2040)=0.43 +-0.025
449 // case k1020: return 0.75*V2Param(px,v2Param[1]); break; //V2Pizero(1020)/V2Pizero(2040)=0.75 +-0.04
450 case k0010: return 0.53*V2Param(px,v2Param[2]); break; //V2Pizero(0010)/V2Pizero(0040)=0.53 +-0.03
451 case k1020: return 0.91*V2Param(px,v2Param[2]); break; //V2Pizero(1020)/V2Pizero(0040)=0.91 +-0.04
452 }
453 return 0;
71443190 454}
455
6a8b015a 456
71443190 457//--------------------------------------------------------------------------
458//
6a8b015a 459// DirectVirtGamma
71443190 460//
461//--------------------------------------------------------------------------
6a8b015a 462Double_t AliGenEMlib::PtPromptVirtGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 463{
6a8b015a 464 return IntegratedKrollWada(px,px)*PtPromptRealGamma(px,px);
71443190 465}
466
6a8b015a 467Double_t AliGenEMlib::PtThermalVirtGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 468{
6e38a462 469 return IntegratedKrollWada(px,px)*PtThermalRealGamma(px,px);
71443190 470}
471
6a8b015a 472Double_t AliGenEMlib::PtDirectVirtGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 473{
6e38a462 474 return IntegratedKrollWada(px,px)*PtDirectRealGamma(px,px);
71443190 475}
476
6a8b015a 477Int_t AliGenEMlib::IpDirectVirtGamma(TRandom *)
71443190 478{
6e38a462 479 return 220000;
71443190 480}
481
6a8b015a 482Double_t AliGenEMlib::YDirectVirtGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 483{
6e38a462 484 return YFlat(*px);
71443190 485}
4ae1c9f0 486
6a8b015a 487Double_t AliGenEMlib::V2DirectVirtGamma( const Double_t *px, const Double_t */*dummy*/ )
71443190 488{
6e38a462 489 return V2DirectRealGamma(px,px);
71443190 490}
4ae1c9f0 491
492//--------------------------------------------------------------------------
493//
e40b9538 494// Pizero
495//
496//--------------------------------------------------------------------------
497Int_t AliGenEMlib::IpPizero(TRandom *)
498{
4ae1c9f0 499 // Return pizero pdg code
6e38a462 500 return 111;
e40b9538 501}
502
503Double_t AliGenEMlib::PtPizero( const Double_t *px, const Double_t */*dummy*/ )
504{
6e38a462 505 // double pigammacorr=1; //misuse pion for direct gammas, tuned for 0040, iteration 0
506 // pigammacorr*=2.258900e-01*log(*px+0.001)+1.591291e+00; //iteration 1
507 // pigammacorr*=6.601943e-03*log(*px+0.001)+9.593698e-01; //iteration 2
508 // pigammacorr*=4.019933e-03*log(*px+0.001)+9.843412e-01; //iteration 3
509 // pigammacorr*=-4.543991e-03*log(*px+0.001)+1.010886e+00; //iteration 4
510 // return pigammacorr*PtPromptRealGamma(px,px); //now the gammas from the pi->gg decay have the pt spectrum of prompt real gammas
511
512 // fit functions and corresponding parameter of Pizero pT for pp @ 2.76 TeV and @ 7 TeV and for PbPb @ 2.76 TeV
513
6e38a462 514 Double_t kc=0.;
515 Double_t kn=0.;
516 Double_t kcT=0.;
517 Double_t kT=0.;
518 Double_t kp0=0.;
519 Double_t kp1=0.;
6e38a462 520 Double_t ka=0.;
521 Double_t kb=0.;
522 Double_t kd=0.;
523
524 switch(fgSelectedCollisionsSystem) {
525 case kPbPb:
526 switch (fgSelectedPtParamPi0){
527 case kPichargedParam:
528 // fit to pi charged v1
529 // charged pion from ToF, unidentified hadrons scaled with pion from TPC
530 // for Pb-Pb @ 2.76 TeV
531 switch (fgSelectedCentrality){
532 case k0005:
533 kc=1347.5; kp0=0.9393; kp1=2.254; kn=11.294; kcT=0.002537; kT=2.414;
534 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
535 break;
536 case k0510:
537 break;
538 kc=1256.1; kp0=0.9545; kp1=2.248; kn=11.291; kcT=0.002662; kT=2.326;
539 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
540 break;
541 case k2030:
542 kc=7421.6; kp0=1.2059; kp1=1.520; kn=10.220; kcT=0.002150; kT=2.196;
543 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
544 break;
545 case k3040:
546 kc=1183.2; kp0=1.0478; kp1=1.623; kn=9.8073; kcT=0.00198333; kT=2.073;
547 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
548 break;
549 // the following is what went into the Pb-Pb preliminary approval (0-10%)
550 case k0010:
551 return PtModTsallis( *px,
552 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][0],
553 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][1],
554 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][2],
555 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][3],
556 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][4],
557 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][5],
558 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][6],
559 0.135);
560 break;
561 case k1020:
562 return PtModTsallis( *px,
563 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][0],
564 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][1],
565 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][2],
566 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][3],
567 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][4],
568 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][5],
569 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][6],
570 0.135);
571 break;
572 case k2040:
573 return PtModTsallis( *px,
574 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][0],
575 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][1],
576 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][2],
577 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][3],
578 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][4],
579 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][5],
580 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][6],
581 0.135);
582 break;
583 case k4050:
584 kc=6220.0; kp0=1.322; kp1=1.224; kn=9.378; kcT=0.000595; kT=2.383;
585 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
586 break;
587 case k5060:
588 kc=2319.0; kp0=1.267; kp1=1.188; kn=9.044; kcT=0.000437; kT=2.276;
589 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
590 break;
591 case k4060:
592 kc=4724.0; kp0=1.319; kp1=1.195; kn=9.255; kcT=0.000511; kT=2.344;
593 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
594 break;
595 case k6080:
596 kc=2842.0; kp0=1.465; kp1=0.8324; kn=8.167; kcT=0.0001049; kT=2.29;
597 return PtModifiedHagedornThermal(*px,kc,kp0,kp1,kn,kcT,kT);
598 break;
599 case k0020:
600 return PtModTsallis( *px,
601 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][0],
602 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][1],
603 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][2],
604 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][3],
605 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][4],
606 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][5],
607 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][6],
608 0.135);
609 break;
610 case k0040:
611 return PtModTsallis( *px,
612 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][0],
613 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][1],
614 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][2],
615 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][3],
616 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][4],
617 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][5],
618 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][6],
619 0.135);
620 break;
621 case k4080:
622 return PtModTsallis( *px,
623 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][0],
624 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][1],
625 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][2],
626 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][3],
627 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][4],
628 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][5],
629 fgkModTsallisParamPiChargedPbPb[fgSelectedCentrality][6],
630 0.135);
631 break;
632 default:
633 return 0;
634 }
635 case kPizeroParam:
636 return PtModTsallis( *px,
637 fgkModTsallisParamPi0PbPb[fgSelectedCentrality][0],
638 fgkModTsallisParamPi0PbPb[fgSelectedCentrality][1],
639 fgkModTsallisParamPi0PbPb[fgSelectedCentrality][2],
640 fgkModTsallisParamPi0PbPb[fgSelectedCentrality][3],
641 fgkModTsallisParamPi0PbPb[fgSelectedCentrality][4],
642 fgkModTsallisParamPi0PbPb[fgSelectedCentrality][5],
643 fgkModTsallisParamPi0PbPb[fgSelectedCentrality][6],
644 0.135);
645 default:
646 return 0;
647
648 }
649 case kpPb:
650 // fit to charged pions for p-Pb @ 5.02TeV
651 switch (fgSelectedPtParamPi0){
652 case kPichargedParam:
653 kc=235.5; ka=0.6903; kb=0.06864; kp0=2.289; kp1=0.5872; kd=0.6474; kn=7.842;
654 return PtModifiedHagedornExp2(*px,kc,ka,kb,kp0,kp1,kd,kn);
655 break;
656 default:
657 return 0;
658
659 }
660 case kpp7TeV:
661 switch (fgSelectedPtParamPi0){
662 // Tsallis fit to final pizero (PHOS+PCM) -> used for publication
663 // for pp @ 7 TeV
664 case kPizeroParam: // fit to combined spectrum with stat errors only
665 return PtTsallis(*px,fgkParamSetPi07TeV[kPizeroParam][0],fgkParamSetPi07TeV[kPizeroParam][1],fgkParamSetPi07TeV[kPizeroParam][2],fgkParamSetPi07TeV[kPizeroParam][3]);
666 break;
667 case kPizeroParamlow:
668 return PtModTsallis( *px,
669 fgkParamSetPi07TeV[kPizeroParamlow][0],
670 fgkParamSetPi07TeV[kPizeroParamlow][1],
671 fgkParamSetPi07TeV[kPizeroParamlow][2],
672 fgkParamSetPi07TeV[kPizeroParamlow][3],
673 fgkParamSetPi07TeV[kPizeroParamlow][4],
674 fgkParamSetPi07TeV[kPizeroParamlow][5],
675 fgkParamSetPi07TeV[kPizeroParamlow][6],
676 0.135);
677 break;
678 case kPizeroParamhigh:
679 return PtModTsallis( *px,
680 fgkParamSetPi07TeV[kPizeroParamhigh][0],
681 fgkParamSetPi07TeV[kPizeroParamhigh][1],
682 fgkParamSetPi07TeV[kPizeroParamhigh][2],
683 fgkParamSetPi07TeV[kPizeroParamhigh][3],
684 fgkParamSetPi07TeV[kPizeroParamhigh][4],
685 fgkParamSetPi07TeV[kPizeroParamhigh][5],
686 fgkParamSetPi07TeV[kPizeroParamhigh][6],
687 0.135);
688 break;
689 case kPichargedParamhigh:
690 return PtModTsallis( *px,
691 fgkParamSetPi07TeV[kPichargedParamhigh][0],
692 fgkParamSetPi07TeV[kPichargedParamhigh][1],
693 fgkParamSetPi07TeV[kPichargedParamhigh][2],
694 fgkParamSetPi07TeV[kPichargedParamhigh][3],
695 fgkParamSetPi07TeV[kPichargedParamhigh][4],
696 fgkParamSetPi07TeV[kPichargedParamhigh][5],
697 fgkParamSetPi07TeV[kPichargedParamhigh][6],
698 0.135);
699 break;
700
701 default:
702 return 0;
703 }
704
705
706 case kpp2760GeV:
707 switch (fgSelectedPtParamPi0){
708 // Tsallis fit to pizero: published pi0
709 // for pp @ 2.76 TeV
710 case kPizeroParam: //published fit parameters
711 return PtTsallis(*px,fgkParamSetPi02760GeV[kPizeroParam][0],fgkParamSetPi02760GeV[kPizeroParam][1],fgkParamSetPi02760GeV[kPizeroParam][2],fgkParamSetPi02760GeV[kPizeroParam][3]);
712 break;
713 case kPizeroParamlow:
714 return PtModTsallis( *px,
715 fgkParamSetPi02760GeV[kPizeroParamlow][0],
716 fgkParamSetPi02760GeV[kPizeroParamlow][1],
717 fgkParamSetPi02760GeV[kPizeroParamlow][2],
718 fgkParamSetPi02760GeV[kPizeroParamlow][3],
719 fgkParamSetPi02760GeV[kPizeroParamlow][4],
720 fgkParamSetPi02760GeV[kPizeroParamlow][5],
721 fgkParamSetPi02760GeV[kPizeroParamlow][6],
722 0.135);
723 break;
724 case kPizeroParamhigh:
725 return PtModTsallis( *px,
726 fgkParamSetPi02760GeV[kPizeroParamhigh][0],
727 fgkParamSetPi02760GeV[kPizeroParamhigh][1],
728 fgkParamSetPi02760GeV[kPizeroParamhigh][2],
729 fgkParamSetPi02760GeV[kPizeroParamhigh][3],
730 fgkParamSetPi02760GeV[kPizeroParamhigh][4],
731 fgkParamSetPi02760GeV[kPizeroParamhigh][5],
732 fgkParamSetPi02760GeV[kPizeroParamhigh][6],
733 0.135);
734 break;
735 case kPichargedParam:
736 return PtModTsallis( *px,
737 fgkParamSetPi02760GeV[kPichargedParam][0],
738 fgkParamSetPi02760GeV[kPichargedParam][1],
739 fgkParamSetPi02760GeV[kPichargedParam][2],
740 fgkParamSetPi02760GeV[kPichargedParam][3],
741 fgkParamSetPi02760GeV[kPichargedParam][4],
742 fgkParamSetPi02760GeV[kPichargedParam][5],
743 fgkParamSetPi02760GeV[kPichargedParam][6],
744 0.135);
745 break;
746 case kPizeroParamAlter:
747 return PtQCD( *px,
748 fgkParamSetPi02760GeV[kPizeroParamAlter][0],
749 fgkParamSetPi02760GeV[kPizeroParamAlter][1],
750 fgkParamSetPi02760GeV[kPizeroParamAlter][2],
751 fgkParamSetPi02760GeV[kPizeroParamAlter][3],
752 fgkParamSetPi02760GeV[kPizeroParamAlter][4]);
753 break;
754 case kPizeroParamAlterlow:
755 return PtQCD( *px,
756 fgkParamSetPi02760GeV[kPizeroParamAlter][0],
757 fgkParamSetPi02760GeV[kPizeroParamAlter][1],
758 fgkParamSetPi02760GeV[kPizeroParamAlter][2],
759 fgkParamSetPi02760GeV[kPizeroParamAlter][3],
760 fgkParamSetPi02760GeV[kPizeroParamAlter][4]);
761 break;
762 default:
763 return 0;
764 }
765 case kpp900GeV:
766 switch (fgSelectedPtParamPi0){
767 // Tsallis fit to pizero: published pi0
768 // for pp @ 0.9 TeV
769 case kPizeroParam: //published fit parameters
770 return PtTsallis( *px,
771 fgkParamSetPi0900GeV[kPizeroParam][0],
772 fgkParamSetPi0900GeV[kPizeroParam][1],
773 fgkParamSetPi0900GeV[kPizeroParam][2],
774 fgkParamSetPi0900GeV[kPizeroParam][3]);
775 break;
776 case kPizeroParamAlter:
777 return PtQCD( *px,
778 fgkParamSetPi0900GeV[kPizeroParamAlter][0],
779 fgkParamSetPi0900GeV[kPizeroParamAlter][1],
780 fgkParamSetPi0900GeV[kPizeroParamAlter][2],
781 fgkParamSetPi0900GeV[kPizeroParamAlter][3],
782 fgkParamSetPi0900GeV[kPizeroParamAlter][4]);
783 break;
784 case kPizeroParamhigh:
785 return PtQCD( *px,
786 fgkParamSetPi0900GeV[kPizeroParamAlterlow][0],
787 fgkParamSetPi0900GeV[kPizeroParamAlterlow][1],
788 fgkParamSetPi0900GeV[kPizeroParamAlterlow][2],
789 fgkParamSetPi0900GeV[kPizeroParamAlterlow][3],
790 fgkParamSetPi0900GeV[kPizeroParamAlterlow][4]);
791 break;
792 default:
793 return 0;
794 }
795
796 default:
797 return 0;
798 }
4ae1c9f0 799
e40b9538 800}
801
802Double_t AliGenEMlib::YPizero( const Double_t *py, const Double_t */*dummy*/ )
803{
6e38a462 804 return YFlat(*py);
e40b9538 805
806}
807
6078e216 808Double_t AliGenEMlib::V2Pizero( const Double_t *px, const Double_t */*dummy*/ )
809{
6e38a462 810 double n1,n2,n3,n4,n5;
811 double v1,v2,v3,v4,v5;
812 switch(fgSelectedCentrality) {
813 case k0010:
814 n1=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k0005]);
815 v1=V2Param(px,fgkV2param[k0005]);
816 n2=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k0510]);
817 v2=V2Param(px,fgkV2param[k0510]);
818 return (n1*v1+n2*v2)/(n1+n2);
819 break;
820 case k0020:
821 n1=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k0005]);
822 v1=V2Param(px,fgkV2param[k0005]);
823 n2=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k0510]);
824 v2=V2Param(px,fgkV2param[k0510]);
825 n3=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k1020]);
826 v3=V2Param(px,fgkV2param[k1020]);
827 return (n1*v1+n2*v2+2*n3*v3)/(n1+n2+2*n3);
828 break;
829 case k2040:
830 n1=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k2030]);
831 v1=V2Param(px,fgkV2param[k2030]);
832 n2=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k3040]);
833 v2=V2Param(px,fgkV2param[k3040]);
834 return (n1*v1+n2*v2)/(n1+n2);
835 break;
836 case k0040:
837 n1=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k0005]);
838 v1=V2Param(px,fgkV2param[k0005]);
839 n2=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k0510]);
840 v2=V2Param(px,fgkV2param[k0510]);
841 n3=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k1020]);
842 v3=V2Param(px,fgkV2param[k1020]);
843 n4=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k2030]);
844 v4=V2Param(px,fgkV2param[k2030]);
845 n5=PtModifiedHagedornPowerlaw(px,fgkRawPtOfV2Param[k3040]);
846 v5=V2Param(px,fgkV2param[k3040]);
847 return (n1*v1+n2*v2+2*n3*v3+2*n4*v4+2*n5*v5)/(n1+n2+2*n3+2*n4+2*n5);
848 break;
849
850 default:
851 return V2Param(px,fgkV2param[fgSelectedCentrality]);
852 }
6078e216 853}
854
e40b9538 855//--------------------------------------------------------------------------
856//
857// Eta
858//
859//--------------------------------------------------------------------------
860Int_t AliGenEMlib::IpEta(TRandom *)
861{
4ae1c9f0 862 // Return eta pdg code
6e38a462 863 return 221;
e40b9538 864}
865
866Double_t AliGenEMlib::PtEta( const Double_t *px, const Double_t */*dummy*/ )
867{
4ae1c9f0 868
869 // fit functions and corresponding parameter of Eta pT for pp @ 2.76 TeV and @ 7 TeV
870 // and mtscaled pT
871
6e38a462 872 // parameters for Tsallis fit to eta
873 Double_t km = 0.;
874 Double_t kc = 0.;
875 Double_t kT = 0.;
876 Double_t kn = 0.;
877
878 // parameters for Tsallis fit to pi0
879 Double_t kmPi0 = 0.;
880 Double_t kcPi0 = 0.;
881 Double_t kTPi0 = 0.;
882 Double_t knPi0 = 0.;
883
884 // parameters for fit to eta/pi0
885 Double_t krm1 = 0.;
886 Double_t krm2 = 0.;
887 Double_t krc1 = 0.;
888 Double_t krc2 = 0.;
889 Double_t krT1 = 0.;
890 Double_t krT2 = 0.;
891 Double_t krn = 0.;
892
893 switch(fgSelectedCollisionsSystem){
894 case kpp7TeV:
895 switch(fgSelectedPtParamEta){
896 // Tsallis fit to final eta (PHOS+PCM) -> used stat errors only for final publication
897 // for pp @ 7 TeV
898 case kEtaParamRatiopp:
899 krm1 = 0.547853; krm2 = 0.134977; krc1 = 1.44198e+11; krc2 = 2.06751e+12 ; krT1 = 0.154567 ; krT2 = 0.139634 ; krn=32.0715;
900 kmPi0=0.134977; kcPi0=2.31335/(2*TMath::Pi()); kTPi0=0.1433; knPi0=7.003;
901 return PtParticleRatiopp(*px, krm1, krm2, krc1, krc2, krT1, krT2, krn) * PtTsallis(*px,kmPi0,kcPi0,kTPi0,knPi0);
902 break;
903 case kEtaParampp:
904 km = 0.547853; kc = 0.290164/(2*TMath::Pi()); kT = 0.212; kn = 7.352;
905 return PtTsallis(*px,km,kc,kT,kn);
906 break;
907 // NOTE: None of these parametrisations look right - no idea where they come from
908 case kEtaParampplow:
909 km = 0.547853; kc = 1.970; kT = 0.253; kn = 7.591;
910 return PtTsallis(*px,km,kc,kT,kn);
911 break;
912 case kEtaParampphigh:
913 km = 0.547853; kc = 3.060; kT = 0.212; kn = 6.578;
914 return PtTsallis(*px,km,kc,kT,kn);
915 break;
916 default:
917 return MtScal(*px,kEta);
918 }
919 case kpp2760GeV:
920 switch(fgSelectedPtParamEta){
921 // Tsallis fit to preliminary eta (QM'11)
922 // for pp @ 2.76 TeV
923 // NOTE: None of these parametrisations look right - no idea where they come from
924 case kEtaParampp:
925 km = 0.547853; kc = 1.971; kT = 0.188; kn = 6.308;
926 return PtTsallis(*px,km,kc,kT,kn);
927 case kEtaParampplow:
928 km = 0.547853; kc = 1.228; kT = 0.220; kn = 7.030;
929 return PtTsallis(*px,km,kc,kT,kn);
930 break;
931 case kEtaParampphigh:
932 km = 0.547853; kc = 2.802; kT = 0.164; kn = 5.815;
933 return PtTsallis(*px,km,kc,kT,kn);
934 break;
935 default:
936 return MtScal(*px,kEta);
937 break;
938 }
939 default:
940 return MtScal(*px,kEta);
941 break;
942 }
e40b9538 943}
944
945Double_t AliGenEMlib::YEta( const Double_t *py, const Double_t */*dummy*/ )
946{
6e38a462 947 return YFlat(*py);
6078e216 948}
e40b9538 949
6078e216 950Double_t AliGenEMlib::V2Eta( const Double_t *px, const Double_t */*dummy*/ )
951{
6e38a462 952 return KEtScal(*px,kEta); //V2Param(px,fgkV2param[1][fgSelectedV2Param]);
e40b9538 953}
954
955//--------------------------------------------------------------------------
956//
957// Rho
958//
959//--------------------------------------------------------------------------
6e38a462 960Int_t AliGenEMlib::IpRho0(TRandom *)
e40b9538 961{
6e38a462 962 // Return rho pdg code
963 return 113;
e40b9538 964}
965
6e38a462 966Double_t AliGenEMlib::PtRho0( const Double_t *px, const Double_t */*dummy*/ )
e40b9538 967{
6e38a462 968 // Rho pT
969 return MtScal(*px,kRho0);
e40b9538 970}
971
6e38a462 972Double_t AliGenEMlib::YRho0( const Double_t *py, const Double_t */*dummy*/ )
e40b9538 973{
6e38a462 974 return YFlat(*py);
4ae1c9f0 975}
e40b9538 976
6e38a462 977Double_t AliGenEMlib::V2Rho0( const Double_t *px, const Double_t */*dummy*/ )
4ae1c9f0 978{
6e38a462 979 return KEtScal(*px,kRho0);
e40b9538 980}
981
6e38a462 982
e40b9538 983//--------------------------------------------------------------------------
984//
985// Omega
986//
987//--------------------------------------------------------------------------
988Int_t AliGenEMlib::IpOmega(TRandom *)
989{
6e38a462 990 // Return omega pdg code
991 return 223;
e40b9538 992}
993
994Double_t AliGenEMlib::PtOmega( const Double_t *px, const Double_t */*dummy*/ )
995{
6e38a462 996 // Omega pT
997 // fit functions and corresponding parameter of Omega pT for preliminary pp @ 7 TeV data
998 // and mtscaled pT
999
1000 // parameters for Tsallis fit to omega
1001 Double_t km = 0.;
1002 Double_t kc = 0.;
1003 Double_t kT = 0.;
1004 Double_t kn = 0.;
1005
1006 // parameters for Tsallis fit to pi0
1007 Double_t kmPi0 = 0.;
1008 Double_t kcPi0 = 0.;
1009 Double_t kTPi0 = 0.;
1010 Double_t knPi0 = 0.;
1011
1012 // parameters for fit to omega/pi0
1013 Double_t krm1 = 0.;
1014 Double_t krm2 = 0.;
1015 Double_t krc1 = 0.;
1016 Double_t krc2 = 0.;
1017 Double_t krT1 = 0.;
1018 Double_t krT2 = 0.;
1019 Double_t krn = 0.;
1020
1021 switch(fgSelectedCollisionsSystem){
1022 case kpp7TeV:
1023 switch(fgSelectedPtParamOmega){
1024 // Tsallis fit to final omega (PHOS) -> stat errors only, preliminary QM12
1025 // for pp @ 7 TeV
1026 case kOmegaParamRatiopp:
1027 krm1 = 0.78265; krm2 = 0.134977; krc1 = 21240028553.4600143433; krc2 = 168266377865.0805969238 ; krT1 = 0.21175 ; krT2 = 0.14328 ; krn=12.8831831756;
1028 kmPi0=0.134977; kcPi0=2.31335/(2*TMath::Pi()); kTPi0=0.1433; knPi0=7.003;
1029 return PtParticleRatiopp(*px, krm1, krm2, krc1, krc2, krT1, krT2, krn) * PtTsallis(*px,kmPi0,kcPi0,kTPi0,knPi0);
1030 break;
1031 case kOmegaParampp:
1032 km = 0.78265; kc = 0.340051/(2*TMath::Pi()); kT = 0.206; kn = 6.31422;
1033 return PtTsallis(*px,km,kc,kT,kn);
1034 break;
1035 default:
1036 return MtScal(*px,kOmega);
1037 }
1038 default:
1039 return MtScal(*px,kOmega);
1040 break;
1041 }
1042
1043 return MtScal(*px,kOmega);
1044
e40b9538 1045}
1046
1047Double_t AliGenEMlib::YOmega( const Double_t *py, const Double_t */*dummy*/ )
1048{
6e38a462 1049 return YFlat(*py);
4ae1c9f0 1050}
e40b9538 1051
4ae1c9f0 1052Double_t AliGenEMlib::V2Omega( const Double_t *px, const Double_t */*dummy*/ )
1053{
6e38a462 1054 return KEtScal(*px,kOmega);
1055
e40b9538 1056}
1057
4ae1c9f0 1058
e40b9538 1059//--------------------------------------------------------------------------
1060//
1061// Etaprime
1062//
1063//--------------------------------------------------------------------------
1064Int_t AliGenEMlib::IpEtaprime(TRandom *)
1065{
6e38a462 1066 // Return etaprime pdg code
1067 return 331;
e40b9538 1068}
1069
1070Double_t AliGenEMlib::PtEtaprime( const Double_t *px, const Double_t */*dummy*/ )
1071{
6e38a462 1072 // Eta pT
1073 return MtScal(*px,kEtaprime);
e40b9538 1074}
1075
1076Double_t AliGenEMlib::YEtaprime( const Double_t *py, const Double_t */*dummy*/ )
1077{
6e38a462 1078 return YFlat(*py);
e40b9538 1079
1080}
1081
4ae1c9f0 1082Double_t AliGenEMlib::V2Etaprime( const Double_t *px, const Double_t */*dummy*/ )
1083{
6e38a462 1084 return KEtScal(*px,kEtaprime);
4ae1c9f0 1085}
1086
e40b9538 1087//--------------------------------------------------------------------------
1088//
1089// Phi
1090//
1091//--------------------------------------------------------------------------
1092Int_t AliGenEMlib::IpPhi(TRandom *)
1093{
6e38a462 1094 // Return phi pdg code
1095 return 333;
e40b9538 1096}
1097
1098Double_t AliGenEMlib::PtPhi( const Double_t *px, const Double_t */*dummy*/ )
1099{
4ae1c9f0 1100 // Phi pT
6e38a462 1101 // fit functions and corresponding parameter of Phi pT for preliminary pp @ 7 TeV data
1102 // and PbPb collisions
1103 // and mtscaled pT
1104
1105 // parameters for Tsallis fit to phi
1106 Double_t km = 0.;
1107 Double_t kc = 0.;
1108 Double_t kT = 0.;
1109 Double_t kn = 0.;
1110
1111
1112 switch(fgSelectedCollisionsSystem){
1113// case kPbPb:
1114// switch(fgSelectedCentrality){
1115// // Tsallis fit to final phi->K+K- (TPC, ITS) -> stat+syst
1116// case k0010:
1117// switch(fgSelectedPtParamPhi){
1118// case kPhiParamPbPb:
1119// km = 0.78265; kc = 0.340051/(2*TMath::Pi()); kT = 0.206; kn = 6.31422;
1120// return PtTsallis(*px,km,kc,kT,kn);
1121// break;
1122// default:
1123// return MtScal(*px,kPhi);
1124// }
1125// default:
1126// return MtScal(*px,kPhi);
1127// }
1128 case kpp7TeV:
1129 switch(fgSelectedPtParamPhi){
1130 // Tsallis fit to final phi->K+K- (TPC, ITS) -> stat+syst
1131 // for pp @ 7 TeV
1132 case kPhiParampp:
1133 km = 1.01946; kc = 0.0269578/(2*TMath::Pi()); kT = 0.2718119311; kn = 6.6755739295;
1134 return PtTsallis(*px,km,kc,kT,kn);
1135 break;
1136 default:
1137 return MtScal(*px,kPhi);
1138 }
1139 default:
1140 return MtScal(*px,kPhi);
1141 break;
1142 }
1143 return MtScal(*px,kPhi);
1144
e40b9538 1145}
1146
1147Double_t AliGenEMlib::YPhi( const Double_t *py, const Double_t */*dummy*/ )
1148{
6e38a462 1149 return YFlat(*py);
e40b9538 1150}
1151
4ae1c9f0 1152Double_t AliGenEMlib::V2Phi( const Double_t *px, const Double_t */*dummy*/ )
e40b9538 1153{
6e38a462 1154 return KEtScal(*px,kPhi);
4ae1c9f0 1155}
1156
e40b9538 1157//--------------------------------------------------------------------------
1158//
4ae1c9f0 1159// Jpsi
e40b9538 1160//
1161//--------------------------------------------------------------------------
4ae1c9f0 1162Int_t AliGenEMlib::IpJpsi(TRandom *)
1163{
6e38a462 1164 // Return phi pdg code
1165 return 443;
4ae1c9f0 1166}
1167
1168Double_t AliGenEMlib::PtJpsi( const Double_t *px, const Double_t */*dummy*/ )
1169{
6e38a462 1170 // Jpsi pT
1171 // based on: //https://aliceinfo.cern.ch/Notes/node/242, https://aliceinfo.cern.ch/Figure/node/3457, www.sciencedirect.com/science/article/pii/S0370269312011446
1172 const static Double_t jpsiPtParam[2][3] = {
1173 { 9.686337e-03, 2.629441e-01, 4.552044e+00 }
1174 ,{ 3.403549e-03, 2.897061e-01, 3.644278e+00 }
1175 };
1176 const double pt=px[0]*2.28/2.613;
1177 switch(fgSelectedCentrality) {
1178 case k0020: return 2.405*PtDoublePowerlaw(&pt,jpsiPtParam[0]); break;
1179 case k2040: return 2.405*PtDoublePowerlaw(&pt,jpsiPtParam[1]); break;
1180 case k0040: return 0.5*2.405*(PtDoublePowerlaw(&pt,jpsiPtParam[0])+PtDoublePowerlaw(&pt,jpsiPtParam[1])); break;
1181 default:
1182 return MtScal(*px,kJpsi);
1183
1184 }
1185 return 0;
4ae1c9f0 1186}
1187
1188Double_t AliGenEMlib::YJpsi( const Double_t *py, const Double_t */*dummy*/ )
1189{
6e38a462 1190 return YFlat(*py);
4ae1c9f0 1191}
1192
1193Double_t AliGenEMlib::V2Jpsi( const Double_t *px, const Double_t */*dummy*/ )
1194{
6e38a462 1195 const static Double_t v2Param[16] = { 1.156000e-01, 8.936854e-01, 0.000000e+00, 4.000000e+00, 6.222375e+00, -1.600314e-01, 8.766676e-01, 7.824143e+00, 1.156000e-01, 3.484503e-02, 4.413685e-01, 0, 1, 3.484503e-02, 4.413685e-01, 7.2 };
1196 switch(fgSelectedCentrality){
1197 case k2040: return V2Param(px,v2Param); break;
1198 case k0010: return 0.43*V2Param(px,v2Param); break; //V2Pizero(0010)/V2Pizero(2040)=0.43 +-0.025
1199 case k1020: return 0.75*V2Param(px,v2Param); break; //V2Pizero(1020)/V2Pizero(2040)=0.75 +-0.04
1200 case k0020: return 0.66*V2Param(px,v2Param); break; //V2Pizero(0020)/V2Pizero(2040)=0.66 +-0.035
1201 case k0040: return 0.82*V2Param(px,v2Param); break; //V2Pizero(0040)/V2Pizero(2040)=0.82 +-0.05
1202 }
1203 return 0;
1204}
1205
1206//--------------------------------------------------------------------------
1207//
1208// Sigma
1209//
1210//--------------------------------------------------------------------------
1211Int_t AliGenEMlib::IpSigma(TRandom *)
1212{
1213 // Return Sigma pdg code
1214 return 3212;
1215}
1216
1217Double_t AliGenEMlib::PtSigma( const Double_t *px, const Double_t */*dummy*/ )
1218{
1219 // Sigma pT
1220 return MtScal(*px,kSigma0);
1221}
1222
1223Double_t AliGenEMlib::YSigma( const Double_t *py, const Double_t */*dummy*/ )
1224{
1225 return YFlat(*py);
1226
1227}
1228
1229Double_t AliGenEMlib::V2Sigma0( const Double_t *px, const Double_t */*dummy*/ )
1230{
1231 return KEtScal(*px,kSigma0);
1232}
1233
1234
1235//--------------------------------------------------------------------------
1236//
1237// K0short
1238//
1239//--------------------------------------------------------------------------
1240
1241Int_t AliGenEMlib::IpK0short(TRandom *)
1242{
1243 // Return kzeroshort pdg code
1244 return 310;
1245}
1246
1247Double_t AliGenEMlib::PtK0short( const Double_t *px, const Double_t */*dummy*/ )
1248{
1249 // K0short pT
1250
1251 Double_t ka = 0;
1252 Double_t kb = 0;
1253 Double_t kc = 0;
1254 Double_t kd = 0;
1255 Double_t ke = 0;
1256 Double_t kf = 0;
1257
1258 switch (fgSelectedCentrality){
1259 case k0010:
1260 ka =9.21859; kb=5.71299; kc=-3.34251; kd=0.48796; ke=0.0192272; kf=3.82224;
1261 return PtXQCD( *px, ka, kb, kc, kd, ke, kf);
1262 break;
1263 case k1020:
1264 ka=6.2377; kb=5.6133; kc=-117.295; kd=3.51154; ke=36.3047; kf=0.456243;
1265 return PtXQCD( *px, ka, kb, kc, kd, ke, kf);
1266 break;
1267 case k0020:
1268 ka=7.7278; kb=5.6686; kc=-3.29259; kd=0.475403; ke=0.0223951; kf=3.69326;
1269 return PtXQCD( *px, ka, kb, kc, kd, ke, kf);
1270 break;
1271 case k2040:
1272 ka=3.38301; kb= 5.5323; kc=-96.078; kd=3.30782; ke=31.085; kf=0.466908;
1273 return PtXQCD( *px, ka, kb, kc, kd, ke, kf);
1274 break;
1275 case k0040:
1276 ka=5.55478; kb=5.61919; kc=-125.635; kd=3.5637; ke=38.9668; kf=0.47068;
1277 return PtXQCD( *px, ka, kb, kc, kd, ke, kf);
1278 break;
1279 case k4080:
1280 ka=0.731606; kb=5.49931; kc=-25.3106; kd=2.2439; ke=8.25063; kf= 0.289288;
1281 return PtXQCD( *px, ka, kb, kc, kd, ke, kf);
1282 break;
1283 default:
1284 return MtScal(*px,kK0s);
1285 break;
1286
1287 }
1288}
1289Double_t AliGenEMlib::YK0short( const Double_t *py, const Double_t */*dummy*/ )
1290{
1291 return YFlat(*py);
1292
1293}
1294
1295Double_t AliGenEMlib::V2K0sshort( const Double_t *px, const Double_t */*dummy*/ )
1296{
1297 return KEtScal(*px,kK0s);
1298}
1299
1300
1301//--------------------------------------------------------------------------
1302//
1303// Delta ++
1304//
1305//--------------------------------------------------------------------------
1306Int_t AliGenEMlib::IpDeltaPlPl(TRandom *)
1307{
1308 // Return Delta++ pdg code
1309 return 2224;
1310}
1311
1312Double_t AliGenEMlib::PtDeltaPlPl( const Double_t *px, const Double_t */*dummy*/ )
1313{
1314 // Delta++ pT
1315 return MtScal(*px,kDeltaPlPl);
1316}
1317
1318Double_t AliGenEMlib::YDeltaPlPl( const Double_t *py, const Double_t */*dummy*/ )
1319{
1320 return YFlat(*py);
1321
1322}
1323
1324Double_t AliGenEMlib::V2DeltaPlPl( const Double_t *px, const Double_t */*dummy*/ )
1325{
1326 return KEtScal(*px,kDeltaPlPl);
1327}
1328
1329
1330//--------------------------------------------------------------------------
1331//
1332// Delta +
1333//
1334//--------------------------------------------------------------------------
1335Int_t AliGenEMlib::IpDeltaPl(TRandom *)
1336{
1337 // Return Delta+ pdg code
1338 return 2214;
1339}
1340
1341Double_t AliGenEMlib::PtDeltaPl( const Double_t *px, const Double_t */*dummy*/ )
1342{
1343 // Delta+ pT
1344 return MtScal(*px,kDeltaPl);
1345}
1346
1347Double_t AliGenEMlib::YDeltaPl( const Double_t *py, const Double_t */*dummy*/ )
1348{
1349 return YFlat(*py);
1350
1351}
1352
1353Double_t AliGenEMlib::V2DeltaPl( const Double_t *px, const Double_t */*dummy*/ )
1354{
1355 return KEtScal(*px,kDeltaPl);
1356}
1357
1358
1359//--------------------------------------------------------------------------
1360//
1361// Delta -
1362//
1363//--------------------------------------------------------------------------
1364Int_t AliGenEMlib::IpDeltaMi(TRandom *)
1365{
1366 // Return Delta- pdg code
1367 return 1114;
1368}
1369
1370Double_t AliGenEMlib::PtDeltaMi( const Double_t *px, const Double_t */*dummy*/ )
1371{
1372 // Delta- pT
1373 return MtScal(*px,kDeltaMi);
1374}
1375
1376Double_t AliGenEMlib::YDeltaMi( const Double_t *py, const Double_t */*dummy*/ )
1377{
1378 return YFlat(*py);
1379
1380}
1381
1382Double_t AliGenEMlib::V2DeltaMi( const Double_t *px, const Double_t */*dummy*/ )
1383{
1384 return KEtScal(*px,kDeltaMi);
1385}
1386
1387
1388
1389//--------------------------------------------------------------------------
1390//
1391// Delta 0
1392//
1393//--------------------------------------------------------------------------
1394Int_t AliGenEMlib::IpDeltaZero(TRandom *)
1395{
1396 // Return Delta0 pdg code
1397 return 2114;
1398}
1399
1400Double_t AliGenEMlib::PtDeltaZero( const Double_t *px, const Double_t */*dummy*/ )
1401{
1402 // Delta0 pT
1403 return MtScal(*px,kDeltaZero);
1404}
1405
1406Double_t AliGenEMlib::YDeltaZero( const Double_t *py, const Double_t */*dummy*/ )
1407{
1408 return YFlat(*py);
1409
1410}
1411
1412Double_t AliGenEMlib::V2DeltaZero( const Double_t *px, const Double_t */*dummy*/ )
1413{
1414 return KEtScal(*px,kDeltaZero);
1415}
1416
1417
1418//--------------------------------------------------------------------------
1419//
1420// rho +
1421//
1422//--------------------------------------------------------------------------
1423Int_t AliGenEMlib::IpRhoPl(TRandom *)
1424{
1425 // Return rho+ pdg code
1426 return 213;
1427}
1428
1429Double_t AliGenEMlib::PtRhoPl( const Double_t *px, const Double_t */*dummy*/ )
1430{
1431 // rho + pT
1432 return MtScal(*px,kRhoPl);
1433}
1434
1435Double_t AliGenEMlib::YRhoPl( const Double_t *py, const Double_t */*dummy*/ )
1436{
1437 return YFlat(*py);
1438
1439}
1440
1441Double_t AliGenEMlib::V2RhoPl( const Double_t *px, const Double_t */*dummy*/ )
1442{
1443 return KEtScal(*px,kRhoPl);
1444}
1445
1446
1447//--------------------------------------------------------------------------
1448//
1449// rho -
1450//
1451//--------------------------------------------------------------------------
1452Int_t AliGenEMlib::IpRhoMi(TRandom *)
1453{
1454 // Return rho- pdg code
1455 return -213;
4ae1c9f0 1456}
1457
6e38a462 1458Double_t AliGenEMlib::PtRhoMi( const Double_t *px, const Double_t */*dummy*/ )
1459{
1460 // rho- pT
1461 return MtScal(*px,kRhoMi);
1462}
1463
1464Double_t AliGenEMlib::YRhoMi( const Double_t *py, const Double_t */*dummy*/ )
1465{
1466 return YFlat(*py);
1467
1468}
1469
1470Double_t AliGenEMlib::V2RhoMi( const Double_t *px, const Double_t */*dummy*/ )
1471{
1472 return KEtScal(*px,kRhoMi);
1473}
1474
1475
1476//--------------------------------------------------------------------------
1477//
1478// K0 *
1479//
1480//--------------------------------------------------------------------------
1481Int_t AliGenEMlib::IpK0star(TRandom *)
1482{
1483 // Return K0 * pdg code
1484 return 313;
1485}
1486
1487Double_t AliGenEMlib::PtK0star( const Double_t *px, const Double_t */*dummy*/ )
1488{
1489 // K0 * pT
1490 return MtScal(*px,kK0star);
1491}
1492
1493Double_t AliGenEMlib::YK0star( const Double_t *py, const Double_t */*dummy*/ )
1494{
1495 return YFlat(*py);
1496
1497}
1498
1499Double_t AliGenEMlib::V2K0star( const Double_t *px, const Double_t */*dummy*/ )
1500{
1501 return KEtScal(*px,kK0star);
1502}
1503
1504
1505
4ae1c9f0 1506Double_t AliGenEMlib::YFlat(Double_t /*y*/)
1507{
6e38a462 1508 //--------------------------------------------------------------------------
1509 //
1510 // flat rapidity distribution
1511 //
1512 //--------------------------------------------------------------------------
e40b9538 1513
6e38a462 1514 Double_t dNdy = 1.;
e40b9538 1515
6e38a462 1516 return dNdy;
e40b9538 1517
1518}
1519
6e38a462 1520
e40b9538 1521//=============================================================
1522//
1523// Mt-scaling
1524//
1525//=============================================================
1526//
4ae1c9f0 1527Double_t AliGenEMlib::MtScal(Double_t pt, Int_t np)
e40b9538 1528{
6e38a462 1529 // Function for the calculation of the Pt distribution for a
1530 // given particle np, from the pizero Pt distribution using
1531 // mt scaling.
1532
1533 Double_t scaledPt = sqrt(pt*pt + fgkHM[np]*fgkHM[np] - fgkHM[0]*fgkHM[0]);
1534 Double_t scaledYield = PtPizero(&scaledPt, (Double_t*) 0);
1535
1536 // VALUE MESON/PI AT 5 GeV/c
1537 Double_t NormPt = 5.;
1538 Double_t scaledNormPt = sqrt(NormPt*NormPt + fgkHM[np]*fgkHM[np] - fgkHM[0]*fgkHM[0]);
1539
1540 Int_t selectedCol;
1541 switch (fgSelectedCollisionsSystem){
1542 case kpp900GeV:
1543 selectedCol=0;
1544 break;
1545 case kpp2760GeV:
1546 selectedCol=0;
1547 break;
1548 case kpp7TeV:
1549 selectedCol=0;
1550 break;
1551 case kpPb:
1552 selectedCol=1;
1553 break;
1554 case kPbPb:
1555 selectedCol=2;
1556 break;
1557 default:
1558 selectedCol=0;
1559 printf("<AliGenEMlib::MtScal> no collision system has been given\n");
1560 }
1561
1562 Double_t norm = fgkMtFactor[selectedCol][np] * (PtPizero(&NormPt, (Double_t*) 0) / PtPizero(&scaledNormPt, (Double_t*) 0));
1563
1564 return norm*(pt/scaledPt)*scaledYield;
e40b9538 1565}
1566
5a516e0a 1567Double_t AliGenEMlib::KEtScal(Double_t pt, Int_t np)
4ae1c9f0 1568{
6e38a462 1569 const int nq=2; //number of quarks for particle np, here always 2
1570 Double_t scaledPt = sqrt(pow(2.0/nq*(sqrt(pt*pt+fgkHM[np]*fgkHM[np])-fgkHM[np])+fgkHM[0],2)-fgkHM[0]*fgkHM[0]);
1571 return V2Pizero(&scaledPt, (Double_t*) 0);
4ae1c9f0 1572}
1573
6078e216 1574Double_t AliGenEMlib::V2Param(const Double_t *px, const Double_t *par)
1575{
6e38a462 1576 // Very general parametrization of the v2
1577
1578 const double &pt=px[0];
1579 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]);
1580 double sys=0;
1581 if(fgSelectedV2Systematic){
1582 double syspt=pt>par[15]?par[15]:pt;
1583 sys=fgSelectedV2Systematic*par[11+fgSelectedV2Systematic*2]*pow(syspt,par[12+fgSelectedV2Systematic*2]);
1584 }
1585 return std::max(val+sys,0.0);
6078e216 1586}
1587
1588Double_t AliGenEMlib::V2Flat(const Double_t */*px*/, const Double_t */*param*/)
1589{
6e38a462 1590 // Flat v2
6078e216 1591
6e38a462 1592 return 0.0;
6078e216 1593}
1594
71443190 1595Double_t AliGenEMlib::GetTAA(Int_t cent){
6e38a462 1596 const static Double_t taa[16] = { 1.0, // pp
1597 26.32, // 0-5
1598 20.56, // 5-10
1599 14.39, // 10-20
1600 8.70, // 20-30
1601 5.001, // 30-40
1602 2.675, // 40-50
1603 1.317, // 50-60
1604 23.44, // 0-10
1605 6.85, // 20-40
1606 1.996, // 40-60
1607 0.4174, // 60-80
1608 18.91, // 0-20
1609 12.88, // 0-40
1610 3.088, // 20-80
1611 1.207}; // 40-80
1612 return taa[cent];
71443190 1613}
4ae1c9f0 1614
e40b9538 1615//==========================================================================
1616//
1617// Set Getters
1618//
1619//==========================================================================
1620
1621typedef Double_t (*GenFunc) (const Double_t*, const Double_t*);
1622
1623typedef Int_t (*GenFuncIp) (TRandom *);
1624
1625GenFunc AliGenEMlib::GetPt(Int_t param, const char * tname) const
1626{
6e38a462 1627 // Return pointer to pT parameterisation
1628 GenFunc func=0;
1629 TString sname(tname);
1630
1631 switch (param) {
1632 case kDirectRealGamma:
1633 func=PtDirectRealGamma;
1634 break;
1635 case kDirectVirtGamma:
1636 func=PtDirectVirtGamma;
1637 break;
1638 case kPizero:
1639 func=PtPizero;
1640 break;
1641 case kEta:
1642 func=PtEta;
1643 break;
1644 case kRho0:
1645 func=PtRho0;
1646 break;
1647 case kOmega:
1648 func=PtOmega;
1649 break;
1650 case kEtaprime:
1651 func=PtEtaprime;
1652 break;
1653 case kPhi:
1654 func=PtPhi;
1655 break;
1656 case kJpsi:
1657 func=PtJpsi;
1658 break;
1659 case kSigma0:
1660 func= PtSigma;
1661 break;
1662 case kK0s:
1663 func= PtK0short;
1664 break;
1665 case kDeltaPlPl:
1666 func= PtDeltaPlPl;
1667 break;
1668 case kDeltaPl:
1669 func= PtDeltaPlPl;
1670 break;
1671 case kDeltaMi:
1672 func= PtDeltaMi;
1673 break;
1674 case kDeltaZero:
1675 func= PtDeltaZero;
1676 break;
1677 case kRhoPl:
1678 func= PtRhoPl;
1679 break;
1680 case kRhoMi:
1681 func= PtRhoMi;
1682 break;
1683 case kK0star:
1684 func= PtK0star;
1685 break;
1686 default:
1687 func=0;
1688 printf("<AliGenEMlib::GetPt> unknown parametrisation\n");
e40b9538 1689 }
6e38a462 1690 return func;
e40b9538 1691}
1692
1693GenFunc AliGenEMlib::GetY(Int_t param, const char * tname) const
1694{
6e38a462 1695 // Return pointer to y- parameterisation
1696 GenFunc func=0;
1697 TString sname(tname);
1698
1699 switch (param) {
1700 case kDirectRealGamma:
1701 func=YDirectRealGamma;
1702 break;
1703 case kDirectVirtGamma:
1704 func=YDirectVirtGamma;
1705 break;
1706 case kPizero:
1707 func=YPizero;
1708 break;
1709 case kEta:
1710 func=YEta;
1711 break;
1712 case kRho0:
1713 func=YRho0;
1714 break;
1715 case kOmega:
1716 func=YOmega;
1717 break;
1718 case kEtaprime:
1719 func=YEtaprime;
1720 break;
1721 case kPhi:
1722 func=YPhi;
1723 break;
1724 case kJpsi:
1725 func=YJpsi;
1726 break;
1727 case kSigma0:
1728 func=YSigma;
1729 break;
1730 case kK0s:
1731 func=YK0short;
1732 break;
1733 case kDeltaPlPl:
1734 func=YDeltaPlPl;
1735 break;
1736 case kDeltaPl:
1737 func=YDeltaPl;
1738 break;
1739 case kDeltaMi:
1740 func=YDeltaMi;
1741 break;
1742 case kDeltaZero:
1743 func=YDeltaZero;
1744 break;
1745 case kRhoPl:
1746 func=YRhoPl;
1747 break;
1748 case kRhoMi:
1749 func=YRhoMi;
1750 break;
1751 case kK0star:
1752 func=YK0star;
1753 break;
1754 default:
1755 func=0;
1756 printf("<AliGenEMlib::GetY> unknown parametrisation\n");
1757 }
1758 return func;
e40b9538 1759}
1760
1761GenFuncIp AliGenEMlib::GetIp(Int_t param, const char * tname) const
1762{
6e38a462 1763 // Return pointer to particle type parameterisation
1764 GenFuncIp func=0;
1765 TString sname(tname);
1766
1767 switch (param) {
1768 case kDirectRealGamma:
1769 func=IpDirectRealGamma;
1770 break;
1771 case kDirectVirtGamma:
1772 func=IpDirectVirtGamma;
1773 break;
1774 case kPizero:
1775 func=IpPizero;
1776 break;
1777 case kEta:
1778 func=IpEta;
1779 break;
1780 case kRho0:
1781 func=IpRho0;
1782 break;
1783 case kOmega:
1784 func=IpOmega;
1785 break;
1786 case kEtaprime:
1787 func=IpEtaprime;
1788 break;
1789 case kPhi:
1790 func=IpPhi;
1791 break;
1792 case kJpsi:
1793 func=IpJpsi;
1794 break;
1795 case kSigma0:
1796 func=IpSigma;
1797 break;
1798 case kK0s:
1799 func=IpK0short;
1800 break;
1801 case kDeltaPlPl:
1802 func=IpDeltaPlPl;
1803 break;
1804 case kDeltaPl:
1805 func=IpDeltaPl;
1806 break;
1807 case kDeltaMi:
1808 func=IpDeltaMi;
1809 break;
1810 case kDeltaZero:
1811 func=IpDeltaZero;
1812 break;
1813 case kRhoPl:
1814 func=IpRhoPl;
1815 break;
1816 case kRhoMi:
1817 func=IpRhoMi;
1818 break;
1819 case kK0star:
1820 func=IpK0star;
1821 break;
1822 default:
1823 func=0;
1824 printf("<AliGenEMlib::GetIp> unknown parametrisation\n");
1825 }
1826 return func;
e40b9538 1827}
1828
6078e216 1829GenFunc AliGenEMlib::GetV2(Int_t param, const char * tname) const
1830{
6e38a462 1831 // Return pointer to v2-parameterisation
1832 GenFunc func=0;
1833 TString sname(tname);
1834
1835 switch (param) {
1836 case kDirectRealGamma:
1837 func=V2DirectRealGamma;
1838 break;
1839 case kDirectVirtGamma:
1840 func=V2DirectVirtGamma;
1841 break;
1842 case kPizero:
1843 func=V2Pizero;
1844 break;
1845 case kEta:
1846 func=V2Eta;
1847 break;
1848 case kRho0:
1849 func=V2Rho0;
1850 break;
1851 case kOmega:
1852 func=V2Omega;
1853 break;
1854 case kEtaprime:
1855 func=V2Etaprime;
1856 break;
1857 case kPhi:
1858 func=V2Phi;
1859 break;
1860 case kJpsi:
1861 func=V2Jpsi;
1862 break;
1863 case kSigma0:
1864 func=V2Sigma0;
1865 break;
1866 case kK0s:
1867 func=V2K0sshort;
1868 break;
1869 case kDeltaPlPl:
1870 func=V2DeltaPlPl;
1871 break;
1872 case kDeltaPl:
1873 func=V2DeltaPl;
1874 break;
1875 case kDeltaMi:
1876 func=V2DeltaMi;
1877 break;
1878 case kDeltaZero:
1879 func=V2DeltaZero;
1880 break;
1881 case kRhoPl:
1882 func=V2RhoPl;
1883 break;
1884 case kRhoMi:
1885 func=V2RhoMi;
1886 break;
1887 case kK0star:
1888 func=V2K0star;
1889 break;
1890
1891 default:
1892 func=0;
1893 printf("<AliGenEMlib::GetV2> unknown parametrisation\n");
1894 }
1895 return func;
6078e216 1896}
4ae1c9f0 1897