Fixes for wrong use of const causing PW.CAST_TO_QUALIFIED_TYPE defect in Coverity
[u/mrichter/AliRoot.git] / EVGEN / AliGenEMlib.h
1 #ifndef ALIGENEMLIB_H
2 #define ALIGENEMLIB_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id: AliGenEMlib.h 30052 2008-11-25 14:54:18Z morsch $ */
7
8 /////////////////////////////////////////////////////////////////////////////
9 //                                                                         //
10 // Implementation of AliGenEMlib for electron, di-electron, and photon     //
11 // cocktail calculations.                                                  //
12 // It is based on AliGenGSIlib.                                            //
13 //                                                                         //
14 // Responsible: R.Averbeck@gsi.de                                          //
15 //                                                                         //
16 /////////////////////////////////////////////////////////////////////////////
17
18 #include "AliGenLib.h"
19 class TRandom;
20
21 class AliGenEMlib :public AliGenLib {
22 public:
23     
24   enum Particle_t{kPizero=0, kEta, kRho, kOmega, kEtaprime, kPhi, kJpsi, kDirectRealGamma, kDirectVirtGamma };
25   enum Centrality_t{kpp=0x0, k0005=0x1, k0510=0x2, k1020=0x3, k2030=0x4, k3040=0x5, k4050=0x6, k5060=0x7, k0010=0x8, k2040=0x9, k4060=0xA, k6080=0xB, k0020=0xC, k0040=0xD, k2080=0xE, k4080=0xF, kCentralities=0x10};
26   enum PtParamSet_t{kPizero7TeVpp=0x10, kPizeroEta7TeVpp=0x20, kPizero7TeVpplow=0x30, kPizeroEta7TeVpplow=0x40, kPizero7TeVpphigh=0x50, kPizeroEta7TeVpphigh=0x60, kPizero2760GeVpp=0x70, kPizeroEta2760GeVpp=0x80, kPizero2760GeVpplow=0x90, kPizeroEta2760GeVpplow=0xA0, kPizero2760GeVpphigh=0xB0, kPizeroEta2760GeVpphigh=0xC0, kPichargedPbPb=0xD0, kPizeroPbPb=0xE0, kPichargedPPb=0xF0 };
27   enum v2Sys_t{kLoV2Sys=-1, kNoV2Sys=0, kUpV2Sys=+1};
28   
29   AliGenEMlib() { } ;
30
31   static void SelectParams(Int_t ptSelect, Int_t centSelect=kpp, Int_t v2sys=kNoV2Sys) 
32   { fgSelectedPtParam=ptSelect; fgSelectedCentrality=centSelect; fgSelectedV2Systematic=v2sys; }
33
34     GenFunc   GetPt(Int_t param, const char * tname=0) const;
35     GenFunc   GetY(Int_t param, const char * tname=0) const;
36     GenFuncIp GetIp(Int_t param, const char * tname=0) const;    
37   GenFunc   GetV2(Int_t param, const char * tname=0) const;
38
39   //private:
40
41   // General functions
42
43   static Int_t fgSelectedPtParam; // selected pT parameter
44   static Int_t fgSelectedCentrality; // selected Centrality
45   static Int_t fgSelectedV2Systematic; // selected v2 systematics, usefully values: -1,0,1
46
47
48   static Double_t PtModifiedHagedornThermal(Double_t pt, 
49                                             Double_t c, 
50                                             Double_t p0, 
51                                             Double_t p1, 
52                                             Double_t n,
53                                             Double_t cT,
54                                             Double_t T);
55
56
57  
58   static Double_t PtModifiedHagedornExp(Double_t pt,
59                                         Double_t c,
60                                         Double_t p0,
61                                         Double_t p1,
62                                         Double_t p2,
63                                         Double_t n); 
64
65
66   static Double_t PtModifiedHagedornExp2(Double_t pt,
67                                            Double_t c,
68                                            Double_t a,
69                                            Double_t b,
70                                            Double_t p0,
71                                            Double_t p1,
72                                            Double_t d,
73                                            Double_t n);
74
75
76   static Double_t PtTsallis(Double_t pt,
77                             Double_t m,
78                             Double_t c,
79                             Double_t T,
80                             Double_t n);
81
82   static Double_t PtExponential(const Double_t *pt, const Double_t *param);
83   static Double_t PtModifiedHagedornPowerlaw(const Double_t *pt, const Double_t *param);
84   static Double_t PtDoublePowerlaw(const Double_t *pt, const Double_t *param);
85   static Double_t IntegratedKrollWada(const Double_t *mh, const Double_t *);
86
87   // direct gamma
88   static Double_t PtPromptRealGamma(const Double_t *px, const Double_t *dummy);
89   static Double_t PtPromptVirtGamma(const Double_t *px, const Double_t *dummy);
90   static Double_t PtThermalRealGamma(const Double_t *px, const Double_t *dummy);
91   static Double_t PtThermalVirtGamma(const Double_t *px, const Double_t *dummy);
92
93   static Int_t    IpDirectRealGamma(TRandom *ran);
94   static Double_t PtDirectRealGamma(const Double_t *px, const Double_t *dummy);
95   static Double_t YDirectRealGamma(const Double_t *py, const Double_t *dummy);
96   static Double_t V2DirectRealGamma(const Double_t *px, const Double_t *dummy);
97
98   static Int_t    IpDirectVirtGamma(TRandom *ran);
99   static Double_t PtDirectVirtGamma(const Double_t *px, const Double_t *dummy);
100   static Double_t YDirectVirtGamma(const Double_t *py, const Double_t *dummy);
101   static Double_t V2DirectVirtGamma(const Double_t *px, const Double_t *dummy);
102
103   // Pizero
104     static Int_t    IpPizero(TRandom *ran);
105   static Double_t PtPizero(const Double_t *px, const Double_t *dummy);
106     static Double_t YPizero(const Double_t *py, const Double_t *dummy);
107   static Double_t V2Pizero(const Double_t *px, const Double_t *dummy);
108
109   // Eta
110     static Int_t    IpEta(TRandom *ran);
111   static Double_t PtEta(const Double_t *px, const Double_t *dummy);
112     static Double_t YEta(const Double_t *py, const Double_t *dummy);
113   static Double_t V2Eta(const Double_t *px, const Double_t *dummy);
114
115   // Rho
116     static Int_t    IpRho(TRandom *ran);
117   static Double_t PtRho(const Double_t *px, const Double_t *dummy);
118     static Double_t YRho(const Double_t *py, const Double_t *dummy);
119   static Double_t V2Rho(const Double_t *py, const Double_t *dummy);
120
121   // Omega
122     static Int_t    IpOmega(TRandom *ran);
123   static Double_t PtOmega(const Double_t *px, const Double_t *dummy);
124     static Double_t YOmega(const Double_t *py, const Double_t *dummy);
125   static Double_t V2Omega(const Double_t *py, const Double_t *dummy);
126
127   // Etaprime
128     static Int_t    IpEtaprime(TRandom *ran);
129   static Double_t PtEtaprime(const Double_t *px, const Double_t *dummy);
130     static Double_t YEtaprime(const Double_t *py, const Double_t *dummy);
131   static Double_t V2Etaprime(const Double_t *py, const Double_t *dummy);
132
133   // Phi
134     static Int_t    IpPhi(TRandom *ran);
135   static Double_t PtPhi(const Double_t *px, const Double_t *dummy);
136     static Double_t YPhi(const Double_t *py, const Double_t *dummy);
137   static Double_t V2Phi(const Double_t *py, const Double_t *dummy);
138
139   // Jpsi
140   static Int_t    IpJpsi(TRandom *ran);
141   static Double_t PtJpsi(const Double_t *px, const Double_t *dummy);
142   static Double_t YJpsi(const Double_t *py, const Double_t *dummy);
143   static Double_t V2Jpsi(const Double_t *py, const Double_t *dummy);
144
145   // General
146   //static Double_t PtFlat(const Double_t *px, const Double_t *dummy);
147     static Double_t YFlat(Double_t y);
148   static Double_t MtScal(Double_t pt, Int_t np);
149   static Double_t V2Param(const Double_t *px, const Double_t *param);
150   static Double_t V2Flat(const Double_t *px, const Double_t *param);
151   static Double_t KEtScal(Double_t pt, Int_t np);
152   static Double_t GetTAA(Int_t cent);
153
154   static Double_t CrossOverLc(double a, double b, double x);
155   static Double_t CrossOverRc(double a, double b, double x);
156
157   static const Double_t fgkV2param[16][15];          // parameters of pi v2
158   static const Double_t fgkRawPtOfV2Param[16][10];   // parameters of the raw pt spectrum of v2 analysys
159   static const Double_t fgkThermPtParam[16][2];      // parameters of thermal gamma pt
160   static const Double_t fgkHM[8];                    // particle masses
161   static const Double_t fgkMtFactor[2][8];           // mt scaling factor
162
163   ClassDef(AliGenEMlib,0)
164 };
165
166
167 #endif