4#ifndef MUONTRACKFINDINGTEST_MSTRACKTESTER_H
5#define MUONTRACKFINDINGTEST_MSTRACKTESTER_H
37 StatusCode
execute()
override final;
38 StatusCode
finalize()
override final;
57 Gaudi::Property<bool>
m_isMC{
this,
"isMC",
false};
60 using TruthHitCol = std::unordered_set<const xAOD::MuonSimHit*>;
78 ToolHandle<MuonR4::ISegmentSelectionTool>
m_segSelector{
this,
"SegmentSelectionTool" ,
"" };
83 ToolHandle<MuonR4::ITrackSummaryTool>
m_summaryTool{
this,
"SummaryTool" ,
""};
87 std::unique_ptr<MuonR4::MsTrackSeeder>
m_seeder{};
Property holding a SG store/key/clid from which a ReadHandle is made.
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Location
Enum defining whether the seed is made in the endcap / barrel.
SectorProjector
Enumeration to select the sector projection.
const MuonGMR4::MuonDetectorManager * m_detMgr
std::shared_ptr< MuonPRDTest::SegmentVariables > SegmentBranchPtr_t
std::optional< MuonR4::MsTrackSeed > makeSeedFromTruth(const ActsTrk::GeometryContext &gctx, const xAOD::TruthParticle &truthMuon) const
Construct MS track seed from the truth associated segments.
ToolHandle< MuonR4::ITrackSummaryTool > m_summaryTool
Hit summary tool.
MuonR4::MsTrackSeed::Location Location
ParticleBranchPtr_t m_truthTrks
std::unique_ptr< MuonR4::MsTrackSeeder > m_seeder
MuonVal::VectorBranch< float > & m_seedThetaCone
Maximum angular difference between the segments part of the seed.
ParticleBranchPtr_t m_legacyTrks
Output branches of the legacy MS tracks.
SegmentBranchPtr_t m_truthSegs
std::unordered_set< const xAOD::MuonSimHit * > TruthHitCol
MuonVal::MatrixBranch< unsigned short > & m_truthMuRecoSegLinks
Links from the truth muon to the segments.
MuonVal::MatrixBranch< unsigned short > & m_truthMuToSeedIdx
Links to all MsTrkSeeds that could be matched to the truthMuon, i.e.
StatusCode execute() override final
MuonVal::VectorBranch< float > & m_truthMuonQP
Estimated Q x P from the seeder algorithm class.
MuonVal::VectorBranch< float > & m_truthMuonsSeedLength
std::shared_ptr< MuonVal::IParticleFourMomBranch > ParticleBranchPtr_t
MuonVal::VectorBranch< char > & m_seedType
Is the seed in the encap or in the barrel chambers.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_legacyTrackKey
Legacy track reconstruction chain.
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthKey
Key to the truth particle collection.
Gaudi::Property< bool > m_isMC
MuonVal::MatrixBranch< unsigned short > & m_truthSegToRecoLink
Link of the truth segments to the matchin reco segments.
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheKey
Dependency on the magnetic field.
SegmentBranchPtr_t m_recoSegs
SG::ReadHandleKey< MuonR4::MsTrackSeedContainer > m_msTrkSeedKey
Temporary container write handle to push the seeds to store gate for later efficiency analysis.
SG::ReadDecorHandleKeyArray< SG::AuxVectorBase > m_trkTruthLinks
Decoration dependency to the MS truth track links.
MuonVal::MatrixBranch< unsigned short > & m_truthMuTruthSegLinks
Links from the truth muon to the segments.
MuonVal::VectorBranch< float > & m_truthMuonsSeedCone
Angular deviation of the true segment seed.
StatusCode initialize() override final
MuonVal::MatrixBranch< unsigned short > & m_seedRecoSegMatch
Link of the track seed to the building segment.
MuonVal::VectorBranch< float > & m_seedQP
Estimated momentum times charge from the track seed.
MuonVal::MatrixBranch< unsigned short > & m_truthMuToSeedCounter
Corresponding matching counter of reconstructed segments.
MuonVal::VectorBranch< unsigned short > & m_truthMuTruthNSegs
Number of associated truth muon segments.
MuonVal::ThreeVectorBranch m_seedPos
Simple seed information.
SG::ReadHandleKey< xAOD::MuonSegmentContainer > SegmentKey_t
MuonVal::VectorBranch< float > & m_seedLength
Maximum separation between the segments on the reference plane.
SG::ReadHandleKey< ActsTrk::TrackContainer > m_trackKey
Dependency on the R4 MS track container.
ToolHandle< MuonR4::ISegmentSelectionTool > m_segSelector
Segment selection tool to pick the good quality segments.
SegmentKey_t m_recoSegmentKey
Primary segment container.
MuonVal::MuonTesterTree m_tree
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
Dependency on the geometry alignment.
SegmentKey_t m_truthSegmentKey
Segment from the truth hits.
std::shared_ptr< TrackSummaryModule > m_trackSummary
Hit summary on the reconstructed track.
StatusCode finalize() override final
std::shared_ptr< TrackSummaryModule > m_seedSummary
Hit summary on the track seed.
std::pair< double, double > calcSeedLength(const ActsTrk::GeometryContext &gctx, const MuonR4::MsTrackSeed &seed) const
MuonR4::MsTrackSeeder::SectorProjector SectorProjector
Property holding a SG store/key/clid from which a ReadHandle is made.
Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a...
DecorHandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader > ReadDecorHandleKeyArray
TruthParticle_v1 TruthParticle
Typedef to implementation.