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.13 2001/03/27 11:01:04 morsch
19 Charm pt-distribution corrected. More realistic y-distribution for pi and K.
21 Revision 1.12 2001/03/09 13:01:41 morsch
22 - enum constants for paramterisation type (particle family) moved to AliGen*lib.h
23 - use AliGenGSIlib::kUpsilon, AliGenPHOSlib::kEtaPrime to access the constants
25 Revision 1.11 2000/11/30 07:12:50 alibrary
26 Introducing new Rndm and QA classes
28 Revision 1.10 2000/06/29 21:08:27 morsch
29 All paramatrisation libraries derive from the pure virtual base class AliGenLib.
30 This allows to pass a pointer to a library directly to AliGenParam and avoids the
31 use of function pointers in Config.C.
33 Revision 1.9 2000/06/14 15:20:56 morsch
36 Revision 1.8 2000/06/09 20:32:11 morsch
37 All coding rule violations except RS3 corrected
39 Revision 1.7 2000/05/02 08:12:13 morsch
40 Coding rule violations corrected.
42 Revision 1.6 1999/09/29 09:24:14 fca
43 Introduction of the Copyright and cvs Log
50 #include "AliGenMUONlib.h"
52 ClassImp(AliGenMUONlib)
55 Double_t AliGenMUONlib::PtPion(Double_t *px, Double_t *dummy)
58 // PT-PARAMETERIZATION CDF, PRL 61(88) 1819
59 // POWER LAW FOR PT > 500 MEV
60 // MT SCALING BELOW (T=160 MEV)
62 const Double_t kp0 = 1.3;
63 const Double_t kxn = 8.28;
64 const Double_t kxlim=0.5;
65 const Double_t kt=0.160;
66 const Double_t kxmpi=0.139;
68 Double_t y, y1, xmpi2, ynorm, a;
71 y1=TMath::Power(kp0/(kp0+kxlim),kxn);
73 ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/kt));
76 y=a*TMath::Power(kp0/(kp0+x),kxn);
78 y=kb*TMath::Exp(-sqrt(x*x+xmpi2)/kt);
84 Double_t AliGenMUONlib::YPion( Double_t *py, Double_t *dummy)
87 Double_t y=TMath::Abs(*py);
89 const Double_t ka = 7000.;
90 const Double_t kdy = 4.;
91 Double_t ex = y*y/(2*kdy*kdy);
92 return ka*TMath::Exp(-ex);
94 return 1.16526e+04+y*-3.79886e+03+y*y*4.31130e+02;
97 // particle composition
99 Int_t AliGenMUONlib::IpPion(TRandom *ran)
102 if (ran->Rndm() < 0.5) {
109 //____________________________________________________________
113 Double_t AliGenMUONlib::PtScal(Double_t pt, Int_t np)
115 // SCALING EN MASSE PAR RAPPORT A PTPI
116 // MASS PI,K,ETA,RHO,OMEGA,ETA',PHI
117 const Double_t khm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0};
118 // VALUE MESON/PI AT 5 GEV
119 const Double_t kfmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0};
121 Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3);
122 Double_t fmax2=f5/kfmax[np];
124 Double_t ptpion=100.*PtPion(&pt, (Double_t*) 0);
125 Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
126 (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ fmax2;
127 return fmtscal*ptpion;
133 //____________________________________________________________
134 Double_t AliGenMUONlib::PtKaon( Double_t *px, Double_t *dummy)
137 return PtScal(*px,2);
141 //____________________________________________________________
142 Double_t AliGenMUONlib::YKaon( Double_t *py, Double_t *dummy)
145 Double_t y=TMath::Abs(*py);
147 const Double_t ka = 1000.;
148 const Double_t kdy = 4.;
150 Double_t ex = y*y/(2*kdy*kdy);
151 return ka*TMath::Exp(-ex);
154 return 1.16526e+04+y*-3.79886e+03+y*y*4.31130e+02;
157 // particle composition
159 Int_t AliGenMUONlib::IpKaon(TRandom *ran)
162 if (ran->Rndm() < 0.5) {
173 //____________________________________________________________
174 Double_t AliGenMUONlib::PtJpsi( Double_t *px, Double_t *dummy)
177 const Double_t kpt0 = 4.;
178 const Double_t kxn = 3.6;
181 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
182 return x/TMath::Power(pass1,kxn);
186 //____________________________________________________________
187 Double_t AliGenMUONlib::YJpsi(Double_t *py, Double_t *dummy)
190 const Double_t ky0 = 4.;
191 const Double_t kb=1.;
193 Double_t y=TMath::Abs(*py);
198 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
201 // particle composition
203 Int_t AliGenMUONlib::IpJpsi(TRandom *)
213 //____________________________________________________________
214 Double_t AliGenMUONlib::PtUpsilon( Double_t *px, Double_t *dummy )
217 const Double_t kpt0 = 5.3;
218 const Double_t kxn = 2.5;
221 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
222 return x/TMath::Power(pass1,kxn);
227 //____________________________________________________________
228 Double_t AliGenMUONlib::YUpsilon(Double_t *py, Double_t *dummy)
231 const Double_t ky0 = 3.;
232 const Double_t kb=1.;
234 Double_t y=TMath::Abs(*py);
239 yu=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
242 // particle composition
244 Int_t AliGenMUONlib::IpUpsilon(TRandom *)
254 // pt-distribution (by scaling of pion distribution)
255 //____________________________________________________________
256 Double_t AliGenMUONlib::PtPhi( Double_t *px, Double_t *dummy)
259 return PtScal(*px,7);
262 Double_t AliGenMUONlib::YPhi( Double_t *px, Double_t *dummy)
266 return YJpsi(px,dum);
268 // particle composition
270 Int_t AliGenMUONlib::IpPhi(TRandom *)
280 // pt-distribution (by scaling of pion distribution)
281 //____________________________________________________________
282 Double_t AliGenMUONlib::PtOmega( Double_t *px, Double_t *dummy)
285 return PtScal(*px,5);
288 Double_t AliGenMUONlib::YOmega( Double_t *px, Double_t *dummy)
292 return YJpsi(px,dum);
294 // particle composition
296 Int_t AliGenMUONlib::IpOmega(TRandom *)
307 // pt-distribution (by scaling of pion distribution)
308 //____________________________________________________________
309 Double_t AliGenMUONlib::PtEta( Double_t *px, Double_t *dummy)
312 return PtScal(*px,3);
315 Double_t AliGenMUONlib::YEta( Double_t *px, Double_t *dummy)
319 return YJpsi(px,dum);
321 // particle composition
323 Int_t AliGenMUONlib::IpEta(TRandom *)
334 //____________________________________________________________
335 Double_t AliGenMUONlib::PtCharm( Double_t *px, Double_t *dummy)
338 const Double_t kpt0 = 4.08;
339 const Double_t kxn = 9.40;
343 Double_t pass1 = 1.+(x/kpt0);
344 return x/TMath::Power(pass1,kxn);
347 Double_t AliGenMUONlib::YCharm( Double_t *px, Double_t *dummy)
351 return YJpsi(px,dum);
354 Int_t AliGenMUONlib::IpCharm(TRandom *ran)
360 random = ran->Rndm();
363 } else if (random < 0.75) {
365 } else if (random < 0.90) {
370 if (ran->Rndm() < 0.5) {ip=-ip;}
381 //____________________________________________________________
382 Double_t AliGenMUONlib::PtBeauty( Double_t *px, Double_t *dummy)
385 const Double_t kpt0 = 4.;
386 const Double_t kxn = 3.6;
389 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
390 return x/TMath::Power(pass1,kxn);
393 Double_t AliGenMUONlib::YBeauty( Double_t *px, Double_t *dummy)
397 return YJpsi(px,dum);
400 Int_t AliGenMUONlib::IpBeauty(TRandom *ran)
402 // Beauty Composition
405 random = ran->Rndm();
408 } else if (random < 0.75) {
410 } else if (random < 0.90) {
415 if (ran->Rndm() < 0.5) {ip=-ip;}
420 typedef Double_t (*GenFunc) (Double_t*, Double_t*);
421 GenFunc AliGenMUONlib::GetPt(Int_t param, const char* tname)
423 // Return pointer to pT parameterisation
456 printf("<AliGenMUONlib::GetPt> unknown parametrisation\n");
461 GenFunc AliGenMUONlib::GetY(Int_t param, const char* tname)
463 // Return pointer to y- parameterisation
496 printf("<AliGenMUONlib::GetY> unknown parametrisation\n");
500 typedef Int_t (*GenFuncIp) (TRandom *);
501 GenFuncIp AliGenMUONlib::GetIp(Int_t param, const char* tname)
503 // Return pointer to particle type parameterisation
536 printf("<AliGenMUONlib::GetIp> unknown parametrisation\n");