Coverity fixes
authorprsnko <Dmitri.Peressounko@cern.ch>
Wed, 25 Jun 2014 16:16:10 +0000 (20:16 +0400)
committerprsnko <Dmitri.Peressounko@cern.ch>
Wed, 25 Jun 2014 16:16:10 +0000 (20:16 +0400)
PHOS/AliPHOSGeoUtils.cxx
PWGGA/PHOSTasks/PHOS_Correlation/AliPHOSCorrelations.cxx
PWGGA/PHOSTasks/PHOS_PbPb_MC/AliPHOSHijingEfficiency.cxx
PWGGA/PHOSTasks/PHOS_embedding/AliAnalysisTaskPi0DiffEfficiency.cxx

index c83f48d..5ba2701 100644 (file)
@@ -82,6 +82,13 @@ AliPHOSGeoUtils::AliPHOSGeoUtils(const AliPHOSGeoUtils & rhs)
   fPadSizePhi(0.),fPadSizeZ(0.),fCPVBoxSizeY(0.),fMisalArray(0x0)
 {
   Fatal("cpy ctor", "not implemented") ; 
+  for(Int_t mod=0; mod<5; mod++){
+    fEMCMatrix[mod]=0 ;
+    for(Int_t istrip=0; istrip<224; istrip++)
+      fStripMatrix[mod][istrip]=0 ;
+    fCPVMatrix[mod]=0;
+    fPHOSMatrix[mod]=0 ;
+  }
 }
 
 //____________________________________________________________________________
index 3d3ecf4..d418fa3 100644 (file)
@@ -2143,7 +2143,7 @@ Double_t AliPHOSCorrelations::GetEfficiency(Double_t x) const {
        {
                pFitPoint = &par8[0];
                Double_t pFit[9];
-               for( int i = 0; i < 10; i++ )
+               for( int i = 0; i < 9; i++ )
                {
                        pFit[i] = *(pFitPoint+i);
                }
index c3d4163..65178fe 100644 (file)
@@ -693,13 +693,14 @@ void AliPHOSHijingEfficiency::UserExec(Option_t *)
     ph->SetDisp2Bit(TestLambda2(clu->E(),m20,m02)) ;
 
     Double_t distBC=clu->GetDistanceToBadChannel();
-    if(distBC>2.)
+    if(distBC>2.){
       FillHistogram(Form("hPhotAll_DistBad2_cen%d",fCenBin),ph->Pt()) ;
-      if(distBC>4.)
+      if(distBC>4.){
         FillHistogram(Form("hPhotAll_DistBad4_cen%d",fCenBin),ph->Pt()) ;
         if(distBC>6.)
           FillHistogram(Form("hPhotAll_DistBad6_cen%d",fCenBin),ph->Pt()) ;
-    
+      }
+    }
     if(ph->IsDispOK()){
       FillHistogram(Form("hCluDispM%d",mod),cellX,cellZ,1.);
     }
@@ -991,7 +992,7 @@ void AliPHOSHijingEfficiency::UserExec(Option_t *)
         }
         if(ph2->IsDispOK()){
           FillHistogram(Form("hMiSingleDisp_cen%d",fCenBin),m,pt2,w) ;
-          if(ph1->IsntUnfolded()){
+          if(ph2->IsntUnfolded()){
             FillHistogram(Form("hMiSingleDispwou_cen%d",fCenBin),m,pt2,w) ;
          }
           FillHistogram(Form("hMiSingleDispcore_cen%d",fCenBin),mv,ptv2,w) ;
index 687189c..08b3b93 100644 (file)
@@ -1884,6 +1884,7 @@ Double_t AliAnalysisTaskPi0DiffEfficiency::TestCPV(Double_t dx, Double_t dz, Dou
               6.58365e-01*5.91917e-01*5.91917e-01/((pt-9.61306e-01)*(pt-9.61306e-01)+5.91917e-01*5.91917e-01)+1.59219);
   Double_t sz=TMath::Min(2.75,4.90341e+02*1.91456e-02*1.91456e-02/(pt*pt+1.91456e-02*1.91456e-02)+1.60) ;
   AliAODEvent *event = dynamic_cast<AliAODEvent*>(InputEvent());
+  if(!event)AliFatal("Can not get ESD event") ;
   Double_t mf = event->GetMagneticField(); //Positive for ++ and negative for --
 
   if(mf<0.){ //field --