AliPhysics  0b37c46 (0b37c46)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
71 
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 
113 
114 protected:
115 
119  void Cleanup();
120 
121 private:
124 
126  ClassDef(AliEmcalManagedObject, 1);
128 };
129 
148 public:
149 
164  };
165 
172 
180 
189 
197  virtual ~AliEmcalTrackSelection();
198 
205  TObjArray *GetAcceptedTracks(const TClonesArray * const tracks);
206 
215  TObjArray *GetAcceptedTracks(const AliVEvent *const event);
216 
231  virtual PWG::EMCAL::AliEmcalTrackSelResultPtr IsTrackAccepted(AliVTrack * const trk) = 0;
232 
250  virtual void GenerateTrackCuts(ETrackFilterType_t type, const char* period = "") = 0;
251 
258  void AddTrackCuts(AliVCuts *cuts);
259 
267 
274  void AddTrackCuts(TObjArray *cuts);
275 
281 
288 
296 
304 
309  virtual void SaveQAObjects(TList *outputList) {}
310 
311 protected:
315 
317 
319 };
320 
321 #endif /* ALIEMCALTRACKSELECTION_H_ */
Interface for virtual track selection.
virtual void GenerateTrackCuts(ETrackFilterType_t type, const char *period="")=0
Interface for track cut generators.
AliEmcalTrackSelection & operator=(const AliEmcalTrackSelection &ref)
Assingment operator.
TObject * GetObject()
Providing access to managed object.
PWG::EMCAL::AliEmcalCutBase * GetTrackCuts(Int_t icut)
Access to track cuts at a given position.
Int_t GetNumberOfCutObjects() const
Get the number of cut objects assigned.
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.
AliEmcalManagedObject()
Dummy constructor.
void SetOwner(bool owner=true)
Specifying ownership over object.
Bool_t fOwner
Switch defining ownership over object.
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)
AliEmcalManagedObject & operator=(const AliEmcalManagedObject &ref)
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)
Hybrid tracks using the 2011 definition excluding NoITSrefit tracks (ESD-only)
AliEmcalTrackSelection()
Default consturctor.
void AddTrackCuts(AliVCuts *cuts)
Add new track cuts to the list of cuts.
TObjArray * fListOfTracks
TObjArray with accepted tracks.
Bool_t fSelectionModeAny
Accept track if any of the cuts is fulfilled.
TObjArray * GetAcceptedTracks(const TClonesArray *const tracks)
Select tracks from a TClonesArray of input tracks.
virtual PWG::EMCAL::AliEmcalTrackSelResultPtr IsTrackAccepted(AliVTrack *const trk)=0
Interface for track selection code.
virtual ~AliEmcalTrackSelection()
Destructor.
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