ATLAS Offline Software
MuonCombinedDebuggerTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONCOMBINEDBASETOOLS_MUONCOMBINEDDEBUGGERTOOL_H
6 #define MUONCOMBINEDBASETOOLS_MUONCOMBINEDDEBUGGERTOOL_H
7 
8 #include <string>
9 #include <vector>
10 
13 #include "GaudiKernel/ITHistSvc.h"
14 #include "GaudiKernel/ToolHandle.h"
19 
20 class TTree;
21 
22 namespace MuonCombined {
23 
24  class MuonCombinedDebuggerTool : public AthAlgTool // the MuonCombinedDebuggerTool can only be used when running with one thread
25  {
26  public:
27  MuonCombinedDebuggerTool(const std::string& type, const std::string& name, const IInterface* parent);
29 
30  static const InterfaceID& interfaceID() {
31  static const InterfaceID IID_MuonCombinedDebuggerTool("MuonCombined::MuonCombinedDebuggerTool", 1, 0);
32  return IID_MuonCombinedDebuggerTool;
33  }
34 
35  StatusCode initialize() override;
36 
37  void fillBranches(const MuonCandidateCollection& muonCandidates, const InDetCandidateCollection& inDetCandidates);
38 
39  void fillMsIdBranches(const MuonCandidateCollection& muonCandidates, const InDetCandidateCollection& inDetCandidates);
40 
41  void fillIdBranches(const InDetCandidateCollection& inDetCandidates);
42 
43  void fillMsBranches(const MuonCandidateCollection& muonCandidates);
44 
45  private:
46  void bookBranches();
47 
48  ToolHandle<Rec::IMuonMatchQuality> m_matchQuality{this, "MuonMatchQuality", "Rec::MuonMatchQuality/MuonMatchQuality"};
49  ToolHandle<Trk::ITruthToTrack> m_truthToTrack{this, "TruthToTrack", "Trk::TruthToTrack/TruthToTrack"};
50 
52 
53  TTree* m_recoTree;
55 
56  std::vector<int> m_mstrack_has_truth;
57  std::vector<int> m_mstrack_has_truth_par;
58  std::vector<int> m_mstrack_truth_pdgid;
59  std::vector<int> m_mstrack_truth_barcode;
60  std::vector<double> m_mstrack_truth_sur_x;
61  std::vector<double> m_mstrack_truth_sur_y;
62  std::vector<double> m_mstrack_truth_sur_z;
63  std::vector<double> m_mstrack_truth_d0;
64  std::vector<double> m_mstrack_truth_z0;
65  std::vector<double> m_mstrack_truth_phi0;
66  std::vector<double> m_mstrack_truth_theta;
67  std::vector<double> m_mstrack_truth_qOverP;
68 
69  std::vector<double> m_mstrack_sur_x;
70  std::vector<double> m_mstrack_sur_y;
71  std::vector<double> m_mstrack_sur_z;
72  std::vector<double> m_mstrack_d0;
73  std::vector<double> m_mstrack_z0;
74  std::vector<double> m_mstrack_phi0;
75  std::vector<double> m_mstrack_theta;
76  std::vector<double> m_mstrack_qOverP;
77  std::vector<double> m_mstrack_cov_d0;
78  std::vector<double> m_mstrack_cov_z0;
79  std::vector<double> m_mstrack_cov_phi0;
80  std::vector<double> m_mstrack_cov_theta;
81  std::vector<double> m_mstrack_cov_qOverP;
82 
83  std::vector<int> m_mstrack_has_sa;
84  std::vector<double> m_mstrack_sa_sur_x;
85  std::vector<double> m_mstrack_sa_sur_y;
86  std::vector<double> m_mstrack_sa_sur_z;
87  std::vector<double> m_mstrack_sa_d0;
88  std::vector<double> m_mstrack_sa_z0;
89  std::vector<double> m_mstrack_sa_phi0;
90  std::vector<double> m_mstrack_sa_theta;
91  std::vector<double> m_mstrack_sa_qOverP;
92  std::vector<double> m_mstrack_sa_cov_d0;
93  std::vector<double> m_mstrack_sa_cov_z0;
94  std::vector<double> m_mstrack_sa_cov_phi0;
95  std::vector<double> m_mstrack_sa_cov_theta;
96  std::vector<double> m_mstrack_sa_cov_qOverP;
97 
98  std::vector<int> m_idtrack_has_truth;
99  std::vector<int> m_idtrack_has_truth_par;
100  std::vector<int> m_idtrack_truth_pdgid;
101  std::vector<int> m_idtrack_truth_barcode; // FIXME barcode-based
102  std::vector<double> m_idtrack_truth_sur_x;
103  std::vector<double> m_idtrack_truth_sur_y;
104  std::vector<double> m_idtrack_truth_sur_z;
105  std::vector<double> m_idtrack_truth_d0;
106  std::vector<double> m_idtrack_truth_z0;
107  std::vector<double> m_idtrack_truth_phi0;
108  std::vector<double> m_idtrack_truth_theta;
109  std::vector<double> m_idtrack_truth_qOverP;
110 
111  std::vector<double> m_idtrack_sur_x;
112  std::vector<double> m_idtrack_sur_y;
113  std::vector<double> m_idtrack_sur_z;
114  std::vector<double> m_idtrack_d0;
115  std::vector<double> m_idtrack_z0;
116  std::vector<double> m_idtrack_phi0;
117  std::vector<double> m_idtrack_theta;
118  std::vector<double> m_idtrack_qOverP;
119  std::vector<double> m_idtrack_cov_d0;
120  std::vector<double> m_idtrack_cov_z0;
121  std::vector<double> m_idtrack_cov_phi0;
122  std::vector<double> m_idtrack_cov_theta;
123  std::vector<double> m_idtrack_cov_qOverP;
124 
125  std::vector<std::vector<double> > m_ms_id_ochi2;
126  std::vector<std::vector<int> > m_ms_id_ondf;
127  std::vector<std::vector<double> > m_ms_id_oprob;
128  std::vector<std::vector<double> > m_ms_id_ichi2;
129  std::vector<std::vector<int> > m_ms_id_indf;
130  std::vector<std::vector<double> > m_ms_id_iprob;
131  };
132 
133 } // namespace MuonCombined
134 
135 #endif
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sa_cov_phi0
std::vector< double > m_mstrack_sa_cov_phi0
Definition: MuonCombinedDebuggerTool.h:94
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_cov_z0
std::vector< double > m_mstrack_cov_z0
Definition: MuonCombinedDebuggerTool.h:78
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_phi0
std::vector< double > m_mstrack_phi0
Definition: MuonCombinedDebuggerTool.h:74
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sur_y
std::vector< double > m_mstrack_sur_y
Definition: MuonCombinedDebuggerTool.h:70
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sa_cov_d0
std::vector< double > m_mstrack_sa_cov_d0
Definition: MuonCombinedDebuggerTool.h:92
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_qOverP
std::vector< double > m_idtrack_qOverP
Definition: MuonCombinedDebuggerTool.h:118
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_sur_z
std::vector< double > m_idtrack_sur_z
Definition: MuonCombinedDebuggerTool.h:113
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_theta
std::vector< double > m_idtrack_theta
Definition: MuonCombinedDebuggerTool.h:117
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_truth_theta
std::vector< double > m_idtrack_truth_theta
Definition: MuonCombinedDebuggerTool.h:108
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_cov_d0
std::vector< double > m_idtrack_cov_d0
Definition: MuonCombinedDebuggerTool.h:119
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_cov_phi0
std::vector< double > m_idtrack_cov_phi0
Definition: MuonCombinedDebuggerTool.h:121
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sa_cov_z0
std::vector< double > m_mstrack_sa_cov_z0
Definition: MuonCombinedDebuggerTool.h:93
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_has_sa
std::vector< int > m_mstrack_has_sa
Definition: MuonCombinedDebuggerTool.h:83
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_truth_sur_z
std::vector< double > m_mstrack_truth_sur_z
Definition: MuonCombinedDebuggerTool.h:62
MuonCombined::MuonCombinedDebuggerTool::m_ms_id_indf
std::vector< std::vector< int > > m_ms_id_indf
Definition: MuonCombinedDebuggerTool.h:129
MuonCombined::MuonCombinedDebuggerTool::bookBranches
void bookBranches()
Definition: MuonCombinedDebuggerTool.cxx:46
MuonCombined::MuonCombinedDebuggerTool::m_ms_id_ichi2
std::vector< std::vector< double > > m_ms_id_ichi2
Definition: MuonCombinedDebuggerTool.h:128
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sa_theta
std::vector< double > m_mstrack_sa_theta
Definition: MuonCombinedDebuggerTool.h:90
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_truth_barcode
std::vector< int > m_idtrack_truth_barcode
Definition: MuonCombinedDebuggerTool.h:101
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_truth_phi0
std::vector< double > m_mstrack_truth_phi0
Definition: MuonCombinedDebuggerTool.h:65
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_cov_qOverP
std::vector< double > m_idtrack_cov_qOverP
Definition: MuonCombinedDebuggerTool.h:123
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sa_sur_x
std::vector< double > m_mstrack_sa_sur_x
Definition: MuonCombinedDebuggerTool.h:84
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_truth_barcode
std::vector< int > m_mstrack_truth_barcode
Definition: MuonCombinedDebuggerTool.h:59
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_cov_z0
std::vector< double > m_idtrack_cov_z0
Definition: MuonCombinedDebuggerTool.h:120
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_qOverP
std::vector< double > m_mstrack_qOverP
Definition: MuonCombinedDebuggerTool.h:76
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_truth_pdgid
std::vector< int > m_mstrack_truth_pdgid
Definition: MuonCombinedDebuggerTool.h:58
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sa_z0
std::vector< double > m_mstrack_sa_z0
Definition: MuonCombinedDebuggerTool.h:88
MuonCombined::MuonCombinedDebuggerTool::m_ms_id_ondf
std::vector< std::vector< int > > m_ms_id_ondf
Definition: MuonCombinedDebuggerTool.h:126
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sa_qOverP
std::vector< double > m_mstrack_sa_qOverP
Definition: MuonCombinedDebuggerTool.h:91
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_truth_sur_y
std::vector< double > m_idtrack_truth_sur_y
Definition: MuonCombinedDebuggerTool.h:103
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_truth_sur_x
std::vector< double > m_mstrack_truth_sur_x
Definition: MuonCombinedDebuggerTool.h:60
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_truth_sur_z
std::vector< double > m_idtrack_truth_sur_z
Definition: MuonCombinedDebuggerTool.h:104
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_has_truth_par
std::vector< int > m_mstrack_has_truth_par
Definition: MuonCombinedDebuggerTool.h:57
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_z0
std::vector< double > m_idtrack_z0
Definition: MuonCombinedDebuggerTool.h:115
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_has_truth_par
std::vector< int > m_idtrack_has_truth_par
Definition: MuonCombinedDebuggerTool.h:99
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_cov_phi0
std::vector< double > m_mstrack_cov_phi0
Definition: MuonCombinedDebuggerTool.h:79
MuonCombined::MuonCombinedDebuggerTool::fillMsIdBranches
void fillMsIdBranches(const MuonCandidateCollection &muonCandidates, const InDetCandidateCollection &inDetCandidates)
Definition: MuonCombinedDebuggerTool.cxx:147
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sa_sur_z
std::vector< double > m_mstrack_sa_sur_z
Definition: MuonCombinedDebuggerTool.h:86
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_truth_qOverP
std::vector< double > m_idtrack_truth_qOverP
Definition: MuonCombinedDebuggerTool.h:109
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_d0
std::vector< double > m_mstrack_d0
Definition: MuonCombinedDebuggerTool.h:72
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sa_cov_qOverP
std::vector< double > m_mstrack_sa_cov_qOverP
Definition: MuonCombinedDebuggerTool.h:96
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sa_sur_y
std::vector< double > m_mstrack_sa_sur_y
Definition: MuonCombinedDebuggerTool.h:85
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_has_truth
std::vector< int > m_idtrack_has_truth
Definition: MuonCombinedDebuggerTool.h:98
MuonCombined::MuonCombinedDebuggerTool::fillBranches
void fillBranches(const MuonCandidateCollection &muonCandidates, const InDetCandidateCollection &inDetCandidates)
Definition: MuonCombinedDebuggerTool.cxx:139
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_cov_d0
std::vector< double > m_mstrack_cov_d0
Definition: MuonCombinedDebuggerTool.h:77
AthAlgTool.h
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_truth_theta
std::vector< double > m_mstrack_truth_theta
Definition: MuonCombinedDebuggerTool.h:66
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_truth_pdgid
std::vector< int > m_idtrack_truth_pdgid
Definition: MuonCombinedDebuggerTool.h:100
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_z0
std::vector< double > m_mstrack_z0
Definition: MuonCombinedDebuggerTool.h:73
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_truth_qOverP
std::vector< double > m_mstrack_truth_qOverP
Definition: MuonCombinedDebuggerTool.h:67
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_cov_theta
std::vector< double > m_idtrack_cov_theta
Definition: MuonCombinedDebuggerTool.h:122
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_truth_sur_y
std::vector< double > m_mstrack_truth_sur_y
Definition: MuonCombinedDebuggerTool.h:61
MuonCombined::MuonCombinedDebuggerTool::m_recoTree
TTree * m_recoTree
Definition: MuonCombinedDebuggerTool.h:53
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
MuonCombined::MuonCombinedDebuggerTool::~MuonCombinedDebuggerTool
~MuonCombinedDebuggerTool()=default
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_truth_d0
std::vector< double > m_mstrack_truth_d0
Definition: MuonCombinedDebuggerTool.h:63
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_truth_sur_x
std::vector< double > m_idtrack_truth_sur_x
Definition: MuonCombinedDebuggerTool.h:102
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sur_z
std::vector< double > m_mstrack_sur_z
Definition: MuonCombinedDebuggerTool.h:71
MuonCandidateCollection.h
MuonCombined::MuonCombinedDebuggerTool::interfaceID
static const InterfaceID & interfaceID()
Definition: MuonCombinedDebuggerTool.h:30
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_has_truth
std::vector< int > m_mstrack_has_truth
Definition: MuonCombinedDebuggerTool.h:56
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_phi0
std::vector< double > m_idtrack_phi0
Definition: MuonCombinedDebuggerTool.h:116
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sa_d0
std::vector< double > m_mstrack_sa_d0
Definition: MuonCombinedDebuggerTool.h:87
MuonCombined::MuonCombinedDebuggerTool::initialize
StatusCode initialize() override
Definition: MuonCombinedDebuggerTool.cxx:31
MuonCombined::MuonCombinedDebuggerTool::m_ms_id_oprob
std::vector< std::vector< double > > m_ms_id_oprob
Definition: MuonCombinedDebuggerTool.h:127
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_truth_phi0
std::vector< double > m_idtrack_truth_phi0
Definition: MuonCombinedDebuggerTool.h:107
MuonCombined::MuonCombinedDebuggerTool::m_matchQuality
ToolHandle< Rec::IMuonMatchQuality > m_matchQuality
Definition: MuonCombinedDebuggerTool.h:48
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_cov_qOverP
std::vector< double > m_mstrack_cov_qOverP
Definition: MuonCombinedDebuggerTool.h:81
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_truth_z0
std::vector< double > m_idtrack_truth_z0
Definition: MuonCombinedDebuggerTool.h:106
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_truth_z0
std::vector< double > m_mstrack_truth_z0
Definition: MuonCombinedDebuggerTool.h:64
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_sur_y
std::vector< double > m_idtrack_sur_y
Definition: MuonCombinedDebuggerTool.h:112
MuonCombined::MuonCombinedDebuggerTool::m_ms_id_ochi2
std::vector< std::vector< double > > m_ms_id_ochi2
Definition: MuonCombinedDebuggerTool.h:125
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sur_x
std::vector< double > m_mstrack_sur_x
Definition: MuonCombinedDebuggerTool.h:69
ITruthToTrack.h
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_truth_d0
std::vector< double > m_idtrack_truth_d0
Definition: MuonCombinedDebuggerTool.h:105
MuonCombined::MuonCombinedDebuggerTool
Definition: MuonCombinedDebuggerTool.h:25
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_cov_theta
std::vector< double > m_mstrack_cov_theta
Definition: MuonCombinedDebuggerTool.h:80
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_d0
std::vector< double > m_idtrack_d0
Definition: MuonCombinedDebuggerTool.h:114
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonCombined::MuonCombinedDebuggerTool::fillMsBranches
void fillMsBranches(const MuonCandidateCollection &muonCandidates)
Definition: MuonCombinedDebuggerTool.cxx:322
MuonCombined
The MuonTagToSegMap is an auxillary construct that links the MuonSegments associated with a combined ...
Definition: IMuonSystemExtensionTool.h:23
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sa_phi0
std::vector< double > m_mstrack_sa_phi0
Definition: MuonCombinedDebuggerTool.h:89
MuonCombined::MuonCombinedDebuggerTool::MuonCombinedDebuggerTool
MuonCombinedDebuggerTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: MuonCombinedDebuggerTool.cxx:26
MuonCombined::MuonCombinedDebuggerTool::m_eventNumber
int m_eventNumber
Definition: MuonCombinedDebuggerTool.h:54
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_sa_cov_theta
std::vector< double > m_mstrack_sa_cov_theta
Definition: MuonCombinedDebuggerTool.h:95
MuonCombined::MuonCombinedDebuggerTool::fillIdBranches
void fillIdBranches(const InDetCandidateCollection &inDetCandidates)
Definition: MuonCombinedDebuggerTool.cxx:204
InDetCandidateCollection.h
MuonCombined::MuonCombinedDebuggerTool::m_truthToTrack
ToolHandle< Trk::ITruthToTrack > m_truthToTrack
Definition: MuonCombinedDebuggerTool.h:49
AthAlgTool
Definition: AthAlgTool.h:26
MuonCombined::MuonCombinedDebuggerTool::m_histSvc
ServiceHandle< ITHistSvc > m_histSvc
Definition: MuonCombinedDebuggerTool.h:51
IMuonMatchQuality.h
MuonCombined::MuonCombinedDebuggerTool::m_ms_id_iprob
std::vector< std::vector< double > > m_ms_id_iprob
Definition: MuonCombinedDebuggerTool.h:130
checker_macros.h
Define macros for attributes used to control the static checker.
MuonCombined::MuonCombinedDebuggerTool::m_mstrack_theta
std::vector< double > m_mstrack_theta
Definition: MuonCombinedDebuggerTool.h:75
MuonCombined::MuonCombinedDebuggerTool::m_idtrack_sur_x
std::vector< double > m_idtrack_sur_x
Definition: MuonCombinedDebuggerTool.h:111
ServiceHandle< ITHistSvc >