![]() |
AliPhysics
7f1bdba (7f1bdba)
|
Interface for virtual track selection. More...
#include <AliEmcalTrackSelection.h>
Public Types | |
enum | ETrackFilterType_t { kNoTrackFilter = 0, kCustomTrackFilter, kHybridTracks, kTPCOnlyTracks, kITSPureTracks, kHybridTracks2010wNoRefit, kHybridTracks2010woNoRefit, kHybridTracks2011wNoRefit, kHybridTracks2011woNoRefit, kHybridTracks2018TRD } |
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 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::AliEmcalCutBase * | GetTrackCuts (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 | |
TObjArray * | fListOfTracks |
TObjArray with accepted tracks. 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 171 of file AliEmcalTrackSelection.h.
Pre-defined track filters.
Definition at line 178 of file AliEmcalTrackSelection.h.
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
[in] | ref |
Definition at line 54 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 84 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 89 of file AliEmcalTrackSelection.cxx.
Referenced by AliEmcalTrackSelectionAOD::AddFilterBit(), PWG::EMCAL::AliEmcalESDTrackCutsGenerator::AddHybridTrackCuts(), PWG::EMCAL::AliEmcalESDTrackCutsGenerator::AddTPCOnlyTrackCuts(), AddTrackCuts(), AliEmcalTrackSelectionAOD::AliEmcalTrackSelectionAOD(), AliEmcalTrackSelectionESD::AliEmcalTrackSelectionESD(), AliEmcalTrackSelectionESD::GenerateTrackCuts(), AliEmcalTrackSelectionAOD::GenerateTrackCuts(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalClusterMatched::InitializeTrackSelections(), AliTrackContainer::SetArray(), and EMCalTriggerPtAnalysis::AliEmcalAnalysisFactory::TrackCutsFactory().
void AliEmcalTrackSelection::AddTrackCuts | ( | PWG::EMCAL::AliEmcalCutBase * | cuts | ) |
Add track cuts of type AliEmcalCutBase.
Takes ownership over the cuts
[in] | cuts | New 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
[in] | cuts | New set of cuts to add |
Definition at line 118 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.
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.
[in] | tracks | TClonesArray of tracks (must not be null) |
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.
[in] | event | AliVEvent, via interface of virtual event (must not be null) |
Definition at line 165 of file AliEmcalTrackSelection.cxx.
Int_t AliEmcalTrackSelection::GetNumberOfCutObjects | ( | ) | const |
Get the number of cut objects assigned.
Definition at line 134 of file AliEmcalTrackSelection.cxx.
PWG::EMCAL::AliEmcalCutBase * AliEmcalTrackSelection::GetTrackCuts | ( | Int_t | icut | ) |
Access to track cuts at a given position.
[in] | icut | Cut at position in array |
Definition at line 139 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::AliEMCalTriggerRecTrackAnalysisComponent::Process(), EMCalTriggerPtAnalysis::AliEMCalTriggerRecJetAnalysisComponent::Process(), EMCalTriggerPtAnalysis::AliAnalysisTaskTrackDensityData::Run(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalClusterMatched::Run(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalTriggerMultiplicity::Run(), EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesMCTriggerMimic::Run(), EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesRef::Run(), and PWG::EMCAL::TestImplAliEmcalTrackSelection::RunTest().
AliEmcalTrackSelection & AliEmcalTrackSelection::operator= | ( | const AliEmcalTrackSelection & | ref | ) |
Assingment operator.
Makes a flat copy
[in] | ref | Reference for the copy |
Definition at line 69 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 346 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 340 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 332 of file AliEmcalTrackSelection.h.
Referenced by AliTrackContainer::SetArray().
|
protected |
List of track cut objects.
Definition at line 350 of file AliEmcalTrackSelection.h.
Referenced by AliEmcalTrackSelectionAOD::AddFilterBit(), AddTrackCuts(), AliEmcalTrackSelection(), AliEmcalTrackSelectionESD::GenerateTrackCuts(), AliEmcalTrackSelectionAOD::GenerateTrackCuts(), GetNumberOfCutObjects(), GetTrackCuts(), AliEmcalTrackSelectionESD::IsTrackAccepted(), AliEmcalTrackSelectionAOD::IsTrackAccepted(), operator=(), AliEmcalTrackSelectionESD::SaveQAObjects(), and ~AliEmcalTrackSelection().
|
protected |
TObjArray with accepted tracks.
Definition at line 349 of file AliEmcalTrackSelection.h.
Referenced by AliEmcalTrackSelection(), GetAcceptedTracks(), operator=(), and ~AliEmcalTrackSelection().
|
protected |
Accept track if any of the cuts is fulfilled.
Definition at line 351 of file AliEmcalTrackSelection.h.
Referenced by AliEmcalTrackSelectionESD::GenerateTrackCuts(), AliEmcalTrackSelectionESD::IsTrackAccepted(), and AliEmcalTrackSelectionAOD::IsTrackAccepted().