3 #ifndef ALIEMCALCONTAINER_H 4 #define ALIEMCALCONTAINER_H 15 #include <TClonesArray.h> 17 #if !(defined(__CINT__) || defined(__MAKECINT__)) 75 class AliEmcalContainer :
public TObject {
81 enum RejectionReason {
85 kAcceptanceCut = 1<<2,
92 kNotHybridTrack = 1<<7,
94 kMCGeneratorCut = 1<<9,
96 kMinDistanceTPCSectorEdgeCut = 1<<11,
109 kZLeadingChCut = 1<<20,
110 kZLeadingEmcCut = 1<<21,
112 kMinLeadPtCut = 1<<23,
113 kMaxTrackPtCut = 1<<24,
114 kMaxClusterPtCut = 1<<25,
117 kMinNConstituents = 1<<28,
118 kOverlapTpcHole = 1<<29
122 AliEmcalContainer(
const char *name);
123 virtual ~AliEmcalContainer(){;}
125 virtual TObject *operator[](
int index)
const = 0;
128 TClonesArray *GetArray()
const {
return fClArray ; }
129 const TString& GetArrayName()
const {
return fClArrayName ; }
130 const TString& GetClassName()
const {
return fClassName ; }
131 TClass *GetClass()
const {
return fClArray == 0 ? 0 : fClArray->GetClass(); }
132 Double_t GetMinE()
const {
return fMinE ; }
133 Double_t GetMaxE()
const {
return fMaxE ; }
134 Double_t GetMinPt()
const {
return fMinPt ; }
135 Double_t GetMaxPt()
const {
return fMaxPt ; }
136 Double_t GetMinEta()
const {
return fMinEta ; }
137 Double_t GetMaxEta()
const {
return fMaxEta ; }
138 Double_t GetMinPhi()
const {
return fMinPhi ; }
139 Double_t GetMaxPhi()
const {
return fMaxPhi ; }
140 Double_t GetEtaSwing()
const {
return fMaxEta - fMinEta; }
141 Double_t GetPhiSwing()
const {
return fMaxPhi - fMinPhi; }
142 Double_t GetAcceptance()
const {
return GetEtaSwing() * GetPhiSwing(); }
143 Int_t GetCurrentID()
const {
return fCurrentID ; }
144 Bool_t GetIsParticleLevel()
const {
return fIsParticleLevel ; }
146 Int_t GetNEntries()
const {
return fClArray ? fClArray->GetEntriesFast() : 0 ; }
147 virtual Bool_t GetMomentum(TLorentzVector &mom,
Int_t i)
const = 0;
148 virtual Bool_t GetAcceptMomentum(TLorentzVector &mom,
Int_t i)
const = 0;
149 virtual Bool_t GetNextMomentum(TLorentzVector &mom) = 0;
150 virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom) = 0;
153 Int_t GetNAcceptEntries()
const;
154 void ResetCurrentID(
Int_t i=-1) { fCurrentID = i ; }
155 virtual void SetArray(
const AliVEvent *event);
156 void SetArrayName(
const char *n) { fClArrayName = n ; }
157 void SetVertex(
Double_t *vtx) { memcpy(fVertex, vtx,
sizeof(
Double_t) * 3); }
158 void SetBitMap(
UInt_t m) { fBitMap = m ; }
159 void SetIsParticleLevel(
Bool_t b) { fIsParticleLevel = b ; }
160 void SortArray() { fClArray->Sort() ; }
162 TClass* GetLoadedClass() {
return fLoadedClass ; }
163 virtual void NextEvent(
const AliVEvent *event);
164 void SetMinMCLabel(
Int_t s) { fMinMCLabel = s ; }
165 void SetMaxMCLabel(
Int_t s) { fMaxMCLabel = s ; }
166 void SetMCLabelRange(
Int_t min,
Int_t max) { SetMinMCLabel(min) ; SetMaxMCLabel(max) ; }
168 void SetMinE(
Double_t min) { fMinE = min ; }
169 void SetMaxE(
Double_t max) { fMaxE = max ; }
170 void SetPtLimits(
Double_t min,
Double_t max) { fMinPt = min ; fMaxPt = max ; }
171 void SetMinPt(
Double_t min) { fMinPt = min ; }
172 void SetMaxPt(
Double_t max) { fMaxPt = max ; }
173 void SetEtaLimits(
Double_t min,
Double_t max) { fMaxEta = max ; fMinEta = min ; }
174 void SetPhiLimits(
Double_t min,
Double_t max) { fMaxPhi = max ; fMinPhi = min ; }
175 void SetMassHypothesis(
Double_t m) { fMassHypothesis = m ; }
176 void SetClassName(
const char *clname);
177 void SetIsEmbedding(
Bool_t b) { fIsEmbedding = b ; }
178 Bool_t GetIsEmbedding()
const {
return fIsEmbedding; }
180 const char* GetName()
const {
return fName.Data() ; }
181 void SetName(
const char* n) { fName = n ; }
184 static Bool_t SamePart(
const AliVParticle* part1,
const AliVParticle* part2,
Double_t dist = 1.e-4);
185 static UShort_t GetRejectionReasonBitPosition(
UInt_t rejectionReason);
187 #if !(defined(__CINT__) || defined(__MAKECINT__)) 191 const AliEmcalIterableMomentumContainer all_momentum()
const;
192 const AliEmcalIterableMomentumContainer accepted_momentum()
const;
204 virtual TString GetDefaultArrayName(
const AliVEvent *
const ev)
const {
return ""; }
205 void GetVertexFromEvent(
const AliVEvent * event);
224 TClonesArray *fClArray;
228 TClass *fLoadedClass;
233 AliEmcalContainer(
const AliEmcalContainer& obj);
234 AliEmcalContainer& operator=(
const AliEmcalContainer& other);
237 ClassDef(AliEmcalContainer,9);
Container implementing iterable functionality of the EMCAL containers.