ATLAS Offline Software
PFTrackSelector.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef PFTRACKSELECTOR_H
5 #define PFTRACKSELECTOR_H
6 
10 
12 
13 #include "StoreGate/DataHandle.h"
15 
20 #include "eflowRec/eflowRecTrack.h"
22 #include "xAODMuon/MuonContainer.h"
24 
26 
28 {
29 
30 public:
32  PFTrackSelector(const std::string& name, ISvcLocator* pSvcLocator);
35 
38  StatusCode execute(const EventContext& ctx) const;
40 
41 private:
43  bool selectTrack(const xAOD::TrackParticle& track) const;
44 
46  bool isElectron(const xAOD::TrackParticle* track) const;
47 
49  bool isMuon(const xAOD::TrackParticle* track) const;
50 
53  this,
54  "tracksName",
55  "InDetTrackParticles",
56  "ReadHandleKey for the TrackParticleContainer to be used as input"
57  };
58 
61  this,
62  "electronsName",
63  "eflowRec_selectedElectrons",
64  "ReadHandleKey for the ElectronContainer to be used as input"
65  };
66 
69  this,
70  "muonsName",
71  "eflowRec_selectedMuons",
72  "ReadHandleKey for the MuonContainer to be used as input"
73  };
74 
77  this,
78  "eflowRecTracksOutputName",
79  "eflowRecTracks",
80  "WriteHandleKey for the eflowRecTrackContainer to write out"
81  };
82 
84  "VertexContainer",
85  "PrimaryVertices",
86  "primary vertex container" };
87 
89  ToolHandle<eflowTrackExtrapolatorBaseAlgTool> m_theTrackExtrapolatorTool{
90  this,
91  "trackExtrapolatorTool",
92  "Trk::ParticleCaloExtensionTool",
93  "ToolHandle for track extrapolation to calorimeter tool"
94  };
95 
97  ToolHandle<InDet::IInDetTrackSelectionTool>
98  m_trackSelectorTool{ this, "trackSelectionTool", "", "ToolHandle to track selection tool provided by tracking CP" };
99 
101  Gaudi::Property<float> m_upperTrackPtCut{ this,
102  "upperTrackPtCut",
103  100.0,
104  "Upper limit on track Pt for input tracks" };
105 
107  ToolHandle<GenericMonitoringTool> m_monTool{ this, "MonTool", "", "Monitoring tool" };
108 };
109 #endif
TRT_DetElementContainer.h
PFTrackSelector::m_electronsReadHandleKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronsReadHandleKey
ReadHandleKey for the ElectronContainer to be used as input.
Definition: PFTrackSelector.h:60
eflowTrackExtrapolatorBaseAlgTool
Definition: eflowTrackExtrapolatorBaseAlgTool.h:28
SG::ReadHandleKey< xAOD::TrackParticleContainer >
PFTrackSelector::selectTrack
bool selectTrack(const xAOD::TrackParticle &track) const
This applys a selection criteria to the track using the tracking CP track selection tool.
Definition: PFTrackSelector.cxx:107
DataHandle.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
PFTrackSelector
Definition: PFTrackSelector.h:28
PFTrackSelector::m_trackSelectorTool
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelectorTool
ToolHandle to track selection tool provided by tracking CP.
Definition: PFTrackSelector.h:98
eflowRecTrack.h
PFTrackSelector::execute
StatusCode execute(const EventContext &ctx) const
Definition: PFTrackSelector.cxx:41
PFTrackSelector::isMuon
bool isMuon(const xAOD::TrackParticle *track) const
check if track belongs to an muon
Definition: PFTrackSelector.cxx:154
PFTrackSelector::finalize
StatusCode finalize()
Definition: PFTrackSelector.cxx:104
SG::WriteHandleKey< eflowRecTrackContainer >
ElectronContainer.h
PFTrackSelector::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Online monitoring tool for recording histograms of the alg in action.
Definition: PFTrackSelector.h:107
PFTrackSelector::isElectron
bool isElectron(const xAOD::TrackParticle *track) const
check if track belongs to an electron
Definition: PFTrackSelector.cxx:118
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PFTrackSelector::initialize
StatusCode initialize()
Gaudi AthAlgorithm hooks.
Definition: PFTrackSelector.cxx:17
PFTrackSelector::m_eflowRecTracksWriteHandleKey
SG::WriteHandleKey< eflowRecTrackContainer > m_eflowRecTracksWriteHandleKey
WriteHandleKey for the eflowRecTrackContainer to write out.
Definition: PFTrackSelector.h:76
PFTrackSelector::m_tracksReadHandleKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tracksReadHandleKey
ReadHandleKey for the TrackParticleContainer to be used as input.
Definition: PFTrackSelector.h:52
IInDetTrackSelectionTool.h
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
ReadCondHandleKey.h
AthReentrantAlgorithm.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
PFTrackSelector::m_vertexKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexKey
Definition: PFTrackSelector.h:83
SiDetectorElementCollection.h
PFTrackSelector::PFTrackSelector
PFTrackSelector(const std::string &name, ISvcLocator *pSvcLocator)
Default constructor.
Definition: PFTrackSelector.cxx:12
PFTrackSelector::m_muonsReadHandleKey
SG::ReadHandleKey< xAOD::MuonContainer > m_muonsReadHandleKey
ReadHandleKey for the MuonContainer to be used as input.
Definition: PFTrackSelector.h:68
MuonContainer.h
PFTrackSelector::m_theTrackExtrapolatorTool
ToolHandle< eflowTrackExtrapolatorBaseAlgTool > m_theTrackExtrapolatorTool
ToolHandle for track extrapolation to calorimeter tool.
Definition: PFTrackSelector.h:89
VertexContainer.h
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
PFTrackSelector::~PFTrackSelector
~PFTrackSelector()
Default destructor.
Definition: PFTrackSelector.h:34
PFTrackSelector::m_upperTrackPtCut
Gaudi::Property< float > m_upperTrackPtCut
Upper limit on track Pt for input tracks.
Definition: PFTrackSelector.h:101
TrackParticleContainer.h