ATLAS Offline Software
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 
8 namespace ActsTrk{
9 
11  {
12  ATH_MSG_DEBUG("Initializing " << name() << "...");
13 
15 
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 }
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
ActsTrk::HGTDTruthTrackDecorationAlg::TruthTrackExtensionData
Data structure to hold HGTD track extension results Contains information about hits,...
Definition: HGTDTruthTrackDecorationAlg.h:36
ActsTrk::HGTDTruthTrackDecorationAlg::m_layerClusterMergedKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterMergedKey
Definition: HGTDTruthTrackDecorationAlg.h:31
HGTDTruthTrackDecorationAlg.h
ActsTrk::HGTDTruthTrackDecorationAlg::initialize
virtual StatusCode initialize() override
Definition: HGTDTruthTrackDecorationAlg.cxx:10
ActsTrk::HGTDTruthTrackDecorationAlg::m_layerClusterTruthClassKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterTruthClassKey
Definition: HGTDTruthTrackDecorationAlg.h:29
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition: ReadCondHandle.h:287
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
WriteDecorHandle.h
Handle class for adding a decoration to an object.
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ActsTrk::HGTDTruthTrackDecorationAlg::execute
virtual StatusCode execute(const EventContext &) const override
Definition: HGTDTruthTrackDecorationAlg.cxx:24
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::HGTDTruthTrackDecorationAlg::m_trackParticleContainerName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleContainerName
Definition: HGTDTruthTrackDecorationAlg.h:26
SG::WriteDecorHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
ActsTrk::HGTDTruthTrackDecorationAlg::m_layerPrimaryExpectedKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerPrimaryExpectedKey
Definition: HGTDTruthTrackDecorationAlg.h:32
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MSTrackingVolumeBuilder.cxx:25
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
ActsTrk::HGTDTruthTrackDecorationAlg::m_layerClusterShadowedKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterShadowedKey
Definition: HGTDTruthTrackDecorationAlg.h:30