git://git.uio.no
/
u
/
mrichter
/
AliRoot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Coding rule violations corrected.
[u/mrichter/AliRoot.git]
/
EVGEN
/
AliGenMUONlib.cxx
diff --git
a/EVGEN/AliGenMUONlib.cxx
b/EVGEN/AliGenMUONlib.cxx
index d56890ac2ded94d5f22583a18c79ff871d5e0106..97c850d6ea284fe7680a584577b0a39e050c4c34 100644
(file)
--- a/
EVGEN/AliGenMUONlib.cxx
+++ b/
EVGEN/AliGenMUONlib.cxx
@@
-15,6
+15,9
@@
/*
$Log$
/*
$Log$
+Revision 1.6 1999/09/29 09:24:14 fca
+Introduction of the Copyright and cvs Log
+
*/
#include "AliGenMUONlib.h"
*/
#include "AliGenMUONlib.h"
@@
-22,49
+25,51
@@
$Log$
ClassImp(AliGenMUONlib)
//
// Pions
ClassImp(AliGenMUONlib)
//
// Pions
-Double_t AliGenMUONlib::PtPion(Double_t *px, Double_t *)
+Double_t AliGenMUONlib::PtPion(Double_t *px, Double_t *
dummy
)
{
//
// PT-PARAMETERIZATION CDF, PRL 61(88) 1819
// POWER LAW FOR PT > 500 MEV
// MT SCALING BELOW (T=160 MEV)
//
{
//
// PT-PARAMETERIZATION CDF, PRL 61(88) 1819
// POWER LAW FOR PT > 500 MEV
// MT SCALING BELOW (T=160 MEV)
//
- const Double_t p0 = 1.3;
- const Double_t xn = 8.28;
- const Double_t xlim=0.5;
- const Double_t t=0.160;
- const Double_t xmpi=0.139;
- const Double_t b=1.;
+ const Double_t
k
p0 = 1.3;
+ const Double_t
k
xn = 8.28;
+ const Double_t
k
xlim=0.5;
+ const Double_t
k
t=0.160;
+ const Double_t
k
xmpi=0.139;
+ const Double_t
k
b=1.;
Double_t y, y1, xmpi2, ynorm, a;
Double_t x=*px;
//
Double_t y, y1, xmpi2, ynorm, a;
Double_t x=*px;
//
- y1=TMath::Power(
p0/(p0+xlim),
xn);
- xmpi2=
xmpi*
xmpi;
- ynorm=
b*(TMath::Exp(-sqrt(xlim*xlim+xmpi2)/
t));
+ y1=TMath::Power(
kp0/(kp0+kxlim),k
xn);
+ xmpi2=
kxmpi*k
xmpi;
+ ynorm=
kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/k
t));
a=ynorm/y1;
a=ynorm/y1;
- if (x > xlim)
- y=a*TMath::Power(
p0/(p0+x),
xn);
+ if (x >
k
xlim)
+ y=a*TMath::Power(
kp0/(kp0+x),k
xn);
else
else
- y=
b*TMath::Exp(-sqrt(x*x+xmpi2)/
t);
+ y=
kb*TMath::Exp(-sqrt(x*x+xmpi2)/k
t);
return y*x;
}
//
// y-distribution
//
return y*x;
}
//
// y-distribution
//
-Double_t AliGenMUONlib::YPion( Double_t *py, Double_t *)
+Double_t AliGenMUONlib::YPion( Double_t *py, Double_t *
dummy
)
{
{
- const Double_t a = 7000.;
- const Double_t dy = 4.;
+// Pion y
+ const Double_t ka = 7000.;
+ const Double_t kdy = 4.;
Double_t y=TMath::Abs(*py);
//
Double_t y=TMath::Abs(*py);
//
- Double_t ex = y*y/(2*
dy*
dy);
- return a*TMath::Exp(-ex);
+ Double_t ex = y*y/(2*
kdy*k
dy);
+ return
k
a*TMath::Exp(-ex);
}
// particle composition
//
Int_t AliGenMUONlib::IpPion()
{
}
// particle composition
//
Int_t AliGenMUONlib::IpPion()
{
+// Pion composition
Float_t random[1];
gMC->Rndm(random,1);
if (random[0] < 0.5) {
Float_t random[1];
gMC->Rndm(random,1);
if (random[0] < 0.5) {
@@
-82,16
+87,16
@@
Double_t AliGenMUONlib::PtScal(Double_t pt, Int_t np)
{
// SCALING EN MASSE PAR RAPPORT A PTPI
// MASS PI,K,ETA,RHO,OMEGA,ETA',PHI
{
// SCALING EN MASSE PAR RAPPORT A PTPI
// MASS PI,K,ETA,RHO,OMEGA,ETA',PHI
- const Double_t hm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0};
+ const Double_t
k
hm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0};
// VALUE MESON/PI AT 5 GEV
// VALUE MESON/PI AT 5 GEV
- const Double_t fmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0};
+ const Double_t
k
fmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0};
np--;
np--;
- Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+
hm[np]*
hm[np])+2.0)),12.3);
- Double_t fmax2=f5/fmax[np];
+ Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+
khm[np]*k
hm[np])+2.0)),12.3);
+ Double_t fmax2=f5/
k
fmax[np];
// PIONS
Double_t ptpion=100.*PtPion(&pt, (Double_t*) 0);
Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
// PIONS
Double_t ptpion=100.*PtPion(&pt, (Double_t*) 0);
Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
- (sqrt(pt*pt+
hm[np]*
hm[np])+2.0)),12.3)/ fmax2;
+ (sqrt(pt*pt+
khm[np]*k
hm[np])+2.0)),12.3)/ fmax2;
return fmtscal*ptpion;
}
//
return fmtscal*ptpion;
}
//
@@
-99,29
+104,32
@@
Double_t AliGenMUONlib::PtScal(Double_t pt, Int_t np)
//
// pt-distribution
//____________________________________________________________
//
// pt-distribution
//____________________________________________________________
-Double_t AliGenMUONlib::PtKaon( Double_t *px, Double_t *)
+Double_t AliGenMUONlib::PtKaon( Double_t *px, Double_t *
dummy
)
{
{
+// Kaon pT
return PtScal(*px,2);
}
// y-distribution
//____________________________________________________________
return PtScal(*px,2);
}
// y-distribution
//____________________________________________________________
-Double_t AliGenMUONlib::YKaon( Double_t *py, Double_t *)
+Double_t AliGenMUONlib::YKaon( Double_t *py, Double_t *
dummy
)
{
{
- const Double_t a = 1000.;
- const Double_t dy = 4.;
+// Kaon y
+ const Double_t ka = 1000.;
+ const Double_t kdy = 4.;
Double_t y=TMath::Abs(*py);
//
Double_t y=TMath::Abs(*py);
//
- Double_t ex = y*y/(2*
dy*
dy);
- return a*TMath::Exp(-ex);
+ Double_t ex = y*y/(2*
kdy*k
dy);
+ return
k
a*TMath::Exp(-ex);
}
// particle composition
//
Int_t AliGenMUONlib::IpKaon()
{
}
// particle composition
//
Int_t AliGenMUONlib::IpKaon()
{
+// Kaon composition
Float_t random[1];
gMC->Rndm(random,1);
if (random[0] < 0.5) {
Float_t random[1];
gMC->Rndm(random,1);
if (random[0] < 0.5) {
@@
-136,35
+144,38
@@
Int_t AliGenMUONlib::IpKaon()
//
// pt-distribution
//____________________________________________________________
//
// pt-distribution
//____________________________________________________________
-Double_t AliGenMUONlib::PtJpsi( Double_t *px, Double_t *)
+Double_t AliGenMUONlib::PtJpsi( Double_t *px, Double_t *
dummy
)
{
{
- const Double_t pt0 = 4.;
- const Double_t xn = 3.6;
+// J/Psi pT
+ const Double_t kpt0 = 4.;
+ const Double_t kxn = 3.6;
Double_t x=*px;
//
Double_t x=*px;
//
- Double_t pass1 = 1.+(x/
pt0)*(x/
pt0);
- return x/TMath::Power(pass1,xn);
+ Double_t pass1 = 1.+(x/
kpt0)*(x/k
pt0);
+ return x/TMath::Power(pass1,
k
xn);
}
//
// y-distribution
//____________________________________________________________
}
//
// y-distribution
//____________________________________________________________
-Double_t AliGenMUONlib::YJpsi(Double_t *py, Double_t *)
+Double_t AliGenMUONlib::YJpsi(Double_t *py, Double_t *
dummy
)
{
{
- const Double_t y0 = 4.;
- const Double_t b=1.;
+// J/psi y
+ const Double_t ky0 = 4.;
+ const Double_t kb=1.;
Double_t yj;
Double_t y=TMath::Abs(*py);
//
Double_t yj;
Double_t y=TMath::Abs(*py);
//
- if (y < y0)
- yj=b;
+ if (y <
k
y0)
+ yj=
k
b;
else
else
- yj=
b*TMath::Exp(-(y-y0)*(y-
y0)/2);
+ yj=
kb*TMath::Exp(-(y-ky0)*(y-k
y0)/2);
return yj;
}
// particle composition
//
Int_t AliGenMUONlib::IpJpsi()
{
return yj;
}
// particle composition
//
Int_t AliGenMUONlib::IpJpsi()
{
+// J/Psi composition
return 443;
}
return 443;
}
@@
-173,36
+184,39
@@
Int_t AliGenMUONlib::IpJpsi()
//
// pt-distribution
//____________________________________________________________
//
// pt-distribution
//____________________________________________________________
-Double_t AliGenMUONlib::PtUpsilon( Double_t *px, Double_t * )
+Double_t AliGenMUONlib::PtUpsilon( Double_t *px, Double_t *
dummy
)
{
{
- const Double_t pt0 = 5.3;
- const Double_t xn = 2.5;
+// Upsilon pT
+ const Double_t kpt0 = 5.3;
+ const Double_t kxn = 2.5;
Double_t x=*px;
//
Double_t x=*px;
//
- Double_t pass1 = 1.+(x/
pt0)*(x/
pt0);
- return x/TMath::Power(pass1,xn);
+ Double_t pass1 = 1.+(x/
kpt0)*(x/k
pt0);
+ return x/TMath::Power(pass1,
k
xn);
}
//
// y-distribution
//
//____________________________________________________________
}
//
// y-distribution
//
//____________________________________________________________
-Double_t AliGenMUONlib::YUpsilon(Double_t *py, Double_t *)
+Double_t AliGenMUONlib::YUpsilon(Double_t *py, Double_t *
dummy
)
{
{
- const Double_t y0 = 3.;
- const Double_t b=1.;
+// Upsilon y
+ const Double_t ky0 = 3.;
+ const Double_t kb=1.;
Double_t yu;
Double_t y=TMath::Abs(*py);
//
Double_t yu;
Double_t y=TMath::Abs(*py);
//
- if (y < y0)
- yu=b;
+ if (y <
k
y0)
+ yu=
k
b;
else
else
- yu=
b*TMath::Exp(-(y-y0)*(y-
y0)/2);
+ yu=
kb*TMath::Exp(-(y-ky0)*(y-k
y0)/2);
return yu;
}
// particle composition
//
Int_t AliGenMUONlib::IpUpsilon()
{
return yu;
}
// particle composition
//
Int_t AliGenMUONlib::IpUpsilon()
{
+// y composition
return 553;
}
return 553;
}
@@
-212,20
+226,23
@@
Int_t AliGenMUONlib::IpUpsilon()
//
// pt-distribution (by scaling of pion distribution)
//____________________________________________________________
//
// pt-distribution (by scaling of pion distribution)
//____________________________________________________________
-Double_t AliGenMUONlib::PtPhi( Double_t *px, Double_t *)
+Double_t AliGenMUONlib::PtPhi( Double_t *px, Double_t *
dummy
)
{
{
+// Phi pT
return PtScal(*px,7);
}
// y-distribution
return PtScal(*px,7);
}
// y-distribution
-Double_t AliGenMUONlib::YPhi( Double_t *px, Double_t *)
+Double_t AliGenMUONlib::YPhi( Double_t *px, Double_t *
dummy
)
{
{
- Double_t *dummy=0;
- return YJpsi(px,dummy);
+// Phi y
+ Double_t *dum=0;
+ return YJpsi(px,dum);
}
// particle composition
//
Int_t AliGenMUONlib::IpPhi()
{
}
// particle composition
//
Int_t AliGenMUONlib::IpPhi()
{
+// Phi composition
return 41;
}
return 41;
}
@@
-235,24
+252,27
@@
Int_t AliGenMUONlib::IpPhi()
//
// pt-distribution
//____________________________________________________________
//
// pt-distribution
//____________________________________________________________
-Double_t AliGenMUONlib::PtCharm( Double_t *px, Double_t *)
+Double_t AliGenMUONlib::PtCharm( Double_t *px, Double_t *
dummy
)
{
{
- const Double_t pt0 = 4.08;
- const Double_t xn = 9.40;
+// Charm pT
+ const Double_t kpt0 = 4.08;
+ const Double_t kxn = 9.40;
Double_t x=*px;
//
Double_t x=*px;
//
- Double_t pass1 = 1.+(x/
pt0)*(x/
pt0);
- return x/TMath::Power(pass1,xn);
+ Double_t pass1 = 1.+(x/
kpt0)*(x/k
pt0);
+ return x/TMath::Power(pass1,
k
xn);
}
// y-distribution
}
// y-distribution
-Double_t AliGenMUONlib::YCharm( Double_t *px, Double_t *)
+Double_t AliGenMUONlib::YCharm( Double_t *px, Double_t *
dummy
)
{
{
- Double_t *dummy=0;
- return YJpsi(px,dummy);
+// Charm y
+ Double_t *dum=0;
+ return YJpsi(px,dum);
}
Int_t AliGenMUONlib::IpCharm()
{
}
Int_t AliGenMUONlib::IpCharm()
{
+// Charm composition
Float_t random[2];
Int_t ip;
// 411,421,431,4122
Float_t random[2];
Int_t ip;
// 411,421,431,4122
@@
-278,24
+298,27
@@
Int_t AliGenMUONlib::IpCharm()
//
// pt-distribution
//____________________________________________________________
//
// pt-distribution
//____________________________________________________________
-Double_t AliGenMUONlib::PtBeauty( Double_t *px, Double_t *)
+Double_t AliGenMUONlib::PtBeauty( Double_t *px, Double_t *
dummy
)
{
{
- const Double_t pt0 = 4.;
- const Double_t xn = 3.6;
+// Beauty pT
+ const Double_t kpt0 = 4.;
+ const Double_t kxn = 3.6;
Double_t x=*px;
//
Double_t x=*px;
//
- Double_t pass1 = 1.+(x/
pt0)*(x/
pt0);
- return x/TMath::Power(pass1,xn);
+ Double_t pass1 = 1.+(x/
kpt0)*(x/k
pt0);
+ return x/TMath::Power(pass1,
k
xn);
}
// y-distribution
}
// y-distribution
-Double_t AliGenMUONlib::YBeauty( Double_t *px, Double_t *)
+Double_t AliGenMUONlib::YBeauty( Double_t *px, Double_t *
dummy
)
{
{
- Double_t *dummy=0;
- return YJpsi(px,dummy);
+// Beauty y
+ Double_t *dum=0;
+ return YJpsi(px,dum);
}
Int_t AliGenMUONlib::IpBeauty()
{
}
Int_t AliGenMUONlib::IpBeauty()
{
+// Beauty Composition
Float_t random[2];
Int_t ip;
gMC->Rndm(random,2);
Float_t random[2];
Int_t ip;
gMC->Rndm(random,2);
@@
-316,6
+339,7
@@
Int_t AliGenMUONlib::IpBeauty()
typedef Double_t (*GenFunc) (Double_t*, Double_t*);
GenFunc AliGenMUONlib::GetPt(Param_t param)
{
typedef Double_t (*GenFunc) (Double_t*, Double_t*);
GenFunc AliGenMUONlib::GetPt(Param_t param)
{
+// Return pointer to pT parameterisation
GenFunc func;
switch (param)
{
GenFunc func;
switch (param)
{
@@
-349,6
+373,7
@@
GenFunc AliGenMUONlib::GetPt(Param_t param)
GenFunc AliGenMUONlib::GetY(Param_t param)
{
GenFunc AliGenMUONlib::GetY(Param_t param)
{
+// Return pointer to y- parameterisation
GenFunc func;
switch (param)
{
GenFunc func;
switch (param)
{
@@
-382,6
+407,7
@@
GenFunc AliGenMUONlib::GetY(Param_t param)
typedef Int_t (*GenFuncIp) ();
GenFuncIp AliGenMUONlib::GetIp(Param_t param)
{
typedef Int_t (*GenFuncIp) ();
GenFuncIp AliGenMUONlib::GetIp(Param_t param)
{
+// Return pointer to particle type parameterisation
GenFuncIp func;
switch (param)
{
GenFuncIp func;
switch (param)
{