AliPhysics  a17849b (a17849b)
AliEmcalTrackSelection.h
Go to the documentation of this file.
1 #ifndef ALIEMCALTRACKSELECTION_H_
2 #define ALIEMCALTRACKSELECTION_H_
3 /* Copyright(c) 1998-2015, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 #include <TObject.h>
7 #include <TBits.h>
9 
10 class TClonesArray;
11 class TList;
12 class TObjArray;
13 class AliVCuts;
14 class AliVEvent;
15 class AliVTrack;
16 
17 namespace PWG {
18 namespace EMCAL {
19 
20 class AliEmcalCutBase;
21 
22 }
23 }
24 
41 public:
46 
52  AliEmcalManagedObject(TObject *object, bool owner = true);
53 
62 
70  AliEmcalManagedObject &operator=(const AliEmcalManagedObject &ref);
71 
75  virtual ~AliEmcalManagedObject() { Cleanup(); }
76 
81  operator bool() const { return fManagedObject != NULL; }
82 
87  bool IsOwner() const { return fOwner; }
88 
93  void SetOwner(bool owner = true) { fOwner = owner; }
94 
102  void SetObject(TObject *managedObject, bool owner = true) {
103  Cleanup();
104  fManagedObject = managedObject;
105  fOwner = owner;
106  }
107 
112  TObject *GetObject() { return fManagedObject; }
113 
114 protected:
115 
119  void Cleanup();
120 
121 private:
124 
126  ClassDef(AliEmcalManagedObject, 1);
128 };
129 
148 public:
149 
155  kNoTrackFilter = 0,
163  kHybridTracks2011woNoRefit
164  };
165 
172 
180 
188  AliEmcalTrackSelection &operator=(const AliEmcalTrackSelection &ref);
189 
197  virtual ~AliEmcalTrackSelection();
198 
212  TObjArray *GetAcceptedTracks(const TClonesArray * const tracks);
213 
227  TObjArray *GetAcceptedTracks(const AliVEvent *const event);
228 
243  virtual PWG::EMCAL::AliEmcalTrackSelResultPtr IsTrackAccepted(AliVTrack * const trk) = 0;
244 
262  virtual void GenerateTrackCuts(ETrackFilterType_t type, const char* period = "") = 0;
263 
270  void AddTrackCuts(AliVCuts *cuts);
271 
278  void AddTrackCuts(PWG::EMCAL::AliEmcalCutBase *cuts);
279 
286  void AddTrackCuts(TObjArray *cuts);
287 
292  Int_t GetNumberOfCutObjects() const;
293 
299  PWG::EMCAL::AliEmcalCutBase *GetTrackCuts(Int_t icut);
300 
307  void SetSelectionModeAny() { fSelectionModeAny = kTRUE ; }
308 
315  void SetSelectionModeAll() { fSelectionModeAny = kFALSE; }
316 
321  virtual void SaveQAObjects(TList *outputList) {}
322 
323 protected:
327 
329 
331 };
332 
333 #endif /* ALIEMCALTRACKSELECTION_H_ */
Interface for virtual track selection.
TObject * GetObject()
Providing access to managed object.
TObjArray * fListOfCuts
List of track cut objects.
virtual void SaveQAObjects(TList *outputList)
Structure containing the result of a given track selection step.
TObject * fManagedObject
Pointer to object handled by the smart pointer.
void SetSelectionModeAny()
Set selection mode to any.
void SetOwner(bool owner=true)
Specifying ownership over object.
Bool_t fOwner
Switch defining ownership over object.
Namespace for EMCAL framework classes and task.
bool IsOwner() const
Checks whether the object is set.
Hybrid tracks using the 2011 definition including NoITSrefit tracks (ESD-only)
Hybrid tracks using the 2010 definition including NoITSrefit tracks (ESD-only)
void SetObject(TObject *managedObject, bool owner=true)
Set new managed object with ownership.
int Int_t
Definition: External.C:63
Hybrid tracks using the 2010 definition excluding NoITSrefit tracks (ESD-only)
Namespace for PWG framework classes.
TObjArray * fListOfTracks
TObjArray with accepted tracks.
Bool_t fSelectionModeAny
Accept track if any of the cuts is fulfilled.
ETrackFilterType_t
Pre-defined track filters.
void SetSelectionModeAll()
Set selection mode to all.
Smart pointer implementation for objects inheriting from TObject.
Interface for a cut class returning selection status and user information.
bool Bool_t
Definition: External.C:53