]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenParam.cxx
Coding rules
[u/mrichter/AliRoot.git] / EVGEN / AliGenParam.cxx
index 5b79c48a00c15f0914ba0ab2eadfdbd177fe5660..506347f5e663cc4ff4ca7a89faa14dd57545dd0d 100644 (file)
@@ -131,8 +131,8 @@ AliGenParam::AliGenParam(Int_t npart, Int_t param, const char* tname, const char
 //____________________________________________________________
 
 AliGenParam::AliGenParam(Int_t npart, Int_t param,
-                         Double_t (*PtPara) (Double_t*, Double_t*),
-                         Double_t (*YPara ) (Double_t* ,Double_t*),
+                         Double_t (*PtPara) (const Double_t*, const Double_t*),
+                         Double_t (*YPara ) (const Double_t* ,const Double_t*),
                         Int_t    (*IpPara) (TRandom *))                 
     :AliGenMC(npart),
      
@@ -321,7 +321,7 @@ void AliGenParam::Generate()
                    "Division by 0: Please check you rapidity range !");
          }
          
-         pl=xmt*ty/sqrt(1.-ty*ty);
+         pl=xmt*ty/sqrt((1.-ty)*(1.+ty));
          theta=TMath::ATan2(pt,pl);
 // Cut on theta
          if(theta<fThetaMin || theta>fThetaMax) continue;
@@ -413,7 +413,7 @@ void AliGenParam::Generate()
 //
 // children
                      
-                     if (ChildSelected(TMath::Abs(kf)) || fForceDecay == kAll && trackIt[i])
+                     if ((ChildSelected(TMath::Abs(kf)) || fForceDecay == kAll) && trackIt[i])
                      {
                          if (fCutOnChild) {
                              pc[0]=iparticle->Px();