AliPhysics  8bb951a (8bb951a)
 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-1999, 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 
25  public:
26 
28 
33  enum ETrackType_t {
34  kRejected = -1,
35  kUndefined = 0,
39  };
40 
42  AliTrackContainer(const char *name, const char *period = "");
43  virtual ~AliTrackContainer(){;}
44 
45  virtual Bool_t ApplyTrackCuts(const AliVTrack* vp, UInt_t &rejectionReason) const;
46  virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const { return AcceptTrack(i, rejectionReason) ; }
47  virtual Bool_t AcceptObject(const TObject* obj, UInt_t &rejectionReason) const { return AcceptTrack(dynamic_cast<const AliVTrack*>(obj), rejectionReason); }
48  virtual Bool_t AcceptParticle(Int_t i, UInt_t &rejectionReason) const { return AcceptTrack(i, rejectionReason); }
49  virtual Bool_t AcceptParticle(const AliVParticle* vp, UInt_t &rejectionReason) const { return AcceptTrack(dynamic_cast<const AliVTrack*>(vp), rejectionReason); }
50  virtual AliVParticle *GetParticle(Int_t i=-1) const { return GetTrack(i) ; }
51  virtual AliVParticle *GetAcceptParticle(Int_t i=-1) const { return GetAcceptTrack(i) ; }
52  virtual AliVParticle *GetNextAcceptParticle() { return GetNextAcceptTrack() ; }
53  virtual AliVParticle *GetNextParticle() { return GetNextTrack() ; }
54  virtual Bool_t AcceptTrack(const AliVTrack* vp, UInt_t &rejectionReason) const;
55  virtual Bool_t AcceptTrack(Int_t i, UInt_t &rejectionReason) const;
56  virtual AliVTrack *GetLeadingTrack(const char* opt="") { return static_cast<AliVTrack*>(GetLeadingParticle(opt)); }
57  virtual AliVTrack *GetTrack(Int_t i=-1) const;
58  virtual AliVTrack *GetAcceptTrack(Int_t i=-1) const;
59  virtual AliVTrack *GetNextAcceptTrack() ;
60  virtual AliVTrack *GetNextTrack() ;
61  Char_t GetTrackType(const AliVTrack* track) const;
62  virtual Bool_t GetMomentumFromTrack(TLorentzVector &mom, const AliVTrack* track, Double_t mass) const;
63  virtual Bool_t GetMomentumFromTrack(TLorentzVector &mom, const AliVTrack* track) const;
64  virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const;
65  virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const;
66  virtual Bool_t GetNextMomentum(TLorentzVector &mom);
67  virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom);
68  Int_t GetNTracks() const { return GetNParticles() ; }
71  Char_t GetTrackType(Int_t i) const { return i >= 0 && i < fTrackTypes.GetSize() ? fTrackTypes[i] : kUndefined ; }
72 
73  void SetArray(AliVEvent *event);
74 
77 
78  void SetTrackCutsPeriod(const char* period) { fTrackCutsPeriod = period; }
79  void AddTrackCuts(AliVCuts *cuts);
80  Int_t GetNumberOfCutObjects() const;
81  AliVCuts *GetTrackCuts(Int_t icut);
82  void SetAODFilterBits(UInt_t bits) { fAODFilterBits = bits ; }
83  void AddAODFilterBit(UInt_t bit) { fAODFilterBits |= bit ; }
84  UInt_t GetAODFilterBits() const { return fAODFilterBits ; }
85 
88 
89  void NextEvent();
90 
91  static void SetDefTrackCutsPeriod(const char* period) { fgDefTrackCutsPeriod = period; }
92  static TString GetDefTrackCutsPeriod() { return fgDefTrackCutsPeriod ; }
93 
94  const char* GetTitle() const;
95 
96  protected:
97  static TString fgDefTrackCutsPeriod;
98 
100  TObjArray *fListOfCuts;
102  UInt_t fAODFilterBits;
105  TObjArray *fFilteredTracks;
106  TArrayC fTrackTypes;
107 
108  private:
109  AliTrackContainer(const AliTrackContainer& obj); // copy constructor
110  AliParticleContainer& operator=(const AliTrackContainer& other); // assignment
111 
113  ClassDef(AliTrackContainer,1);
115 };
116 
117 #endif
118 
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
Double_t mass
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
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
void SetArray(AliVEvent *event)
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
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)
virtual AliVTrack * GetAcceptTrack(Int_t i=-1) const
virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom)
const char * GetTitle() const
void SetTrackFilterType(ETrackFilterType_t f)
virtual AliVParticle * GetNextAcceptParticle()
Int_t GetNAcceptedParticles() const
virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const
Track status undefined.
AliParticleContainer & operator=(const AliTrackContainer &other)