]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG/EMCAL/AliEmcalContainer.cxx
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWG / EMCAL / AliEmcalContainer.cxx
index a065a2f14829530d0d06f1e0ea7924b914d4371b..6a9ce44150964cff8a6cccc46eba8f068e238bf6 100644 (file)
@@ -5,8 +5,6 @@
 
 
 #include <TClonesArray.h>
-
-#include "AliEmcalJet.h"
 #include "AliVEvent.h"
 #include "AliLog.h"
 #include "AliNamedArrayI.h"
@@ -23,7 +21,8 @@ AliEmcalContainer::AliEmcalContainer():
   fIsParticleLevel(kFALSE),
   fClArray(0),
   fCurrentID(0),
-  fLabelMap(0)
+  fLabelMap(0),
+  fRejectionReason(0)
 {
   // Default constructor.
 
@@ -40,7 +39,8 @@ AliEmcalContainer::AliEmcalContainer(const char *name):
   fIsParticleLevel(kFALSE),
   fClArray(0),
   fCurrentID(0),
-  fLabelMap(0)
+  fLabelMap(0),
+  fRejectionReason(0)
 {
   // Standard constructor.
 
@@ -97,3 +97,14 @@ Int_t AliEmcalContainer::GetIndexFromLabel(Int_t lab) const
     return lab; 
   }
 }
+
+//________________________________________________________________________
+UShort_t AliEmcalContainer::GetRejectionReasonBitPosition() const
+{ 
+  // Returns the highest bit in the rejection map.
+
+  UInt_t rs = fRejectionReason;
+  UShort_t p = 0;
+  while (rs >>= 1) { p++; }
+  return p;
+}