ATLAS Offline Software
SimpleIDNtupleTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INDETALIGNNTUPLETOOLS_SIMPLEIDNTUPLETOOL_H
6 #define INDETALIGNNTUPLETOOLS_SIMPLEIDNTUPLETOOL_H
7 
8 #include "GaudiKernel/ToolHandle.h"
10 
12 
23 class TFile;
24 class TTree;
25 
26 namespace Trk
27 {
28  class AlignTrack;
29  class ITrackParticleCreatorTool;
30  class IAlignModuleTool;
31 }
32 
33 namespace InDetDD
34 {
35  class TRT_DetectorManager;
36 }
37 
38 class TRT_ID;
39 
40 namespace InDet
41 {
42  class SimpleIDNtupleTool : virtual public Trk::IFillNtupleTool, public AthAlgTool
43  {
44 
45  public:
46  SimpleIDNtupleTool(const std::string & type, const std::string & name, const IInterface * parent);
47  virtual ~SimpleIDNtupleTool();
48 
51 
53  void dumpTrack(int itrk, const Trk::AlignTrack * alignTrack);
54 
56  void fillHits(const Trk::AlignTrack * alignTrack);
57 
58  void storeHitmap();
59  void fillHitmap();
60  void fillSummary();
61  void showStatistics();
62 
63  void setNtuple(TFile* ntuple) { m_file=ntuple; }
65 
66  private:
67 
68  void initializeNtuple();
69 
70  ToolHandle <Trk::ITrackParticleCreatorTool> m_particleCreator;
71  ToolHandle <Trk::IAlignModuleTool> m_alignModuleTool;
72 
73  const TRT_ID * m_idHelper;
74 
75  TFile * m_file;
76  TTree * m_tree;
77 
78  //std::string m_filename; //!< name of ntuple file
79  //std::string m_filepath; //!< path to ntuple file
80 
81  // Reconstructed variables
84 
85  // Track information
86 
88  double m_xvtx;
89 
91  double m_yvtx;
92 
94  double m_zvtx;
95 
97  double m_d0;
98 
100  double m_z0;
101 
103  double m_phi0;
104 
106  double m_theta;
107 
109  double m_qoverp;
110 
112  double m_pt;
113 
115  double m_eta;
116 
118  double m_chi2;
119 
121  int m_ndof;
122 
124  double m_chi2prob;
125 
126  // Hit information
127 
129  int m_nhits;
130 
133 
136 
139 
142 
144  int m_nshsct;
145 
147  int m_nshpix;
148 
150  int m_nholes;
151 
153  int m_nhsct;
154 
156  int m_nhpix;
157 
159  double * m_hit_rho;
160 
162  double * m_hit_phi;
163 
165  double * m_hit_z;
166 
168  double * m_hit_cotth;
169 
171  double * m_hit_eta;
172 
174  double * m_hit_xloc;
175 
177  double * m_hit_yloc;
178 
180  double * m_hit_zloc;
181 
183  double * m_hit_drd;
184 
186  double * m_hit_sig;
187 
188  double * m_hit_resx;
189  double * m_hit_resx_err;
190  double * m_hit_resy;
191  double * m_hit_resy_err;
192 
193  double * m_hit_tpar_x;
194  double * m_hit_tpar_y;
195 
196  int * m_hit_det;
197  int * m_hit_type;
198 
202  double * m_hit_derivx_rotx;
203  double * m_hit_derivx_roty;
204  double * m_hit_derivx_rotz;
205  double * m_hit_derivx_bowx;
206  double * m_hit_derivx_bowy;
207  double * m_hit_derivx_bowz;
211  double * m_hit_derivy_rotx;
212  double * m_hit_derivy_roty;
213  double * m_hit_derivy_rotz;
214  double * m_hit_derivy_bowx;
215  double * m_hit_derivy_bowy;
216  double * m_hit_derivy_bowz;
217 
219 
221  }; // end class
222 
223 } // end namespace
224 
225 #endif // INDETALIGNNTUPLETOOLS_SIMPLEIDNTUPLETOOL_H
InDet::SimpleIDNtupleTool::m_chi2
double m_chi2
Chi2 of the track fit (chi2 in ntuple)
Definition: SimpleIDNtupleTool.h:118
InDet::SimpleIDNtupleTool::m_max_hits
int m_max_hits
max number of hits on track stored in ntuple
Definition: SimpleIDNtupleTool.h:218
InDet::SimpleIDNtupleTool::m_nshpix
int m_nshpix
number of shared Pixel hits on track (nshpix in ntuple)
Definition: SimpleIDNtupleTool.h:147
InDet::SimpleIDNtupleTool::m_hit_derivy_roty
double * m_hit_derivy_roty
derivatives of Y-residual wrt.
Definition: SimpleIDNtupleTool.h:212
InDet::SimpleIDNtupleTool::m_hit_sig
double * m_hit_sig
hit error (hit_sig in ntuple)
Definition: SimpleIDNtupleTool.h:186
InDet::SimpleIDNtupleTool::m_hit_rho
double * m_hit_rho
radius of hit (hit_rho in ntuple)
Definition: SimpleIDNtupleTool.h:159
InDet::SimpleIDNtupleTool::m_z0
double m_z0
z0 perigee parameter of reconstructed track (z0 in ntuple)
Definition: SimpleIDNtupleTool.h:100
InDet::SimpleIDNtupleTool::m_hit_tpar_y
double * m_hit_tpar_y
track parameter locY
Definition: SimpleIDNtupleTool.h:194
InDet::SimpleIDNtupleTool::m_pt
double m_pt
pt perigee parameter of reconstructed track (pt in ntuple)
Definition: SimpleIDNtupleTool.h:112
InDet::SimpleIDNtupleTool::m_nhitssct
int m_nhitssct
number of SCT hits on track (nscthits in ntuple)
Definition: SimpleIDNtupleTool.h:135
InDet::SimpleIDNtupleTool::storeHitmap
void storeHitmap()
stores hitmap for writing to ntuple
Definition: SimpleIDNtupleTool.cxx:586
IFillNtupleTool.h
InDet::SimpleIDNtupleTool::m_runNumber
int m_runNumber
Definition: SimpleIDNtupleTool.h:82
InDet::SimpleIDNtupleTool::m_hit_derivy_bowz
double * m_hit_derivy_bowz
derivatives of Y-residual wrt.
Definition: SimpleIDNtupleTool.h:216
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::SimpleIDNtupleTool::m_hit_derivy_transy
double * m_hit_derivy_transy
derivatives of Y-residual wrt.
Definition: SimpleIDNtupleTool.h:209
InDet::SimpleIDNtupleTool::m_hit_derivx_transx
double * m_hit_derivx_transx
derivatives of X-residual wrt.
Definition: SimpleIDNtupleTool.h:199
InDet::SimpleIDNtupleTool::m_hit_derivx_bowy
double * m_hit_derivx_bowy
derivatives of X-residual wrt.
Definition: SimpleIDNtupleTool.h:206
InDet::SimpleIDNtupleTool::m_hit_resy
double * m_hit_resy
Y-residual of the hit.
Definition: SimpleIDNtupleTool.h:190
InDet::SimpleIDNtupleTool::m_particleCreator
ToolHandle< Trk::ITrackParticleCreatorTool > m_particleCreator
Pointer to track particle creator tool.
Definition: SimpleIDNtupleTool.h:70
InDet::SimpleIDNtupleTool::fillHitmap
void fillHitmap()
fills ntuple with hit information
Definition: SimpleIDNtupleTool.cxx:590
InDet::SimpleIDNtupleTool::m_nhitspix
int m_nhitspix
number of Pixel hits on track (ntrthits in ntuple)
Definition: SimpleIDNtupleTool.h:138
InDet::SimpleIDNtupleTool::m_nshared
int m_nshared
number of shared hits on track (nshared in ntuple)
Definition: SimpleIDNtupleTool.h:141
InDet::SimpleIDNtupleTool::m_yvtx
double m_yvtx
y coord of track perigee (yvtx in ntuple)
Definition: SimpleIDNtupleTool.h:91
InDet::SimpleIDNtupleTool::finalize
StatusCode finalize()
Definition: SimpleIDNtupleTool.cxx:191
InDet::SimpleIDNtupleTool::m_hit_derivy_bowx
double * m_hit_derivy_bowx
derivatives of Y-residual wrt.
Definition: SimpleIDNtupleTool.h:214
InDet::SimpleIDNtupleTool::fillSummary
void fillSummary()
fills ntuple with event and track summary information
Definition: SimpleIDNtupleTool.cxx:594
InDet::SimpleIDNtupleTool::m_hit_cotth
double * m_hit_cotth
cot(theta) of hit (hit_cotth in ntuple)
Definition: SimpleIDNtupleTool.h:168
InDet::SimpleIDNtupleTool::m_phi0
double m_phi0
phi perigee parameter of reconstructed track (phi0 in ntuple)
Definition: SimpleIDNtupleTool.h:103
InDet::SimpleIDNtupleTool::m_zvtx
double m_zvtx
z coord of track perigee (zvtx in ntuple)
Definition: SimpleIDNtupleTool.h:94
InDet::SimpleIDNtupleTool::m_hit_tpar_x
double * m_hit_tpar_x
track parameter locX
Definition: SimpleIDNtupleTool.h:193
InDet::SimpleIDNtupleTool::SimpleIDNtupleTool
SimpleIDNtupleTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: SimpleIDNtupleTool.cxx:38
InDet::SimpleIDNtupleTool::m_tree
TTree * m_tree
Definition: SimpleIDNtupleTool.h:76
InDet::SimpleIDNtupleTool::m_nhitstrt
int m_nhitstrt
number of TRT hits on track (ntrthits in ntuple)
Definition: SimpleIDNtupleTool.h:132
InDet::SimpleIDNtupleTool::m_eta
double m_eta
eta of perigee of reconstructed track (eta in ntuple)
Definition: SimpleIDNtupleTool.h:115
InDet::SimpleIDNtupleTool::m_nshsct
int m_nshsct
number of shared SCT hits on track (nshsct in ntuple)
Definition: SimpleIDNtupleTool.h:144
InDet::SimpleIDNtupleTool::m_hit_zloc
double * m_hit_zloc
local z coord of hit (hit_zloc in ntuple)
Definition: SimpleIDNtupleTool.h:180
InDet::SimpleIDNtupleTool::m_qoverp
double m_qoverp
Q over p perigee parameter of reconstructed track (qoverp in ntuple)
Definition: SimpleIDNtupleTool.h:109
InDet::SimpleIDNtupleTool::m_hit_derivx_bowz
double * m_hit_derivx_bowz
derivatives of X-residual wrt.
Definition: SimpleIDNtupleTool.h:207
InDet::SimpleIDNtupleTool::m_idHelper
const TRT_ID * m_idHelper
Definition: SimpleIDNtupleTool.h:73
InDet::SimpleIDNtupleTool::m_hit_derivy_transx
double * m_hit_derivy_transx
derivatives of Y-residual wrt.
Definition: SimpleIDNtupleTool.h:208
InDet::SimpleIDNtupleTool::m_hit_type
int * m_hit_type
hit type
Definition: SimpleIDNtupleTool.h:197
InDet::SimpleIDNtupleTool::m_hit_derivx_transz
double * m_hit_derivx_transz
derivatives of X-residual wrt.
Definition: SimpleIDNtupleTool.h:201
InDet::SimpleIDNtupleTool::m_hit_det
int * m_hit_det
detector type for the hit
Definition: SimpleIDNtupleTool.h:196
InDet::SimpleIDNtupleTool::m_hit_eta
double * m_hit_eta
eta angle of hit (hit_eta in ntuple)
Definition: SimpleIDNtupleTool.h:171
InDet::SimpleIDNtupleTool::m_evtNumber
int m_evtNumber
Definition: SimpleIDNtupleTool.h:83
Trk::IFillNtupleTool
Definition: IFillNtupleTool.h:33
InDet::SimpleIDNtupleTool::m_chi2prob
double m_chi2prob
Chi2 probability of the track fit (chi2prob in ntuple)
Definition: SimpleIDNtupleTool.h:124
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::SimpleIDNtupleTool::m_alignModuleTool
ToolHandle< Trk::IAlignModuleTool > m_alignModuleTool
Pointer to AlignmModuleTool.
Definition: SimpleIDNtupleTool.h:71
AthAlgTool.h
InDet::SimpleIDNtupleTool::dumpTrack
void dumpTrack(int itrk, const Trk::AlignTrack *alignTrack)
fills track information to ntuple
Definition: SimpleIDNtupleTool.cxx:198
InDet::SimpleIDNtupleTool::m_hit_z
double * m_hit_z
z coord of hit (hit_z in ntuple)
Definition: SimpleIDNtupleTool.h:165
test_pyathena.parent
parent
Definition: test_pyathena.py:15
InDet::SimpleIDNtupleTool::initializeNtuple
void initializeNtuple()
Definition: SimpleIDNtupleTool.cxx:602
InDet::SimpleIDNtupleTool::m_file
TFile * m_file
Definition: SimpleIDNtupleTool.h:75
InDet::SimpleIDNtupleTool::m_nhsct
int m_nhsct
number of SCT holes on track (nhsct in ntuple)
Definition: SimpleIDNtupleTool.h:153
InDet::SimpleIDNtupleTool::m_hit_drd
double * m_hit_drd
drift distance to wire for hit (hit_drd in ntuple)
Definition: SimpleIDNtupleTool.h:183
InDet::SimpleIDNtupleTool::m_hit_derivy_transz
double * m_hit_derivy_transz
derivatives of Y-residual wrt.
Definition: SimpleIDNtupleTool.h:210
InDet::SimpleIDNtupleTool::m_hit_derivx_roty
double * m_hit_derivx_roty
derivatives of X-residual wrt.
Definition: SimpleIDNtupleTool.h:203
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDet::SimpleIDNtupleTool::m_hit_derivy_rotx
double * m_hit_derivy_rotx
derivatives of Y-residual wrt.
Definition: SimpleIDNtupleTool.h:211
InDet::SimpleIDNtupleTool::m_hit_derivx_transy
double * m_hit_derivx_transy
derivatives of X-residual wrt.
Definition: SimpleIDNtupleTool.h:200
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
InDet::SimpleIDNtupleTool::m_hit_derivy_rotz
double * m_hit_derivy_rotz
derivatives of Y-residual wrt.
Definition: SimpleIDNtupleTool.h:213
InDet::SimpleIDNtupleTool::~SimpleIDNtupleTool
virtual ~SimpleIDNtupleTool()
Definition: SimpleIDNtupleTool.cxx:116
InDet::SimpleIDNtupleTool::fillNtuple
StatusCode fillNtuple()
writes trees and histograms to ntuple
Definition: SimpleIDNtupleTool.cxx:181
Trk::AlignTrack
Definition: AlignTrack.h:41
InDet::SimpleIDNtupleTool::m_hit_phi
double * m_hit_phi
phi angle of hit (hit_phi in ntuple)
Definition: SimpleIDNtupleTool.h:162
TRT_ID
Definition: TRT_ID.h:84
InDet::SimpleIDNtupleTool::m_hit_yloc
double * m_hit_yloc
local y coord of hit (hit_yloc in ntuple)
Definition: SimpleIDNtupleTool.h:177
InDet::SimpleIDNtupleTool::m_theta
double m_theta
theta perigee parameter of reconstructed track (theta in ntuple)
Definition: SimpleIDNtupleTool.h:106
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
InDet::SimpleIDNtupleTool::m_hit_resy_err
double * m_hit_resy_err
Y-residual error of the hit.
Definition: SimpleIDNtupleTool.h:191
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
InDet::SimpleIDNtupleTool::m_storeDerivatives
bool m_storeDerivatives
Definition: SimpleIDNtupleTool.h:220
InDet::SimpleIDNtupleTool::m_d0
double m_d0
d0 perigee parameter of reconstructed track (d0 in ntuple)
Definition: SimpleIDNtupleTool.h:97
InDet::SimpleIDNtupleTool::m_nhpix
int m_nhpix
number of Pixel holes on track (nhpix in ntuple)
Definition: SimpleIDNtupleTool.h:156
InDet::SimpleIDNtupleTool::m_hit_xloc
double * m_hit_xloc
local x coord of hit (hit_xloc in ntuple)
Definition: SimpleIDNtupleTool.h:174
InDet::SimpleIDNtupleTool::fillHits
void fillHits(const Trk::AlignTrack *alignTrack)
fills hit information to ntuple
Definition: SimpleIDNtupleTool.cxx:336
InDet::SimpleIDNtupleTool::m_hit_derivx_rotz
double * m_hit_derivx_rotz
derivatives of X-residual wrt.
Definition: SimpleIDNtupleTool.h:204
InDet::SimpleIDNtupleTool::showStatistics
void showStatistics()
write statistics out to log file
Definition: SimpleIDNtupleTool.cxx:598
InDet::SimpleIDNtupleTool::m_hit_resx_err
double * m_hit_resx_err
X-residual error of the hit.
Definition: SimpleIDNtupleTool.h:189
InDet::SimpleIDNtupleTool::m_hit_resx
double * m_hit_resx
X-residual of the hit.
Definition: SimpleIDNtupleTool.h:188
InDet::SimpleIDNtupleTool::m_hit_derivx_rotx
double * m_hit_derivx_rotx
derivatives of X-residual wrt.
Definition: SimpleIDNtupleTool.h:202
InDet::SimpleIDNtupleTool::m_nholes
int m_nholes
number of holes on track (nholes in ntuple)
Definition: SimpleIDNtupleTool.h:150
AthAlgTool
Definition: AthAlgTool.h:26
InDet::SimpleIDNtupleTool::m_hit_derivy_bowy
double * m_hit_derivy_bowy
derivatives of Y-residual wrt.
Definition: SimpleIDNtupleTool.h:215
InDet::SimpleIDNtupleTool::setNtuple
void setNtuple(TFile *ntuple)
sets the output stream for the logfile
Definition: SimpleIDNtupleTool.h:63
InDet::SimpleIDNtupleTool::m_hit_derivx_bowx
double * m_hit_derivx_bowx
derivatives of X-residual wrt.
Definition: SimpleIDNtupleTool.h:205
InDet::SimpleIDNtupleTool::m_nhits
int m_nhits
number of hits on track [including scattering centers] (nhits in ntuple)
Definition: SimpleIDNtupleTool.h:129
InDet::SimpleIDNtupleTool
Definition: SimpleIDNtupleTool.h:43
InDet::SimpleIDNtupleTool::m_ndof
int m_ndof
number of degrees of freedom of the track fit (ndof in ntuple)
Definition: SimpleIDNtupleTool.h:121
InDet::SimpleIDNtupleTool::m_xvtx
double m_xvtx
x coord of track perigee (xvtx in ntuple)
Definition: SimpleIDNtupleTool.h:88
AlignTrack
AlignTrack is a generalization of a Trk::Track, used as the basic object to contain track information...
InDet::SimpleIDNtupleTool::initialize
StatusCode initialize()
Definition: SimpleIDNtupleTool.cxx:161