ATLAS Offline Software
Loading...
Searching...
No Matches
MuonHoughDataNtuple.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef HOUGHIDITESTER_H
5#define HOUGHIDITESTER_H
6
7// Framework includes
10
11// EDM includes
14
18
19// Muon includes
26
32public:
33 MuonHoughDataNtuple(const std::string& name, ISvcLocator* pSvcLocator);
34 virtual ~MuonHoughDataNtuple() override;
35
36 virtual StatusCode initialize() override;
37 virtual StatusCode execute() override;
38 virtual StatusCode finalize() override;
39
40private:
41 int channel(const Identifier& measId) const;
42 int gasGap(const Identifier& measId) const;
43 // truth info from xAOD
45 this, "MuonTruthParticlesKey", "MuonTruthParticles"};
47 this, "MuonTruthSegmentsKey", "MuonTruthSegments"};
48 // Hough Data
50 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
51
52 // eta hit output tree
53 MuonVal::MuonTesterTree m_eta_hit_tree{"EtaHitHoughData","MuonHoughDataNtuple"};
54 // hough maximum eta hit info
55 MuonVal::ScalarBranch<float>& m_maxHit_sector{m_eta_hit_tree.newScalar<float>("maxHit_Sector")};
57 MuonVal::ScalarBranch<float>& m_maxHit_theta{m_eta_hit_tree.newScalar<float>("maxHit_Theta")};
58 MuonVal::ScalarBranch<int>& m_maxHit_region{m_eta_hit_tree.newScalar<int>("maxHit_Region")};
59 // station index/eta/phi
60 MuonVal::ScalarBranch<int>& m_maxHit_stationIndex{m_eta_hit_tree.newScalar<int>("hit_StationIndex", -999)};
61 MuonVal::ScalarBranch<int>& m_maxHit_stationEta{m_eta_hit_tree.newScalar<int>("hit_StationEta", -999)};
62 MuonVal::ScalarBranch<int>& m_maxHit_stationPhi{m_eta_hit_tree.newScalar<int>("hit_StationPhi", -999)};
63
64 // eta hit info from hough maximum
69 // eta hit debug info
71
72 // local position info from associated PrepRawData
75
76 // record info from identifier and do truth matching
83
84 MuonVal::VectorBranch<int>& m_hit_mdtIndex{m_eta_hit_tree.newVector<int>("hit_MDTIndex")};
85 MuonVal::VectorBranch<int>& m_hit_cscIndex{m_eta_hit_tree.newVector<int>("hit_CSCIndex")};
86 MuonVal::VectorBranch<int>& m_hit_tgcIndex{m_eta_hit_tree.newVector<int>("hit_TGCIndex")};
87 MuonVal::VectorBranch<int>& m_hit_rpcIndex{m_eta_hit_tree.newVector<int>("hit_RPCIndex")};
89 MuonVal::VectorBranch<int>& m_hit_stgcIndex{m_eta_hit_tree.newVector<int>("hit_STGCIndex")};
90
91 MuonVal::VectorBranch<bool>& m_hit_truthMatched{m_eta_hit_tree.newVector<bool>("hit_TruthMatched")};
92
93 // phi hit output tree
94 MuonVal::MuonTesterTree m_phi_hit_tree{"PhiHitHoughData","MuonHoughDataNtuple"};
95 // hough maximum phi hit info
96 MuonVal::ScalarBranch<float>& m_maxPhiHit_sector{m_phi_hit_tree.newScalar<float>("maxPhiHit_Sector")};
97 MuonVal::ScalarBranch<float>& m_maxPhiHit_z0{m_phi_hit_tree.newScalar<float>("maxPhiHit_Z0")};
98 // station index/eta/phi
99 MuonVal::ScalarBranch<int>& m_maxPhiHit_stationIndex{m_phi_hit_tree.newScalar<int>("phiHit_StationIndex", -999)};
100 MuonVal::ScalarBranch<int>& m_maxPhiHit_stationEta{m_phi_hit_tree.newScalar<int>("phiHit_StationEta", -999)};
101 MuonVal::ScalarBranch<int>& m_maxPhiHit_stationPhi{m_phi_hit_tree.newScalar<int>("phiHit_StationPhi", -999)};
102
103 // phi hit info from hough maximum
108 // phi hit debug info
110
111 // local position info from associated PrepRawData
114
115 // record info from identifier and do truth matching
122
123 MuonVal::VectorBranch<int>& m_phiHit_mdtIndex{m_phi_hit_tree.newVector<int>("phiHit_MdtIndex")};
124 MuonVal::VectorBranch<int>& m_phiHit_cscIndex{m_phi_hit_tree.newVector<int>("phiHit_CscIndex")};
125 MuonVal::VectorBranch<int>& m_phiHit_tgcIndex{m_phi_hit_tree.newVector<int>("phiHit_TgcIndex")};
126 MuonVal::VectorBranch<int>& m_phiHit_rpcIndex{m_phi_hit_tree.newVector<int>("phiHit_RpcIndex")};
127 MuonVal::VectorBranch<int>& m_phiHit_mmIndex{m_phi_hit_tree.newVector<int>("phiHit_MMIndex")};
128 MuonVal::VectorBranch<int>& m_phiHit_stgcIndex{m_phi_hit_tree.newVector<int>("phiHit_STGCIndex")};
129
130 MuonVal::VectorBranch<bool>& m_phiHit_truthMatched{m_phi_hit_tree.newVector<bool>("phiHit_TruthMatched")};
131
132 // truth output tree
133 MuonVal::MuonTesterTree m_truth_tree{"TruthHoughData","MuonHoughDataNtuple"};
134 // muon truth info
135 MuonVal::ScalarBranch<int>& m_truth_pdgId{m_truth_tree.newScalar<int>("pdgId", -999)};
136 MuonVal::ScalarBranch<int>& m_truth_barcode{m_truth_tree.newScalar<int>("barcode", -999)}; // FIXME barcode-based
137
138 MuonVal::ScalarBranch<float>& m_truth_pt{m_truth_tree.newScalar<float>("truth_Pt", -999)};
139 MuonVal::ScalarBranch<float>& m_truth_eta{m_truth_tree.newScalar<float>("truth_Eta", -999)};
140 MuonVal::ScalarBranch<float>& m_truth_phi{m_truth_tree.newScalar<float>("truth_Phi", -999)};
141
142 // muon truth segment info
145
146 MuonVal::VectorBranch<int>& m_truth_seg_nPrecisionHits{m_truth_tree.newVector<int>("truth_seg_NPrecisionHits")};
147 MuonVal::VectorBranch<int>& m_truth_seg_nTriggerHits{m_truth_tree.newVector<int>("truth_seg_NTriggerHits")};
148 MuonVal::VectorBranch<int>& m_truth_seg_sector{m_truth_tree.newVector<int>("truth_seg_Sector")};
149};
150
151#endif // HOUGHIDITESTER_H
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_hit_global
MuonVal::TgcIdentifierBranch m_phiHit_tgcId
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_truthSegmentsKey
MuonVal::VectorBranch< float > & m_hit_ymin
MuonVal::VectorBranch< int > & m_hit_tech
MuonVal::CscIdentifierBranch m_phiHit_cscId
MuonVal::TgcIdentifierBranch m_hit_stgcId
MuonVal::VectorBranch< int > & m_truth_seg_nTriggerHits
MuonVal::VectorBranch< float > & m_phiHit_ymin
MuonVal::VectorBranch< int > & m_truth_seg_sector
MuonVal::ScalarBranch< int > & m_maxHit_stationIndex
MuonVal::VectorBranch< int > & m_hit_tgcIndex
MuonVal::MuonTesterTree m_eta_hit_tree
MuonVal::ScalarBranch< float > & m_maxHit_sector
MuonVal::TgcIdentifierBranch m_phiHit_stgcId
MuonVal::MuonTesterTree m_phi_hit_tree
MuonVal::TwoVectorBranch m_phiHit_local
MuonVal::VectorBranch< float > & m_phiHit_ymax
MuonVal::ScalarBranch< float > & m_maxPhiHit_z0
MuonVal::ScalarBranch< int > & m_maxHit_stationEta
MuonVal::CscIdentifierBranch m_hit_cscId
MuonVal::VectorBranch< int > & m_phiHit_mmIndex
MuonVal::RpcIdentifierBranch m_hit_rpcId
MuonVal::VectorBranch< int > & m_hit_stgcIndex
MuonVal::ScalarBranch< int > & m_maxPhiHit_stationEta
int gasGap(const Identifier &measId) const
MuonVal::ScalarBranch< float > & m_maxPhiHit_sector
MuonVal::ScalarBranch< int > & m_maxHit_region
MuonVal::ScalarBranch< float > & m_maxHit_z0
SG::ReadHandleKey< Muon::HoughDataPerSectorVec > m_houghDataPerSectorVecKey
int channel(const Identifier &measId) const
MuonVal::ThreeVectorBranch m_truth_seg_pos
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
MuonVal::TwoVectorBranch m_hit_local
MuonVal::VectorBranch< int > & m_hit_mmIndex
MuonVal::VectorBranch< float > & m_hit_x
MuonVal::VectorBranch< int > & m_hit_mdtIndex
MuonVal::MdtIdentifierBranch m_phiHit_mdtId
MuonVal::VectorBranch< bool > & m_phiHit_truthMatched
MuonVal::ScalarBranch< float > & m_truth_pt
MuonVal::VectorBranch< int > & m_hit_cscIndex
MuonVal::VectorBranch< float > & m_phiHit_w
MuonVal::ScalarBranch< int > & m_truth_barcode
MuonVal::MdtIdentifierBranch m_hit_mdtId
MuonVal::VectorBranch< float > & m_phiHit_x
MuonVal::VectorBranch< bool > & m_hit_truthMatched
MuonVal::RpcIdentifierBranch m_phiHit_rpcId
MuonVal::VectorBranch< int > & m_hit_rpcIndex
MuonVal::TgcIdentifierBranch m_phiHit_mmId
MuonVal::VectorBranch< float > & m_hit_w
MuonVal::ScalarBranch< float > & m_truth_phi
MuonVal::TgcIdentifierBranch m_hit_mmId
virtual StatusCode finalize() override
MuonVal::VectorBranch< int > & m_phiHit_rpcIndex
MuonVal::VectorBranch< int > & m_phiHit_mdtIndex
MuonVal::ScalarBranch< int > & m_maxPhiHit_stationPhi
MuonVal::VectorBranch< float > & m_hit_ymax
MuonVal::VectorBranch< int > & m_phiHit_tech
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthMuonKey
MuonVal::VectorBranch< int > & m_phiHit_stgcIndex
MuonVal::VectorBranch< int > & m_truth_seg_nPrecisionHits
MuonVal::ScalarBranch< int > & m_maxPhiHit_stationIndex
MuonVal::TgcIdentifierBranch m_hit_tgcId
MuonVal::ScalarBranch< int > & m_truth_pdgId
MuonVal::VectorBranch< int > & m_phiHit_cscIndex
virtual StatusCode execute() override
MuonVal::ThreeVectorBranch m_phiHit_global
MuonVal::VectorBranch< int > & m_phiHit_tgcIndex
MuonVal::ThreeVectorBranch m_truth_seg_p
MuonVal::MuonTesterTree m_truth_tree
MuonVal::ScalarBranch< float > & m_maxHit_theta
MuonVal::ScalarBranch< float > & m_truth_eta
MuonVal::ScalarBranch< int > & m_maxHit_stationPhi
Branch to store all information of the CscIdentifier.
Branch to store all information of the MDT identifier.
Branch to store all information of the TgcIdentifier.
Property holding a SG store/key/clid from which a ReadHandle is made.
void initialize()