AliPhysics  05bc5cb (05bc5cb)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEmcalContainer.h
Go to the documentation of this file.
1 #ifndef AliEmcalContainer_H
2 #define AliEmcalContainer_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 class TLorentzVector;
7 class AliTLorentzVector;
8 class AliVEvent;
9 class AliNamedArrayI;
10 class AliVParticle;
11 
12 #include <TNamed.h>
13 #include <TClonesArray.h>
15 
67 class AliEmcalContainer : public TObject {
68  public:
74  // General
75  kNullObject = 1<<0,
76  kPtCut = 1<<1,
77  kAcceptanceCut = 1<<2,
78  kMCLabelCut = 1<<3,
79  kBitMapCut = 1<<4,
80  kHFCut = 1<<5,
81  // leave bit 6 free for future implementations
82 
83  // AliParticleContainer
84  kNotHybridTrack = 1<<7,
85  kMCFlag = 1<<8,
86  kMCGeneratorCut = 1<<9,
87  kChargeCut = 1<<10,
89  // leave bit 12 free for future implementations
90 
91  // AliClusterContainer
92  kIsEMCalCut = 1<<13,
93  kTimeCut = 1<<14,
94  kEnergyCut = 1<<15,
95  kExoticCut = 1<<16,
96  // leave bit 17 free for future implementations
97 
98  // AliJetContainer
99  kAreaCut = 1<<18,
100  kAreaEmcCut = 1<<19,
101  kZLeadingChCut = 1<<20,
102  kZLeadingEmcCut = 1<<21,
103  kNEFCut = 1<<22,
104  kMinLeadPtCut = 1<<23,
105  kMaxTrackPtCut = 1<<24,
107  kFlavourCut = 1<<26,
108  kTagStatus = 1<<27,
111  };
112 
114  AliEmcalContainer(const char *name);
115  virtual ~AliEmcalContainer(){;}
116 
117  TObject *operator[](int index) const;
118 
119  virtual Bool_t ApplyKinematicCuts(const AliTLorentzVector& mom, UInt_t &rejectionReason) const;
120  TClonesArray *GetArray() const { return fClArray ; }
121  const TString& GetArrayName() const { return fClArrayName ; }
122  const TString& GetClassName() const { return fClassName ; }
123  Double_t GetMinE() const { return fMinE ; }
124  Double_t GetMaxE() const { return fMaxE ; }
125  Double_t GetMinPt() const { return fMinPt ; }
126  Double_t GetMaxPt() const { return fMaxPt ; }
127  Double_t GetMinEta() const { return fMinEta ; }
128  Double_t GetMaxEta() const { return fMaxEta ; }
129  Double_t GetMinPhi() const { return fMinPhi ; }
130  Double_t GetMaxPhi() const { return fMaxPhi ; }
131  Int_t GetCurrentID() const { return fCurrentID ; }
132  Bool_t GetIsParticleLevel() const { return fIsParticleLevel ; }
133  Int_t GetIndexFromLabel(Int_t lab) const;
134  Int_t GetNEntries() const { return fClArray->GetEntriesFast() ; }
135  virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const = 0;
136  virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const = 0;
137  virtual Bool_t GetNextMomentum(TLorentzVector &mom) = 0;
138  virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom) = 0;
139  virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const = 0;
140  virtual Bool_t AcceptObject(const TObject* obj, UInt_t &rejectionReason) const = 0;
141  Int_t GetNAcceptEntries() const;
142  void ResetCurrentID(Int_t i=-1) { fCurrentID = i ; }
143  virtual void SetArray(AliVEvent *event);
144  void SetArrayName(const char *n) { fClArrayName = n ; }
145  void SetBitMap(UInt_t m) { fBitMap = m ; }
146  void SetIsParticleLevel(Bool_t b) { fIsParticleLevel = b ; }
147  void SortArray() { fClArray->Sort() ; }
148  UShort_t GetRejectionReasonBitPosition(UInt_t rejectionReason) const;
149  TClass* GetLoadedClass() { return fLoadedClass ; }
150  virtual void NextEvent() {;}
151  void SetMinMCLabel(Int_t s) { fMinMCLabel = s ; }
152  void SetMaxMCLabel(Int_t s) { fMaxMCLabel = s ; }
153  void SetMCLabelRange(Int_t min, Int_t max) { SetMinMCLabel(min) ; SetMaxMCLabel(max) ; }
154  void SetELimits(Double_t min, Double_t max) { fMinE = min ; fMaxE = max ; }
155  void SetMinE(Double_t min) { fMinE = min ; }
156  void SetMaxE(Double_t max) { fMaxE = max ; }
157  void SetPtLimits(Double_t min, Double_t max) { fMinPt = min ; fMaxPt = max ; }
158  void SetMinPt(Double_t min) { fMinPt = min ; }
159  void SetMaxPt(Double_t max) { fMaxPt = max ; }
160  void SetEtaLimits(Double_t min, Double_t max) { fMaxEta = max ; fMinEta = min ; }
161  void SetPhiLimits(Double_t min, Double_t max) { fMaxPhi = max ; fMinPhi = min ; }
162  void SetMassHypothesis(Double_t m) { fMassHypothesis = m ; }
163  void SetClassName(const char *clname);
164 
165  const char* GetName() const { return fName.Data() ; }
166  void SetName(const char* n) { fName = n ; }
167 
168  static Bool_t SamePart(const AliVParticle* part1, const AliVParticle* part2, Double_t dist = 1.e-4);
169 
170  const AliEmcalIterableContainer all() const;
171  const AliEmcalIterableContainer accepted() const;
172 
173  protected:
174  TString fName;
175  TString fClArrayName;
176  TString fBaseClassName;
178  UInt_t fBitMap;
179  Double_t fMinPt;
180  Double_t fMaxPt;
181  Double_t fMaxE;
182  Double_t fMinE;
183  Double_t fMinEta;
184  Double_t fMaxEta;
185  Double_t fMinPhi;
186  Double_t fMaxPhi;
187  Int_t fMinMCLabel;
188  Int_t fMaxMCLabel;
189  Double_t fMassHypothesis;
190  TClonesArray *fClArray;
191  Int_t fCurrentID;
192  AliNamedArrayI *fLabelMap;
193  Double_t fVertex[3];
194  TClass *fLoadedClass;
195 
196  private:
197  TString fClassName;
198 
199  AliEmcalContainer(const AliEmcalContainer& obj); // copy constructor
200  AliEmcalContainer& operator=(const AliEmcalContainer& other); // assignment
201 
203  ClassDef(AliEmcalContainer,8);
205 };
206 #endif
particle not in acceptance in and/or
virtual Bool_t ApplyKinematicCuts(const AliTLorentzVector &mom, UInt_t &rejectionReason) const
void SetMassHypothesis(Double_t m)
const AliEmcalIterableContainer all() const
Int_t GetNAcceptEntries() const
virtual Bool_t GetNextMomentum(TLorentzVector &mom)=0
Double_t fMinE
Max. cut on particle energy.
Double_t fMinPhi
Min. cut on particle .
TObject * operator[](int index) const
Cut on the z of the leading particle in the EMCAL.
Double_t fMaxE
Min. cut on particle energy.
Double_t GetMinPhi() const
void SetName(const char *n)
Int_t GetIndexFromLabel(Int_t lab) const
Cut on the jet area in the EMCAL.
void SetMinE(Double_t min)
Double_t GetMaxEta() const
void SetMaxE(Double_t max)
virtual ~AliEmcalContainer()
UInt_t fBitMap
bitmap mask
TString fClassName
name of the class in the TClonesArray
void SetMinPt(Double_t min)
virtual void SetArray(AliVEvent *event)
Track too close to the TPC sector boundary.
Double_t fMinPt
Min. cut on particle .
void SetArrayName(const char *n)
void SetEtaLimits(Double_t min, Double_t max)
TClass * fLoadedClass
! Class of the objects contained in the TClonesArray
Cell time cut not passed.
void SetMCLabelRange(Int_t min, Int_t max)
const TString & GetClassName() const
Cut on flavour content in the jet.
Bool_t fIsParticleLevel
whether or not it is a particle level object collection
Cluster is exotic cluster.
virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const =0
TString fName
object name
Double_t GetMaxPhi() const
Energy below threshold.
void SetBitMap(UInt_t m)
Double_t GetMinEta() const
UShort_t GetRejectionReasonBitPosition(UInt_t rejectionReason) const
Double_t GetMinE() const
Double_t GetMinPt() const
Int_t GetCurrentID() const
Cut on the jet area.
Double_t fMaxPhi
Max. cut on particle .
Cut on the z of the leading charged constituent.
Base class for container structures within the EMCAL framework.
void SetMaxPt(Double_t max)
void SetMinMCLabel(Int_t s)
virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const =0
TClonesArray * GetArray() const
Cut on the MC flag.
RejectionReason
Bit definition for the reason a particle was rejected.
Container implementing iterable functionality of the EMCAL containers.
Track did not pass the hybrid track cuts.
AliNamedArrayI * fLabelMap
! Label-Index map
void SetPtLimits(Double_t min, Double_t max)
void SetClassName(const char *clname)
Int_t fMinMCLabel
minimum MC label
const TString & GetArrayName() const
Double_t fMassHypothesis
if < 0 it will use a PID mass when available
Cut on jet tag status.
Cluster not in the EMCAL.
Double_t fVertex[3]
! event vertex array
const char * GetName() const
Double_t fMaxPt
Max. cut on particle .
AliEmcalContainer & operator=(const AliEmcalContainer &other)
void SetMaxMCLabel(Int_t s)
Cut on the minimum of the leading particle.
Cut on the neutral energy fraction.
static Bool_t SamePart(const AliVParticle *part1, const AliVParticle *part2, Double_t dist=1.e-4)
Cut on the regions of acceptance with bad sectors.
Double_t fMinEta
Min. cut on particle .
virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const =0
void SetIsParticleLevel(Bool_t b)
void SetELimits(Double_t min, Double_t max)
Particle charge did not match.
TString fBaseClassName
name of the base class that this container can handle
TString fClArrayName
name of branch
Cut on the minimum number of constituents.
Int_t fMaxMCLabel
maximum MC label
Double_t fMaxEta
Max. cut on particle .
const AliEmcalIterableContainer accepted() const
Cut on the maximum cluster .
TClonesArray * fClArray
! Pointer to array in input event
Int_t GetNEntries() const
void SetPhiLimits(Double_t min, Double_t max)
virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom)=0
Cut on the maximum track .
Int_t fCurrentID
! current ID for automatic loops
Double_t GetMaxE() const
Double_t GetMaxPt() const
virtual void NextEvent()
void ResetCurrentID(Int_t i=-1)
Bool_t GetIsParticleLevel() const