add cut to reject tracks close to TPC sector edge
[u/mrichter/AliRoot.git] / PWG / EMCAL / AliEmcalContainer.h
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
12 #include <TNamed.h>
13 #include <TClonesArray.h>
14
15 class AliEmcalContainer : public TNamed {
16  public:
17   enum RejectionReason {
18     // General
19     kNullObject = 1<<0,
20     kPtCut = 1<<1,
21     kAcceptanceCut = 1<<2,
22     kBitMapCut = 1<<3,
23     // leave bits 4-7 free for future implementations
24     
25     // AliParticleContainer
26     kMCFlag = 1<<8,
27     kMCGeneratorCut = 1<<9,
28     kChargeCut = 1<<10,
29     kMinDistanceTPCSectorEdgeCut = 1<<11,
30     // leave bit 12 free for future implementations
31
32     // AliClusterContainer
33     kIsEMCalCut = 1<<13,
34     kTimeCut = 1<<14,
35     kEnergyCut = 1<<15,
36     // leave bits 16-17 free for future implementations
37
38     // AliJetContainer
39     kAreaCut = 1<<18,
40     kAreaEmcCut = 1<<19,
41     kZLeadingChCut = 1<<20,
42     kZLeadingEmcCut = 1<<21,
43     kNEFCut = 1<<22,
44     kMinLeadPtCut = 1<<23,
45     kMaxTrackPtCut = 1<<24,
46     kMaxClusterPtCut = 1<<25,
47     kFlavourCut = 1<<26,
48     kTagStatus = 1<<27
49   };
50
51   AliEmcalContainer();
52   AliEmcalContainer(const char *name); 
53   virtual ~AliEmcalContainer(){;}
54
55   TClonesArray               *GetArray() const                      { return fClArray                   ; }
56   const TString&              GetArrayName()                  const { return fClArrayName               ; }
57   Int_t                       GetCurrentID()                  const { return fCurrentID-1               ; }
58   Bool_t                      GetIsParticleLevel()            const { return fIsParticleLevel           ; }
59   Int_t                       GetIndexFromLabel(Int_t lab)    const;
60   Int_t                       GetNEntries()                   const { return fClArray->GetEntriesFast() ; }
61   virtual void                GetMomentum(TLorentzVector &mom, Int_t i) const = 0;
62   void                        ResetCurrentID(Int_t i=0)             { fCurrentID = i                    ; }
63   virtual void                SetArray(AliVEvent *event);
64   void                        SetArrayName(const char *n)           { fClArrayName = n                  ; }
65   void                        SetIsParticleLevel(Bool_t b)          { fIsParticleLevel = b              ; }
66   void                        SortArray()                           { fClArray->Sort()                  ; }
67   UInt_t                      GetRejectionReason()            const { return fRejectionReason           ; }
68   UInt_t                      TestRejectionReason(UInt_t rs)  const { return fRejectionReason & rs      ; }
69   UShort_t                    GetRejectionReasonBitPosition() const;
70
71  protected:
72   TString                     fClArrayName;             // name of branch
73   TString                     fClassName;               // name of the class in the TClonesArray
74   Bool_t                      fIsParticleLevel;         // whether or not it is a particle level object collection
75   TClonesArray               *fClArray;                 //!TClonesArray
76   Int_t                       fCurrentID;               //!current ID for automatic loops
77   AliNamedArrayI             *fLabelMap;                //!Label-Index map
78   Double_t                    fVertex[3];               //!event vertex array
79   UInt_t                      fRejectionReason;         //!reject reason bit map for the last call to an accept object function
80
81  private:
82   AliEmcalContainer(const AliEmcalContainer& obj); // copy constructor
83   AliEmcalContainer& operator=(const AliEmcalContainer& other); // assignment
84
85   ClassDef(AliEmcalContainer,4);
86 };
87 #endif