AliPhysics  5403132 (5403132)
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,
  kITSPureTracks, kHybridTracks2010wNoRefit, kHybridTracks2010woNoRefit, kHybridTracks2011wNoRefit,
  kHybridTracks2011woNoRefit
}
 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 PWG::EMCAL::AliEmcalTrackSelResultPtr 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 (PWG::EMCAL::AliEmcalCutBase *cuts)
 Add track cuts of type AliEmcalCutBase. 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...
 
PWG::EMCAL::AliEmcalCutBaseGetTrackCuts (Int_t icut)
 Access to track cuts at a given position. More...
 
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...
 
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 171 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.

kITSPureTracks 

ITS stand-alone tracks.

kHybridTracks2010wNoRefit 

Hybrid tracks using the 2010 definition including NoITSrefit tracks (ESD-only)

kHybridTracks2010woNoRefit 

Hybrid tracks using the 2010 definition excluding NoITSrefit tracks (ESD-only)

kHybridTracks2011wNoRefit 

Hybrid tracks using the 2011 definition including NoITSrefit tracks (ESD-only)

kHybridTracks2011woNoRefit 

Hybrid tracks using the 2011 definition excluding NoITSrefit tracks (ESD-only)

Definition at line 178 of file AliEmcalTrackSelection.h.

Constructor & Destructor Documentation

AliEmcalTrackSelection::AliEmcalTrackSelection ( )

Default consturctor.

Initialising objects with NULL, sets acception mode to ALL

Definition at line 46 of file AliEmcalTrackSelection.cxx.

AliEmcalTrackSelection::AliEmcalTrackSelection ( const AliEmcalTrackSelection ref)

Copy constructor.

Performing a flat copy

Parameters
[in]ref

Definition at line 54 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 84 of file AliEmcalTrackSelection.cxx.

Referenced by operator=().

Member Function Documentation

void AliEmcalTrackSelection::AddTrackCuts ( PWG::EMCAL::AliEmcalCutBase cuts)

Add track cuts of type AliEmcalCutBase.

Takes ownership over the cuts

Parameters
[in]cutsNew cuts to add

Definition at line 107 of file AliEmcalTrackSelection.cxx.

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 118 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.

Referenced by PWG::EMCAL::TestImplAliEmcalTrackSelectionHybrid::TestImplAliEmcalTrackSelectionHybrid(), PWG::EMCAL::TestImplAliEmcalTrackSelectionITSpure::TestImplAliEmcalTrackSelectionITSpure(), and PWG::EMCAL::TestImplAliEmcalTrackSelectionTPConly::TestImplAliEmcalTrackSelectionTPConly().

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

Select tracks from a TClonesArray of input tracks.

Running track selection for all tracks in the input array (by calling the IsTrackAccepted function) and storing the track selection result in the output container. Attention: The output container contains the result for all tracks, not only those selected. It is the user responsibility to filter the selected tracks.

Parameters
[in]tracksTClonesArray of tracks (must not be null)
Returns
TObjArray of AliEmcalTrackSelResultPtr with the selection status for all tracks

Definition at line 149 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.

Running track selection for all tracks in the input event (by calling the IsTrackAccepted function) and storing the track selection result in the output container. Attention: The output container contains the result for all tracks, not only those selected. It is the user responsibility to filter the selected tracks.

Parameters
[in]eventAliVEvent, via interface of virtual event (must not be null)
Returns
TObjArray of AliEmcalTrackSelResultPtr with the selection status for all tracks

Definition at line 165 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 134 of file AliEmcalTrackSelection.cxx.

PWG::EMCAL::AliEmcalCutBase * 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 139 of file AliEmcalTrackSelection.cxx.

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

virtual PWG::EMCAL::AliEmcalTrackSelResultPtr 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 69 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 345 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 339 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 331 of file AliEmcalTrackSelection.h.

Referenced by AliTrackContainer::SetArray().

Member Data Documentation

TObjArray* AliEmcalTrackSelection::fListOfTracks
protected

TObjArray with accepted tracks.

Definition at line 348 of file AliEmcalTrackSelection.h.

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

Bool_t AliEmcalTrackSelection::fSelectionModeAny
protected

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