]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVGEN/AliGenPMDlib.cxx
New class used for primary vertex finding (AliITSVertexerTracks)
[u/mrichter/AliRoot.git] / EVGEN / AliGenPMDlib.cxx
CommitLineData
0ed0a0a2 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/*
17$Log$
116cbefd 18Revision 1.5 2002/10/14 14:55:35 hristov
19Merging the VirtualMC branch to the main development branch (HEAD)
20
b9d0a01d 21Revision 1.3.10.1 2002/06/10 14:57:41 hristov
22Merged with v3-08-02
23
24Revision 1.4 2002/04/17 12:48:54 morsch
25const added.
26
d5b6b483 27Revision 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
30
34f60c01 31Revision 1.2 2000/11/30 07:12:50 alibrary
32Introducing new Rndm and QA classes
33
65fb704d 34Revision 1.1 2000/09/08 15:37:58 morsch
35pt and y-parameterisations for PMD physics simulation.
36THIS VERSION IS JUST A TEMPLATE THE PT AND Y DISTRIBUTIONS HAVE TO BE CORRECTED !!!!.
37
0ed0a0a2 38*/
39
116cbefd 40#include <TMath.h>
41#include <TPDGCode.h>
42
0ed0a0a2 43#include "AliGenPMDlib.h"
0ed0a0a2 44
45ClassImp(AliGenPMDlib)
46//
47// Neutral Pions
48
49Double_t AliGenPMDlib::PtPi0(Double_t *px, Double_t *dummy)
50{
51//
52// PT-PARAMETERIZATION CDF, PRL 61(88) 1819
53// POWER LAW FOR PT > 500 MEV
54// MT SCALING BELOW (T=160 MEV)
55//
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;
61 const Double_t kb=1.;
62 Double_t y, y1, xmpi2, ynorm, a;
63 Double_t x=*px;
64 //
65 y1=TMath::Power(kp0/(kp0+kxlim),kxn);
66 xmpi2=kxmpi*kxmpi;
67 ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/kt));
68 a=ynorm/y1;
69 if (x > kxlim)
70 y=a*TMath::Power(kp0/(kp0+x),kxn);
71 else
72 y=kb*TMath::Exp(-sqrt(x*x+xmpi2)/kt);
73 return y*x;
74}
75
76//
77// y-distribution
78//
79Double_t AliGenPMDlib::YPi0( Double_t *py, Double_t *dummy)
80{
81 //
82 // y parametrisation for pi0
83 //
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);
91 //
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);
95}
96
97// particle composition
98//
65fb704d 99Int_t AliGenPMDlib::IpPi0(TRandom *)
0ed0a0a2 100{
101// Pi0
102 return kPi0;
103}
104
105//____________________________________________________________
106//
107// Mt-scaling
108
109Double_t AliGenPMDlib::PtScal(Double_t pt, Int_t np)
110{
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};
116 np--;
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];
119 // PIONS
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;
124}
125//
126// kaon
127//
128// pt-distribution
129//____________________________________________________________
130
131Double_t AliGenPMDlib::PtEta( Double_t *px, Double_t *dummy)
132{
133// Kaon pT
134 return PtScal(*px,3);
135}
136
137// y-distribution
138//____________________________________________________________
139Double_t AliGenPMDlib::YEta( Double_t *py, Double_t *dummy)
140{
141 //
142 // y parametrisation for etas
143 //
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);
151 //
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);
155}
156
157// particle composition
158//
65fb704d 159Int_t AliGenPMDlib::IpEta(TRandom *)
0ed0a0a2 160{
161 return 221;
162}
163
164
165typedef Double_t (*GenFunc) (Double_t*, Double_t*);
d5b6b483 166GenFunc AliGenPMDlib::GetPt(Int_t param, const char* tname) const
0ed0a0a2 167{
168// Return pointer to pT parameterisation
169 GenFunc func=NULL;
170 switch (param)
171 {
34f60c01 172 case kPion:
0ed0a0a2 173 func=PtPi0;
174 break;
34f60c01 175 case kEta:
0ed0a0a2 176 func=PtEta;
177 break;
178 default:
179 func=0;
180 printf("<AliGenPMDlib::GetPt> unknown parametrisation\n");
181 }
182 return func;
183}
184
d5b6b483 185GenFunc AliGenPMDlib::GetY(Int_t param, const char* tname) const
0ed0a0a2 186{
187// Return pointer to y- parameterisation
188 GenFunc func=NULL;
189 switch (param)
190 {
34f60c01 191 case kPion:
0ed0a0a2 192 func=YPi0;
193 break;
34f60c01 194 case kEta:
0ed0a0a2 195 func=YEta;
196 break;
197 default:
198 func=0;
199 printf("<AliGenPMDlib::GetY> unknown parametrisation\n");
200 }
201 return func;
202
203}
65fb704d 204typedef Int_t (*GenFuncIp) (TRandom *);
d5b6b483 205GenFuncIp AliGenPMDlib::GetIp(Int_t param, const char* tname) const
0ed0a0a2 206{
207// Return pointer to particle type parameterisation
208 GenFuncIp func=NULL;
209 switch (param)
210 {
34f60c01 211 case kPion:
0ed0a0a2 212 func=IpPi0;
213 break;
34f60c01 214 case kEta:
0ed0a0a2 215 func=IpEta;
216 break;
217 default:
218 printf("<AliGenPMDlib::GetIp> unknown parametrisation\n");
219 }
220 return func;
221}
222
223
224
225