Simplify complicated if that fails on HP-UX CC
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Aug 1999 14:13:01 +0000 (14:13 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Aug 1999 14:13:01 +0000 (14:13 +0000)
EVGEN/AliGenParam.cxx
STEER/AliMagF.cxx

index 1256684..54ee2ed 100644 (file)
@@ -240,10 +240,12 @@ void AliGenParam::Generate()
                    Float_t PChild=TMath::Sqrt(PtChild*PtChild+pc[2]*pc[2]);
                    Float_t ThetaChild=TMath::ATan2(PtChild,pc[2]);
                    Float_t PhiChild=TMath::ATan2(pc[1],pc[0])+TMath::Pi();
-                   if ((PtChild   > fPtMin   && PtChild   <fPtMax)      &&
+                   Bool_t childok = 
+                     ((PtChild   > fPtMin   && PtChild   <fPtMax)      &&
                        (PChild    > fPMin    && PChild    <fPMax)       &&
                        (ThetaChild>fThetaMin && ThetaChild<fThetaMax)   &&
-                       (PhiChild  >  fPhiMin && PhiChild  <fPhiMax))
+                       (PhiChild  >  fPhiMin && PhiChild  <fPhiMax));
+                   if(childok)
                      {
                        pch[ncsel][0]=pc[0];
                        pch[ncsel][1]=pc[1];
index 3cd91fe..c6e3850 100644 (file)
@@ -158,9 +158,10 @@ void AliMagFCM::Field(Float_t *x, Float_t *b)
   if(-700<x[2] && x[2]<fZbeg && x[0]*x[0]+(x[1]+30)*(x[1]+30) < 560*560) {
     b[2]=2;
   } else  {
-    if(fZbeg<=x[2] && x[2]<fZbeg+fZdel*(fZn-1)
+    Bool_t infield=(fZbeg<=x[2] && x[2]<fZbeg+fZdel*(fZn-1)
        &&  ( fXbeg <= TMath::Abs(x[0]) && TMath::Abs(x[0]) < fXbeg+fXdel*(fXn-1) )
-       &&  ( fYbeg <= TMath::Abs(x[1]) && TMath::Abs(x[1]) < fYbeg+fYdel*(fYn-1) )) {
+       &&  ( fYbeg <= TMath::Abs(x[1]) && TMath::Abs(x[1]) < fYbeg+fYdel*(fYn-1) ));
+      if(infield) {
       xl[0]=TMath::Abs(x[0])-fXbeg;
       xl[1]=TMath::Abs(x[1])-fYbeg;
       xl[2]=x[2]-fZbeg;