AliPhysics  d497547 (d497547)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEmcalTrackSelection Class Referenceabstract

Interface for virtual track selection. More...

#include <AliEmcalTrackSelection.h>

Inheritance diagram for AliEmcalTrackSelection:

Public Types

enum  ETrackFilterType_t { kNoTrackFilter = 0, kCustomTrackFilter, kHybridTracks, kTPCOnlyTracks }
 Pre-defined track filters. More...
 

Public Member Functions

 AliEmcalTrackSelection ()
 Default consturctor. More...
 
 AliEmcalTrackSelection (const AliEmcalTrackSelection &ref)
 Copy constructor. More...
 
AliEmcalTrackSelectionoperator= (const AliEmcalTrackSelection &ref)
 Assingment operator. More...
 
virtual ~AliEmcalTrackSelection ()
 Destructor. More...
 
TObjArrayGetAcceptedTracks (const TClonesArray *const tracks)
 Select tracks from a TClonesArray of input tracks. More...
 
TObjArrayGetAcceptedTracks (const AliVEvent *const event)
 Select tracks from a virtual event. More...
 
virtual bool IsTrackAccepted (AliVTrack *const trk)=0
 Interface for track selection code. More...
 
virtual void GenerateTrackCuts (ETrackFilterType_t type, const char *period="")=0
 Interface for track cut generators. More...
 
void AddTrackCuts (AliVCuts *cuts)
 Add new track cuts to the list of cuts. More...
 
void AddTrackCuts (TObjArray *cuts)
 Add new set of track cuts to the list of cuts. More...
 
Int_t GetNumberOfCutObjects () const
 Get the number of cut objects assigned. More...
 
AliVCuts * GetTrackCuts (Int_t icut)
 Access to track cuts at a given position. More...
 
const TBits & GetTrackBitmap () const
 Get selection bitmap for the last handled track. More...
 
const TClonesArray * GetAcceptedTrackBitmaps () const
 
void SetSelectionModeAny ()
 Set selection mode to any. More...
 
void SetSelectionModeAll ()
 Set selection mode to all. More...
 
virtual void SaveQAObjects (TList *outputList)
 

Protected Attributes

TObjArrayfListOfTracks
 TObjArray with accepted tracks. More...
 
TClonesArray * fListOfTrackBitmaps
 TClonesArray with accepted tracks' bit maps. More...
 
TBits fTrackBitmap
 Bitmap of last accepted/rejected track. More...
 
TObjArrayfListOfCuts
 List of track cut objects. More...
 
Bool_t fSelectionModeAny
 Accept track if any of the cuts is fulfilled. More...
 

Detailed Description

Interface for virtual track selection.

Author
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Lawrence Berkeley National Laboratory
Salvatore Aiola salva.nosp@m.tore.nosp@m..aiol.nosp@m.a@ce.nosp@m.rn.ch, Yale University
Date
Jan 30, 2016

Interface for track selection within the EMCAL framework. Enables transparent track selection for ESDs and AODs by implementing a wrapper derived from this class. The following abstract functions need to be implemented by inheriting classes:

  • GetAcceptedTracks (with TClonesArray and AliVEvent as parameters)
  • IsTrackAccepted (with AliVTrackCuts)
  • GenerateTrackCuts

The usage of the virtual track selection is described here: VirtualTrackSelection

Definition at line 138 of file AliEmcalTrackSelection.h.

Member Enumeration Documentation

Pre-defined track filters.

Enumerator
kNoTrackFilter 

No filter (all tracks passing)

kCustomTrackFilter 

Custom (user-defined) tracks.

kHybridTracks 

Hybrid tracks.

kTPCOnlyTracks 

TPC-only tracks.

Definition at line 145 of file AliEmcalTrackSelection.h.

Constructor & Destructor Documentation

AliEmcalTrackSelection::AliEmcalTrackSelection ( )

Default consturctor.

Initialising objects with NULL, sets acception mode to ALL

Definition at line 29 of file AliEmcalTrackSelection.cxx.

AliEmcalTrackSelection::AliEmcalTrackSelection ( const AliEmcalTrackSelection ref)

Copy constructor.

Performing a flat copy

Parameters
[in]ref

Definition at line 39 of file AliEmcalTrackSelection.cxx.

AliEmcalTrackSelection::~AliEmcalTrackSelection ( )
virtual

Destructor.

Deletes track and track cut arrays. In case the object has ownership over the track cuts itself, it also deletes those

Definition at line 73 of file AliEmcalTrackSelection.cxx.

Referenced by operator=().

Member Function Documentation

void AliEmcalTrackSelection::AddTrackCuts ( TObjArray cuts)

Add new set of track cuts to the list of cuts.

Takes ownership over the cuts

Parameters
[in]cutsNew set of cuts to add

Definition at line 87 of file AliEmcalTrackSelection.cxx.

virtual void AliEmcalTrackSelection::GenerateTrackCuts ( ETrackFilterType_t  type,
const char *  period = "" 
)
pure virtual

