initialize data member, fix coverity 18208; add protection agains negative index...
authorgconesab <gustavo.conesa.balbastre@cern.ch>
Mon, 18 Aug 2014 09:52:14 +0000 (11:52 +0200)
committergconesab <gustavo.conesa.balbastre@cern.ch>
Mon, 18 Aug 2014 09:56:52 +0000 (11:56 +0200)
PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.cxx

index e28ec48..d43d17a 100755 (executable)
@@ -68,7 +68,7 @@ ClassImp(AliAnaParticleHadronCorrelation)
     fListMixTrackEvents(),          fListMixCaloEvents(),
     fUseMixStoredInReader(0),       fFillNeutralEventMixPool(0),
     fM02MaxCut(0),                  fM02MinCut(0),  
-    fFillPileUpHistograms(0),
+    fFillPileUpHistograms(0),       fFillHighMultHistograms(0),
     fSelectLeadingHadronAngle(0),
     fMinLeadHadPhi(0),              fMaxLeadHadPhi(0),
     fMinLeadHadPt(0),               fMaxLeadHadPt(0),
@@ -670,7 +670,7 @@ void AliAnaParticleHadronCorrelation::FillChargedUnderlyingEventHistograms(Float
   }
   
   //fill different multiplicity/centrality histogram
-  if(fFillHighMultHistograms)
+  if(fFillHighMultHistograms && cen >= 0 && cen < GetNCentrBin())
   {
     fhXEUeMult[cen]->Fill(ptTrig,uexE);
     fhZTUeMult[cen]->Fill(ptTrig,uezT);