]>
Commit | Line | Data |
---|---|---|
0ed0a0a2 | 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 | /* | |
17 | $Log$ | |
b9d0a01d | 18 | Revision 1.3.10.1 2002/06/10 14:57:41 hristov |
19 | Merged with v3-08-02 | |
20 | ||
21 | Revision 1.4 2002/04/17 12:48:54 morsch | |
22 | const added. | |
23 | ||
d5b6b483 | 24 | Revision 1.3 2001/03/09 13:01:41 morsch |
25 | - enum constants for paramterisation type (particle family) moved to AliGen*lib.h | |
26 | - use AliGenGSIlib::kUpsilon, AliGenPHOSlib::kEtaPrime to access the constants | |
27 | ||
34f60c01 | 28 | Revision 1.2 2000/11/30 07:12:50 alibrary |
29 | Introducing new Rndm and QA classes | |
30 | ||
65fb704d | 31 | Revision 1.1 2000/09/08 15:37:58 morsch |
32 | pt and y-parameterisations for PMD physics simulation. | |
33 | THIS VERSION IS JUST A TEMPLATE THE PT AND Y DISTRIBUTIONS HAVE TO BE CORRECTED !!!!. | |
34 | ||
0ed0a0a2 | 35 | */ |
36 | ||
37 | #include "AliGenPMDlib.h" | |
0ed0a0a2 | 38 | #include "AliPDG.h" |
65fb704d | 39 | #include "TMath.h" |
0ed0a0a2 | 40 | |
41 | ClassImp(AliGenPMDlib) | |
42 | // | |
43 | // Neutral Pions | |
44 | ||
45 | Double_t AliGenPMDlib::PtPi0(Double_t *px, Double_t *dummy) | |
46 | { | |
47 | // | |
48 | // PT-PARAMETERIZATION CDF, PRL 61(88) 1819 | |
49 | // POWER LAW FOR PT > 500 MEV | |
50 | // MT SCALING BELOW (T=160 MEV) | |
51 | // | |
52 | const Double_t kp0 = 1.3; | |
53 | const Double_t kxn = 8.28; | |
54 | const Double_t kxlim=0.5; | |
55 | const Double_t kt=0.160; | |
56 | const Double_t kxmpi=0.139; | |
57 | const Double_t kb=1.; | |
58 | Double_t y, y1, xmpi2, ynorm, a; | |
59 | Double_t x=*px; | |
60 | // | |
61 | y1=TMath::Power(kp0/(kp0+kxlim),kxn); | |
62 | xmpi2=kxmpi*kxmpi; | |
63 | ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/kt)); | |
64 | a=ynorm/y1; | |
65 | if (x > kxlim) | |
66 | y=a*TMath::Power(kp0/(kp0+x),kxn); | |
67 | else | |
68 | y=kb*TMath::Exp(-sqrt(x*x+xmpi2)/kt); | |
69 | return y*x; | |
70 | } | |
71 | ||
72 | // | |
73 | // y-distribution | |
74 | // | |
75 | Double_t AliGenPMDlib::YPi0( Double_t *py, Double_t *dummy) | |
76 | { | |
77 | // | |
78 | // y parametrisation for pi0 | |
79 | // | |
80 | const Double_t ka1 = 4913.; | |
81 | const Double_t ka2 = 1819.; | |
82 | const Double_t keta1 = 0.22; | |
83 | const Double_t keta2 = 3.66; | |
84 | const Double_t kdeta1 = 1.47; | |
85 | const Double_t kdeta2 = 1.51; | |
86 | Double_t y=TMath::Abs(*py); | |
87 | // | |
88 | Double_t ex1 = (y-keta1)*(y-keta1)/(2*kdeta1*kdeta1); | |
89 | Double_t ex2 = (y-keta2)*(y-keta2)/(2*kdeta2*kdeta2); | |
90 | return ka1*TMath::Exp(-ex1)+ka2*TMath::Exp(-ex2); | |
91 | } | |
92 | ||
93 | // particle composition | |
94 | // | |
65fb704d | 95 | Int_t AliGenPMDlib::IpPi0(TRandom *) |
0ed0a0a2 | 96 | { |
97 | // Pi0 | |
98 | return kPi0; | |
99 | } | |
100 | ||
101 | //____________________________________________________________ | |
102 | // | |
103 | // Mt-scaling | |
104 | ||
105 | Double_t AliGenPMDlib::PtScal(Double_t pt, Int_t np) | |
106 | { | |
107 | // SCALING EN MASSE PAR RAPPORT A PTPI | |
108 | // MASS PI,K,ETA,RHO,OMEGA,ETA',PHI | |
109 | const Double_t khm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0}; | |
110 | // VALUE MESON/PI AT 5 GEV | |
111 | const Double_t kfmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0}; | |
112 | np--; | |
113 | Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3); | |
114 | Double_t fmax2=f5/kfmax[np]; | |
115 | // PIONS | |
116 | Double_t ptpion=100.*PtPi0(&pt, (Double_t*) 0); | |
117 | Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/ | |
118 | (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ fmax2; | |
119 | return fmtscal*ptpion; | |
120 | } | |
121 | // | |
122 | // kaon | |
123 | // | |
124 | // pt-distribution | |
125 | //____________________________________________________________ | |
126 | ||
127 | Double_t AliGenPMDlib::PtEta( Double_t *px, Double_t *dummy) | |
128 | { | |
129 | // Kaon pT | |
130 | return PtScal(*px,3); | |
131 | } | |
132 | ||
133 | // y-distribution | |
134 | //____________________________________________________________ | |
135 | Double_t AliGenPMDlib::YEta( Double_t *py, Double_t *dummy) | |
136 | { | |
137 | // | |
138 | // y parametrisation for etas | |
139 | // | |
140 | const Double_t ka1 = 4913.; | |
141 | const Double_t ka2 = 1819.; | |
142 | const Double_t keta1 = 0.22; | |
143 | const Double_t keta2 = 3.66; | |
144 | const Double_t kdeta1 = 1.47; | |
145 | const Double_t kdeta2 = 1.51; | |
146 | Double_t y=TMath::Abs(*py); | |
147 | // | |
148 | Double_t ex1 = (y-keta1)*(y-keta1)/(2*kdeta1*kdeta1); | |
149 | Double_t ex2 = (y-keta2)*(y-keta2)/(2*kdeta2*kdeta2); | |
150 | return ka1*TMath::Exp(-ex1)+ka2*TMath::Exp(-ex2); | |
151 | } | |
152 | ||
153 | // particle composition | |
154 | // | |
65fb704d | 155 | Int_t AliGenPMDlib::IpEta(TRandom *) |
0ed0a0a2 | 156 | { |
157 | return 221; | |
158 | } | |
159 | ||
160 | ||
161 | typedef Double_t (*GenFunc) (Double_t*, Double_t*); | |
d5b6b483 | 162 | GenFunc AliGenPMDlib::GetPt(Int_t param, const char* tname) const |
0ed0a0a2 | 163 | { |
164 | // Return pointer to pT parameterisation | |
165 | GenFunc func=NULL; | |
166 | switch (param) | |
167 | { | |
34f60c01 | 168 | case kPion: |
0ed0a0a2 | 169 | func=PtPi0; |
170 | break; | |
34f60c01 | 171 | case kEta: |
0ed0a0a2 | 172 | func=PtEta; |
173 | break; | |
174 | default: | |
175 | func=0; | |
176 | printf("<AliGenPMDlib::GetPt> unknown parametrisation\n"); | |
177 | } | |
178 | return func; | |
179 | } | |
180 | ||
d5b6b483 | 181 | GenFunc AliGenPMDlib::GetY(Int_t param, const char* tname) const |
0ed0a0a2 | 182 | { |
183 | // Return pointer to y- parameterisation | |
184 | GenFunc func=NULL; | |
185 | switch (param) | |
186 | { | |
34f60c01 | 187 | case kPion: |
0ed0a0a2 | 188 | func=YPi0; |
189 | break; | |
34f60c01 | 190 | case kEta: |
0ed0a0a2 | 191 | func=YEta; |
192 | break; | |
193 | default: | |
194 | func=0; | |
195 | printf("<AliGenPMDlib::GetY> unknown parametrisation\n"); | |
196 | } | |
197 | return func; | |
198 | ||
199 | } | |
65fb704d | 200 | typedef Int_t (*GenFuncIp) (TRandom *); |
d5b6b483 | 201 | GenFuncIp AliGenPMDlib::GetIp(Int_t param, const char* tname) const |
0ed0a0a2 | 202 | { |
203 | // Return pointer to particle type parameterisation | |
204 | GenFuncIp func=NULL; | |
205 | switch (param) | |
206 | { | |
34f60c01 | 207 | case kPion: |
0ed0a0a2 | 208 | func=IpPi0; |
209 | break; | |
34f60c01 | 210 | case kEta: |
0ed0a0a2 | 211 | func=IpEta; |
212 | break; | |
213 | default: | |
214 | printf("<AliGenPMDlib::GetIp> unknown parametrisation\n"); | |
215 | } | |
216 | return func; | |
217 | } | |
218 | ||
219 | ||
220 | ||
221 |