Interface for track cut generators.

Track cut definitions might change period-by-period. Generators are methods to initialize the track cuts once the period is known. The method has default implementations for hybrid and global tracks.

As the way of implementation differs between ESDs and AODs the method has to be implemented in the child class.

Attention: In order to be usable for a given dataset, the initialization for the period / dataset needs to be implemented in the child class. Not all datasets are necessarily supported.

Parameters
[in]typePre-defined track cuts type
[in]periodPeriod / Dataset name for which to initialize the track cuts

Implemented in AliEmcalTrackSelectionAOD, and AliEmcalTrackSelectionESD.

const TClonesArray* AliEmcalTrackSelection::GetAcceptedTrackBitmaps ( ) const
inline

Get selection bitmaps of all accepted tracks

Returns
Bitmaps of all selected tracks

Definition at line 277 of file AliEmcalTrackSelection.h.

Referenced by AliTrackContainer::NextEvent().

TObjArray * AliEmcalTrackSelection::GetAcceptedTracks ( const TClonesArray *const  tracks)

Select tracks from a TClonesArray of input tracks.

Parameters
[in]tracksTClonesArray of tracks (must not be null)
Returns
TObjArray of selected tracks

Definition at line 113 of file AliEmcalTrackSelection.cxx.

Referenced by AliTrackContainer::NextEvent(), and EMCalTriggerPtAnalysis::AliAnalysisTaskPtEMCalTrigger::Run().

TObjArray * AliEmcalTrackSelection::GetAcceptedTracks ( const AliVEvent *const  event)

Select tracks from a virtual event.

Delegates selection process to function IsTrackAccepted

Parameters
[in]eventAliVEvent, via interface of virtual event (must not be null)
Returns
TObjArray of selected tracks

Definition at line 146 of file AliEmcalTrackSelection.cxx.

Int_t AliEmcalTrackSelection::GetNumberOfCutObjects ( ) const

Get the number of cut objects assigned.

Returns
The number of cut objects

Definition at line 98 of file AliEmcalTrackSelection.cxx.

const TBits& AliEmcalTrackSelection::GetTrackBitmap ( ) const
inline

Get selection bitmap for the last handled track.

Returns
Track selection bitmap of the last handled track

Definition at line 271 of file AliEmcalTrackSelection.h.

AliVCuts * AliEmcalTrackSelection::GetTrackCuts ( Int_t  icut)

Access to track cuts at a given position.

Parameters
[in]icutCut at position in array
Returns
The cuts (NULL for invalid positions)

Definition at line 103 of file AliEmcalTrackSelection.cxx.

Referenced by EMCalTriggerPtAnalysis::AliAnalysisTaskPtEMCalTrigger::UserCreateOutputObjects().

virtual bool AliEmcalTrackSelection::IsTrackAccepted ( AliVTrack *const  trk)
pure virtual
AliEmcalTrackSelection & AliEmcalTrackSelection::operator= ( const AliEmcalTrackSelection ref)

Assingment operator.

Makes a flat copy

Parameters
[in]refReference for the copy
Returns
Result of the copy

Definition at line 57 of file AliEmcalTrackSelection.cxx.

virtual void AliEmcalTrackSelection::SaveQAObjects ( TList outputList)
inlinevirtual

Saving QA objects to the output list.

Parameters
[in]outputListCommon output list, used to store QA objects

Reimplemented in AliEmcalTrackSelectionESD.

Definition at line 299 of file AliEmcalTrackSelection.h.

Referenced by EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesRef::CreateUserObjects().

void AliEmcalTrackSelection::SetSelectionModeAll ( )
inline

Set selection mode to all.

In this case tracks are only accepted if all cuts are passed.

Definition at line 293 of file AliEmcalTrackSelection.h.

Referenced by AliTrackContainer::SetArray().

void AliEmcalTrackSelection::SetSelectionModeAny ( )
inline

Set selection mode to any.

In this case tracks are accepted if any of the cuts is passed.

Definition at line 285 of file AliEmcalTrackSelection.h.

Referenced by AliTrackContainer::SetArray().

Member Data Documentation

TClonesArray* AliEmcalTrackSelection::fListOfTrackBitmaps
protected

TClonesArray with accepted tracks' bit maps.

Definition at line 303 of file AliEmcalTrackSelection.h.

Referenced by AliEmcalTrackSelection(), GetAcceptedTrackBitmaps(), GetAcceptedTracks(), operator=(), and ~AliEmcalTrackSelection().

TObjArray* AliEmcalTrackSelection::fListOfTracks
protected

TObjArray with accepted tracks.

Definition at line 302 of file AliEmcalTrackSelection.h.

Referenced by AliEmcalTrackSelection(), GetAcceptedTracks(), operator=(), and ~AliEmcalTrackSelection().

TBits AliEmcalTrackSelection::fTrackBitmap
protected

The documentation for this class was generated from the following files: