1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
20 #include "AliGenMUONlib.h"
22 ClassImp(AliGenMUONlib)
25 Double_t AliGenMUONlib::PtPion(Double_t *px, Double_t *)
28 // PT-PARAMETERIZATION CDF, PRL 61(88) 1819
29 // POWER LAW FOR PT > 500 MEV
30 // MT SCALING BELOW (T=160 MEV)
32 const Double_t p0 = 1.3;
33 const Double_t xn = 8.28;
34 const Double_t xlim=0.5;
35 const Double_t t=0.160;
36 const Double_t xmpi=0.139;
38 Double_t y, y1, xmpi2, ynorm, a;
41 y1=TMath::Power(p0/(p0+xlim),xn);
43 ynorm=b*(TMath::Exp(-sqrt(xlim*xlim+xmpi2)/t));
46 y=a*TMath::Power(p0/(p0+x),xn);
48 y=b*TMath::Exp(-sqrt(x*x+xmpi2)/t);
54 Double_t AliGenMUONlib::YPion( Double_t *py, Double_t *)
56 const Double_t a = 7000.;
57 const Double_t dy = 4.;
59 Double_t y=TMath::Abs(*py);
61 Double_t ex = y*y/(2*dy*dy);
62 return a*TMath::Exp(-ex);
64 // particle composition
66 Int_t AliGenMUONlib::IpPion()
70 if (random[0] < 0.5) {
77 //____________________________________________________________
81 Double_t AliGenMUONlib::PtScal(Double_t pt, Int_t np)
83 // SCALING EN MASSE PAR RAPPORT A PTPI
84 // MASS PI,K,ETA,RHO,OMEGA,ETA',PHI
85 const Double_t hm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0};
86 // VALUE MESON/PI AT 5 GEV
87 const Double_t fmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0};
89 Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+hm[np]*hm[np])+2.0)),12.3);
90 Double_t fmax2=f5/fmax[np];
92 Double_t ptpion=100.*PtPion(&pt, (Double_t*) 0);
93 Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
94 (sqrt(pt*pt+hm[np]*hm[np])+2.0)),12.3)/ fmax2;
95 return fmtscal*ptpion;
101 //____________________________________________________________
102 Double_t AliGenMUONlib::PtKaon( Double_t *px, Double_t *)
104 return PtScal(*px,2);
108 //____________________________________________________________
109 Double_t AliGenMUONlib::YKaon( Double_t *py, Double_t *)
111 const Double_t a = 1000.;
112 const Double_t dy = 4.;
115 Double_t y=TMath::Abs(*py);
117 Double_t ex = y*y/(2*dy*dy);
118 return a*TMath::Exp(-ex);
121 // particle composition
123 Int_t AliGenMUONlib::IpKaon()
127 if (random[0] < 0.5) {
138 //____________________________________________________________
139 Double_t AliGenMUONlib::PtJpsi( Double_t *px, Double_t *)
141 const Double_t pt0 = 4.;
142 const Double_t xn = 3.6;
145 Double_t pass1 = 1.+(x/pt0)*(x/pt0);
146 return x/TMath::Power(pass1,xn);
150 //____________________________________________________________
151 Double_t AliGenMUONlib::YJpsi(Double_t *py, Double_t *)
153 const Double_t y0 = 4.;
156 Double_t y=TMath::Abs(*py);
161 yj=b*TMath::Exp(-(y-y0)*(y-y0)/2);
164 // particle composition
166 Int_t AliGenMUONlib::IpJpsi()
175 //____________________________________________________________
176 Double_t AliGenMUONlib::PtUpsilon( Double_t *px, Double_t * )
178 const Double_t pt0 = 5.3;
179 const Double_t xn = 2.5;
182 Double_t pass1 = 1.+(x/pt0)*(x/pt0);
183 return x/TMath::Power(pass1,xn);
188 //____________________________________________________________
189 Double_t AliGenMUONlib::YUpsilon(Double_t *py, Double_t *)
191 const Double_t y0 = 3.;
194 Double_t y=TMath::Abs(*py);
199 yu=b*TMath::Exp(-(y-y0)*(y-y0)/2);
202 // particle composition
204 Int_t AliGenMUONlib::IpUpsilon()
213 // pt-distribution (by scaling of pion distribution)
214 //____________________________________________________________
215 Double_t AliGenMUONlib::PtPhi( Double_t *px, Double_t *)
217 return PtScal(*px,7);
220 Double_t AliGenMUONlib::YPhi( Double_t *px, Double_t *)
223 return YJpsi(px,dummy);
225 // particle composition
227 Int_t AliGenMUONlib::IpPhi()
237 //____________________________________________________________
238 Double_t AliGenMUONlib::PtCharm( Double_t *px, Double_t *)
240 const Double_t pt0 = 4.08;
241 const Double_t xn = 9.40;
244 Double_t pass1 = 1.+(x/pt0)*(x/pt0);
245 return x/TMath::Power(pass1,xn);
248 Double_t AliGenMUONlib::YCharm( Double_t *px, Double_t *)
251 return YJpsi(px,dummy);
254 Int_t AliGenMUONlib::IpCharm()
260 if (random[0] < 0.5) {
262 } else if (random[0] < 0.75) {
264 } else if (random[0] < 0.90) {
269 if (random[1] < 0.5) {ip=-ip;}
280 //____________________________________________________________
281 Double_t AliGenMUONlib::PtBeauty( Double_t *px, Double_t *)
283 const Double_t pt0 = 4.;
284 const Double_t xn = 3.6;
287 Double_t pass1 = 1.+(x/pt0)*(x/pt0);
288 return x/TMath::Power(pass1,xn);
291 Double_t AliGenMUONlib::YBeauty( Double_t *px, Double_t *)
294 return YJpsi(px,dummy);
297 Int_t AliGenMUONlib::IpBeauty()
302 if (random[0] < 0.5) {
304 } else if (random[0] < 0.75) {
306 } else if (random[0] < 0.90) {
311 if (random[1] < 0.5) {ip=-ip;}
316 typedef Double_t (*GenFunc) (Double_t*, Double_t*);
317 GenFunc AliGenMUONlib::GetPt(Param_t param)
345 printf("<AliGenMUONlib::GetPt> unknown parametrisation\n");
350 GenFunc AliGenMUONlib::GetY(Param_t param)
378 printf("<AliGenMUONlib::GetY> unknown parametrisation\n");
382 typedef Int_t (*GenFuncIp) ();
383 GenFuncIp AliGenMUONlib::GetIp(Param_t param)
411 printf("<AliGenMUONlib::GetIp> unknown parametrisation\n");