AliPhysics  a9863a5 (a9863a5)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliTrackContainer.h
Go to the documentation of this file.
1 #ifndef ALITRACKCONTAINER_H
2 #define ALITRACKCONTAINER_H
3 /* Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 class AliVEvent;
7 class AliVParticle;
8 class AliVCuts;
9 class AliTLorentzVector;
10 
11 #include <TArrayC.h>
12 
13 #include "AliVTrack.h"
14 #include "AliEmcalTrackSelection.h"
15 #include "AliParticleContainer.h"
16 
18 
27  public:
28 
30 
35  enum ETrackType_t {
36  kRejected = -1,
37  kUndefined = 0,
41  };
42 
44  AliTrackContainer(const char *name, const char *period = "");
45  virtual ~AliTrackContainer(){;}
46 
47  virtual Bool_t ApplyTrackCuts(const AliVTrack* vp, UInt_t &rejectionReason) const;
48  virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const { return AcceptTrack(i, rejectionReason) ; }
49  virtual Bool_t AcceptObject(const TObject* obj, UInt_t &rejectionReason) const { return AcceptTrack(dynamic_cast<const AliVTrack*>(obj), rejectionReason); }
50  virtual Bool_t AcceptParticle(Int_t i, UInt_t &rejectionReason) const { return AcceptTrack(i, rejectionReason); }
51  virtual Bool_t AcceptParticle(const AliVParticle* vp, UInt_t &rejectionReason) const { return AcceptTrack(dynamic_cast<const AliVTrack*>(vp), rejectionReason); }
52  virtual AliVParticle *GetParticle(Int_t i=-1) const { return GetTrack(i) ; }
53  virtual AliVParticle *GetAcceptParticle(Int_t i=-1) const { return GetAcceptTrack(i) ; }
54  virtual AliVParticle *GetNextAcceptParticle() { return GetNextAcceptTrack() ; }
55  virtual AliVParticle *GetNextParticle() { return GetNextTrack() ; }
56  virtual Bool_t AcceptTrack(const AliVTrack* vp, UInt_t &rejectionReason) const;
57  virtual Bool_t AcceptTrack(Int_t i, UInt_t &rejectionReason) const;
58  virtual AliVTrack *GetLeadingTrack(const char* opt="") { return static_cast<AliVTrack*>(GetLeadingParticle(opt)); }
59  virtual AliVTrack *GetTrack(Int_t i=-1) const;
60  virtual AliVTrack *GetAcceptTrack(Int_t i=-1) const;
61  virtual AliVTrack *GetNextAcceptTrack() ;
62  virtual AliVTrack *GetNextTrack() ;
63  Char_t GetTrackType(const AliVTrack* track) const;
64  virtual Bool_t GetMomentumFromTrack(TLorentzVector &mom, const AliVTrack* track, Double_t mass) const;
65  virtual Bool_t GetMomentumFromTrack(TLorentzVector &mom, const AliVTrack* track) const;
66  virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const;
67  virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const;
68  virtual Bool_t GetNextMomentum(TLorentzVector &mom);
69  virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom);
70  Int_t GetNTracks() const { return GetNParticles() ; }
73  Char_t GetTrackType(Int_t i) const { return i >= 0 && i < fTrackTypes.GetSize() ? fTrackTypes[i] : kUndefined ; }
74 
75  void SetArray(const AliVEvent *event);
76 
79 
80  void SetTrackCutsPeriod(const char* period) { fTrackCutsPeriod = period; }
81  void AddTrackCuts(AliVCuts *cuts);
82  Int_t GetNumberOfCutObjects() const;
83  AliVCuts *GetTrackCuts(Int_t icut);
84  void SetAODFilterBits(UInt_t bits) { fAODFilterBits = bits ; }
85  void AddAODFilterBit(UInt_t bit) { fAODFilterBits |= bit ; }
86  UInt_t GetAODFilterBits() const { return fAODFilterBits ; }
87 
90 
91  void NextEvent();
92 
93  static void SetDefTrackCutsPeriod(const char* period) { fgDefTrackCutsPeriod = period; }
94  static TString GetDefTrackCutsPeriod() { return fgDefTrackCutsPeriod ; }
95 
96  const char* GetTitle() const;
97 
98  const AliTrackIterableContainer all() const;
99  const AliTrackIterableContainer accepted() const;
100 
105 
110 
111  protected:
112  static TString fgDefTrackCutsPeriod;
113 
115  TObjArray *fListOfCuts;
117  UInt_t fAODFilterBits;
120  TObjArray *fFilteredTracks;
121  TArrayC fTrackTypes;
122 
123  private:
124  AliTrackContainer(const AliTrackContainer& obj); // copy constructor
125  AliTrackContainer& operator=(const AliTrackContainer& other); // assignment
126 
128  ClassDef(AliTrackContainer,1);
130 };
131 
132 #endif
133 
Interface for virtual track selection.
void SetTrackCutsPeriod(const char *period)
TObjArray * fFilteredTracks
! tracks filtered using fEmcalTrackSelection
Int_t GetNTracks() const
static TString fgDefTrackCutsPeriod
! default period string used to generate track cuts
AliTrackIterableContainer::iterator rbegin() const
const AliTrackIterableContainer accepted() const
Double_t mass
Int_t GetNParticles() const
Container with name, TClonesArray and cuts for particles.
virtual Bool_t AcceptParticle(const AliVParticle *vp, UInt_t &rejectionReason) const
Track selected under the constrained hybrid track cuts.
UInt_t fAODFilterBits
track filter bits
const AliTrackIterableContainer all() const
AliVCuts * GetTrackCuts(Int_t icut)
virtual Bool_t GetNextMomentum(TLorentzVector &mom)
Char_t GetTrackType(Int_t i) const
AliEmcalTrackSelection * fEmcalTrackSelection
! track selection object
AliTrackIterableContainer::iterator end() const
virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const
ETrackFilterType_t fTrackFilterType
track filter type
TString fTrackCutsPeriod
period string used to generate track cuts
bidirectional stl iterator over the EMCAL iterable container
Container for particles within the EMCAL framework.
Track selected under the constrained hybrid track cuts without ITS refit.
UInt_t GetAODFilterBits() const
virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const
virtual Bool_t GetMomentumFromTrack(TLorentzVector &mom, const AliVTrack *track, Double_t mass) const
ETrackType_t
Status of a track after track selection.
virtual Bool_t AcceptParticle(Int_t i, UInt_t &rejectionReason) const
void SetAODFilterBits(UInt_t bits)
virtual Bool_t ApplyTrackCuts(const AliVTrack *vp, UInt_t &rejectionReason) const
virtual AliVParticle * GetAcceptParticle(Int_t i=-1) const
virtual AliVParticle * GetParticle(Int_t i=-1) const
AliTrackIterableContainer::iterator rend() const
virtual Bool_t AcceptTrack(const AliVTrack *vp, UInt_t &rejectionReason) const
AliTrackIterableContainer::iterator begin() const
Int_t GetNumberOfCutObjects() const
static void SetDefTrackCutsPeriod(const char *period)
void SetFilterHybridTracks(Bool_t f)
virtual AliVParticle * GetLeadingParticle(const char *opt="")
static TString GetDefTrackCutsPeriod()
TArrayC fTrackTypes
! track types
TObjArray * fListOfCuts
list of track cut objects
AliTrackIterableContainer::iterator accept_begin() const
void AddAODFilterBit(UInt_t bit)
virtual AliVParticle * GetNextParticle()
ETrackFilterType_t GetTrackFilterType() const
AliTrackIterableContainer::iterator accept_rbegin() const
virtual AliVTrack * GetNextTrack()
virtual ~AliTrackContainer()
AliTrackIterableContainer::iterator accept_end() const
virtual Bool_t AcceptObject(const TObject *obj, UInt_t &rejectionReason) const
Bool_t fSelectionModeAny
accept track if any of the cuts is fulfilled
virtual AliVTrack * GetTrack(Int_t i=-1) const
Track selected under the global hybrid track cuts.
virtual AliVTrack * GetLeadingTrack(const char *opt="")
virtual AliVTrack * GetNextAcceptTrack()
AliEmcalTrackSelection::ETrackFilterType_t ETrackFilterType_t
Char_t GetTrackType(const AliVTrack *track) const
void AddTrackCuts(AliVCuts *cuts)
void SetArray(const AliVEvent *event)
virtual AliVTrack * GetAcceptTrack(Int_t i=-1) const
virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom)
const char * GetTitle() const
void SetTrackFilterType(ETrackFilterType_t f)
AliEmcalIterableContainerT< AliVTrack > AliTrackIterableContainer
virtual AliVParticle * GetNextAcceptParticle()
Int_t GetNAcceptedParticles() const
virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const
AliTrackContainer & operator=(const AliTrackContainer &other)
Track status undefined.
AliTrackIterableContainer::iterator accept_rend() const