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