ATLAS Offline Software
Loading...
Searching...
No Matches
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
17#include "GaudiKernel/ToolHandle.h"
20
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
An algorithm that can be simultaneously executed in multiple threads.
std::atomic< unsigned int > m_nTracksBelow
Counter for tracks that have pT below the cut.
Definition ReadxAOD.h:31
std::atomic< unsigned int > m_nTracksAbove
Counter for tracks that have pT above the cut.
Definition ReadxAOD.h:33
virtual StatusCode execute(const EventContext &ctx) const override
Definition ReadxAOD.cxx:25
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelectionTool
Tool handle for the track selection tool.
Definition ReadxAOD.h:40
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackKey
Read handle for the offline object container - set to ID tracks by default.
Definition ReadxAOD.h:38
virtual StatusCode initialize() override
Definition ReadxAOD.cxx:11
ReadxAOD(const std::string &name, ISvcLocator *pSvcLocator)
Definition ReadxAOD.cxx:7
virtual StatusCode finalize() override
Definition ReadxAOD.cxx:49
Gaudi::Property< float > m_cut
pT cut in MeV
Definition ReadxAOD.h:36
Property holding a SG store/key/clid from which a ReadHandle is made.