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.11 2000/11/30 07:12:50 alibrary
19 Introducing new Rndm and QA classes
21 Revision 1.10 2000/06/29 21:08:27 morsch
22 All paramatrisation libraries derive from the pure virtual base class AliGenLib.
23 This allows to pass a pointer to a library directly to AliGenParam and avoids the
24 use of function pointers in Config.C.
26 Revision 1.9 2000/06/14 15:20:56 morsch
29 Revision 1.8 2000/06/09 20:32:11 morsch
30 All coding rule violations except RS3 corrected
32 Revision 1.7 2000/05/02 08:12:13 morsch
33 Coding rule violations corrected.
35 Revision 1.6 1999/09/29 09:24:14 fca
36 Introduction of the Copyright and cvs Log
43 #include "AliGenMUONlib.h"
45 ClassImp(AliGenMUONlib)
48 Double_t AliGenMUONlib::PtPion(Double_t *px, Double_t *dummy)
51 // PT-PARAMETERIZATION CDF, PRL 61(88) 1819
52 // POWER LAW FOR PT > 500 MEV
53 // MT SCALING BELOW (T=160 MEV)
55 const Double_t kp0 = 1.3;
56 const Double_t kxn = 8.28;
57 const Double_t kxlim=0.5;
58 const Double_t kt=0.160;
59 const Double_t kxmpi=0.139;
61 Double_t y, y1, xmpi2, ynorm, a;
64 y1=TMath::Power(kp0/(kp0+kxlim),kxn);
66 ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/kt));
69 y=a*TMath::Power(kp0/(kp0+x),kxn);
71 y=kb*TMath::Exp(-sqrt(x*x+xmpi2)/kt);
77 Double_t AliGenMUONlib::YPion( Double_t *py, Double_t *dummy)
80 const Double_t ka = 7000.;
81 const Double_t kdy = 4.;
83 Double_t y=TMath::Abs(*py);
85 Double_t ex = y*y/(2*kdy*kdy);
86 return ka*TMath::Exp(-ex);
88 // particle composition
90 Int_t AliGenMUONlib::IpPion(TRandom *ran)
93 if (ran->Rndm() < 0.5) {
100 //____________________________________________________________
104 Double_t AliGenMUONlib::PtScal(Double_t pt, Int_t np)
106 // SCALING EN MASSE PAR RAPPORT A PTPI
107 // MASS PI,K,ETA,RHO,OMEGA,ETA',PHI
108 const Double_t khm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0};
109 // VALUE MESON/PI AT 5 GEV
110 const Double_t kfmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0};
112 Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3);
113 Double_t fmax2=f5/kfmax[np];
115 Double_t ptpion=100.*PtPion(&pt, (Double_t*) 0);
116 Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
117 (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ fmax2;
118 return fmtscal*ptpion;
124 //____________________________________________________________
125 Double_t AliGenMUONlib::PtKaon( Double_t *px, Double_t *dummy)
128 return PtScal(*px,2);
132 //____________________________________________________________
133 Double_t AliGenMUONlib::YKaon( Double_t *py, Double_t *dummy)
136 const Double_t ka = 1000.;
137 const Double_t kdy = 4.;
140 Double_t y=TMath::Abs(*py);
142 Double_t ex = y*y/(2*kdy*kdy);
143 return ka*TMath::Exp(-ex);
146 // particle composition
148 Int_t AliGenMUONlib::IpKaon(TRandom *ran)
151 if (ran->Rndm() < 0.5) {
162 //____________________________________________________________
163 Double_t AliGenMUONlib::PtJpsi( Double_t *px, Double_t *dummy)
166 const Double_t kpt0 = 4.;
167 const Double_t kxn = 3.6;
170 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
171 return x/TMath::Power(pass1,kxn);
175 //____________________________________________________________
176 Double_t AliGenMUONlib::YJpsi(Double_t *py, Double_t *dummy)
179 const Double_t ky0 = 4.;
180 const Double_t kb=1.;
182 Double_t y=TMath::Abs(*py);
187 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
190 // particle composition
192 Int_t AliGenMUONlib::IpJpsi(TRandom *)
202 //____________________________________________________________
203 Double_t AliGenMUONlib::PtUpsilon( Double_t *px, Double_t *dummy )
206 const Double_t kpt0 = 5.3;
207 const Double_t kxn = 2.5;
210 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
211 return x/TMath::Power(pass1,kxn);
216 //____________________________________________________________
217 Double_t AliGenMUONlib::YUpsilon(Double_t *py, Double_t *dummy)
220 const Double_t ky0 = 3.;
221 const Double_t kb=1.;
223 Double_t y=TMath::Abs(*py);
228 yu=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
231 // particle composition
233 Int_t AliGenMUONlib::IpUpsilon(TRandom *)
243 // pt-distribution (by scaling of pion distribution)
244 //____________________________________________________________
245 Double_t AliGenMUONlib::PtPhi( Double_t *px, Double_t *dummy)
248 return PtScal(*px,7);
251 Double_t AliGenMUONlib::YPhi( Double_t *px, Double_t *dummy)
255 return YJpsi(px,dum);
257 // particle composition
259 Int_t AliGenMUONlib::IpPhi(TRandom *)
270 //____________________________________________________________
271 Double_t AliGenMUONlib::PtCharm( Double_t *px, Double_t *dummy)
274 const Double_t kpt0 = 4.08;
275 const Double_t kxn = 9.40;
278 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
279 return x/TMath::Power(pass1,kxn);
282 Double_t AliGenMUONlib::YCharm( Double_t *px, Double_t *dummy)
286 return YJpsi(px,dum);
289 Int_t AliGenMUONlib::IpCharm(TRandom *ran)
295 random = ran->Rndm();
298 } else if (random < 0.75) {
300 } else if (random < 0.90) {
305 if (ran->Rndm() < 0.5) {ip=-ip;}
316 //____________________________________________________________
317 Double_t AliGenMUONlib::PtBeauty( Double_t *px, Double_t *dummy)
320 const Double_t kpt0 = 4.;
321 const Double_t kxn = 3.6;
324 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
325 return x/TMath::Power(pass1,kxn);
328 Double_t AliGenMUONlib::YBeauty( Double_t *px, Double_t *dummy)
332 return YJpsi(px,dum);
335 Int_t AliGenMUONlib::IpBeauty(TRandom *ran)
337 // Beauty Composition
340 random = ran->Rndm();
343 } else if (random < 0.75) {
345 } else if (random < 0.90) {
350 if (ran->Rndm() < 0.5) {ip=-ip;}
355 typedef Double_t (*GenFunc) (Double_t*, Double_t*);
356 GenFunc AliGenMUONlib::GetPt(Int_t param, const char* tname)
358 // Return pointer to pT parameterisation
385 printf("<AliGenMUONlib::GetPt> unknown parametrisation\n");
390 GenFunc AliGenMUONlib::GetY(Int_t param, const char* tname)
392 // Return pointer to y- parameterisation
419 printf("<AliGenMUONlib::GetY> unknown parametrisation\n");
423 typedef Int_t (*GenFuncIp) (TRandom *);
424 GenFuncIp AliGenMUONlib::GetIp(Int_t param, const char* tname)
426 // Return pointer to particle type parameterisation
453 printf("<AliGenMUONlib::GetIp> unknown parametrisation\n");