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.14 2002/02/22 17:26:43 morsch
21 Revision 1.13 2001/03/27 11:01:04 morsch
22 Charm pt-distribution corrected. More realistic y-distribution for pi and K.
24 Revision 1.12 2001/03/09 13:01:41 morsch
25 - enum constants for paramterisation type (particle family) moved to AliGen*lib.h
26 - use AliGenGSIlib::kUpsilon, AliGenPHOSlib::kEtaPrime to access the constants
28 Revision 1.11 2000/11/30 07:12:50 alibrary
29 Introducing new Rndm and QA classes
31 Revision 1.10 2000/06/29 21:08:27 morsch
32 All paramatrisation libraries derive from the pure virtual base class AliGenLib.
33 This allows to pass a pointer to a library directly to AliGenParam and avoids the
34 use of function pointers in Config.C.
36 Revision 1.9 2000/06/14 15:20:56 morsch
39 Revision 1.8 2000/06/09 20:32:11 morsch
40 All coding rule violations except RS3 corrected
42 Revision 1.7 2000/05/02 08:12:13 morsch
43 Coding rule violations corrected.
45 Revision 1.6 1999/09/29 09:24:14 fca
46 Introduction of the Copyright and cvs Log
50 // Library class for particle pt and y distributions used for
51 // muon spectrometer simulations.
52 // To be used with AliGenParam.
53 // The following particle typed can be simulated:
54 // pi, K, phi, omega, eta, J/Psi, Upsilon, charm and beauty mesons.
56 // andreas.morsch@cern.ch
62 #include "AliGenMUONlib.h"
64 ClassImp(AliGenMUONlib)
67 Double_t AliGenMUONlib::PtPion(Double_t *px, Double_t *dummy)
70 // PT-PARAMETERIZATION CDF, PRL 61(88) 1819
71 // POWER LAW FOR PT > 500 MEV
72 // MT SCALING BELOW (T=160 MEV)
74 const Double_t kp0 = 1.3;
75 const Double_t kxn = 8.28;
76 const Double_t kxlim=0.5;
77 const Double_t kt=0.160;
78 const Double_t kxmpi=0.139;
80 Double_t y, y1, xmpi2, ynorm, a;
83 y1=TMath::Power(kp0/(kp0+kxlim),kxn);
85 ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/kt));
88 y=a*TMath::Power(kp0/(kp0+x),kxn);
90 y=kb*TMath::Exp(-sqrt(x*x+xmpi2)/kt);
96 Double_t AliGenMUONlib::YPion( Double_t *py, Double_t *dummy)
99 Double_t y=TMath::Abs(*py);
101 const Double_t ka = 7000.;
102 const Double_t kdy = 4.;
103 Double_t ex = y*y/(2*kdy*kdy);
104 return ka*TMath::Exp(-ex);
106 return 1.16526e+04+y*-3.79886e+03+y*y*4.31130e+02;
109 // particle composition
111 Int_t AliGenMUONlib::IpPion(TRandom *ran)
114 if (ran->Rndm() < 0.5) {
121 //____________________________________________________________
125 Double_t AliGenMUONlib::PtScal(Double_t pt, Int_t np)
127 // SCALING EN MASSE PAR RAPPORT A PTPI
128 // MASS PI,K,ETA,RHO,OMEGA,ETA',PHI
129 const Double_t khm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0};
130 // VALUE MESON/PI AT 5 GEV
131 const Double_t kfmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0};
133 Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3);
134 Double_t fmax2=f5/kfmax[np];
136 Double_t ptpion=100.*PtPion(&pt, (Double_t*) 0);
137 Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
138 (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ fmax2;
139 return fmtscal*ptpion;
145 //____________________________________________________________
146 Double_t AliGenMUONlib::PtKaon( Double_t *px, Double_t *dummy)
149 return PtScal(*px,2);
153 //____________________________________________________________
154 Double_t AliGenMUONlib::YKaon( Double_t *py, Double_t *dummy)
157 Double_t y=TMath::Abs(*py);
159 const Double_t ka = 1000.;
160 const Double_t kdy = 4.;
162 Double_t ex = y*y/(2*kdy*kdy);
163 return ka*TMath::Exp(-ex);
166 return 1.16526e+04+y*-3.79886e+03+y*y*4.31130e+02;
169 // particle composition
171 Int_t AliGenMUONlib::IpKaon(TRandom *ran)
174 if (ran->Rndm() < 0.5) {
185 //____________________________________________________________
186 Double_t AliGenMUONlib::PtJpsi( Double_t *px, Double_t *dummy)
189 const Double_t kpt0 = 4.;
190 const Double_t kxn = 3.6;
193 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
194 return x/TMath::Power(pass1,kxn);
198 //____________________________________________________________
199 Double_t AliGenMUONlib::YJpsi(Double_t *py, Double_t *dummy)
202 const Double_t ky0 = 4.;
203 const Double_t kb=1.;
205 Double_t y=TMath::Abs(*py);
210 yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
213 // particle composition
215 Int_t AliGenMUONlib::IpJpsi(TRandom *)
225 //____________________________________________________________
226 Double_t AliGenMUONlib::PtUpsilon( Double_t *px, Double_t *dummy )
229 const Double_t kpt0 = 5.3;
230 const Double_t kxn = 2.5;
233 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
234 return x/TMath::Power(pass1,kxn);
239 //____________________________________________________________
240 Double_t AliGenMUONlib::YUpsilon(Double_t *py, Double_t *dummy)
243 const Double_t ky0 = 3.;
244 const Double_t kb=1.;
246 Double_t y=TMath::Abs(*py);
251 yu=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
254 // particle composition
256 Int_t AliGenMUONlib::IpUpsilon(TRandom *)
266 // pt-distribution (by scaling of pion distribution)
267 //____________________________________________________________
268 Double_t AliGenMUONlib::PtPhi( Double_t *px, Double_t *dummy)
271 return PtScal(*px,7);
274 Double_t AliGenMUONlib::YPhi( Double_t *px, Double_t *dummy)
278 return YJpsi(px,dum);
280 // particle composition
282 Int_t AliGenMUONlib::IpPhi(TRandom *)
292 // pt-distribution (by scaling of pion distribution)
293 //____________________________________________________________
294 Double_t AliGenMUONlib::PtOmega( Double_t *px, Double_t *dummy)
297 return PtScal(*px,5);
300 Double_t AliGenMUONlib::YOmega( Double_t *px, Double_t *dummy)
304 return YJpsi(px,dum);
306 // particle composition
308 Int_t AliGenMUONlib::IpOmega(TRandom *)
319 // pt-distribution (by scaling of pion distribution)
320 //____________________________________________________________
321 Double_t AliGenMUONlib::PtEta( Double_t *px, Double_t *dummy)
324 return PtScal(*px,3);
327 Double_t AliGenMUONlib::YEta( Double_t *px, Double_t *dummy)
331 return YJpsi(px,dum);
333 // particle composition
335 Int_t AliGenMUONlib::IpEta(TRandom *)
346 //____________________________________________________________
347 Double_t AliGenMUONlib::PtCharm( Double_t *px, Double_t *dummy)
350 const Double_t kpt0 = 4.08;
351 const Double_t kxn = 9.40;
355 Double_t pass1 = 1.+(x/kpt0);
356 return x/TMath::Power(pass1,kxn);
359 Double_t AliGenMUONlib::YCharm( Double_t *px, Double_t *dummy)
363 return YJpsi(px,dum);
366 Int_t AliGenMUONlib::IpCharm(TRandom *ran)
372 random = ran->Rndm();
375 } else if (random < 0.75) {
377 } else if (random < 0.90) {
382 if (ran->Rndm() < 0.5) {ip=-ip;}
393 //____________________________________________________________
394 Double_t AliGenMUONlib::PtBeauty( Double_t *px, Double_t *dummy)
397 const Double_t kpt0 = 4.;
398 const Double_t kxn = 3.6;
401 Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
402 return x/TMath::Power(pass1,kxn);
405 Double_t AliGenMUONlib::YBeauty( Double_t *px, Double_t *dummy)
409 return YJpsi(px,dum);
412 Int_t AliGenMUONlib::IpBeauty(TRandom *ran)
414 // Beauty Composition
417 random = ran->Rndm();
420 } else if (random < 0.75) {
422 } else if (random < 0.90) {
427 if (ran->Rndm() < 0.5) {ip=-ip;}
432 typedef Double_t (*GenFunc) (Double_t*, Double_t*);
433 GenFunc AliGenMUONlib::GetPt(Int_t param, const char* tname) const
435 // Return pointer to pT parameterisation
468 printf("<AliGenMUONlib::GetPt> unknown parametrisation\n");
473 GenFunc AliGenMUONlib::GetY(Int_t param, const char* tname) const
475 // Return pointer to y- parameterisation
508 printf("<AliGenMUONlib::GetY> unknown parametrisation\n");
512 typedef Int_t (*GenFuncIp) (TRandom *);
513 GenFuncIp AliGenMUONlib::GetIp(Int_t param, const char* tname) const
515 // Return pointer to particle type parameterisation
548 printf("<AliGenMUONlib::GetIp> unknown parametrisation\n");