ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaExamples
AthExBasics
src
ReadxAOD.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
10
11
#ifndef ATHEXBASICS_READXAOD_H
12
#define ATHEXBASICS_READXAOD_H
13
14
#include <atomic>
15
16
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
17
#include "GaudiKernel/ToolHandle.h"
18
#include "
InDetTrackSelectionTool/IInDetTrackSelectionTool.h
"
19
#include "
xAODTracking/TrackParticleContainer.h
"
20
21
class
ReadxAOD
:
public
AthReentrantAlgorithm
{
22
public
:
23
ReadxAOD
(
const
std::string &name, ISvcLocator *pSvcLocator);
24
25
virtual
StatusCode
initialize
()
override
;
26
virtual
StatusCode
execute
(
const
EventContext& ctx)
const override
;
27
virtual
StatusCode
finalize
()
override
;
28
29
private
:
31
mutable
std::atomic<unsigned int>
m_nTracksBelow
{0};
33
mutable
std::atomic<unsigned int>
m_nTracksAbove
{0};
35
Gaudi::Property<float>
m_cut
36
{
this
,
"PtCut"
, 500.0,
"pT Cut to apply to the tracks in MeV"
};
37
38
SG::ReadHandleKey<xAOD::TrackParticleContainer>
m_trackKey
{
this
,
"TrackParticlesKey"
,
"InDetTrackParticles"
};
40
ToolHandle<InDet::IInDetTrackSelectionTool>
m_trackSelectionTool
{
this
,
"TrackSelectionTool"
,
"InDetTrackSelectionTool"
,
"Tool for selecting tracks"
};
41
};
42
43
#endif
AthReentrantAlgorithm.h
TrackParticleContainer.h
IInDetTrackSelectionTool.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
ReadxAOD::m_nTracksBelow
std::atomic< unsigned int > m_nTracksBelow
Counter for tracks that have pT below the cut.
Definition
ReadxAOD.h:31
ReadxAOD::m_nTracksAbove
std::atomic< unsigned int > m_nTracksAbove
Counter for tracks that have pT above the cut.
Definition
ReadxAOD.h:33
ReadxAOD::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
ReadxAOD.cxx:25
ReadxAOD::m_trackSelectionTool
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelectionTool
Tool handle for the track selection tool.
Definition
ReadxAOD.h:40
ReadxAOD::m_trackKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackKey
Read handle for the offline object container - set to ID tracks by default.
Definition
ReadxAOD.h:38
ReadxAOD::initialize
virtual StatusCode initialize() override
Definition
ReadxAOD.cxx:11
ReadxAOD::ReadxAOD
ReadxAOD(const std::string &name, ISvcLocator *pSvcLocator)
Definition
ReadxAOD.cxx:7
ReadxAOD::finalize
virtual StatusCode finalize() override
Definition
ReadxAOD.cxx:49
ReadxAOD::m_cut
Gaudi::Property< float > m_cut
pT cut in MeV
Definition
ReadxAOD.h:36
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
Generated on
for ATLAS Offline Software by
1.17.0