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.5 2002/10/14 14:55:35 hristov
19 Merging the VirtualMC branch to the main development branch (HEAD)
21 Revision 1.3.10.1 2002/06/10 14:57:41 hristov
24 Revision 1.4 2002/04/17 12:48:54 morsch
27 Revision 1.3 2001/03/09 13:01:41 morsch
28 - enum constants for paramterisation type (particle family) moved to AliGen*lib.h
29 - use AliGenGSIlib::kUpsilon, AliGenPHOSlib::kEtaPrime to access the constants
31 Revision 1.2 2000/11/30 07:12:50 alibrary
32 Introducing new Rndm and QA classes
34 Revision 1.1 2000/09/08 15:37:58 morsch
35 pt and y-parameterisations for PMD physics simulation.
36 THIS VERSION IS JUST A TEMPLATE THE PT AND Y DISTRIBUTIONS HAVE TO BE CORRECTED !!!!.
43 #include "AliGenPMDlib.h"
45 ClassImp(AliGenPMDlib)
49 Double_t AliGenPMDlib::PtPi0(Double_t *px, Double_t *dummy)
52 // PT-PARAMETERIZATION CDF, PRL 61(88) 1819
53 // POWER LAW FOR PT > 500 MEV
54 // MT SCALING BELOW (T=160 MEV)
56 const Double_t kp0 = 1.3;
57 const Double_t kxn = 8.28;
58 const Double_t kxlim=0.5;
59 const Double_t kt=0.160;
60 const Double_t kxmpi=0.139;
62 Double_t y, y1, xmpi2, ynorm, a;
65 y1=TMath::Power(kp0/(kp0+kxlim),kxn);
67 ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/kt));
70 y=a*TMath::Power(kp0/(kp0+x),kxn);
72 y=kb*TMath::Exp(-sqrt(x*x+xmpi2)/kt);
79 Double_t AliGenPMDlib::YPi0( Double_t *py, Double_t *dummy)
82 // y parametrisation for pi0
84 const Double_t ka1 = 4913.;
85 const Double_t ka2 = 1819.;
86 const Double_t keta1 = 0.22;
87 const Double_t keta2 = 3.66;
88 const Double_t kdeta1 = 1.47;
89 const Double_t kdeta2 = 1.51;
90 Double_t y=TMath::Abs(*py);
92 Double_t ex1 = (y-keta1)*(y-keta1)/(2*kdeta1*kdeta1);
93 Double_t ex2 = (y-keta2)*(y-keta2)/(2*kdeta2*kdeta2);
94 return ka1*TMath::Exp(-ex1)+ka2*TMath::Exp(-ex2);
97 // particle composition
99 Int_t AliGenPMDlib::IpPi0(TRandom *)
105 //____________________________________________________________
109 Double_t AliGenPMDlib::PtScal(Double_t pt, Int_t np)
111 // SCALING EN MASSE PAR RAPPORT A PTPI
112 // MASS PI,K,ETA,RHO,OMEGA,ETA',PHI
113 const Double_t khm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0};
114 // VALUE MESON/PI AT 5 GEV
115 const Double_t kfmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0};
117 Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3);
118 Double_t fmax2=f5/kfmax[np];
120 Double_t ptpion=100.*PtPi0(&pt, (Double_t*) 0);
121 Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
122 (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ fmax2;
123 return fmtscal*ptpion;
129 //____________________________________________________________
131 Double_t AliGenPMDlib::PtEta( Double_t *px, Double_t *dummy)
134 return PtScal(*px,3);
138 //____________________________________________________________
139 Double_t AliGenPMDlib::YEta( Double_t *py, Double_t *dummy)
142 // y parametrisation for etas
144 const Double_t ka1 = 4913.;
145 const Double_t ka2 = 1819.;
146 const Double_t keta1 = 0.22;
147 const Double_t keta2 = 3.66;
148 const Double_t kdeta1 = 1.47;
149 const Double_t kdeta2 = 1.51;
150 Double_t y=TMath::Abs(*py);
152 Double_t ex1 = (y-keta1)*(y-keta1)/(2*kdeta1*kdeta1);
153 Double_t ex2 = (y-keta2)*(y-keta2)/(2*kdeta2*kdeta2);
154 return ka1*TMath::Exp(-ex1)+ka2*TMath::Exp(-ex2);
157 // particle composition
159 Int_t AliGenPMDlib::IpEta(TRandom *)
165 typedef Double_t (*GenFunc) (Double_t*, Double_t*);
166 GenFunc AliGenPMDlib::GetPt(Int_t param, const char* tname) const
168 // Return pointer to pT parameterisation
180 printf("<AliGenPMDlib::GetPt> unknown parametrisation\n");
185 GenFunc AliGenPMDlib::GetY(Int_t param, const char* tname) const
187 // Return pointer to y- parameterisation
199 printf("<AliGenPMDlib::GetY> unknown parametrisation\n");
204 typedef Int_t (*GenFuncIp) (TRandom *);
205 GenFuncIp AliGenPMDlib::GetIp(Int_t param, const char* tname) const
207 // Return pointer to particle type parameterisation
218 printf("<AliGenPMDlib::GetIp> unknown parametrisation\n");