AliPhysics  e34b7ac (e34b7ac)
 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;
10 
11 #include <TArrayC.h>
12 
13 #include "AliVTrack.h"
14 #include "AliEmcalTrackSelection.h"
15 #include "AliParticleContainer.h"
16 
17 #if !(defined(__CINT__) || defined(__MAKECINT__))
20 #endif
21 
30  public:
31 
33 
38  enum ETrackType_t {
39  kRejected = -1,
40  kUndefined = 0,
44  };
45 
47  AliTrackContainer(const char *name, const char *period = "");
48  virtual ~AliTrackContainer(){;}
49 
50  virtual Bool_t ApplyTrackCuts(const AliVTrack* vp, UInt_t &rejectionReason) const;
51  virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const { return AcceptTrack(i, rejectionReason) ; }
52  virtual Bool_t AcceptObject(const TObject* obj, UInt_t &rejectionReason) const { return AcceptTrack(dynamic_cast<const AliVTrack*>(obj), rejectionReason); }
53  virtual Bool_t AcceptParticle(Int_t i, UInt_t &rejectionReason) const { return AcceptTrack(i, rejectionReason); }
54  virtual Bool_t AcceptParticle(const AliVParticle* vp, UInt_t &rejectionReason) const { return AcceptTrack(dynamic_cast<const AliVTrack*>(vp), rejectionReason); }
55  virtual AliVParticle *GetParticle(Int_t i=-1) const { return GetTrack(i) ; }
56  virtual AliVParticle *GetAcceptParticle(Int_t i=-1) const { return GetAcceptTrack(i) ; }
57  virtual AliVParticle *GetNextAcceptParticle() { return GetNextAcceptTrack() ; }
58  virtual AliVParticle *GetNextParticle() { return GetNextTrack() ; }
59  virtual Bool_t AcceptTrack(const AliVTrack* vp, UInt_t &rejectionReason) const;
60  virtual Bool_t AcceptTrack(Int_t i, UInt_t &rejectionReason) const;
61  virtual AliVTrack *GetLeadingTrack(const char* opt="") { return static_cast<AliVTrack*>(GetLeadingParticle(opt)); }
62  virtual AliVTrack *GetTrack(Int_t i=-1) const;
63  virtual AliVTrack *GetAcceptTrack(Int_t i=-1) const;
64  virtual AliVTrack *GetNextAcceptTrack() ;
65  virtual AliVTrack *GetNextTrack() ;
66  Char_t GetTrackType(const AliVTrack* track) const;
67  virtual Bool_t GetMomentumFromTrack(TLorentzVector &mom, const AliVTrack* track, Double_t mass) const;
68  virtual Bool_t GetMomentumFromTrack(TLorentzVector &mom, const AliVTrack* track) const;
69  virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const;
70  virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const;
71  virtual Bool_t GetNextMomentum(TLorentzVector &mom);
72  virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom);
73  Int_t GetNTracks() const { return GetNParticles() ; }
76  Char_t GetTrackType(Int_t i) const { return i >= 0 && i < fTrackTypes.GetSize() ? fTrackTypes[i] : kUndefined ; }
77 
78  void SetArray(const AliVEvent *event);
79 
82 
83  void SetTrackCutsPeriod(const char* period) { fTrackCutsPeriod = period; }
84  void AddTrackCuts(AliVCuts *cuts);
86  AliVCuts *GetTrackCuts(Int_t icut);
87  void SetAODFilterBits(UInt_t bits) { fAODFilterBits = bits ; }
88  void AddAODFilterBit(UInt_t bit) { fAODFilterBits |= bit ; }
89  UInt_t GetAODFilterBits() const { return fAODFilterBits ; }
90 
93 
94  void NextEvent();
95 
96  static void SetDefTrackCutsPeriod(const char* period) { fgDefTrackCutsPeriod = period; }
98 
99  const char* GetTitle() const;
100 
101 #if !(defined(__CINT__) || defined(__MAKECINT__))
102  const AliTrackIterableContainer all() const;
103  const AliTrackIterableContainer accepted() const;
104 
107 #endif
108 
109  protected:
111 
119  TArrayC fTrackTypes;
120 
121  private:
122  AliTrackContainer(const AliTrackContainer& obj); // copy constructor
123  AliTrackContainer& operator=(const AliTrackContainer& other); // assignment
124 
126  ClassDef(AliTrackContainer,1);
128 };
129 
130 #endif
131 
Interface for virtual track selection.
void SetTrackCutsPeriod(const char *period)
double Double_t
Definition: External.C:58
TObjArray * fFilteredTracks
! tracks filtered using fEmcalTrackSelection
Int_t GetNTracks() const
static TString fgDefTrackCutsPeriod
! default period string used to generate track cuts
const AliTrackIterableContainer accepted() const
Double_t mass
Int_t GetNParticles() const
Container with name, TClonesArray and cuts for particles.
EMCALIterableContainer::AliEmcalIterableContainerT< AliVTrack, EMCALIterableContainer::operator_star_object< AliVTrack > > AliTrackIterableContainer
virtual Bool_t AcceptParticle(const AliVParticle *vp, UInt_t &rejectionReason) const
char Char_t
Definition: External.C:18
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
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
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
int Int_t
Definition: External.C:63
virtual AliVParticle * GetParticle(Int_t i=-1) const
unsigned int UInt_t
Definition: External.C:33
EMCALIterableContainer::AliEmcalIterableContainerT< AliVTrack, EMCALIterableContainer::operator_star_pair< AliVTrack > > AliTrackIterableMomentumContainer
virtual Bool_t AcceptTrack(const AliVTrack *vp, UInt_t &rejectionReason) 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
void AddAODFilterBit(UInt_t bit)
virtual AliVParticle * GetNextParticle()
ETrackFilterType_t GetTrackFilterType() const
virtual AliVTrack * GetNextTrack()
virtual ~AliTrackContainer()
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 AliTrackIterableMomentumContainer accepted_momentum() const
const char * GetTitle() const
void SetTrackFilterType(ETrackFilterType_t f)
virtual AliVParticle * GetNextAcceptParticle()
bool Bool_t
Definition: External.C:53
Int_t GetNAcceptedParticles() const
virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const
AliTrackContainer & operator=(const AliTrackContainer &other)
Track status undefined.
const AliTrackIterableMomentumContainer all_momentum() const