Make getters constant
[u/mrichter/AliRoot.git] / PWG / EMCAL / AliEmcalContainer.h
CommitLineData
e58333e0 1#ifndef AliEmcalContainer_H
2#define AliEmcalContainer_H
3
4//
5// container with name, TClonesArray
6//
7
6421eeb0 8class TLorentzVector;
e58333e0 9class AliVEvent;
ef46ebe5 10class AliNamedArrayI;
e58333e0 11
6421eeb0 12#include <TNamed.h>
13#include <TClonesArray.h>
e58333e0 14
15class AliEmcalContainer : public TNamed {
16 public:
6504c17f 17 enum RejectionReason {
18 // General
19 kNullObject = 1<<0,
20 kPtCut = 1<<1,
21 kAcceptanceCut = 1<<2,
22 kBitMapCut = 1<<3,
23 // leave bits 4-7 free for future implementations
24
25 // AliParticleContainer
26 kMCFlag = 1<<8,
27 kMCGeneratorCut = 1<<9,
28 kChargeCut = 1<<10,
29 // leave bits 11-12 free for future implementations
30
31 // AliClusterContainer
32 kIsEMCalCut = 1<<13,
33 kTimeCut = 1<<14,
34 kEnergyCut = 1<<15,
35 // leave bits 16-17 free for future implementations
36
37 // AliJetContainer
38 kAreaCut = 1<<18,
39 kAreaEmcCut = 1<<19,
40 kZLeadingChCut = 1<<20,
41 kZLeadingEmcCut = 1<<21,
42 kNEFCut = 1<<22,
43 kMinLeadPtCut = 1<<23,
44 kMaxTrackPtCut = 1<<24,
45 kMaxClusterPtCut = 1<<25,
46 kFlavourCut = 1<<26,
47 kTagStatus = 1<<27
48 };
49
e58333e0 50 AliEmcalContainer();
51 AliEmcalContainer(const char *name);
6421eeb0 52 virtual ~AliEmcalContainer(){;}
e58333e0 53
3617787b 54 TClonesArray *GetArray() const { return fClArray ; }
68e03fc3 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() ; }
6421eeb0 60 virtual void GetMomentum(TLorentzVector &mom, Int_t i) const = 0;
68e03fc3 61 void ResetCurrentID(Int_t i=0) { fCurrentID = i ; }
b6f970ad 62 virtual void SetArray(AliVEvent *event);
68e03fc3 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() const { return fRejectionReason ; }
67 UInt_t TestRejectionReason(UInt_t rs) const { return fRejectionReason & rs ; }
68 UShort_t GetRejectionReasonBitPosition() const;
e58333e0 69
70 protected:
e58333e0 71 TString fClArrayName; // name of branch
b6f970ad 72 TString fClassName; // name of the class in the TClonesArray
ef46ebe5 73 Bool_t fIsParticleLevel; // whether or not it is a particle level object collection
ef46ebe5 74 TClonesArray *fClArray; //!TClonesArray
b6f970ad 75 Int_t fCurrentID; //!current ID for automatic loops
ef46ebe5 76 AliNamedArrayI *fLabelMap; //!Label-Index map
77 Double_t fVertex[3]; //!event vertex array
6504c17f 78 UInt_t fRejectionReason; //!reject reason bit map for the last call to an accept object function
e58333e0 79
80 private:
81 AliEmcalContainer(const AliEmcalContainer& obj); // copy constructor
82 AliEmcalContainer& operator=(const AliEmcalContainer& other); // assignment
83
ef46ebe5 84 ClassDef(AliEmcalContainer,3);
e58333e0 85};
e58333e0 86#endif