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.6 1999/09/29 09:24:14 fca
19 Introduction of the Copyright and cvs Log
23 #include "AliGenMUONlib.h"
25 ClassImp(AliGenMUONlib)
28 Double_t AliGenMUONlib::PtPion(Double_t *px, Double_t *dummy)
31 // PT-PARAMETERIZATION CDF, PRL 61(88) 1819
32 // POWER LAW FOR PT > 500 MEV
33 // MT SCALING BELOW (T=160 MEV)
35 const Double_t kp0 = 1.3;
36 const Double_t kxn = 8.28;
37 const Double_t kxlim=0.5;
38 const Double_t kt=0.160;
39 const Double_t kxmpi=0.139;
41 Double_t y, y1, xmpi2, ynorm, a;
44 y1=TMath::Power(kp0/(kp0+kxlim),kxn);
46 ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/kt));
49 y=a*TMath::Power(kp0/(kp0+x),kxn);
51 y=kb*TMath::Exp(-sqrt(x*x+xmpi2)/kt);
57 Double_t AliGenMUONlib::YPion( Double_t *py, Double_t *dummy)
60 const Double_t ka = 7000.;
61 const Double_t kdy = 4.;
63 Double_t y=TMath::Abs(*py);
65 Double_t ex = y*y/(2*kdy*kdy);
66 return ka*TMath::Exp(-ex);
68 // particle composition
70 Int_t AliGenMUONlib::IpPion()
75 if (random[0] < 0.5) {
82 //____________________________________________________________
86 Double_t AliGenMUONlib::PtScal(Double_t pt, Int_t np)
88 // SCALING EN MASSE PAR RAPPORT A PTPI
89 // MASS PI,K,ETA,RHO,OMEGA,ETA',PHI
90 const Double_t khm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0};
91 // VALUE MESON/PI AT 5 GEV
92 const Double_t kfmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0};
94 Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3);
95 Double_t fmax2=f5/kfmax[np];
97 Double_t ptpion=100.*PtPion(&pt, (Double_t*) 0);
98 Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
99 (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ fmax2;
100 return fmtscal*ptpion;
106 //____________________________________________________________
107 Double_t AliGenMUONlib::PtKaon( Double_t *px, Double_t *dummy)
110 return PtScal(*px,2);
114 //____________________________________________________________
115 Double_t AliGenMUONlib::YKaon( Double_t *py, Double_t *dummy)
118 const Double_t ka = 1000.;
119 const Double_t kdy = 4.;
122 Double_t y=TMath::Abs(*py);
124 Double_t ex = y*y/(2*kdy*kdy);
125 return ka*TMath::Exp(-ex);
128 // particle composition
130 Int_t AliGenMUONlib::IpKaon()
135 if (random[0] < 0.5) {
146 //____________________________________________________________
147 Double_t AliGenMUONlib::PtJpsi( Double_t *px, Double_t *dummy)
150 const Double_t kpt0 = 4.;
151 const Double_t kxn = 3.6;
154 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
155 return x/TMath::Power(pass1,kxn);
159 //____________________________________________________________
160 Double_t AliGenMUONlib::YJpsi(Double_t *py, Double_t *dummy)
163 const Double_t ky0 = 4.;
164 const Double_t kb=1.;
166 Double_t y=TMath::Abs(*py);
171 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
174 // particle composition
176 Int_t AliGenMUONlib::IpJpsi()
186 //____________________________________________________________
187 Double_t AliGenMUONlib::PtUpsilon( Double_t *px, Double_t *dummy )
190 const Double_t kpt0 = 5.3;
191 const Double_t kxn = 2.5;
194 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
195 return x/TMath::Power(pass1,kxn);
200 //____________________________________________________________
201 Double_t AliGenMUONlib::YUpsilon(Double_t *py, Double_t *dummy)
204 const Double_t ky0 = 3.;
205 const Double_t kb=1.;
207 Double_t y=TMath::Abs(*py);
212 yu=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
215 // particle composition
217 Int_t AliGenMUONlib::IpUpsilon()
227 // pt-distribution (by scaling of pion distribution)
228 //____________________________________________________________
229 Double_t AliGenMUONlib::PtPhi( Double_t *px, Double_t *dummy)
232 return PtScal(*px,7);
235 Double_t AliGenMUONlib::YPhi( Double_t *px, Double_t *dummy)
239 return YJpsi(px,dum);
241 // particle composition
243 Int_t AliGenMUONlib::IpPhi()
254 //____________________________________________________________
255 Double_t AliGenMUONlib::PtCharm( Double_t *px, Double_t *dummy)
258 const Double_t kpt0 = 4.08;
259 const Double_t kxn = 9.40;
262 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
263 return x/TMath::Power(pass1,kxn);
266 Double_t AliGenMUONlib::YCharm( Double_t *px, Double_t *dummy)
270 return YJpsi(px,dum);
273 Int_t AliGenMUONlib::IpCharm()
280 if (random[0] < 0.5) {
282 } else if (random[0] < 0.75) {
284 } else if (random[0] < 0.90) {
289 if (random[1] < 0.5) {ip=-ip;}
300 //____________________________________________________________
301 Double_t AliGenMUONlib::PtBeauty( Double_t *px, Double_t *dummy)
304 const Double_t kpt0 = 4.;
305 const Double_t kxn = 3.6;
308 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
309 return x/TMath::Power(pass1,kxn);
312 Double_t AliGenMUONlib::YBeauty( Double_t *px, Double_t *dummy)
316 return YJpsi(px,dum);
319 Int_t AliGenMUONlib::IpBeauty()
321 // Beauty Composition
325 if (random[0] < 0.5) {
327 } else if (random[0] < 0.75) {
329 } else if (random[0] < 0.90) {
334 if (random[1] < 0.5) {ip=-ip;}
339 typedef Double_t (*GenFunc) (Double_t*, Double_t*);
340 GenFunc AliGenMUONlib::GetPt(Param_t param)
342 // Return pointer to pT parameterisation
369 printf("<AliGenMUONlib::GetPt> unknown parametrisation\n");
374 GenFunc AliGenMUONlib::GetY(Param_t param)
376 // Return pointer to y- parameterisation
403 printf("<AliGenMUONlib::GetY> unknown parametrisation\n");
407 typedef Int_t (*GenFuncIp) ();
408 GenFuncIp AliGenMUONlib::GetIp(Param_t param)
410 // Return pointer to particle type parameterisation
437 printf("<AliGenMUONlib::GetIp> unknown parametrisation\n");