AliPhysics  879ce3b (879ce3b)
 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 AliTLorentzVector;
10 class AliVEvent;
11 class AliNamedArrayI;
12 class AliVParticle;
13 
14 #include <TNamed.h>
15 #include <TClonesArray.h>
16 
17 class AliEmcalContainer : public TObject {
18  public:
20  // General
21  kNullObject = 1<<0,
22  kPtCut = 1<<1,
24  kMCLabelCut = 1<<3,
25  kBitMapCut = 1<<4,
26  kHFCut = 1<<5,
27  // leave bit 6 free for future implementations
28 
29  // AliParticleContainer
31  kMCFlag = 1<<8,
33  kChargeCut = 1<<10,
35  // leave bit 12 free for future implementations
36 
37  // AliClusterContainer
38  kIsEMCalCut = 1<<13,
39  kTimeCut = 1<<14,
40  kEnergyCut = 1<<15,
41  kExoticCut = 1<<16,
42  // leave bit 17 free for future implementations
43 
44  // AliJetContainer
45  kAreaCut = 1<<18,
46  kAreaEmcCut = 1<<19,
47  kZLeadingChCut = 1<<20,
48  kZLeadingEmcCut = 1<<21,
49  kNEFCut = 1<<22,
50  kMinLeadPtCut = 1<<23,
51  kMaxTrackPtCut = 1<<24,
53  kFlavourCut = 1<<26,
54  kTagStatus = 1<<27,
56  };
57 
59  AliEmcalContainer(const char *name);
60  virtual ~AliEmcalContainer(){;}
61 
62  virtual Bool_t ApplyKinematicCuts(const AliTLorentzVector& mom);
63  TClonesArray *GetArray() const { return fClArray ; }
64  const TString& GetArrayName() const { return fClArrayName ; }
65  const TString& GetClassName() const { return fClassName ; }
66  Double_t GetMinE() const { return fMinE ; }
67  Double_t GetMaxE() const { return fMaxE ; }
68  Double_t GetMinPt() const { return fMinPt ; }
69  Double_t GetMaxPt() const { return fMaxPt ; }
70  Double_t GetMinEta() const { return fMinEta ; }
71  Double_t GetMaxEta() const { return fMaxEta ; }
72  Double_t GetMinPhi() const { return fMinPhi ; }
73  Double_t GetMaxPhi() const { return fMaxPhi ; }
74  Int_t GetCurrentID() const { return fCurrentID ; }
75  Bool_t GetIsParticleLevel() const { return fIsParticleLevel ; }
76  Int_t GetIndexFromLabel(Int_t lab) const;
77  Int_t GetNEntries() const { return fClArray->GetEntriesFast() ; }
78  virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) = 0;
79  virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) = 0;
80  virtual Bool_t GetNextMomentum(TLorentzVector &mom, Int_t i=-1) = 0;
81  virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom, Int_t i=-1) = 0;
82  virtual Bool_t AcceptObject(Int_t i) = 0;
83  virtual Bool_t AcceptObject(const TObject* obj) = 0;
84  void ResetCurrentID(Int_t i=-1) { fCurrentID = i ; }
85  virtual void SetArray(AliVEvent *event);
86  void SetArrayName(const char *n) { fClArrayName = n ; }
87  void SetBitMap(UInt_t m) { fBitMap = m ; }
88  void SetIsParticleLevel(Bool_t b) { fIsParticleLevel = b ; }
89  void SortArray() { fClArray->Sort() ; }
90  UInt_t GetRejectionReason() const { return fRejectionReason ; }
91  UInt_t TestRejectionReason(UInt_t rs) const { return fRejectionReason & rs ; }
92  UShort_t GetRejectionReasonBitPosition() const;
93  TClass* GetLoadedClass() { return fLoadedClass ; }
94  virtual void NextEvent() {;}
95  void SetMinMCLabel(Int_t s) { fMinMCLabel = s ; }
96  void SetMaxMCLabel(Int_t s) { fMaxMCLabel = s ; }
97  void SetMCLabelRange(Int_t min, Int_t max) { SetMinMCLabel(min) ; SetMaxMCLabel(max) ; }
98  void SetELimits(Double_t min, Double_t max) { fMinE = min ; fMaxE = max ; }
99  void SetMinE(Double_t min) { fMinE = min ; }
100  void SetMaxE(Double_t max) { fMaxE = max ; }
101  void SetPtLimits(Double_t min, Double_t max) { fMinPt = min ; fMaxPt = max ; }
102  void SetMinPt(Double_t min) { fMinPt = min ; }
103  void SetMaxPt(Double_t max) { fMaxPt = max ; }
104  void SetEtaLimits(Double_t min, Double_t max) { fMaxEta = max ; fMinEta = min ; }
105  void SetPhiLimits(Double_t min, Double_t max) { fMaxPhi = max ; fMinPhi = min ; }
106  void SetMassHypothesis(Double_t m) { fMassHypothesis = m ; }
107 
108  const char* GetName() const { return fName.Data() ; }
109  void SetName(const char* n) { fName = n ; }
110 
111  static Bool_t SamePart(const AliVParticle* part1, const AliVParticle* part2, Double_t dist = 1.e-4);
112 
113  protected:
114  TString fName; // object name
115  TString fClArrayName; // name of branch
116  TString fClassName; // name of the class in the TClonesArray
117  Bool_t fIsParticleLevel; // whether or not it is a particle level object collection
118  UInt_t fBitMap; // bitmap mask
119  Double_t fMinPt; // cut on particle pt
120  Double_t fMaxPt; // cut on particle pt
121  Double_t fMaxE; // cut on particle energy
122  Double_t fMinE; // cut on particle energy
123  Double_t fMinEta; // cut on particle eta
124  Double_t fMaxEta; // cut on particle eta
125  Double_t fMinPhi; // cut on particle phi
126  Double_t fMaxPhi; // cut on particle phi
127  Int_t fMinMCLabel; // minimum MC label
128  Int_t fMaxMCLabel; // maximum MC label
129  Double_t fMassHypothesis; // if < 0 it will use a PID mass when available
130  TClonesArray *fClArray;
131  Int_t fCurrentID;
132  AliNamedArrayI *fLabelMap;
133  Double_t fVertex[3];
135  TClass *fLoadedClass;
136 
137  private:
138  AliEmcalContainer(const AliEmcalContainer& obj); // copy constructor
139  AliEmcalContainer& operator=(const AliEmcalContainer& other); // assignment
140 
142 };
143 #endif
void SetMassHypothesis(Double_t m)
Double_t GetMinPhi() const
void SetName(const char *n)
Int_t GetIndexFromLabel(Int_t lab) const
void SetMinE(Double_t min)
Double_t GetMaxEta() const
void SetMaxE(Double_t max)
UInt_t TestRejectionReason(UInt_t rs) const
virtual Bool_t AcceptObject(Int_t i)=0
virtual ~AliEmcalContainer()
void SetMinPt(Double_t min)
UShort_t GetRejectionReasonBitPosition() const
virtual void SetArray(AliVEvent *event)
virtual Bool_t ApplyKinematicCuts(const AliTLorentzVector &mom)
void SetArrayName(const char *n)
void SetEtaLimits(Double_t min, Double_t max)
TClass * fLoadedClass
reject reason bit map for the last call to an accept object function
TClass * GetLoadedClass()
void SetMCLabelRange(Int_t min, Int_t max)
const TString & GetClassName() const
UInt_t fRejectionReason
event vertex array
Double_t GetMaxPhi() const
void SetBitMap(UInt_t m)
Double_t GetMinEta() const
Double_t GetMinE() const
Double_t GetMinPt() const
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
void SetMaxPt(Double_t max)
void SetMinMCLabel(Int_t s)
TClonesArray * GetArray() const
ClassDef(AliEmcalContainer, 7)
AliNamedArrayI * fLabelMap
current ID for automatic loops
void SetPtLimits(Double_t min, Double_t max)
virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom, Int_t i=-1)=0
const TString & GetArrayName() const
Double_t fVertex[3]
Label-Index map.
const char * GetName() const
AliEmcalContainer & operator=(const AliEmcalContainer &other)
void SetMaxMCLabel(Int_t s)
static Bool_t SamePart(const AliVParticle *part1, const AliVParticle *part2, Double_t dist=1.e-4)
void SetIsParticleLevel(Bool_t b)
void SetELimits(Double_t min, Double_t max)
TClonesArray * fClArray
Int_t GetNEntries() const
void SetPhiLimits(Double_t min, Double_t max)
Int_t fCurrentID
TClonesArray.
UInt_t GetRejectionReason() const
Double_t GetMaxE() const
Double_t GetMaxPt() const
virtual void NextEvent()
void ResetCurrentID(Int_t i=-1)
Bool_t GetIsParticleLevel() const
virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i)=0