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.3.10.1 2002/06/10 14:57:41 hristov
21 Revision 1.4 2002/04/17 12:48:54 morsch
24 Revision 1.3 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.2 2000/11/30 07:12:50 alibrary
29 Introducing new Rndm and QA classes
31 Revision 1.1 2000/09/08 15:37:58 morsch
32 pt and y-parameterisations for PMD physics simulation.
33 THIS VERSION IS JUST A TEMPLATE THE PT AND Y DISTRIBUTIONS HAVE TO BE CORRECTED !!!!.
37 #include "AliGenPMDlib.h"
41 ClassImp(AliGenPMDlib)
45 Double_t AliGenPMDlib::PtPi0(Double_t *px, Double_t *dummy)
48 // PT-PARAMETERIZATION CDF, PRL 61(88) 1819
49 // POWER LAW FOR PT > 500 MEV
50 // MT SCALING BELOW (T=160 MEV)
52 const Double_t kp0 = 1.3;
53 const Double_t kxn = 8.28;
54 const Double_t kxlim=0.5;
55 const Double_t kt=0.160;
56 const Double_t kxmpi=0.139;
58 Double_t y, y1, xmpi2, ynorm, a;
61 y1=TMath::Power(kp0/(kp0+kxlim),kxn);
63 ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/kt));
66 y=a*TMath::Power(kp0/(kp0+x),kxn);
68 y=kb*TMath::Exp(-sqrt(x*x+xmpi2)/kt);
75 Double_t AliGenPMDlib::YPi0( Double_t *py, Double_t *dummy)
78 // y parametrisation for pi0
80 const Double_t ka1 = 4913.;
81 const Double_t ka2 = 1819.;
82 const Double_t keta1 = 0.22;
83 const Double_t keta2 = 3.66;
84 const Double_t kdeta1 = 1.47;
85 const Double_t kdeta2 = 1.51;
86 Double_t y=TMath::Abs(*py);
88 Double_t ex1 = (y-keta1)*(y-keta1)/(2*kdeta1*kdeta1);
89 Double_t ex2 = (y-keta2)*(y-keta2)/(2*kdeta2*kdeta2);
90 return ka1*TMath::Exp(-ex1)+ka2*TMath::Exp(-ex2);
93 // particle composition
95 Int_t AliGenPMDlib::IpPi0(TRandom *)
101 //____________________________________________________________
105 Double_t AliGenPMDlib::PtScal(Double_t pt, Int_t np)
107 // SCALING EN MASSE PAR RAPPORT A PTPI
108 // MASS PI,K,ETA,RHO,OMEGA,ETA',PHI
109 const Double_t khm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0};
110 // VALUE MESON/PI AT 5 GEV
111 const Double_t kfmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0};
113 Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3);
114 Double_t fmax2=f5/kfmax[np];
116 Double_t ptpion=100.*PtPi0(&pt, (Double_t*) 0);
117 Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
118 (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ fmax2;
119 return fmtscal*ptpion;
125 //____________________________________________________________
127 Double_t AliGenPMDlib::PtEta( Double_t *px, Double_t *dummy)
130 return PtScal(*px,3);
134 //____________________________________________________________
135 Double_t AliGenPMDlib::YEta( Double_t *py, Double_t *dummy)
138 // y parametrisation for etas
140 const Double_t ka1 = 4913.;
141 const Double_t ka2 = 1819.;
142 const Double_t keta1 = 0.22;
143 const Double_t keta2 = 3.66;
144 const Double_t kdeta1 = 1.47;
145 const Double_t kdeta2 = 1.51;
146 Double_t y=TMath::Abs(*py);
148 Double_t ex1 = (y-keta1)*(y-keta1)/(2*kdeta1*kdeta1);
149 Double_t ex2 = (y-keta2)*(y-keta2)/(2*kdeta2*kdeta2);
150 return ka1*TMath::Exp(-ex1)+ka2*TMath::Exp(-ex2);
153 // particle composition
155 Int_t AliGenPMDlib::IpEta(TRandom *)
161 typedef Double_t (*GenFunc) (Double_t*, Double_t*);
162 GenFunc AliGenPMDlib::GetPt(Int_t param, const char* tname) const
164 // Return pointer to pT parameterisation
176 printf("<AliGenPMDlib::GetPt> unknown parametrisation\n");
181 GenFunc AliGenPMDlib::GetY(Int_t param, const char* tname) const
183 // Return pointer to y- parameterisation
195 printf("<AliGenPMDlib::GetY> unknown parametrisation\n");
200 typedef Int_t (*GenFuncIp) (TRandom *);
201 GenFuncIp AliGenPMDlib::GetIp(Int_t param, const char* tname) const
203 // Return pointer to particle type parameterisation
214 printf("<AliGenPMDlib::GetIp> unknown parametrisation\n");