]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG/CaloTrackCorrBase/AliCaloTrackReader.cxx
move pile up check to separte method
[u/mrichter/AliRoot.git] / PWG / CaloTrackCorrBase / AliCaloTrackReader.cxx
index f8befc36293db89e2a2786ef550db6aa85e09737..02b0b9257b1b9032485f7dc5e58b8c9fe41dd482 100755 (executable)
@@ -438,6 +438,16 @@ void AliCaloTrackReader::InitParameters()
   
 }
 
+
+//________________________________________________
+Bool_t AliCaloTrackReader::IsPileUpFromSPD() const
+{
+  // Check if event is from pile-up determined by SPD
+  // Default values: (3, 0.8, 3., 2., 5.)
+  return fInputEvent->IsPileupFromSPD((Int_t) fPileUpParam[0] , fPileUpParam[1] , 
+                                              fPileUpParam[2] , fPileUpParam[3] , fPileUpParam[4] ); 
+}
+
 //________________________________________________________
 void AliCaloTrackReader::Print(const Option_t * opt) const
 {
@@ -605,9 +615,7 @@ Bool_t AliCaloTrackReader::FillInputEvent(const Int_t iEntry,
     if(!fCaloFilterPatch)
     {
       // Do not analyze events with pileup
-      // Default values: (3, 0.8, 3., 2., 5.)
-      Bool_t bPileup = fInputEvent->IsPileupFromSPD((Int_t) fPileUpParam[0] , fPileUpParam[1] , 
-                                                    fPileUpParam[2] ,fPileUpParam[3] , fPileUpParam[4] ); 
+      Bool_t bPileup = IsPileUpFromSPD();
       //IsPileupFromSPDInMultBins() // method to try
       //printf("pile-up %d, %d, %2.2f, %2.2f, %2.2f, %2.2f\n",bPileup, (Int_t) fPileUpParam[0], fPileUpParam[1], fPileUpParam[2], fPileUpParam[3], fPileUpParam[4]);
       if(bPileup) return kFALSE;