5#ifndef MUONFASTRECONSTRUCTIONTEST_MUONFASTRECOTESTER_H
6#define MUONFASTRECONSTRUCTIONTEST_MUONFASTRECOTESTER_H
29 virtual StatusCode
execute()
override;
30 virtual StatusCode
finalize()
override;
46 using simHitSet = std::unordered_set<const xAOD::MuonSimHit*>;
73 const std::vector<const MuonR4::SpacePointContainer*>& spContainers);
95 Gaudi::Property<bool>
m_isMC{
this,
"isMC",
false,
"Toggle whether the job is ran on MC or not"};
98 "Toggle whether the particular space poitns shall be written"};
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
MuonVal::VectorBranch< float > & m_gen_Phi
MuonVal::VectorBranch< unsigned char > & m_spType
Type of spacepoints: 1 for trigger eta, 2 for precision, 3 for only-phi.
SG::ReadHandleKey< MuonR4::SpacePointContainer > m_NSWspKey
SG::ReadHandleKey< MuonR4::GlobalPatternContainer > m_patternKey
MuonVal::ScalarBranch< unsigned > & m_pat_n
====== Global Pattern block ===========
void fillTruthInfo(const TruthParticleMap &truthHits, const xAOD::MuonSegmentContainer *truthSegments)
Fill the truth particleinformation into the tree.
MuonVal::MatrixBranch< unsigned char > & m_spMatchedToPattern
Branch indicating which space points in the tree are associated to the i-th pattern.
MuonVal::VectorBranch< unsigned char > & m_pat_nPileupNonPrecSpacePoints
Number of pileup trigger eta space points in the pattern.
MuonVal::VectorBranch< unsigned char > & m_pat_nAllPrecSpacePoints
Number of precision space points in the buckets crossed by the pattern.
MuonVal::VectorBranch< unsigned char > & m_pat_nStations
Number of stations.
MuonVal::MatrixBranch< unsigned char > & m_NSWspMatchedToTruth
MuonVal::VectorBranch< uint16_t > & m_pat_sector2
MuonVal::VectorBranch< float > & m_gen_Eta
MuonVal::VectorBranch< unsigned char > & m_pat_nAllPhiSpacePoints
Number of phi space points in the buckets crossed by the pattern.
MuonVal::VectorBranch< unsigned char > & m_pat_nPhiSpacePoints
Number of phi measurements in the pattern.
Gaudi::Property< bool > m_writeSpacePoints
MuonVal::VectorBranch< float > & m_pat_phi
MuonVal::VectorBranch< float > & m_pat_normalizedResidual
pattern normalized residual
MuonVal::VectorBranch< unsigned char > & m_pat_nTrueNonPrecSpacePoints
Number of truth trigger eta space points in the pattern.
MuonVal::VectorBranch< unsigned char > & m_pat_nPileupPhiSpacePoints
Number of pileup phi space points in the pattern.
virtual ~MuonFastRecoTester()=default
virtual StatusCode execute() override
std::map< const xAOD::TruthParticle *, std::vector< simHitSet > > TruthParticleMap
MuonVal::VectorBranch< unsigned char > & m_pat_nTruePrecSpacePoints
Number of truth precision space points in the pattern.
MuonVal::VectorBranch< short > & m_gen_Q
====== Truth particle block ===========
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
MuonVal::MatrixBranch< unsigned char > & m_gen_nNonPrecSpacePointsPerStation
Number of trigger eta measurements per station.
virtual StatusCode finalize() override
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
MuonVal::VectorBranch< unsigned char > & m_pat_nPileupPrecSpacePoints
Number of pileup precision space points in the pattern.
MuonVal::MatrixBranch< unsigned char > & m_gen_nPhiSpacePointsPerStation
Number of phi measurements per station.
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_truthSegmentKey
std::shared_ptr< SpacePointTesterModule > m_NSWspTester
std::shared_ptr< SpacePointTesterModule > m_spTester
====== Spacepoint block ===========
std::unordered_set< const xAOD::MuonSimHit * > simHitSet
virtual StatusCode initialize() override
MuonVal::VectorBranch< unsigned char > & m_pat_nNonPrecSpacePoints
Number of trigger eta space points in the pattern.
Gaudi::Property< bool > m_isMC
MuonVal::VectorBranch< unsigned char > & m_pat_nTruthparticles
number of matched truth particles
MuonVal::VectorBranch< float > & m_gen_Pt
void fillSpacePointInfo(const MuonR4::SpacePointContainer *spc, const MuonR4::GlobalPatternContainer *patternCont, const TruthParticleMap &truthHits, SpacePointTesterModule &spTester, MuonVal::VectorBranch< unsigned char > &spTypeBranch, MuonVal::MatrixBranch< unsigned char > &spMatchedToPatternBranch, MuonVal::MatrixBranch< unsigned char > &spMatchedToTruthBranch) const
Fill the space point information into the tree.
MuonVal::VectorBranch< unsigned char > & m_NSWspType
void fillGlobPatternInfo(const MuonR4::GlobalPatternContainer *patternCont, const TruthParticleMap &truthHits, const std::vector< const MuonR4::SpacePointContainer * > &spContainers)
Fill the info associated to the global patterns into the tree.
MuonVal::VectorBranch< uint16_t > & m_pat_sector1
pattern primary & secondary sectors (different if the pattern is in the sector overlap)
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
MuonVal::MatrixBranch< unsigned char > & m_NSWspMatchedToPattern
MuonVal::VectorBranch< float > & m_pat_residual
pattern residual
MuonVal::MuonTesterTree m_tree
MuonVal::VectorBranch< unsigned char > & m_pat_nAllNonPrecSpacePoints
Number of trigger eta space points in the buckets crossed by the pattern.
MuonVal::VectorBranch< short > & m_pat_side
+1 for A-, -1 of C-side
MuonVal::MatrixBranch< unsigned char > & m_pat_MatchedToTruth
Branch indicating which truth particles in the tree are associated to the i-th pattern.
MuonVal::VectorBranch< unsigned char > & m_pat_nPrecSpacePoints
Number of precision measurements in the pattern.
MuonVal::MatrixBranch< unsigned char > & m_gen_nPrecSpacePointsPerStation
Number of precision measurements per station.
TruthParticleMap fillTruthMap(const xAOD::MuonSegmentContainer *truthSegments) const
Fill the truth particle map.
std::array< unsigned int, Acts::toUnderlying(eHitType::nTypes)> HitCounts
MuonVal::MatrixBranch< unsigned char > & m_spMatchedToTruth
Branch indicating which space points in the tree are associated to the i-th truth particle.
MuonVal::VectorBranch< float > & m_pat_Eta
pattern average theta & phi
MuonVal::VectorBranch< unsigned char > & m_pat_nTruePhiSpacePoints
Number of truth phi space points in the pattern.
SG::ReadHandleKey< MuonR4::SpacePointContainer > m_spKey
Property holding a SG store/key/clid from which a ReadHandle is made.
DataVector< GlobalPattern > GlobalPatternContainer
Abrivation of the GlobalPattern container type.
DataVector< SpacePointBucket > SpacePointContainer
Abrivation of the space point container type.
Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a...
MuonSegmentContainer_v1 MuonSegmentContainer
Definition of the current "MuonSegment container version".
HitCounts pileupHitCounts