ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonPhaseII
MuonCnv
MuonActsDump
src
TruthSegmentWriter.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef MUONACTSDUMP_TRUTHSEGMENTWRITER_H
5
#define MUONACTSDUMP_TRUTHSEGMENTWRITER_H
6
7
#include "
AthenaBaseComps/AthHistogramAlgorithm.h
"
8
9
#include "
MuonTesterTree/MuonTesterTree.h
"
10
#include "
MuonTesterTree/ThreeVectorBranch.h
"
11
#include "
MuonPRDTest/SegmentVariables.h
"
12
13
#include "
ActsEvent/ContextUtility.h
"
14
#include "
MuonReadoutGeometryR4/MuonDetectorManager.h
"
15
#include "
xAODMuon/MuonSegmentContainer.h
"
16
17
#include "
StoreGate/ReadHandleKey.h
"
18
#include "
StoreGate/ReadDecorHandleKey.h
"
19
20
#include "
MuonIdHelpers/IMuonIdHelperSvc.h
"
21
22
23
namespace
Acts
{
24
class
Surface;
25
}
26
27
namespace
MuonValR4
{
28
class
TruthSegmentWriter
:
public
AthHistogramAlgorithm
{
29
public
:
30
using
AthHistogramAlgorithm::AthHistogramAlgorithm
;
31
virtual
StatusCode
initialize
()
override
final
;
32
virtual
StatusCode
execute
(
const
EventContext& ctx)
override
final
;
33
virtual
StatusCode
finalize
()
override
final
;
34
private
:
36
const
Acts::Surface&
getSurface
(
const
Identifier
& simHitId)
const
;
38
const
Acts::Surface&
getSurface
(
const
xAOD::MuonSegment
& segment)
const
;
40
ActsTrk::ContextUtility
m_ctxProvider
{
this
};
41
43
SG::ReadHandleKey<xAOD::MuonSegmentContainer>
m_segmentKey
{
this
,
"segmentKey"
,
"MuonTruthSegments"
};
45
SG::ReadDecorHandleKey<xAOD::MuonSegmentContainer>
m_truthLinkKey
{
this
,
"truthLinkKey"
,
m_segmentKey
,
"truthParticleLink"
};
46
48
ServiceHandle<Muon::IMuonIdHelperSvc>
m_idHelperSvc
{
this
,
"MuonIdHelperSvc"
,
"Muon::MuonIdHelperSvc/MuonIdHelperSvc"
};
50
const
MuonGMR4::MuonDetectorManager
*
m_detMgr
{
nullptr
};
51
53
MuonVal::MuonTesterTree
m_tree
{
"MuonTruth"
,
"ActsMuonTruthDump"
};
55
MuonVal::ScalarBranch<std::uint32_t>
&
m_eventId
{
m_tree
.newScalar<std::uint32_t>(
"event_id"
)};
57
std::shared_ptr<MuonPRDTest::SegmentVariables>
m_segmentBranches
{};
59
std::shared_ptr<MuonVal::CoordSystemsBranch>
m_segmentFrames
{};
61
std::shared_ptr<MuonVal::IParticleFourMomBranch>
m_truthTrks
{};
62
63
64
65
};
66
}
67
68
69
#endif
AthHistogramAlgorithm.h
ContextUtility.h
IMuonIdHelperSvc.h
MuonDetectorManager.h
MuonSegmentContainer.h
MuonTesterTree.h
SegmentVariables.h
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
ThreeVectorBranch.h
ActsTrk::ContextUtility
Utility class to handle the three contexts neeeded in an ACTS reconstruction job 1) GeometryContext -...
Definition
ContextUtility.h:27
AthHistogramAlgorithm::AthHistogramAlgorithm
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition
AthHistogramAlgorithm.cxx:31
MuonGMR4::MuonDetectorManager
Definition
MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:62
MuonValR4::TruthSegmentWriter
Definition
TruthSegmentWriter.h:28
MuonValR4::TruthSegmentWriter::initialize
virtual StatusCode initialize() override final
Definition
TruthSegmentWriter.cxx:24
MuonValR4::TruthSegmentWriter::execute
virtual StatusCode execute(const EventContext &ctx) override final
Execute method.
Definition
TruthSegmentWriter.cxx:98
MuonValR4::TruthSegmentWriter::finalize
virtual StatusCode finalize() override final
Definition
TruthSegmentWriter.cxx:111
MuonValR4::TruthSegmentWriter::m_truthTrks
std::shared_ptr< MuonVal::IParticleFourMomBranch > m_truthTrks
The pointer to the associated truth particles.
Definition
TruthSegmentWriter.h:61
MuonValR4::TruthSegmentWriter::m_segmentKey
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_segmentKey
Data dependency on the truth segment container.
Definition
TruthSegmentWriter.h:43
MuonValR4::TruthSegmentWriter::m_segmentFrames
std::shared_ptr< MuonVal::CoordSystemsBranch > m_segmentFrames
Pointer to the associated track vari.
Definition
TruthSegmentWriter.h:59
MuonValR4::TruthSegmentWriter::m_eventId
MuonVal::ScalarBranch< std::uint32_t > & m_eventId
The event number in this event.
Definition
TruthSegmentWriter.h:55
MuonValR4::TruthSegmentWriter::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
The muon detector manager.
Definition
TruthSegmentWriter.h:50
MuonValR4::TruthSegmentWriter::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Service handle towards the IdHelper svc.
Definition
TruthSegmentWriter.h:48
MuonValR4::TruthSegmentWriter::m_tree
MuonVal::MuonTesterTree m_tree
instance to the Event tree
Definition
TruthSegmentWriter.h:53
MuonValR4::TruthSegmentWriter::AthHistogramAlgorithm
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition
AthHistogramAlgorithm.cxx:31
MuonValR4::TruthSegmentWriter::m_ctxProvider
ActsTrk::ContextUtility m_ctxProvider
Context provider for geometry, magnetic field and calibration contexts.
Definition
TruthSegmentWriter.h:40
MuonValR4::TruthSegmentWriter::m_segmentBranches
std::shared_ptr< MuonPRDTest::SegmentVariables > m_segmentBranches
The pointer to the segment variables.
Definition
TruthSegmentWriter.h:57
MuonValR4::TruthSegmentWriter::getSurface
const Acts::Surface & getSurface(const Identifier &simHitId) const
Retrieves the surface associated with a sim hit identifier.
Definition
TruthSegmentWriter.cxx:115
MuonValR4::TruthSegmentWriter::m_truthLinkKey
SG::ReadDecorHandleKey< xAOD::MuonSegmentContainer > m_truthLinkKey
Data dependency on the truth particle link.
Definition
TruthSegmentWriter.h:45
MuonVal::MuonTesterTree
Definition
MuonTesterTree.h:38
MuonVal::ScalarBranch
Definition
ScalarBranch.h:12
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition
StoreGate/StoreGate/ReadDecorHandleKey.h:86
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
ServiceHandle
Definition
ClusterMakerTool.h:36
Acts
This class is not to needed in AthSimulation.
Definition
MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/xAODMuonPrepData/UtilFunctions.h:23
Identifier
Definition
IdentifierFieldParser.cxx:14
MuonValR4
Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a...
Definition
SpacePointWriter.cxx:32
xAOD::MuonSegment
MuonSegment_v1 MuonSegment
Reference the current persistent version:
Definition
Event/xAOD/xAODMuon/xAODMuon/MuonSegment.h:13
Generated on
for ATLAS Offline Software by
1.17.0