AliPhysics  75b74d3 (75b74d3)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
AliTrackContainer.h
Go to the documentation of this file.
1 #ifndef ALITRACKCONTAINER_H
2 #define ALITRACKCONTAINER_H
3 
4 class AliVEvent;
5 class AliVParticle;
6 class AliVCuts;
7 class AliTLorentzVector;
8 
9 #include <TArrayC.h>
10 
11 #include "AliVTrack.h"
12 #include "AliEmcalTrackSelection.h"
13 #include "AliParticleContainer.h"
14 
16  public:
17 
19 
20  enum ETrackType_t {
21  kRejected = -1,
26  };
27 
29  AliTrackContainer(const char *name, const char *period = "");
30  virtual ~AliTrackContainer(){;}
31 
32  virtual Bool_t ApplyTrackCuts(const AliVTrack* vp);
33  virtual Bool_t AcceptObject(Int_t i) { return AcceptTrack(i) ; }
34  virtual Bool_t AcceptObject(const TObject* obj) { return AcceptTrack(dynamic_cast<const AliVTrack*>(obj)) ; }
35  virtual Bool_t AcceptParticle(Int_t i) { return AcceptTrack(i) ; }
36  virtual Bool_t AcceptParticle(const AliVParticle* vp) { return AcceptTrack(dynamic_cast<const AliVTrack*>(vp)) ; }
37  virtual AliVParticle *GetParticle(Int_t i=-1) const { return GetTrack(i) ; }
38  virtual AliVParticle *GetAcceptParticle(Int_t i=-1) { return GetAcceptTrack(i) ; }
39  virtual AliVParticle *GetNextAcceptParticle() { return GetNextAcceptTrack() ; }
40  virtual AliVParticle *GetNextParticle() { return GetNextTrack() ; }
41  virtual Bool_t AcceptTrack(const AliVTrack* vp) ;
42  virtual Bool_t AcceptTrack(Int_t i) ;
43  virtual AliVTrack *GetLeadingTrack(const char* opt="") { return static_cast<AliVTrack*>(GetLeadingParticle(opt)); }
44  virtual AliVTrack *GetTrack(Int_t i=-1) const;
45  virtual AliVTrack *GetAcceptTrack(Int_t i=-1) ;
46  virtual AliVTrack *GetNextAcceptTrack() ;
47  virtual AliVTrack *GetNextTrack() ;
48  virtual Bool_t GetMomentum(TLorentzVector &mom, const AliVTrack* part, Double_t mass);
49  virtual Bool_t GetMomentum(TLorentzVector &mom, const AliVTrack* part);
50  virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i);
51  virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i);
52  virtual Bool_t GetNextMomentum(TLorentzVector &mom);
53  virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom);
54  Int_t GetNTracks() const { return GetNParticles() ; }
57  Char_t GetTrackType(Int_t i) const { return i >= 0 && i < fTrackTypes.GetSize() ? fTrackTypes[i] : kUndefined ; }
58 
59  void SetArray(AliVEvent *event);
60 
61  void SetClassName(const char *clname);
62 
65 
66  void SetTrackCutsPeriod(const char* period) { fTrackCutsPeriod = period; }
67  void AddTrackCuts(AliVCuts *cuts);
68  Int_t GetNumberOfCutObjects() const;
69  AliVCuts *GetTrackCuts(Int_t icut);
70  void SetAODFilterBits(UInt_t bits) { fAODFilterBits = bits ; }
71  void AddAODFilterBit(UInt_t bit) { fAODFilterBits |= bit ; }
72  UInt_t GetAODFilterBits() const { return fAODFilterBits ; }
73 
76 
77  void NextEvent();
78 
79  static void SetDefTrackCutsPeriod(const char* period) { fgDefTrackCutsPeriod = period; }
80  static TString GetDefTrackCutsPeriod() { return fgDefTrackCutsPeriod ; }
81 
82  const char* GetTitle() const;
83 
84  protected:
85  static TString fgDefTrackCutsPeriod;
86 
87  ETrackFilterType_t fTrackFilterType; // track filter type
88  TObjArray *fListOfCuts; // list of track cut objects
89  Bool_t fSelectionModeAny; // accept track if any of the cuts is fulfilled
90  UInt_t fAODFilterBits; // track filter bits
91  TString fTrackCutsPeriod; // period string used to generate track cuts
93  TObjArray *fFilteredTracks;
94  TArrayC fTrackTypes;
95 
96  private:
97  AliTrackContainer(const AliTrackContainer& obj); // copy constructor
98  AliParticleContainer& operator=(const AliTrackContainer& other); // assignment
99 
101 };
102 
103 #endif
104 
Interface for virtual track selection.
ClassDef(AliTrackContainer, 1)
virtual Bool_t AcceptParticle(const AliVParticle *vp)
void SetTrackCutsPeriod(const char *period)
TObjArray * fFilteredTracks
track selection object
void SetClassName(const char *clname)
Int_t GetNTracks() const
virtual Bool_t ApplyTrackCuts(const AliVTrack *vp)
static TString fgDefTrackCutsPeriod
Double_t mass
Int_t GetNParticles() const
virtual Bool_t AcceptTrack(const AliVTrack *vp)
virtual Bool_t AcceptParticle(Int_t i)
AliVCuts * GetTrackCuts(Int_t icut)
virtual Bool_t GetNextMomentum(TLorentzVector &mom)
Char_t GetTrackType(Int_t i) const
AliEmcalTrackSelection * fEmcalTrackSelection
virtual AliVParticle * GetAcceptParticle(Int_t i=-1)
ETrackFilterType_t fTrackFilterType
default period string used to generate track cuts
void SetArray(AliVEvent *event)
Container for particles within the EMCAL framework.
UInt_t GetAODFilterBits() const
void SetAODFilterBits(UInt_t bits)
virtual AliVParticle * GetParticle(Int_t i=-1) const
Int_t GetNumberOfCutObjects() const
static void SetDefTrackCutsPeriod(const char *period)
virtual Bool_t AcceptObject(Int_t i)
void SetFilterHybridTracks(Bool_t f)
virtual AliVParticle * GetLeadingParticle(const char *opt="")
static TString GetDefTrackCutsPeriod()
TArrayC fTrackTypes
tracks filtered using fEmcalTrackSelection
TObjArray * fListOfCuts
void AddAODFilterBit(UInt_t bit)
virtual AliVParticle * GetNextParticle()
ETrackFilterType_t GetTrackFilterType() const
virtual AliVTrack * GetNextTrack()
virtual ~AliTrackContainer()
virtual AliVTrack * GetTrack(Int_t i=-1) const
virtual AliVTrack * GetLeadingTrack(const char *opt="")
virtual AliVTrack * GetNextAcceptTrack()
AliEmcalTrackSelection::ETrackFilterType_t ETrackFilterType_t
virtual Bool_t GetMomentum(TLorentzVector &mom, const AliVTrack *part, Double_t mass)
virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i)
void AddTrackCuts(AliVCuts *cuts)
virtual Bool_t AcceptObject(const TObject *obj)
virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom)
const char * GetTitle() const
void SetTrackFilterType(ETrackFilterType_t f)
virtual AliVTrack * GetAcceptTrack(Int_t i=-1)
virtual AliVParticle * GetNextAcceptParticle()
AliParticleContainer & operator=(const AliTrackContainer &other)