Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MsTrackTester.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONTRACKFINDINGTEST_MSTRACKTESTER_H
5 #define MUONTRACKFINDINGTEST_MSTRACKTESTER_H
6 
9 
12 
13 
15 
20 
23 
24 namespace MuonValR4{
26  public:
28 
29  StatusCode initialize() override final;
30  StatusCode execute() override final;
31  StatusCode finalize() override final;
32  private:
33 
34 
36 
38  const Location plane) const;
39  MuonVal::MuonTesterTree m_tree{"MsTrackValidTest", "MuonTrackTester"};
40 
41  Gaudi::Property<bool> m_isMC{this, "isMC", false};
42 
43 
44  using TruthHitCol = std::unordered_set<const xAOD::MuonSimHit*>;
45 
48  SegmentKey_t m_truthSegmentKey{this, "TruthSegmentKey", "TruthSegmentsR4"};
50  SegmentKey_t m_recoSegmentKey{this, "SegmentKey", "MuonSegmentsFromR4"};
52  SG::ReadHandleKey<xAOD::TruthParticleContainer> m_truthKey{this, "TruthKey", "MuonTruthParticles"};
56  SG::ReadHandleKey<MuonR4::MsTrackSeedContainer> m_msTrkSeedKey{this, "MsTrkSeedKey", "MsTrackSeeds"};
57 
58  using ParticleBranchPtr_t = std::shared_ptr<MuonVal::IParticleFourMomBranch>;
60 
61  using SegmentBranchPtr_t = std::shared_ptr<MuonPRDTest::SegmentVariables>;
64 
73 
75  MuonVal::MatrixBranch<unsigned short>& m_seedRecoSegMatch{m_tree.newMatrix<unsigned short>("MsTrkSeed_segmentLinks")};
77  MuonVal::MatrixBranch<unsigned short>& m_truthSegToRecoLink{m_tree.newMatrix<unsigned short>("TruthSegments_recoSegLinks",-1)};
79  MuonVal::MatrixBranch<unsigned short>& m_truthMuToSeedIdx{m_tree.newMatrix<unsigned short>("TruthMuons_seedLinks", -1)};
83  MuonVal::MatrixBranch<unsigned short>& m_truthMuTruthSegLinks{m_tree.newMatrix<unsigned short>("TruthMuons_truthSegLinks")};
85  MuonVal::MatrixBranch<unsigned short>& m_truthMuRecoSegLinks{m_tree.newMatrix<unsigned short>("TruthMuons_recoSegLinks")};
86 
88  ToolHandle<MuonR4::ISegmentSelectionTool> m_segSelector{this, "SegmentSelectionTool" , "" };
95 
96  };
97 }
98 
99 
100 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
MuonValR4::MsTrackTester
Definition: MsTrackTester.h:25
AthHistogramAlgorithm::AthHistogramAlgorithm
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition: AthHistogramAlgorithm.cxx:31
MuonValR4::MsTrackTester::m_seedType
MuonVal::VectorBranch< char > & m_seedType
Is the seed in the encap or in the barrel chambers.
Definition: MsTrackTester.h:68
MuonValR4::MsTrackTester::m_refEndcapDiscR
double m_refEndcapDiscR
Radius of the reference disc.
Definition: MsTrackTester.h:94
TruthParticleContainer.h
MuonTesterTreeDict.h
xAOD::MuonSegment_v1
Class describing a MuonSegment.
Definition: MuonSegment_v1.h:33
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
MuonValR4::MsTrackTester::m_seedThetaCone
MuonVal::VectorBranch< float > & m_seedThetaCone
Maximum angular difference between the segments part of the seed.
Definition: MsTrackTester.h:72
MuonValR4::MsTrackTester::execute
StatusCode execute() override final
Definition: MsTrackTester.cxx:97
MuonVal::VectorBranch< char >
SG::ReadHandleKey< xAOD::MuonSegmentContainer >
MuonVal::ThreeVectorBranch
Definition: ThreeVectorBranch.h:19
MuonValR4::MsTrackTester::expressAtRefPlane
double expressAtRefPlane(const xAOD::MuonSegment &segment, const Location plane) const
Definition: MsTrackTester.cxx:176
MuonR4::MsTrackSeed::Location
Location
Enum defining whether the seed is made in the endcap / barrel.
Definition: MsTrackSeed.h:21
MuonSegmentContainer.h
AthHistogramAlgorithm.h
MuonValR4::MsTrackTester::m_seedPos
MuonVal::ThreeVectorBranch m_seedPos
Simple seed information.
Definition: MsTrackTester.h:66
MuonValR4::MsTrackTester::m_tree
MuonVal::MuonTesterTree m_tree
Definition: MsTrackTester.h:39
MuonValR4::MsTrackTester::TruthHitCol
std::unordered_set< const xAOD::MuonSimHit * > TruthHitCol
Definition: MsTrackTester.h:44
MuonVal::MuonTesterTree
Definition: MuonTesterTree.h:30
MuonValR4::MsTrackTester::m_truthSegs
SegmentBranchPtr_t m_truthSegs
Definition: MsTrackTester.h:62
MuonValR4::MsTrackTester::m_truthSegmentKey
SegmentKey_t m_truthSegmentKey
Segment from the truth hits.
Definition: MsTrackTester.h:48
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonValR4::MsTrackTester::m_segSelector
ToolHandle< MuonR4::ISegmentSelectionTool > m_segSelector
Segment selection tool to pick the good quality segments.
Definition: MsTrackTester.h:88
ISegmentSelectionTool.h
MuonPatternContainer.h
MuonValR4::MsTrackTester::m_truthSegToRecoLink
MuonVal::MatrixBranch< unsigned short > & m_truthSegToRecoLink
Link of the truth segments to the matchin reco segments.
Definition: MsTrackTester.h:77
MsTrackSeed.h
MuonSimHitContainer.h
MuonValR4::MsTrackTester::m_isMC
Gaudi::Property< bool > m_isMC
Definition: MsTrackTester.h:41
MuonValR4::MsTrackTester::m_truthKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthKey
Key to the truth particle collection.
Definition: MsTrackTester.h:52
MuonVal::MuonTesterTree::newVector
VectorBranch< T > & newVector(const std::string &name)
Creates new branches and returns their reference.
AthHistogramAlgorithm
Definition: AthHistogramAlgorithm.h:32
MuonValR4::MsTrackTester::m_refEndcapDiscZ
double m_refEndcapDiscZ
Position along the beam axis of the referece disc onto which all endcap segments are projected.
Definition: MsTrackTester.h:92
MuonValR4::MsTrackTester::finalize
StatusCode finalize() override final
Definition: MsTrackTester.cxx:197
MuonValR4::MsTrackTester::ParticleBranchPtr_t
std::shared_ptr< MuonVal::IParticleFourMomBranch > ParticleBranchPtr_t
Definition: MsTrackTester.h:58
MuonValR4
Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a...
Definition: IPatternVisualizationTool.h:23
MuonValR4::MsTrackTester::m_refBarrelR
double m_refBarrelR
Radius of the barrel reference cylinder onto which all segments are projected.
Definition: MsTrackTester.h:90
MuonValR4::MsTrackTester::m_recoSegs
SegmentBranchPtr_t m_recoSegs
Definition: MsTrackTester.h:63
MuonValR4::MsTrackTester::m_truthMuRecoSegLinks
MuonVal::MatrixBranch< unsigned short > & m_truthMuRecoSegLinks
Links from the truth muon to the segments
Definition: MsTrackTester.h:85
MuonValR4::MsTrackTester::m_msTrkSeedKey
SG::ReadHandleKey< MuonR4::MsTrackSeedContainer > m_msTrkSeedKey
Temporary container write handle to push the seeds to store gate for later efficiency analysis.
Definition: MsTrackTester.h:56
MuonValR4::MsTrackTester::m_seedRecoSegMatch
MuonVal::MatrixBranch< unsigned short > & m_seedRecoSegMatch
Link of the track seed to the building segment
Definition: MsTrackTester.h:75
MuonValR4::MsTrackTester::m_truthMuToSeedIdx
MuonVal::MatrixBranch< unsigned short > & m_truthMuToSeedIdx
Links to all MsTrkSeeds that could be matched to the truthMuon, i.e.
Definition: MsTrackTester.h:79
MuonVal::MatrixBranch< unsigned short >
MuonValR4::MsTrackTester::m_truthMuToSeedCounter
MuonVal::MatrixBranch< unsigned short > & m_truthMuToSeedCounter
Corresponding matching counter of reconstructed segments.
Definition: MsTrackTester.h:81
MuonValR4::MsTrackTester::m_recoSegmentKey
SegmentKey_t m_recoSegmentKey
Primary segment container.
Definition: MsTrackTester.h:50
MuonValR4::MsTrackTester::m_trkTruthLinks
SG::ReadDecorHandleKeyArray< SG::AuxVectorBase > m_trkTruthLinks
Decoration dependency to the MS truth track links.
Definition: MsTrackTester.h:54
SegmentVariables.h
MuonValR4::MsTrackTester::SegmentBranchPtr_t
std::shared_ptr< MuonPRDTest::SegmentVariables > SegmentBranchPtr_t
Definition: MsTrackTester.h:61
MuonVal::MuonTesterTree::newMatrix
MatrixBranch< T > & newMatrix(const std::string &name)
MuonValR4::MsTrackTester::m_truthTrks
ParticleBranchPtr_t m_truthTrks
Definition: MsTrackTester.h:59
ReadDecorHandleKeyArray.h
python.SystemOfUnits.m
float m
Definition: SystemOfUnits.py:105
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
MuonValR4::MsTrackTester::m_seedLength
MuonVal::VectorBranch< float > & m_seedLength
Maximum separation between the segments on the reference plane.
Definition: MsTrackTester.h:70
MuonValR4::MsTrackTester::initialize
StatusCode initialize() override final
Definition: MsTrackTester.cxx:20
MuonValR4::MsTrackTester::m_truthMuTruthSegLinks
MuonVal::MatrixBranch< unsigned short > & m_truthMuTruthSegLinks
Links from the truth muon to the segments
Definition: MsTrackTester.h:83