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.8 2000/06/09 20:32:11 morsch
19 All coding rule violations except RS3 corrected
21 Revision 1.7 2000/05/02 08:12:13 morsch
22 Coding rule violations corrected.
24 Revision 1.6 1999/09/29 09:24:14 fca
25 Introduction of the Copyright and cvs Log
29 #include "AliGenMUONlib.h"
32 ClassImp(AliGenMUONlib)
35 Double_t AliGenMUONlib::PtPion(Double_t *px, Double_t *dummy)
38 // PT-PARAMETERIZATION CDF, PRL 61(88) 1819
39 // POWER LAW FOR PT > 500 MEV
40 // MT SCALING BELOW (T=160 MEV)
42 const Double_t kp0 = 1.3;
43 const Double_t kxn = 8.28;
44 const Double_t kxlim=0.5;
45 const Double_t kt=0.160;
46 const Double_t kxmpi=0.139;
48 Double_t y, y1, xmpi2, ynorm, a;
51 y1=TMath::Power(kp0/(kp0+kxlim),kxn);
53 ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/kt));
56 y=a*TMath::Power(kp0/(kp0+x),kxn);
58 y=kb*TMath::Exp(-sqrt(x*x+xmpi2)/kt);
64 Double_t AliGenMUONlib::YPion( Double_t *py, Double_t *dummy)
67 const Double_t ka = 7000.;
68 const Double_t kdy = 4.;
70 Double_t y=TMath::Abs(*py);
72 Double_t ex = y*y/(2*kdy*kdy);
73 return ka*TMath::Exp(-ex);
75 // particle composition
77 Int_t AliGenMUONlib::IpPion()
82 if (random[0] < 0.5) {
89 //____________________________________________________________
93 Double_t AliGenMUONlib::PtScal(Double_t pt, Int_t np)
95 // SCALING EN MASSE PAR RAPPORT A PTPI
96 // MASS PI,K,ETA,RHO,OMEGA,ETA',PHI
97 const Double_t khm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0};
98 // VALUE MESON/PI AT 5 GEV
99 const Double_t kfmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0};
101 Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3);
102 Double_t fmax2=f5/kfmax[np];
104 Double_t ptpion=100.*PtPion(&pt, (Double_t*) 0);
105 Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
106 (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ fmax2;
107 return fmtscal*ptpion;
113 //____________________________________________________________
114 Double_t AliGenMUONlib::PtKaon( Double_t *px, Double_t *dummy)
117 return PtScal(*px,2);
121 //____________________________________________________________
122 Double_t AliGenMUONlib::YKaon( Double_t *py, Double_t *dummy)
125 const Double_t ka = 1000.;
126 const Double_t kdy = 4.;
129 Double_t y=TMath::Abs(*py);
131 Double_t ex = y*y/(2*kdy*kdy);
132 return ka*TMath::Exp(-ex);
135 // particle composition
137 Int_t AliGenMUONlib::IpKaon()
142 if (random[0] < 0.5) {
153 //____________________________________________________________
154 Double_t AliGenMUONlib::PtJpsi( Double_t *px, Double_t *dummy)
157 const Double_t kpt0 = 4.;
158 const Double_t kxn = 3.6;
161 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
162 return x/TMath::Power(pass1,kxn);
166 //____________________________________________________________
167 Double_t AliGenMUONlib::YJpsi(Double_t *py, Double_t *dummy)
170 const Double_t ky0 = 4.;
171 const Double_t kb=1.;
173 Double_t y=TMath::Abs(*py);
178 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
181 // particle composition
183 Int_t AliGenMUONlib::IpJpsi()
193 //____________________________________________________________
194 Double_t AliGenMUONlib::PtUpsilon( Double_t *px, Double_t *dummy )
197 const Double_t kpt0 = 5.3;
198 const Double_t kxn = 2.5;
201 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
202 return x/TMath::Power(pass1,kxn);
207 //____________________________________________________________
208 Double_t AliGenMUONlib::YUpsilon(Double_t *py, Double_t *dummy)
211 const Double_t ky0 = 3.;
212 const Double_t kb=1.;
214 Double_t y=TMath::Abs(*py);
219 yu=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
222 // particle composition
224 Int_t AliGenMUONlib::IpUpsilon()
234 // pt-distribution (by scaling of pion distribution)
235 //____________________________________________________________
236 Double_t AliGenMUONlib::PtPhi( Double_t *px, Double_t *dummy)
239 return PtScal(*px,7);
242 Double_t AliGenMUONlib::YPhi( Double_t *px, Double_t *dummy)
246 return YJpsi(px,dum);
248 // particle composition
250 Int_t AliGenMUONlib::IpPhi()
261 //____________________________________________________________
262 Double_t AliGenMUONlib::PtCharm( Double_t *px, Double_t *dummy)
265 const Double_t kpt0 = 4.08;
266 const Double_t kxn = 9.40;
269 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
270 return x/TMath::Power(pass1,kxn);
273 Double_t AliGenMUONlib::YCharm( Double_t *px, Double_t *dummy)
277 return YJpsi(px,dum);
280 Int_t AliGenMUONlib::IpCharm()
287 if (random[0] < 0.5) {
289 } else if (random[0] < 0.75) {
291 } else if (random[0] < 0.90) {
296 if (random[1] < 0.5) {ip=-ip;}
307 //____________________________________________________________
308 Double_t AliGenMUONlib::PtBeauty( Double_t *px, Double_t *dummy)
311 const Double_t kpt0 = 4.;
312 const Double_t kxn = 3.6;
315 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
316 return x/TMath::Power(pass1,kxn);
319 Double_t AliGenMUONlib::YBeauty( Double_t *px, Double_t *dummy)
323 return YJpsi(px,dum);
326 Int_t AliGenMUONlib::IpBeauty()
328 // Beauty Composition
332 if (random[0] < 0.5) {
334 } else if (random[0] < 0.75) {
336 } else if (random[0] < 0.90) {
341 if (random[1] < 0.5) {ip=-ip;}
346 typedef Double_t (*GenFunc) (Double_t*, Double_t*);
347 GenFunc AliGenMUONlib::GetPt(Param_t param)
349 // Return pointer to pT parameterisation
376 printf("<AliGenMUONlib::GetPt> unknown parametrisation\n");
381 GenFunc AliGenMUONlib::GetY(Param_t param)
383 // Return pointer to y- parameterisation
410 printf("<AliGenMUONlib::GetY> unknown parametrisation\n");
414 typedef Int_t (*GenFuncIp) ();
415 GenFuncIp AliGenMUONlib::GetIp(Param_t param)
417 // Return pointer to particle type parameterisation
444 printf("<AliGenMUONlib::GetIp> unknown parametrisation\n");