ATLAS Offline Software
Loading...
Searching...
No Matches
HGTDTruthTrackDecorationAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
3*/
4
7
8namespace ActsTrk{
9
11 {
12 ATH_MSG_DEBUG("Initializing " << name() << "...");
13
15
18 ATH_CHECK( m_layerClusterMergedKey.initialize() );
20
21 return StatusCode::SUCCESS;
22 }
23
24 StatusCode HGTDTruthTrackDecorationAlg::execute(const EventContext& ctx) const
25 {
26 ATH_MSG_DEBUG("Executing " << name() << "...");
27
28 const xAOD::TrackParticleContainer* trackParticles {nullptr};
29 ATH_CHECK(SG::get(trackParticles, m_trackParticleContainerName, ctx));
30
31 ATH_MSG_DEBUG("Size of trackParticles collection " << trackParticles->size());
32
33 // Create WriteDecorHandles for all decorations
38
40 for (const xAOD::TrackParticle* trackParticle : *trackParticles) {
41 layerClusterTruthClassHandle(*trackParticle) = data.truthClassVec;
42 layerClusterShadowedHandle(*trackParticle) = data.isShadowedVec;
43 layerClusterMergedHandle(*trackParticle) = data.isMergedVec;
44 layerPrimaryExpectedHandle(*trackParticle) = data.primaryExistsVec;
45 }
46
47 return StatusCode::SUCCESS;
48 }
49
50}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
Handle class for adding a decoration to an object.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleContainerName
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterShadowedKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterMergedKey
virtual StatusCode execute(const EventContext &) const override
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerPrimaryExpectedKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterTruthClassKey
size_type size() const noexcept
Returns the number of elements in the collection.
Handle class for adding a decoration to an object.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Data structure to hold HGTD track extension results Contains information about hits,...