AliPhysics  f2694b8 (f2694b8)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
AliEmcalContainer.h
Go to the documentation of this file.
1 #ifndef AliEmcalContainer_H
2 #define AliEmcalContainer_H
3 
4 //
5 // container with name, TClonesArray
6 //
7 
8 class TLorentzVector;
9 class AliVEvent;
10 class AliNamedArrayI;
11 class AliVParticle;
12 
13 #include <TNamed.h>
14 #include <TClonesArray.h>
15 
16 class AliEmcalContainer : public TObject {
17  public:
19  // General
20  kNullObject = 1<<0,
21  kPtCut = 1<<1,
23  kMCLabelCut = 1<<3,
24  kBitMapCut = 1<<4,
25  kHFCut = 1<<5,
26  // leave bit 6 free for future implementations
27 
28  // AliParticleContainer
30  kMCFlag = 1<<8,
32  kChargeCut = 1<<10,
34  // leave bit 12 free for future implementations
35 
36  // AliClusterContainer
37  kIsEMCalCut = 1<<13,
38  kTimeCut = 1<<14,
39  kEnergyCut = 1<<15,
40  kExoticCut = 1<<16,
41  // leave bit 17 free for future implementations
42 
43  // AliJetContainer
44  kAreaCut = 1<<18,
45  kAreaEmcCut = 1<<19,
46  kZLeadingChCut = 1<<20,
47  kZLeadingEmcCut = 1<<21,
48  kNEFCut = 1<<22,
49  kMinLeadPtCut = 1<<23,
50  kMaxTrackPtCut = 1<<24,
52  kFlavourCut = 1<<26,
53  kTagStatus = 1<<27,
55  };
56 
58  AliEmcalContainer(const char *name);
59  virtual ~AliEmcalContainer(){;}
60 
61  TClonesArray *GetArray() const { return fClArray ; }
62  const TString& GetArrayName() const { return fClArrayName ; }
63  const TString& GetClassName() const { return fClassName ; }
64  Int_t GetCurrentID() const { return fCurrentID ; }
65  Bool_t GetIsParticleLevel() const { return fIsParticleLevel ; }
66  Int_t GetIndexFromLabel(Int_t lab) const;
67  Int_t GetNEntries() const { return fClArray->GetEntriesFast() ; }
68  virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) = 0;
69  virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) = 0;
70  virtual Bool_t GetNextMomentum(TLorentzVector &mom, Int_t i=-1) = 0;
71  virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom, Int_t i=-1) = 0;
72  virtual Bool_t AcceptObject(Int_t i) = 0;
73  virtual Bool_t AcceptObject(TObject* obj) = 0;
74  void ResetCurrentID(Int_t i=-1) { fCurrentID = i ; }
75  virtual void SetArray(AliVEvent *event);
76  void SetArrayName(const char *n) { fClArrayName = n ; }
77  void SetBitMap(UInt_t m) { fBitMap = m ; }
78  void SetIsParticleLevel(Bool_t b) { fIsParticleLevel = b ; }
79  void SortArray() { fClArray->Sort() ; }
80  UInt_t GetRejectionReason() const { return fRejectionReason ; }
81  UInt_t TestRejectionReason(UInt_t rs) const { return fRejectionReason & rs ; }
82  UShort_t GetRejectionReasonBitPosition() const;
83  TClass* GetLoadedClass() { return fLoadedClass ; }
84  virtual void NextEvent() {;}
85 
86  const char* GetName() const { return fName.Data() ; }
87  void SetName(const char* n) { fName = n ; }
88 
89  static Bool_t SamePart(const AliVParticle* part1, const AliVParticle* part2, Double_t dist = 1.e-4);
90 
91  protected:
92  TString fName; // object name
93  TString fClArrayName; // name of branch
94  TString fClassName; // name of the class in the TClonesArray
95  Bool_t fIsParticleLevel; // whether or not it is a particle level object collection
96  UInt_t fBitMap; // bitmap mask
97  TClonesArray *fClArray;
98  Int_t fCurrentID;
99  AliNamedArrayI *fLabelMap;
100  Double_t fVertex[3];
102  TClass *fLoadedClass;
103 
104  private:
105  AliEmcalContainer(const AliEmcalContainer& obj); // copy constructor
106  AliEmcalContainer& operator=(const AliEmcalContainer& other); // assignment
107 
109 };
110 #endif
void SetName(const char *n)
Int_t GetIndexFromLabel(Int_t lab) const
UInt_t TestRejectionReason(UInt_t rs) const
virtual Bool_t AcceptObject(Int_t i)=0
virtual ~AliEmcalContainer()
UShort_t GetRejectionReasonBitPosition() const
virtual void SetArray(AliVEvent *event)
void SetArrayName(const char *n)
TClass * fLoadedClass
reject reason bit map for the last call to an accept object function
TClass * GetLoadedClass()
const TString & GetClassName() const
UInt_t fRejectionReason
event vertex array
ClassDef(AliEmcalContainer, 6)
void SetBitMap(UInt_t m)
Int_t GetCurrentID() const
virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i)=0
virtual Bool_t GetNextMomentum(TLorentzVector &mom, Int_t i=-1)=0
TClonesArray * GetArray() const
AliNamedArrayI * fLabelMap
current ID for automatic loops
virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom, Int_t i=-1)=0
const TString & GetArrayName() const
Double_t fVertex[3]
Label-Index map.
const char * GetName() const
AliEmcalContainer & operator=(const AliEmcalContainer &other)
static Bool_t SamePart(const AliVParticle *part1, const AliVParticle *part2, Double_t dist=1.e-4)
void SetIsParticleLevel(Bool_t b)
TClonesArray * fClArray
Int_t GetNEntries() const
Int_t fCurrentID
TClonesArray.
UInt_t GetRejectionReason() const
virtual void NextEvent()
void ResetCurrentID(Int_t i=-1)
Bool_t GetIsParticleLevel() const
virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i)=0