]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding rule violations corrected.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 May 2000 08:12:13 +0000 (08:12 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 May 2000 08:12:13 +0000 (08:12 +0000)
EVGEN/AliGenMUONlib.cxx
EVGEN/AliGenMUONlib.h

index d56890ac2ded94d5f22583a18c79ff871d5e0106..97c850d6ea284fe7680a584577b0a39e050c4c34 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.6  1999/09/29 09:24:14  fca
+Introduction of the Copyright and cvs Log
+
 */
 
 #include "AliGenMUONlib.h"
@@ -22,49 +25,51 @@ $Log$
 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)
 //
-  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 kp0 = 1.3;
+  const Double_t kxn = 8.28;
+  const Double_t kxlim=0.5;
+  const Double_t kt=0.160;
+  const Double_t kxmpi=0.139;
+  const Double_t kb=1.;
   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),kxn);
+  xmpi2=kxmpi*kxmpi;
+  ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+xmpi2)/kt));
   a=ynorm/y1;
-  if (x > xlim)
-    y=a*TMath::Power(p0/(p0+x),xn);
+  if (x > kxlim)
+    y=a*TMath::Power(kp0/(kp0+x),kxn);
   else
-    y=b*TMath::Exp(-sqrt(x*x+xmpi2)/t);
+    y=kb*TMath::Exp(-sqrt(x*x+xmpi2)/kt);
   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 ex = y*y/(2*dy*dy);
-  return a*TMath::Exp(-ex);
+  Double_t ex = y*y/(2*kdy*kdy);
+  return ka*TMath::Exp(-ex);
 }
 //                 particle composition
 //
 Int_t AliGenMUONlib::IpPion()
 {
+// Pion composition 
     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
-  const Double_t hm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0};
+  const Double_t khm[10] = {.13957,.493,.5488,.769,.7826,.958,1.02,0,0,0};
   //     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 kfmax[10]={1.,0.3,0.55,1.0,1.0,1.0,1.0,0,0,0};
   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]*khm[np])+2.0)),12.3);
+  Double_t fmax2=f5/kfmax[np];
   // 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]*khm[np])+2.0)),12.3)/ fmax2;
   return fmtscal*ptpion;
 }
 //
@@ -99,29 +104,32 @@ Double_t AliGenMUONlib::PtScal(Double_t pt, Int_t np)
 //
 //                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
 //____________________________________________________________
-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 ex = y*y/(2*dy*dy);
-  return a*TMath::Exp(-ex);
+  Double_t ex = y*y/(2*kdy*kdy);
+  return ka*TMath::Exp(-ex);
 }
 
 //                 particle composition
 //
 Int_t AliGenMUONlib::IpKaon()
 {
+// Kaon composition
     Float_t random[1];
     gMC->Rndm(random,1);
     if (random[0] < 0.5) {
@@ -136,35 +144,38 @@ Int_t AliGenMUONlib::IpKaon()
 //
 //                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 pass1 = 1.+(x/pt0)*(x/pt0);
-  return x/TMath::Power(pass1,xn);
+  Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
+  return x/TMath::Power(pass1,kxn);
 }
 //
 //               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);
   //
-  if (y < y0)
-    yj=b;
+  if (y < ky0)
+    yj=kb;
   else
-    yj=b*TMath::Exp(-(y-y0)*(y-y0)/2);
+    yj=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
   return yj;
 }
 //                 particle composition
 //
 Int_t AliGenMUONlib::IpJpsi()
 {
+// J/Psi composition
     return 443;
 }
 
@@ -173,36 +184,39 @@ Int_t AliGenMUONlib::IpJpsi()
 //
 //                  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 pass1 = 1.+(x/pt0)*(x/pt0);
-  return x/TMath::Power(pass1,xn);
+  Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
+  return x/TMath::Power(pass1,kxn);
 }
 //
 //                    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);
   //
-  if (y < y0)
-    yu=b;
+  if (y < ky0)
+    yu=kb;
   else
-    yu=b*TMath::Exp(-(y-y0)*(y-y0)/2);
+    yu=kb*TMath::Exp(-(y-ky0)*(y-ky0)/2);
   return yu;
 }
 //                 particle composition
 //
 Int_t AliGenMUONlib::IpUpsilon()
 {
+// y composition
     return 553;
 }
 
@@ -212,20 +226,23 @@ Int_t AliGenMUONlib::IpUpsilon()
 //
 //    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
-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()
 {
+// Phi composition
     return 41;
 }
 
