AliPhysics  a9863a5 (a9863a5)
 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-2016, 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 
17 
71 class AliEmcalContainer : public TObject {
72  public:
78  // General
79  kNullObject = 1<<0,
80  kPtCut = 1<<1,
81  kAcceptanceCut = 1<<2,
82  kMCLabelCut = 1<<3,
83  kBitMapCut = 1<<4,
84  kHFCut = 1<<5,
85  // leave bit 6 free for future implementations
86 
87  // AliParticleContainer
88  kNotHybridTrack = 1<<7,
89  kMCFlag = 1<<8,
90  kMCGeneratorCut = 1<<9,
91  kChargeCut = 1<<10,
93  // leave bit 12 free for future implementations
94 
95  // AliClusterContainer
96  kIsEMCalCut = 1<<13,
97  kTimeCut = 1<<14,
98  kEnergyCut = 1<<15,
99  kExoticCut = 1<<16,
100  // leave bit 17 free for future implementations
101 
102  // AliJetContainer
103  kAreaCut = 1<<18,
104  kAreaEmcCut = 1<<19,
105  kZLeadingChCut = 1<<20,
106  kZLeadingEmcCut = 1<<21,
107  kNEFCut = 1<<22,
108  kMinLeadPtCut = 1<<23,
109  kMaxTrackPtCut = 1<<24,
111  kFlavourCut = 1<<26,
112  kTagStatus = 1<<27,
115  };
116 
118  AliEmcalContainer(const char *name);
119  virtual ~AliEmcalContainer(){;}
120 
121  virtual TObject *operator[](int index) const = 0;
122 
123  virtual Bool_t ApplyKinematicCuts(const AliTLorentzVector& mom, UInt_t &rejectionReason) const;
124  TClonesArray *GetArray() const { return fClArray ; }
125  const TString& GetArrayName() const { return fClArrayName ; }
126  const TString& GetClassName() const { return fClassName ; }
127  Double_t GetMinE() const { return fMinE ; }
128  Double_t GetMaxE() const { return fMaxE ; }
129  Double_t GetMinPt() const { return fMinPt ; }
130  Double_t GetMaxPt() const { return fMaxPt ; }
131  Double_t GetMinEta() const { return fMinEta ; }
132  Double_t GetMaxEta() const { return fMaxEta ; }
133  Double_t GetMinPhi() const { return fMinPhi ; }
134  Double_t GetMaxPhi() const { return fMaxPhi ; }
135  Int_t GetCurrentID() const { return fCurrentID ; }
136  Bool_t GetIsParticleLevel() const { return fIsParticleLevel ; }
137  Int_t GetIndexFromLabel(Int_t lab) const;
138  Int_t GetNEntries() const { return fClArray->GetEntriesFast() ; }
139  virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const = 0;
140  virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const = 0;
141  virtual Bool_t GetNextMomentum(TLorentzVector &mom) = 0;
142  virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom) = 0;
143  virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const = 0;
144  virtual Bool_t AcceptObject(const TObject* obj, UInt_t &rejectionReason) const = 0;
145  Int_t GetNAcceptEntries() const;
146  void ResetCurrentID(Int_t i=-1) { fCurrentID = i ; }
147  virtual void SetArray(const AliVEvent *event);
148  void SetArrayName(const char *n) { fClArrayName = n ; }
149  void SetBitMap(UInt_t m) { fBitMap = m ; }
150  void SetIsParticleLevel(Bool_t b) { fIsParticleLevel = b ; }
151  void SortArray() { fClArray->Sort() ; }
152  UShort_t GetRejectionReasonBitPosition(UInt_t rejectionReason) const;
153  TClass* GetLoadedClass() { return fLoadedClass ; }
154  virtual void NextEvent() {;}
155  void SetMinMCLabel(Int_t s) { fMinMCLabel = s ; }
156  void SetMaxMCLabel(Int_t s) { fMaxMCLabel = s ; }
157  void SetMCLabelRange(Int_t min, Int_t max) { SetMinMCLabel(min) ; SetMaxMCLabel(max) ; }
158  void SetELimits(Double_t min, Double_t max) { fMinE = min ; fMaxE = max ; }
159  void SetMinE(Double_t min) { fMinE = min ; }
160  void SetMaxE(Double_t max) { fMaxE = max ; }
161  void SetPtLimits(Double_t min, Double_t max) { fMinPt = min ; fMaxPt = max ; }
162  void SetMinPt(Double_t min) { fMinPt = min ; }
163  void SetMaxPt(Double_t max) { fMaxPt = max ; }
164  void SetEtaLimits(Double_t min, Double_t max) { fMaxEta = max ; fMinEta = min ; }
165  void SetPhiLimits(Double_t min, Double_t max) { fMaxPhi = max ; fMinPhi = min ; }
166  void SetMassHypothesis(Double_t m) { fMassHypothesis = m ; }
167  void SetClassName(const char *clname);
168 
169  const char* GetName() const { return fName.Data() ; }
170  void SetName(const char* n) { fName = n ; }
171 
172  static Double_t RelativePhi(Double_t ang1, Double_t ang2);
173  static Bool_t SamePart(const AliVParticle* part1, const AliVParticle* part2, Double_t dist = 1.e-4);
174 
175  const AliEmcalIterableContainer all() const;
176  const AliEmcalIterableContainer accepted() const;
177 
178  protected:
179  TString fName;
180  TString fClArrayName;
181  TString fBaseClassName;
183  UInt_t fBitMap;
184  Double_t fMinPt;
185  Double_t fMaxPt;
186  Double_t fMaxE;
187  Double_t fMinE;
188  Double_t fMinEta;
189  Double_t fMaxEta;
190  Double_t fMinPhi;
191  Double_t fMaxPhi;
192  Int_t fMinMCLabel;
193  Int_t fMaxMCLabel;
194  Double_t fMassHypothesis;
195  TClonesArray *fClArray;
196  Int_t fCurrentID;
197  AliNamedArrayI *fLabelMap;
198  Double_t fVertex[3];
199  TClass *fLoadedClass;
200 
201  private:
202  TString fClassName;
203 
204  AliEmcalContainer(const AliEmcalContainer& obj); // copy constructor
205  AliEmcalContainer& operator=(const AliEmcalContainer& other); // assignment
206 
208  ClassDef(AliEmcalContainer,8);
210 };
211 #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 .
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()
static Double_t RelativePhi(Double_t ang1, Double_t ang2)
UInt_t fBitMap
bitmap mask
TString fClassName
name of the class in the TClonesArray
void SetMinPt(Double_t min)
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
AliEmcalIterableContainerT< TObject > AliEmcalIterableContainer
Int_t GetCurrentID() const
Double_t fMaxPhi
Max. cut on particle .
Cut on the z of the leading charged constituent.
virtual TObject * operator[](int index) const =0
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)
virtual void SetArray(const AliVEvent *event)
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