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 **************************************************************************/
18 Revision 1.10 2000/06/29 21:08:27 morsch
19 All paramatrisation libraries derive from the pure virtual base class AliGenLib.
20 This allows to pass a pointer to a library directly to AliGenParam and avoids the
21 use of function pointers in Config.C.
23 Revision 1.9 2000/06/14 15:20:56 morsch
26 Revision 1.8 2000/06/09 20:32:11 morsch
27 All coding rule violations except RS3 corrected
29 Revision 1.7 2000/05/02 08:12:13 morsch
30 Coding rule violations corrected.
32 Revision 1.6 1999/09/29 09:24:14 fca
33 Introduction of the Copyright and cvs Log
40 #include "AliGenMUONlib.h"
42 ClassImp(AliGenMUONlib)
45 Double_t AliGenMUONlib::PtPion(Double_t *px, Double_t *dummy)
48 // PT-PARAMETERIZATION CDF, PRL 61(88) 1819
49 // POWER LAW FOR PT > 500 MEV
50 // MT SCALING BELOW (T=160 MEV)
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;
58 Double_t y, y1, xmpi2, ynorm, a;
61 y1=TMath::Power(kp0/(kp0+kxlim),kxn);
63 ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/kt));
66 y=a*TMath::Power(kp0/(kp0+x),kxn);
68 y=kb*TMath::Exp(-sqrt(x*x+xmpi2)/kt);
74 Double_t AliGenMUONlib::YPion( Double_t *py, Double_t *dummy)
77 const Double_t ka = 7000.;
78 const Double_t kdy = 4.;
80 Double_t y=TMath::Abs(*py);
82 Double_t ex = y*y/(2*kdy*kdy);
83 return ka*TMath::Exp(-ex);
85 // particle composition
87 Int_t AliGenMUONlib::IpPion(TRandom *ran)
90 if (ran->Rndm() < 0.5) {
97 //____________________________________________________________
101 Double_t AliGenMUONlib::PtScal(Double_t pt, Int_t np)
103 // SCALING EN MASSE PAR RAPPORT A PTPI
104 // MASS PI,K,ETA,RHO,OMEGA,ETA',PHI
105 const Double_t khm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0};
106 // VALUE MESON/PI AT 5 GEV
107 const Double_t kfmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0};
109 Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3);
110 Double_t fmax2=f5/kfmax[np];
112 Double_t ptpion=100.*PtPion(&pt, (Double_t*) 0);
113 Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
114 (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ fmax2;
115 return fmtscal*ptpion;
121 //____________________________________________________________
122 Double_t AliGenMUONlib::PtKaon( Double_t *px, Double_t *dummy)
125 return PtScal(*px,2);
129 //____________________________________________________________
130 Double_t AliGenMUONlib::YKaon( Double_t *py, Double_t *dummy)
133 const Double_t ka = 1000.;
134 const Double_t kdy = 4.;
137 Double_t y=TMath::Abs(*py);
139 Double_t ex = y*y/(2*kdy*kdy);
140 return ka*TMath::Exp(-ex);
143 // particle composition
145 Int_t AliGenMUONlib::IpKaon(TRandom *ran)
148 if (ran->Rndm() < 0.5) {
159 //____________________________________________________________
160 Double_t AliGenMUONlib::PtJpsi( Double_t *px, Double_t *dummy)
163 const Double_t kpt0 = 4.;
164 const Double_t kxn = 3.6;
167 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
168 return x/TMath::Power(pass1,kxn);
172 //____________________________________________________________
173 Double_t AliGenMUONlib::YJpsi(Double_t *py, Double_t *dummy)
176 const Double_t ky0 = 4.;
177 const Double_t kb=1.;
179 Double_t y=TMath::Abs(*py);
184 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
187 // particle composition
189 Int_t AliGenMUONlib::IpJpsi(TRandom *)
199 //____________________________________________________________
200 Double_t AliGenMUONlib::PtUpsilon( Double_t *px, Double_t *dummy )
203 const Double_t kpt0 = 5.3;
204 const Double_t kxn = 2.5;
207 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
208 return x/TMath::Power(pass1,kxn);
213 //____________________________________________________________
214 Double_t AliGenMUONlib::YUpsilon(Double_t *py, Double_t *dummy)
217 const Double_t ky0 = 3.;
218 const Double_t kb=1.;
220 Double_t y=TMath::Abs(*py);
225 yu=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
228 // particle composition
230 Int_t AliGenMUONlib::IpUpsilon(TRandom *)
240 // pt-distribution (by scaling of pion distribution)
241 //____________________________________________________________
242 Double_t AliGenMUONlib::PtPhi( Double_t *px, Double_t *dummy)
245 return PtScal(*px,7);
248 Double_t AliGenMUONlib::YPhi( Double_t *px, Double_t *dummy)
252 return YJpsi(px,dum);
254 // particle composition
256 Int_t AliGenMUONlib::IpPhi(TRandom *)
267 //____________________________________________________________
268 Double_t AliGenMUONlib::PtCharm( Double_t *px, Double_t *dummy)
271 const Double_t kpt0 = 4.08;
272 const Double_t kxn = 9.40;
275 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
276 return x/TMath::Power(pass1,kxn);
279 Double_t AliGenMUONlib::YCharm( Double_t *px, Double_t *dummy)
283 return YJpsi(px,dum);
286 Int_t AliGenMUONlib::IpCharm(TRandom *ran)
292 random = ran->Rndm();
295 } else if (random < 0.75) {
297 } else if (random < 0.90) {
302 if (ran->Rndm() < 0.5) {ip=-ip;}
313 //____________________________________________________________
314 Double_t AliGenMUONlib::PtBeauty( Double_t *px, Double_t *dummy)
317 const Double_t kpt0 = 4.;
318 const Double_t kxn = 3.6;
321 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
322 return x/TMath::Power(pass1,kxn);
325 Double_t AliGenMUONlib::YBeauty( Double_t *px, Double_t *dummy)
329 return YJpsi(px,dum);
332 Int_t AliGenMUONlib::IpBeauty(TRandom *ran)
334 // Beauty Composition
337 random = ran->Rndm();
340 } else if (random < 0.75) {
342 } else if (random < 0.90) {
347 if (ran->Rndm() < 0.5) {ip=-ip;}
352 typedef Double_t (*GenFunc) (Double_t*, Double_t*);
353 GenFunc AliGenMUONlib::GetPt(Param_t param, const char* tname)
355 // Return pointer to pT parameterisation
382 printf("<AliGenMUONlib::GetPt> unknown parametrisation\n");
387 GenFunc AliGenMUONlib::GetY(Param_t param, const char* tname)
389 // Return pointer to y- parameterisation
416 printf("<AliGenMUONlib::GetY> unknown parametrisation\n");
420 typedef Int_t (*GenFuncIp) (TRandom *);
421 GenFuncIp AliGenMUONlib::GetIp(Param_t param, const char* tname)
423 // Return pointer to particle type parameterisation
450 printf("<AliGenMUONlib::GetIp> unknown parametrisation\n");