AliPhysics  1168478 (1168478)
 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>
8 
9 class TClonesArray;
10 class TList;
11 class TObjArray;
12 class AliVCuts;
13 class AliVEvent;
14 class AliVTrack;
15 
32 public:
37 
43  AliEmcalManagedObject(TObject *object, bool owner = true);
44 
53 
62 
67 
72  operator bool() const { return fManagedObject != NULL; }
73 
78  bool IsOwner() const { return fOwner; }
79 
84  void SetOwner(bool owner = true) { fOwner = owner; }
85 
93  void SetObject(TObject *managedObject, bool owner = true) {
94  Cleanup();
95  fManagedObject = managedObject;
96  fOwner = owner;
97  }
98 
104 
105 protected:
106 
110  void Cleanup();
111 
112 private:
115 
117  ClassDef(AliEmcalManagedObject, 1);
119 };
120 
139 public:
140 
150  };
151 
158 
166 
175 
183  virtual ~AliEmcalTrackSelection();
184 
191  TObjArray *GetAcceptedTracks(const TClonesArray * const tracks);
192 
201  TObjArray *GetAcceptedTracks(const AliVEvent *const event);
202 
217  virtual bool IsTrackAccepted(AliVTrack * const trk) = 0;
218 
236  virtual void GenerateTrackCuts(ETrackFilterType_t type, const char* period = "") = 0;
237 
244  void AddTrackCuts(AliVCuts *cuts);
245 
252  void AddTrackCuts(TObjArray *cuts);
253 
259 
265  AliVCuts *GetTrackCuts(Int_t icut);
266 
271  const TBits& GetTrackBitmap() const { return fTrackBitmap; }
272 
277  const TClonesArray* GetAcceptedTrackBitmaps() const { return fListOfTrackBitmaps; }
278 
286 
294 
299  virtual void SaveQAObjects(TList *outputList) {}
300 
301 protected:
303  TClonesArray *fListOfTrackBitmaps;
304  TBits fTrackBitmap;
307 
309 
311 };
312 
313 #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.
Int_t GetNumberOfCutObjects() const
Get the number of cut objects assigned.
TObjArray * fListOfCuts
List of track cut objects.
virtual void SaveQAObjects(TList *outputList)
const TClonesArray * GetAcceptedTrackBitmaps() const
TObject * fManagedObject
Pointer to object handled by the smart pointer.
void SetSelectionModeAny()
Set selection mode to any.
AliEmcalManagedObject()
Dummy constructor.
TClonesArray * fListOfTrackBitmaps
TClonesArray with accepted tracks' bit maps.
void SetOwner(bool owner=true)
Specifying ownership over object.
Bool_t fOwner
Switch defining ownership over object.
const TBits & GetTrackBitmap() const
Get selection bitmap for the last handled track.
bool IsOwner() const
Checks whether the object is set.
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
AliVCuts * GetTrackCuts(Int_t icut)
Access to track cuts at a given position.
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.
TBits fTrackBitmap
Bitmap of last accepted/rejected track.
virtual ~AliEmcalTrackSelection()
Destructor.
ETrackFilterType_t
Pre-defined track filters.
void SetSelectionModeAll()
Set selection mode to all.
Smart pointer implementation for objects inheriting from TObject.
bool Bool_t
Definition: External.C:53
virtual bool IsTrackAccepted(AliVTrack *const trk)=0
Interface for track selection code.