AliPhysics  8bb951a (8bb951a)
 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,
110  };
111 
113  AliEmcalContainer(const char *name);
114  virtual ~AliEmcalContainer(){;}
115 
116  TObject *operator[](int index) const;
117 
118  virtual Bool_t ApplyKinematicCuts(const AliTLorentzVector& mom, UInt_t &rejectionReason) const;
119  TClonesArray *GetArray() const { return fClArray ; }
120  const TString& GetArrayName() const { return fClArrayName ; }
121  const TString& GetClassName() const { return fClassName ; }
122  Double_t GetMinE() const { return fMinE ; }
123  Double_t GetMaxE() const { return fMaxE ; }
124  Double_t GetMinPt() const { return fMinPt ; }
125  Double_t GetMaxPt() const { return fMaxPt ; }
126  Double_t GetMinEta() const { return fMinEta ; }
127  Double_t GetMaxEta() const { return fMaxEta ; }
128  Double_t GetMinPhi() const { return fMinPhi ; }
129  Double_t GetMaxPhi() const { return fMaxPhi ; }
130  Int_t GetCurrentID() const { return fCurrentID ; }
131  Bool_t GetIsParticleLevel() const { return fIsParticleLevel ; }
132  Int_t GetIndexFromLabel(Int_t lab) const;
133  Int_t GetNEntries() const { return fClArray->GetEntriesFast() ; }
134  virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const = 0;
135  virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const = 0;
136  virtual Bool_t GetNextMomentum(TLorentzVector &mom) = 0;
137  virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom) = 0;
138  virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const = 0;
139  virtual Bool_t AcceptObject(const TObject* obj, UInt_t &rejectionReason) const = 0;
140  Int_t GetNAcceptEntries() const;
141  void ResetCurrentID(Int_t i=-1) { fCurrentID = i ; }
142  virtual void SetArray(AliVEvent *event);
143  void SetArrayName(const char *n) { fClArrayName = n ; }
144  void SetBitMap(UInt_t m) { fBitMap = m ; }
145  void SetIsParticleLevel(Bool_t b) { fIsParticleLevel = b ; }
146  void SortArray() { fClArray->Sort() ; }
147  UShort_t GetRejectionReasonBitPosition(UInt_t rejectionReason) const;
148  TClass* GetLoadedClass() { return fLoadedClass ; }
149  virtual void NextEvent() {;}
150  void SetMinMCLabel(Int_t s) { fMinMCLabel = s ; }
151  void SetMaxMCLabel(Int_t s) { fMaxMCLabel = s ; }
152  void SetMCLabelRange(Int_t min, Int_t max) { SetMinMCLabel(min) ; SetMaxMCLabel(max) ; }
153  void SetELimits(Double_t min, Double_t max) { fMinE = min ; fMaxE = max ; }
154  void SetMinE(Double_t min) { fMinE = min ; }
155  void SetMaxE(Double_t max) { fMaxE = max ; }
156  void SetPtLimits(Double_t min, Double_t max) { fMinPt = min ; fMaxPt = max ; }
157  void SetMinPt(Double_t min) { fMinPt = min ; }
158  void SetMaxPt(Double_t max) { fMaxPt = max ; }
159  void SetEtaLimits(Double_t min, Double_t max) { fMaxEta = max ; fMinEta = min ; }
160  void SetPhiLimits(Double_t min, Double_t max) { fMaxPhi = max ; fMinPhi = min ; }
161  void SetMassHypothesis(Double_t m) { fMassHypothesis = m ; }
162  void SetClassName(const char *clname);
163 
164  const char* GetName() const { return fName.Data() ; }
165  void SetName(const char* n) { fName = n ; }
166 
167  static Bool_t SamePart(const AliVParticle* part1, const AliVParticle* part2, Double_t dist = 1.e-4);
168 
169  const AliEmcalIterableContainer all() const;
170  const AliEmcalIterableContainer accepted() const;
171 
172  protected:
173  TString fName;
174  TString fClArrayName;
175  TString fBaseClassName;
177  UInt_t fBitMap;
178  Double_t fMinPt;
179  Double_t fMaxPt;
180  Double_t fMaxE;
181  Double_t fMinE;
182  Double_t fMinEta;
183  Double_t fMaxEta;
184  Double_t fMinPhi;
185  Double_t fMaxPhi;
186  Int_t fMinMCLabel;
187  Int_t fMaxMCLabel;
188  Double_t fMassHypothesis;
189  TClonesArray *fClArray;
190  Int_t fCurrentID;
191  AliNamedArrayI *fLabelMap;
192  Double_t fVertex[3];
193  TClass *fLoadedClass;
194 
195  private:
196  TString fClassName;
197 
198  AliEmcalContainer(const AliEmcalContainer& obj); // copy constructor
199  AliEmcalContainer& operator=(const AliEmcalContainer& other); // assignment
200 
202  ClassDef(AliEmcalContainer,8);
204 };
205 #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)
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