ATLAS Offline Software
Loading...
Searching...
No Matches
SegmentDumperAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN
3 for the benefit of the ATLAS collaboration
4*/
5#ifndef MUONBUCKETDUMP_SegmentDumperAlg_H
6#define MUONBUCKETDUMP_SegmentDumperAlg_H
7
9
13
17
21
22namespace MuonR4 {
23
25public:
27 ~SegmentDumperAlg() override = default;
28
29 StatusCode initialize() override final;
30 StatusCode execute() override final;
31 StatusCode finalize() override final;
32
36 this, "SpacePointKeys", {"MuonSpacePoints"},
37 "Keys to the SpacePoint containers"};
38
40 this, "SegmentKeys", "MuonSegmentsFromR4",
41 "Keys to the reconstructed segment containers (aligned by index with SpacePointKeys)"};
42
45 this, "TruthDecorLinks", {}, "truthParticleLink decoration on segments"};
46
48 this, "AlignmentKey", "ActsAlignment", "Geometry alignment context"};
49
51 MuonVal::MuonTesterTree m_tree{"MuonSegmentDump", "MuonSegmentDump"};
52
53 // Per-bucket scalars
55 m_tree.newScalar<uint16_t>("bucket_spacePoints", 0)};
57 m_tree.newScalar<uint16_t>("bucket_layers", 0)};
59 m_tree.newScalar<uint8_t>("bucket_chamberIndex", 0)};
61 m_tree.newScalar<uint8_t>("bucket_sector", 0)};
63 m_tree.newScalar<uint16_t>("bucket_segments", 0)};
64
65 // Per-segment (reco) vectors
69 m_tree.newVector<float>("segment_chiSquared")};
71 m_tree.newVector<float>("segment_numberDoF")};
72
73 // NEW: reco η/φ derived from the segment direction (always filled)
75 m_tree.newVector<float>("segmentEta")};
77 m_tree.newVector<float>("segmentPhi")};
78
79 // Truth labels & kinematics (filled only when a truth match exists)
81 m_tree.newVector<int32_t>("segmentTruthPart")};
83 m_tree.newVector<int32_t>("segmentTruthPDGId")};
85 m_tree.newVector<float>("segmentTruthPt")};
87 m_tree.newVector<float>("segmentTruthEta")};
89 m_tree.newVector<float>("segmentTruthPhi")};
91 m_tree.newVector<uint8_t>("segmentHasTruth")};
92
93 // Helper: for a given SP bucket, count unique layer numbers
94 uint16_t countLayersInBucket(const SpacePointBucket& bucket) const;
95};
96
97} // namespace MuonR4
98
99#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
MuonVal::ThreeVectorBranch m_segmentPos
MuonVal::VectorBranch< float > & m_segment_numberDoF
SG::ReadDecorHandleKeyArray< xAOD::MuonSegmentContainer > m_truthDecorKeys
Truth decoration (MC)
MuonVal::VectorBranch< float > & m_segmentTruthPhi
MuonVal::VectorBranch< float > & m_segmentTruthEta
SG::ReadHandleKeyArray< SpacePointContainer > m_spacePointKeys
Inputs.
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_segmentKeys
MuonVal::VectorBranch< float > & m_segmentTruthPt
MuonVal::ScalarBranch< uint16_t > & m_bucket_spacePoints
MuonVal::MuonTesterTree m_tree
Output tree.
MuonVal::VectorBranch< float > & m_segmentRecoEta
MuonVal::ScalarBranch< uint16_t > & m_bucket_segments
MuonVal::ScalarBranch< uint8_t > & m_bucket_chamberIdx
MuonVal::VectorBranch< int32_t > & m_segmentTruthPDGId
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
uint16_t countLayersInBucket(const SpacePointBucket &bucket) const
~SegmentDumperAlg() override=default
MuonVal::ScalarBranch< uint8_t > & m_bucket_sector
MuonVal::VectorBranch< float > & m_segmentRecoPhi
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
StatusCode finalize() override final
MuonVal::VectorBranch< uint8_t > & m_segmentHasTruth
StatusCode initialize() override final
StatusCode execute() override final
MuonVal::VectorBranch< float > & m_segment_chiSquared
MuonVal::VectorBranch< int32_t > & m_segmentTruthIdx
MuonVal::ThreeVectorBranch m_segmentDir
MuonVal::ScalarBranch< uint16_t > & m_bucket_layers
: The muon space point bucket represents a collection of points that will bre processed together in t...
Property holding a SG store/key/clid from which a ReadHandle is made.
This header ties the generic definitions in this package.
DataVector< SpacePointBucket > SpacePointContainer
Abrivation of the space point container type.
Forward declaration.
DecorHandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader > ReadDecorHandleKeyArray
#define private