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.12 2001/03/09 13:01:41 morsch
19 - enum constants for paramterisation type (particle family) moved to AliGen*lib.h
20 - use AliGenGSIlib::kUpsilon, AliGenPHOSlib::kEtaPrime to access the constants
22 Revision 1.11 2000/11/30 07:12:50 alibrary
23 Introducing new Rndm and QA classes
25 Revision 1.10 2000/06/29 21:08:27 morsch
26 All paramatrisation libraries derive from the pure virtual base class AliGenLib.
27 This allows to pass a pointer to a library directly to AliGenParam and avoids the
28 use of function pointers in Config.C.
30 Revision 1.9 2000/06/14 15:20:56 morsch
33 Revision 1.8 2000/06/09 20:32:11 morsch
34 All coding rule violations except RS3 corrected
36 Revision 1.7 2000/05/02 08:12:13 morsch
37 Coding rule violations corrected.
39 Revision 1.6 1999/09/29 09:24:14 fca
40 Introduction of the Copyright and cvs Log
47 #include "AliGenMUONlib.h"
49 ClassImp(AliGenMUONlib)
52 Double_t AliGenMUONlib::PtPion(Double_t *px, Double_t *dummy)
55 // PT-PARAMETERIZATION CDF, PRL 61(88) 1819
56 // POWER LAW FOR PT > 500 MEV
57 // MT SCALING BELOW (T=160 MEV)
59 const Double_t kp0 = 1.3;
60 const Double_t kxn = 8.28;
61 const Double_t kxlim=0.5;
62 const Double_t kt=0.160;
63 const Double_t kxmpi=0.139;
65 Double_t y, y1, xmpi2, ynorm, a;
68 y1=TMath::Power(kp0/(kp0+kxlim),kxn);
70 ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/kt));
73 y=a*TMath::Power(kp0/(kp0+x),kxn);
75 y=kb*TMath::Exp(-sqrt(x*x+xmpi2)/kt);
81 Double_t AliGenMUONlib::YPion( Double_t *py, Double_t *dummy)
84 Double_t y=TMath::Abs(*py);
86 const Double_t ka = 7000.;
87 const Double_t kdy = 4.;
88 Double_t ex = y*y/(2*kdy*kdy);
89 return ka*TMath::Exp(-ex);
91 return 1.16526e+04+y*-3.79886e+03+y*y*4.31130e+02;
94 // particle composition
96 Int_t AliGenMUONlib::IpPion(TRandom *ran)
99 if (ran->Rndm() < 0.5) {
106 //____________________________________________________________
110 Double_t AliGenMUONlib::PtScal(Double_t pt, Int_t np)
112 // SCALING EN MASSE PAR RAPPORT A PTPI
113 // MASS PI,K,ETA,RHO,OMEGA,ETA',PHI
114 const Double_t khm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0};
115 // VALUE MESON/PI AT 5 GEV
116 const Double_t kfmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0};
118 Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3);
119 Double_t fmax2=f5/kfmax[np];
121 Double_t ptpion=100.*PtPion(&pt, (Double_t*) 0);
122 Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
123 (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ fmax2;
124 return fmtscal*ptpion;
130 //____________________________________________________________
131 Double_t AliGenMUONlib::PtKaon( Double_t *px, Double_t *dummy)
134 return PtScal(*px,2);
138 //____________________________________________________________
139 Double_t AliGenMUONlib::YKaon( Double_t *py, Double_t *dummy)
142 Double_t y=TMath::Abs(*py);
144 const Double_t ka = 1000.;
145 const Double_t kdy = 4.;
147 Double_t ex = y*y/(2*kdy*kdy);
148 return ka*TMath::Exp(-ex);
151 return 1.16526e+04+y*-3.79886e+03+y*y*4.31130e+02;
154 // particle composition
156 Int_t AliGenMUONlib::IpKaon(TRandom *ran)
159 if (ran->Rndm() < 0.5) {
170 //____________________________________________________________
171 Double_t AliGenMUONlib::PtJpsi( Double_t *px, Double_t *dummy)
174 const Double_t kpt0 = 4.;
175 const Double_t kxn = 3.6;
178 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
179 return x/TMath::Power(pass1,kxn);
183 //____________________________________________________________
184 Double_t AliGenMUONlib::YJpsi(Double_t *py, Double_t *dummy)
187 const Double_t ky0 = 4.;
188 const Double_t kb=1.;
190 Double_t y=TMath::Abs(*py);
195 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
198 // particle composition
200 Int_t AliGenMUONlib::IpJpsi(TRandom *)
210 //____________________________________________________________
211 Double_t AliGenMUONlib::PtUpsilon( Double_t *px, Double_t *dummy )
214 const Double_t kpt0 = 5.3;
215 const Double_t kxn = 2.5;
218 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
219 return x/TMath::Power(pass1,kxn);
224 //____________________________________________________________
225 Double_t AliGenMUONlib::YUpsilon(Double_t *py, Double_t *dummy)
228 const Double_t ky0 = 3.;
229 const Double_t kb=1.;
231 Double_t y=TMath::Abs(*py);
236 yu=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
239 // particle composition
241 Int_t AliGenMUONlib::IpUpsilon(TRandom *)
251 // pt-distribution (by scaling of pion distribution)
252 //____________________________________________________________
253 Double_t AliGenMUONlib::PtPhi( Double_t *px, Double_t *dummy)
256 return PtScal(*px,7);
259 Double_t AliGenMUONlib::YPhi( Double_t *px, Double_t *dummy)
263 return YJpsi(px,dum);
265 // particle composition
267 Int_t AliGenMUONlib::IpPhi(TRandom *)
278 //____________________________________________________________
279 Double_t AliGenMUONlib::PtCharm( Double_t *px, Double_t *dummy)
282 const Double_t kpt0 = 4.08;
283 const Double_t kxn = 9.40;
287 Double_t pass1 = 1.+(x/kpt0);
288 return x/TMath::Power(pass1,kxn);
291 Double_t AliGenMUONlib::YCharm( Double_t *px, Double_t *dummy)
295 return YJpsi(px,dum);
298 Int_t AliGenMUONlib::IpCharm(TRandom *ran)
304 random = ran->Rndm();
307 } else if (random < 0.75) {
309 } else if (random < 0.90) {
314 if (ran->Rndm() < 0.5) {ip=-ip;}
325 //____________________________________________________________
326 Double_t AliGenMUONlib::PtBeauty( Double_t *px, Double_t *dummy)
329 const Double_t kpt0 = 4.;
330 const Double_t kxn = 3.6;
333 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
334 return x/TMath::Power(pass1,kxn);
337 Double_t AliGenMUONlib::YBeauty( Double_t *px, Double_t *dummy)
341 return YJpsi(px,dum);
344 Int_t AliGenMUONlib::IpBeauty(TRandom *ran)
346 // Beauty Composition
349 random = ran->Rndm();
352 } else if (random < 0.75) {
354 } else if (random < 0.90) {
359 if (ran->Rndm() < 0.5) {ip=-ip;}
364 typedef Double_t (*GenFunc) (Double_t*, Double_t*);
365 GenFunc AliGenMUONlib::GetPt(Int_t param, const char* tname)
367 // Return pointer to pT parameterisation
394 printf("<AliGenMUONlib::GetPt> unknown parametrisation\n");
399 GenFunc AliGenMUONlib::GetY(Int_t param, const char* tname)
401 // Return pointer to y- parameterisation
428 printf("<AliGenMUONlib::GetY> unknown parametrisation\n");
432 typedef Int_t (*GenFuncIp) (TRandom *);
433 GenFuncIp AliGenMUONlib::GetIp(Int_t param, const char* tname)
435 // Return pointer to particle type parameterisation
462 printf("<AliGenMUONlib::GetIp> unknown parametrisation\n");