AliPhysics  v5-06-40-01 (42bb456)
 All Classes Namespaces Files Functions Variables 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  // leave bits 16-17 free for future implementations
38 
39  // AliJetContainer
40  kAreaCut = 1<<18,
41  kAreaEmcCut = 1<<19,
42  kZLeadingChCut = 1<<20,
43  kZLeadingEmcCut = 1<<21,
44  kNEFCut = 1<<22,
45  kMinLeadPtCut = 1<<23,
46  kMaxTrackPtCut = 1<<24,
48  kFlavourCut = 1<<26,
49  kTagStatus = 1<<27,
51  };
52 
54  AliEmcalContainer(const char *name);
55  virtual ~AliEmcalContainer(){;}
56 
57  TClonesArray *GetArray() const { return fClArray ; }
58  const TString& GetArrayName() const { return fClArrayName ; }
59  const TString& GetClassName() const { return fClassName ; }
60  Int_t GetCurrentID() const { return fCurrentID-1 ; }
61  Bool_t GetIsParticleLevel() const { return fIsParticleLevel ; }
62  Int_t GetIndexFromLabel(Int_t lab) const;
63  Int_t GetNEntries() const { return fClArray->GetEntriesFast() ; }
64  virtual void GetMomentum(TLorentzVector &mom, Int_t i) const = 0;
65  void ResetCurrentID(Int_t i=0) { fCurrentID = i ; }
66  virtual void SetArray(AliVEvent *event);
67  void SetArrayName(const char *n) { fClArrayName = n ; }
68  void SetIsParticleLevel(Bool_t b) { fIsParticleLevel = b ; }
69  void SortArray() { fClArray->Sort() ; }
70  UInt_t GetRejectionReason() const { return fRejectionReason ; }
71  UInt_t TestRejectionReason(UInt_t rs) const { return fRejectionReason & rs ; }
72  UShort_t GetRejectionReasonBitPosition() const;
73 
74  protected:
75  TString fClArrayName; // name of branch
76  TString fClassName; // name of the class in the TClonesArray
77  Bool_t fIsParticleLevel; // whether or not it is a particle level object collection
78  TClonesArray *fClArray;
79  Int_t fCurrentID;
80  AliNamedArrayI *fLabelMap;
81  Double_t fVertex[3];
83 
84  private:
85  AliEmcalContainer(const AliEmcalContainer& obj); // copy constructor
86  AliEmcalContainer& operator=(const AliEmcalContainer& other); // assignment
87 
89 };
90 #endif
ClassDef(AliEmcalContainer, 5)
virtual void GetMomentum(TLorentzVector &mom, Int_t i) const =0
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)
const TString & GetClassName() const
UInt_t fRejectionReason
event vertex array
Int_t GetCurrentID() const
TClonesArray * GetArray() const
AliNamedArrayI * fLabelMap
current ID for automatic loops
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
Bool_t GetIsParticleLevel() const
void ResetCurrentID(Int_t i=0)