1 #ifndef AliEmcalContainer_H
2 #define AliEmcalContainer_H
5 // container with name, TClonesArray
13 #include <TClonesArray.h>
15 class AliEmcalContainer : public TNamed {
17 enum RejectionReason {
21 kAcceptanceCut = 1<<2,
23 // leave bits 4-7 free for future implementations
25 // AliParticleContainer
27 kMCGeneratorCut = 1<<9,
29 // leave bits 11-12 free for future implementations
31 // AliClusterContainer
35 // leave bits 16-17 free for future implementations
40 kZLeadingChCut = 1<<20,
41 kZLeadingEmcCut = 1<<21,
43 kMinLeadPtCut = 1<<23,
44 kMaxTrackPtCut = 1<<24,
45 kMaxClusterPtCut = 1<<25,
51 AliEmcalContainer(const char *name);
52 virtual ~AliEmcalContainer(){;}
54 TClonesArray *GetArray() { return fClArray ; }
55 const TString& GetArrayName() const { return fClArrayName ; }
56 Int_t GetCurrentID() const { return fCurrentID-1 ; }
57 Bool_t GetIsParticleLevel() const { return fIsParticleLevel ; }
58 Int_t GetIndexFromLabel(Int_t lab) const;
59 Int_t GetNEntries() const { return fClArray->GetEntriesFast() ; }
60 virtual void GetMomentum(TLorentzVector &mom, Int_t i) const = 0;
61 void ResetCurrentID(Int_t i=0) { fCurrentID = i ; }
62 virtual void SetArray(AliVEvent *event);
63 void SetArrayName(const char *n) { fClArrayName = n ; }
64 void SetIsParticleLevel(Bool_t b) { fIsParticleLevel = b ; }
65 void SortArray() { fClArray->Sort() ; }
66 UInt_t GetRejectionReason() { return fRejectionReason ; }
67 UInt_t TestRejectionReason(UInt_t rs) { return fRejectionReason & rs ; }
70 TString fClArrayName; // name of branch
71 TString fClassName; // name of the class in the TClonesArray
72 Bool_t fIsParticleLevel; // whether or not it is a particle level object collection
73 TClonesArray *fClArray; //!TClonesArray
74 Int_t fCurrentID; //!current ID for automatic loops
75 AliNamedArrayI *fLabelMap; //!Label-Index map
76 Double_t fVertex[3]; //!event vertex array
77 UInt_t fRejectionReason; //!reject reason bit map for the last call to an accept object function
80 AliEmcalContainer(const AliEmcalContainer& obj); // copy constructor
81 AliEmcalContainer& operator=(const AliEmcalContainer& other); // assignment
83 ClassDef(AliEmcalContainer,3);