AliPhysics  a0db429 (a0db429)
 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-1 ; }
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 void GetMomentum(TLorentzVector &mom, Int_t i) const = 0;
66  void ResetCurrentID(Int_t i=0) { fCurrentID = i ; }
67  virtual void SetArray(AliVEvent *event);
68  void SetArrayName(const char *n) { fClArrayName = n ; }
69  void SetIsParticleLevel(Bool_t b) { fIsParticleLevel = b ; }
70  void SortArray() { fClArray->Sort() ; }
71  UInt_t GetRejectionReason() const { return fRejectionReason ; }
72  UInt_t TestRejectionReason(UInt_t rs) const { return fRejectionReason & rs ; }
73  UShort_t GetRejectionReasonBitPosition() const;
74 
75  protected:
76  TString fClArrayName; // name of branch
77  TString fClassName; // name of the class in the TClonesArray
78  Bool_t fIsParticleLevel; // whether or not it is a particle level object collection
79  TClonesArray *fClArray;
80  Int_t fCurrentID;
81  AliNamedArrayI *fLabelMap;
82  Double_t fVertex[3];
84 
85  private:
86  AliEmcalContainer(const AliEmcalContainer& obj); // copy constructor
87  AliEmcalContainer& operator=(const AliEmcalContainer& other); // assignment
88 
90 };
91 #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)