add protection against negative index for array
authorgconesab <gustavo.conesa.balbastre@cern.ch>
Mon, 18 Aug 2014 09:55:28 +0000 (11:55 +0200)
committergconesab <gustavo.conesa.balbastre@cern.ch>
Mon, 18 Aug 2014 09:56:52 +0000 (11:56 +0200)
PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.cxx

index d43d17a..73200b1 100755 (executable)
@@ -607,7 +607,7 @@ void AliAnaParticleHadronCorrelation::FillChargedMomentumImbalanceHistograms(Flo
   }
   
   //fill different multiplicity/centrality histogram
-  if(fFillHighMultHistograms)
+  if(fFillHighMultHistograms && cen >= 0 && cen < GetNCentrBin())
   {
     fhXEMult[cen]->Fill(ptTrig,xE);
     fhZTMult[cen]->Fill(ptTrig,zT);