![]() |
AliPhysics
58ae0ed (58ae0ed)
|
Interface for virtual track selection. More...
#include <AliEmcalTrackSelection.h>
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... | |
AliEmcalTrackSelection & | operator= (const AliEmcalTrackSelection &ref) |
Assingment operator. More... | |
virtual | ~AliEmcalTrackSelection () |
Destructor. More... | |
TObjArray * | GetAcceptedTracks (const TClonesArray *const tracks) |
Select tracks from a TClonesArray of input tracks. More... | |
TObjArray * | GetAcceptedTracks (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 | |
TObjArray * | fListOfTracks |
TObjArray with accepted tracks. More... | |
TClonesArray * | fListOfTrackBitmaps |
TClonesArray with accepted tracks' bit maps. More... | |
TBits | fTrackBitmap |
Bitmap of last accepted/rejected track. More... | |
TObjArray * | fListOfCuts |
List of track cut objects. More... | |
Bool_t | fSelectionModeAny |
Accept track if any of the cuts is fulfilled. More... | |
Interface for virtual track selection.
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:
The usage of the virtual track selection is described here: VirtualTrackSelection
Definition at line 138 of file AliEmcalTrackSelection.h.
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.
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
[in] | ref |
Definition at line 39 of file AliEmcalTrackSelection.cxx.
|
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=().
void AliEmcalTrackSelection::AddTrackCuts | ( | AliVCuts * | cuts | ) |
Add new track cuts to the list of cuts.
Takes ownership over the cuts
[in] | cuts | New cuts to add |
Definition at line 79 of file AliEmcalTrackSelection.cxx.
Referenced by AliEmcalESDTrackCutsGenerator::AddHybridTrackCuts(), AliEmcalESDTrackCutsGenerator::AddTPCOnlyTrackCuts(), AddTrackCuts(), AliEmcalTrackSelectionAOD::AliEmcalTrackSelectionAOD(), AliEmcalTrackSelectionESD::AliEmcalTrackSelectionESD(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalClusterMatched::InitializeTrackSelections(), AliTrackContainer::SetArray(), and EMCalTriggerPtAnalysis::AliEmcalAnalysisFactory::TrackCutsFactory().
void AliEmcalTrackSelection::AddTrackCuts | ( | TObjArray * | cuts | ) |
Add new set of track cuts to the list of cuts.
Takes ownership over the cuts
[in] | cuts | New set of cuts to add |
Definition at line 87 of file AliEmcalTrackSelection.cxx.
|
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.
[in] | type | Pre-defined track cuts type |
[in] | period | Period / Dataset name for which to initialize the track cuts |
Implemented in AliEmcalTrackSelectionAOD, and AliEmcalTrackSelectionESD.
|
inline |
Get selection bitmaps of all accepted 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.
[in] | tracks | TClonesArray of tracks (must not be null) |
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
[in] | event | AliVEvent, via interface of virtual event (must not be null) |
Definition at line 146 of file AliEmcalTrackSelection.cxx.
Int_t AliEmcalTrackSelection::GetNumberOfCutObjects | ( | ) | const |
Get the number of cut objects assigned.
Definition at line 98 of file AliEmcalTrackSelection.cxx.
|
inline |
Get selection bitmap for 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.
[in] | icut | Cut at position in array |
Definition at line 103 of file AliEmcalTrackSelection.cxx.
Referenced by EMCalTriggerPtAnalysis::AliAnalysisTaskPtEMCalTrigger::UserCreateOutputObjects().
|
pure virtual |
Interface for track selection code.
This interface has to be implemented by the child classes. Here the selection of the track takes place. The function defines whether the track provided as argument is selected.
Attention: The function has to support both AliESD/AliAODtack on the one side and AliPicoTrack on the other side in order to be compatible with the old EMCAL framework.
[in] | trk | Track to be checked |
Implemented in AliEmcalTrackSelectionAOD, and AliEmcalTrackSelectionESD.
Referenced by AliAnalysisTaskParticleInJet::AcceptTrack(), EMCalTriggerPtAnalysis::AliAnalysisTaskPtEfficiencyJets::FindAssociatedTrack(), GetAcceptedTracks(), EMCalTriggerPtAnalysis::AliAnalysisTaskTrackDensity::GetAcceptLabels(), EMCalTriggerPtAnalysis::AliAnalysisTaskTrackDensityData::GetParticleMultiplicity(), EMCalTriggerPtAnalysis::AliEMCalTriggerRecJetAnalysisComponent::Process(), EMCalTriggerPtAnalysis::AliEMCalTriggerRecTrackAnalysisComponent::Process(), EMCalTriggerPtAnalysis::AliAnalysisTaskTrackDensityData::Run(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalClusterMatched::Run(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalTriggerMultiplicity::Run(), EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesMCTriggerMimic::Run(), and EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesRef::Run().
AliEmcalTrackSelection & AliEmcalTrackSelection::operator= | ( | const AliEmcalTrackSelection & | ref | ) |
Assingment operator.
Makes a flat copy
[in] | ref | Reference for the copy |
Definition at line 57 of file AliEmcalTrackSelection.cxx.
|
inlinevirtual |
Saving QA objects to the output list.
[in] | outputList | Common output list, used to store QA objects |
Reimplemented in AliEmcalTrackSelectionESD.
Definition at line 299 of file AliEmcalTrackSelection.h.
Referenced by EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesRef::CreateUserObjects().
|
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().
|
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().
|
protected |
List of track cut objects.
Definition at line 305 of file AliEmcalTrackSelection.h.
Referenced by AddTrackCuts(), AliEmcalTrackSelection(), AliEmcalTrackSelectionESD::GenerateTrackCuts(), AliEmcalTrackSelectionAOD::GenerateTrackCuts(), GetNumberOfCutObjects(), GetTrackCuts(), AliEmcalTrackSelectionESD::IsTrackAccepted(), AliEmcalTrackSelectionAOD::IsTrackAccepted(), operator=(), AliEmcalTrackSelectionESD::SaveQAObjects(), and ~AliEmcalTrackSelection().
|
protected |
TClonesArray with accepted tracks' bit maps.
Definition at line 303 of file AliEmcalTrackSelection.h.
Referenced by AliEmcalTrackSelection(), GetAcceptedTrackBitmaps(), GetAcceptedTracks(), operator=(), and ~AliEmcalTrackSelection().
|
protected |
TObjArray with accepted tracks.
Definition at line 302 of file AliEmcalTrackSelection.h.
Referenced by AliEmcalTrackSelection(), GetAcceptedTracks(), operator=(), and ~AliEmcalTrackSelection().
|
protected |
Accept track if any of the cuts is fulfilled.
Definition at line 306 of file AliEmcalTrackSelection.h.
Referenced by AliEmcalTrackSelectionESD::GenerateTrackCuts(), AliEmcalTrackSelectionAOD::GenerateTrackCuts(), AliEmcalTrackSelectionESD::IsTrackAccepted(), AliEmcalTrackSelectionAOD::IsTrackAccepted(), SetSelectionModeAll(), and SetSelectionModeAny().
|
protected |
Bitmap of last accepted/rejected track.
Definition at line 304 of file AliEmcalTrackSelection.h.
Referenced by GetAcceptedTracks(), GetTrackBitmap(), AliEmcalTrackSelectionESD::IsTrackAccepted(), and AliEmcalTrackSelectionAOD::IsTrackAccepted().