81c086499ac9bb1a34bb7c23700d1c1d3c54d301
[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 particles{kPizero, kEta, kRho, kOmega, kEtaprime, kPhi, kJpsi};
25   enum centrality{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{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{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(const Double_t pt, 
49                                             const Double_t c, 
50                                             const Double_t p0, 
51                                             const Double_t p1, 
52                                             const Double_t n,
53                                             const Double_t cT,
54                                             const Double_t T);
55
56
57  
58   static Double_t PtModifiedHagedornExp(const Double_t pt,
59                                         const Double_t c,
60                                         const Double_t p0,
61                                         const Double_t p1,
62                                         const Double_t p2,
63                                         const Double_t n); 
64
65
66   static Double_t PtModifiedHagedornExp2(const Double_t pt,
67                                            const Double_t c,
68                                            const Double_t a,
69                                            const Double_t b,
70                                            const Double_t p0,
71                                            const Double_t p1,
72                                            const Double_t d,
73                                            const Double_t n);
74
75
76   static Double_t PtTsallis(const Double_t pt,
77                             const Double_t m,
78                             const Double_t c,
79                             const Double_t T,
80                             const Double_t n);
81
82
83
84
85   // Pizero
86     static Int_t    IpPizero(TRandom *ran);
87   static Double_t PtPizero(const Double_t *px, const Double_t *dummy);
88     static Double_t YPizero(const Double_t *py, const Double_t *dummy);
89   static Double_t V2Pizero(const Double_t *px, const Double_t *dummy);
90
91   // Eta
92     static Int_t    IpEta(TRandom *ran);
93   static Double_t PtEta(const Double_t *px, const Double_t *dummy);
94     static Double_t YEta(const Double_t *py, const Double_t *dummy);
95   static Double_t V2Eta(const Double_t *px, const Double_t *dummy);
96
97   // Rho
98     static Int_t    IpRho(TRandom *ran);
99   static Double_t PtRho(const Double_t *px, const Double_t *dummy);
100     static Double_t YRho(const Double_t *py, const Double_t *dummy);
101   static Double_t V2Rho(const Double_t *py, const Double_t *dummy);
102
103   // Omega
104     static Int_t    IpOmega(TRandom *ran);
105   static Double_t PtOmega(const Double_t *px, const Double_t *dummy);
106     static Double_t YOmega(const Double_t *py, const Double_t *dummy);
107   static Double_t V2Omega(const Double_t *py, const Double_t *dummy);
108
109   // Etaprime
110     static Int_t    IpEtaprime(TRandom *ran);
111   static Double_t PtEtaprime(const Double_t *px, const Double_t *dummy);
112     static Double_t YEtaprime(const Double_t *py, const Double_t *dummy);
113   static Double_t V2Etaprime(const Double_t *py, const Double_t *dummy);
114
115   // Phi
116     static Int_t    IpPhi(TRandom *ran);
117   static Double_t PtPhi(const Double_t *px, const Double_t *dummy);
118     static Double_t YPhi(const Double_t *py, const Double_t *dummy);
119   static Double_t V2Phi(const Double_t *py, const Double_t *dummy);
120
121   // Jpsi
122   static Int_t    IpJpsi(TRandom *ran);
123   static Double_t PtJpsi(const Double_t *px, const Double_t *dummy);
124   static Double_t YJpsi(const Double_t *py, const Double_t *dummy);
125   static Double_t V2Jpsi(const Double_t *py, const Double_t *dummy);
126
127   // General
128   //static Double_t PtFlat(const Double_t *px, const Double_t *dummy);
129     static Double_t YFlat(Double_t y);
130   static Double_t MtScal(Double_t pt, Int_t np);
131   static Double_t V2Param(const Double_t *px, const Double_t *param);
132   static Double_t V2Flat(const Double_t *px, const Double_t *param);
133   static Double_t KEtScal(Double_t pt, Int_t np);
134
135   static Double_t CrossOverLc(const double a, const double b, const double x);
136   static Double_t CrossOverRc(const double a, const double b, const double x);
137
138   static const Double_t fgkV2param[16][15]; // array of v2 parameter
139   static const Double_t fgkHM[7];
140   static const Double_t fgkMtFactor[2][7];
141
142   ClassDef(AliGenEMlib,0)
143 };
144
145
146 #endif