7#ifndef THINNINGUTILS_ThinGeantTruthAlg_H
8#define THINNINGUTILS_ThinGeantTruthAlg_H
20#include "GaudiKernel/ServiceHandle.h"
21#include "GaudiKernel/ToolHandle.h"
33 using AthReentrantAlgorithm::AthReentrantAlgorithm;
35 virtual StatusCode
finalize()
override;
36 virtual StatusCode
execute(
const EventContext& ctx)
const override final;
41 std::unordered_set<int>&)
const;
44 std::unordered_set<int>&)
const;
50 "Stream for which thinning is to be done." };
55 "Max eta value for e-gamma truth particles" };
61 Gaudi::Property<std::string>
m_truthLinkDecor{
this,
"TruthLinkDecor",
"truthParticleLink"};
67 "LongLivedParticleList",
68 { 310, 3122, 3222, 3112, 3322, 3312 },
69 "List of long lifetime particles which are likely to be decayed by "
70 "Geant but whose children must be kept"
77 "Name of the input Truth Particle container"
84 "Name of the input Truth Vertices container"
91 "Name of the input electron container"
98 "Name of the input forward electron container"
105 "Name of the input photon container"
109 m_muonsKey{
this,
"MuonsKey",
"Muons",
"Name of the input muon container" };
114 "egammaTruthParticles",
115 "Name of the input egammaTruth container"
HandleKey object for adding thinning to an object.
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a ReadHandle is made.
HandleKey object for adding thinning to an object.
SG::ReadHandleKey< xAOD::MuonContainer > m_muonsKey
std::atomic< unsigned long > m_nParticlesThinned
void ancestors(const xAOD::TruthParticle *, std::vector< bool > &, std::unordered_set< int > &) const
Inline method.
std::atomic< unsigned long > m_nVerticesProcessed
std::atomic< unsigned long > m_nVerticesThinned
Gaudi::Property< std::string > m_truthLinkDecor
Truth particle link decorations.
SG::ReadHandleKey< xAOD::PhotonContainer > m_photonsKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_egammaTruthKey
virtual StatusCode execute(const EventContext &ctx) const override final
SG::ThinningHandleKey< xAOD::TruthVertexContainer > m_truthVerticesKey
StringProperty m_streamName
virtual StatusCode initialize() override
void descendants(const xAOD::TruthParticle *, std::vector< bool > &, std::unordered_set< int > &) const
Gaudi::Property< std::vector< int > > m_longlived
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronsKey
std::atomic< unsigned long > m_nEventsProcessed
Counters.
SG::ReadDecorHandleKeyArray< xAOD::IParticleContainer > m_readDecorKeys
Schedule the algorithm's dependency on the truth particle link.
virtual StatusCode finalize() override
Gaudi::Property< bool > m_keepMuons
Gaudi::Property< bool > m_keepEGamma
std::atomic< unsigned long > m_nParticlesProcessed
SG::ThinningHandleKey< xAOD::TruthParticleContainer > m_truthParticlesKey
Gaudi::Property< float > m_etaMaxEgTruth
SG::ReadHandleKey< xAOD::ElectronContainer > m_fwdElectronsKey
DecorHandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader > ReadDecorHandleKeyArray
TruthParticle_v1 TruthParticle
Typedef to implementation.