@@ -235,24 +252,27 @@ Int_t AliGenMUONlib::IpPhi()
 //
 //                    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 pass1 = 1.+(x/pt0)*(x/pt0);
-  return x/TMath::Power(pass1,xn);
+  Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
+  return x/TMath::Power(pass1,kxn);
 }
 //                  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()
 {  
+// Charm composition
     Float_t random[2];
     Int_t ip;
 //    411,421,431,4122
@@ -278,24 +298,27 @@ Int_t AliGenMUONlib::IpCharm()
 //
 //                    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 pass1 = 1.+(x/pt0)*(x/pt0);
-  return x/TMath::Power(pass1,xn);
+  Double_t pass1 = 1.+(x/kpt0)*(x/kpt0);
+  return x/TMath::Power(pass1,kxn);
 }
 //                     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()
 {  
+// Beauty Composition
     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)
 {
+// Return pointer to pT parameterisation
     GenFunc func;
     switch (param) 
     {
@@ -349,6 +373,7 @@ GenFunc AliGenMUONlib::GetPt(Param_t param)
 
 GenFunc AliGenMUONlib::GetY(Param_t param)
 {
+// Return pointer to y- parameterisation
     GenFunc func;
     switch (param) 
     {
@@ -382,6 +407,7 @@ GenFunc AliGenMUONlib::GetY(Param_t param)
 typedef Int_t (*GenFuncIp) ();
 GenFuncIp AliGenMUONlib::GetIp(Param_t param)
 {
+// Return pointer to particle type parameterisation
     GenFuncIp func;
     switch (param) 
     {
index dd40e969be228f864a9abdb5d512d9a534798792..23d3acea0fb6606f0eca195ab351c7c76c7b70e3 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _AliGenMUONlib_H
-#define _AliGenMUONlib_H
+#ifndef ALIGENMUONLIB_H
+#define ALIGENMUONLIB_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
@@ -13,35 +13,35 @@ public TObject
 {
  public:
 // pions
-    static Double_t PtPion(Double_t *px, Double_t *);
+    static Double_t PtPion(Double_t *px, Double_t *dummy);
     static Double_t PtScal(Double_t pt, Int_t np);
-    static Double_t YPion( Double_t *py, Double_t *);
+    static Double_t YPion( Double_t *py, Double_t *dummy);
     static Int_t    IpPion();
 // kaons
-    static Double_t PtKaon(Double_t *px, Double_t *);
-    static Double_t YKaon( Double_t *py, Double_t *);
+    static Double_t PtKaon(Double_t *px, Double_t *dummy);
+    static Double_t YKaon( Double_t *py, Double_t *dummy);
     static Int_t    IpKaon();
 // Phi
-    static Double_t PtPhi( Double_t *px, Double_t *);
-    static Double_t YPhi( Double_t *px, Double_t *);
+    static Double_t PtPhi( Double_t *px, Double_t *dummy);
+    static Double_t YPhi( Double_t *px, Double_t *dummy);
     static Int_t    IpPhi();
 // J/Psi     
-    static Double_t PtJpsi( Double_t *px, Double_t *);
-    static Double_t YJpsi(Double_t *py, Double_t *);
+    static Double_t PtJpsi( Double_t *px, Double_t *dummy);
+    static Double_t YJpsi(Double_t *py, Double_t *dummy);
     static Int_t    IpJpsi();
 // Upsilon    
-    static Double_t PtUpsilon( Double_t *px, Double_t * );
-    static Double_t YUpsilon(Double_t *py, Double_t *);
+    static Double_t PtUpsilon( Double_t *px, Double_t *dummy );
+    static Double_t YUpsilon(Double_t *py, Double_t *dummy);
     static Int_t    IpUpsilon();
 //
 // Charm    
-    static Double_t PtCharm( Double_t *px, Double_t * );
-    static Double_t YCharm(Double_t *py, Double_t *);
+    static Double_t PtCharm( Double_t *px, Double_t *dummy );
+    static Double_t YCharm(Double_t *py, Double_t *dummy);
     static Int_t    IpCharm();
 //
 // Beauty
-    static Double_t PtBeauty( Double_t *px, Double_t * );
-    static Double_t YBeauty(Double_t *py, Double_t *);
+    static Double_t PtBeauty( Double_t *px, Double_t *dummy );
+    static Double_t YBeauty(Double_t *py, Double_t *dummy);
     static Int_t    IpBeauty();
 //
     typedef Double_t (*GenFunc)  (Double_t *, Double_t *);