AliPhysics  7dff9e1 (7dff9e1)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
AliEmcalContainer.h
Go to the documentation of this file.
1 #ifndef AliEmcalContainer_H
2 #define AliEmcalContainer_H
3 
4 //
5 // container with name, TClonesArray
6 //
7 
8 class TLorentzVector;
9 class AliVEvent;
10 class AliNamedArrayI;
11 
12 #include <TNamed.h>
13 #include <TClonesArray.h>
14 
15 class AliEmcalContainer : public TNamed {
16  public:
18  // General
19  kNullObject = 1<<0,
20  kPtCut = 1<<1,
22  kBitMapCut = 1<<3,
23  // leave bits 4-6 free for future implementations
24 
25  // AliParticleContainer
27  kMCFlag = 1<<8,
29  kChargeCut = 1<<10,
32 
33  // AliClusterContainer
34  kIsEMCalCut = 1<<13,
35  kTimeCut = 1<<14,
36  kEnergyCut = 1<<15,
37  kExoticCut = 1<<16,
38  // leave bit 17 free for future implementations
39 
40  // AliJetContainer
41  kAreaCut = 1<<18,
42  kAreaEmcCut = 1<<19,
43  kZLeadingChCut = 1<<20,
44  kZLeadingEmcCut = 1<<21,
45  kNEFCut = 1<<22,
46  kMinLeadPtCut = 1<<23,
47  kMaxTrackPtCut = 1<<24,
49  kFlavourCut = 1<<26,
50  kTagStatus = 1<<27,
52  };
53 
55  AliEmcalContainer(const char *name);
56  virtual ~AliEmcalContainer(){;}
57 
58  TClonesArray *GetArray() const { return fClArray ; }
59  const TString& GetArrayName() const { return fClArrayName ; }
60  const TString& GetClassName() const { return fClassName ; }
61  Int_t GetCurrentID() const { return fCurrentID ; }
62  Bool_t GetIsParticleLevel() const { return fIsParticleLevel ; }
63  Int_t GetIndexFromLabel(Int_t lab) const;
64  Int_t GetNEntries() const { return fClArray->GetEntriesFast() ; }
65  virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) = 0;
66  virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) = 0;
67  virtual Bool_t GetNextMomentum(TLorentzVector &mom, Int_t i=-1) = 0;
68  virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom, Int_t i=-1) = 0;
69  void ResetCurrentID(Int_t i=-1) { fCurrentID = i ; }
70  virtual void SetArray(AliVEvent *event);
71  void SetArrayName(const char *n) { fClArrayName = n ; }
72  void SetIsParticleLevel(Bool_t b) { fIsParticleLevel = b ; }
73  void SortArray() { fClArray->Sort() ; }
74  UInt_t GetRejectionReason() const { return fRejectionReason ; }
75  UInt_t TestRejectionReason(UInt_t rs) const { return fRejectionReason & rs ; }
76  UShort_t GetRejectionReasonBitPosition() const;
77  TClass* GetLoadedClass() { return fLoadedClass ; }
78  virtual void NextEvent() {;}
79 
80  protected:
81  TString fClArrayName; // name of branch
82  TString fClassName; // name of the class in the TClonesArray
83  Bool_t fIsParticleLevel; // whether or not it is a particle level object collection
84  TClonesArray *fClArray;
85  Int_t fCurrentID;
86  AliNamedArrayI *fLabelMap;
87  Double_t fVertex[3];
89  TClass *fLoadedClass;
90 
91  private:
92  AliEmcalContainer(const AliEmcalContainer& obj); // copy constructor
93  AliEmcalContainer& operator=(const AliEmcalContainer& other); // assignment
94 
96 };
97 #endif
ClassDef(AliEmcalContainer, 5)
Int_t GetIndexFromLabel(Int_t lab) const
UInt_t TestRejectionReason(UInt_t rs) const
virtual ~AliEmcalContainer()
UShort_t GetRejectionReasonBitPosition() const
virtual void SetArray(AliVEvent *event)
void SetArrayName(const char *n)
TClass * fLoadedClass
reject reason bit map for the last call to an accept object function
TClass * GetLoadedClass()
const TString & GetClassName() const
UInt_t fRejectionReason
event vertex array
Int_t GetCurrentID() const
virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i)=0
virtual Bool_t GetNextMomentum(TLorentzVector &mom, Int_t i=-1)=0
TClonesArray * GetArray() const
AliNamedArrayI * fLabelMap
current ID for automatic loops
virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom, Int_t i=-1)=0
const TString & GetArrayName() const
Double_t fVertex[3]
Label-Index map.
AliEmcalContainer & operator=(const AliEmcalContainer &other)
void SetIsParticleLevel(Bool_t b)
TClonesArray * fClArray
Int_t GetNEntries() const
Int_t fCurrentID
TClonesArray.
UInt_t GetRejectionReason() const
virtual void NextEvent()
void ResetCurrentID(Int_t i=-1)
Bool_t GetIsParticleLevel() const
virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i)=0