ATLAS Offline Software
Loading...
Searching...
No Matches
SimpleIDNtupleTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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
14
24
25class TFile;
26class TTree;
27class TRT_ID;
28
29namespace Trk
30{
31 class AlignTrack;
32}
33
34namespace InDet
35{
36 class SimpleIDNtupleTool : public extends<AthAlgTool, Trk::IFillNtupleTool>
37 {
38 public:
39 using base_class::base_class;
40 virtual ~SimpleIDNtupleTool();
41
42 virtual StatusCode initialize() override;
43 virtual StatusCode finalize() override;
44
46 virtual void dumpTrack(const EventContext& ctx, int itrk, const Trk::AlignTrack * alignTrack) override;
47
49 void fillHits(const Trk::AlignTrack * alignTrack);
50
51 virtual void storeHitmap() override;
52 virtual void fillHitmap() override;
53 virtual void fillSummary() override;
54 virtual void showStatistics() override;
55
56 virtual void setNtuple(TFile* ntuple) override { m_file=ntuple; }
57 virtual StatusCode fillNtuple() override;
58
59 private:
60 void initializeNtuple();
61
62 ToolHandle <Trk::ITrackParticleCreatorTool> m_particleCreator
63 {this, "TrackParticleCreatorTool", "Trk::TrackParticleCreatorTool/TrackParticleCreatorTool", "tool to build TrackParticle"};
64 PublicToolHandle <Trk::IAlignModuleTool> m_alignModuleTool
65 {this, "AlignModuleTool", "", ""};
66
67 const TRT_ID * m_idHelper{};
68
69 TFile * m_file{};
70 TTree * m_tree{nullptr};
71
72 // Reconstructed variables
75
76 // Track information
77
79 double m_xvtx{};
80
82 double m_yvtx{};
83
85 double m_zvtx{};
86
88 double m_d0{};
89
91 double m_z0{};
92
94 double m_phi0{};
95
97 double m_theta{};
98
100 double m_qoverp{};
101
103 double m_pt{};
104
106 double m_eta{};
107
109 double m_chi2{};
110
112 int m_ndof{};
113
115 double m_chi2prob{};
116
117 // Hit information
118
120 int m_nhits{};
121
124
127
130
133
135 int m_nshsct{};
136
138 int m_nshpix{};
139
141 int m_nholes{};
142
144 int m_nhsct{};
145
147 int m_nhpix{};
148
150 double * m_hit_rho{};
151
153 double * m_hit_phi{};
154
156 double * m_hit_z{};
157
159 double * m_hit_cotth{};
160
162 double * m_hit_eta{};
163
165 double * m_hit_xloc{};
166
168 double * m_hit_yloc{};
169
171 double * m_hit_zloc{};
172
174 double * m_hit_drd{};
175
177 double * m_hit_sig{};
178
179 double * m_hit_resx{};
180 double * m_hit_resx_err{};
181 double * m_hit_resy{};
182 double * m_hit_resy_err{};
183
184 double * m_hit_tpar_x{};
185 double * m_hit_tpar_y{};
186
187 int * m_hit_det{};
188 int * m_hit_type{};
189
193 double * m_hit_derivx_rotx{};
194 double * m_hit_derivx_roty{};
195 double * m_hit_derivx_rotz{};
196 double * m_hit_derivx_bowx{};
197 double * m_hit_derivx_bowy{};
198 double * m_hit_derivx_bowz{};
202 double * m_hit_derivy_rotx{};
203 double * m_hit_derivy_roty{};
204 double * m_hit_derivy_rotz{};
205 double * m_hit_derivy_bowx{};
206 double * m_hit_derivy_bowy{};
207 double * m_hit_derivy_bowz{};
208
209 Gaudi::Property<int> m_max_hits{this, "MaxHits", 150};
210
211 Gaudi::Property<bool> m_storeDerivatives{this, "StoreDerivatives", false};
212 }; // end class
213
214} // end namespace
215
216#endif // INDETALIGNNTUPLETOOLS_SIMPLEIDNTUPLETOOL_H
AlignTrack is a generalization of a Trk::Track, used as the basic object to contain track information...
double * m_hit_derivy_rotx
derivatives of Y-residual wrt.
double * m_hit_tpar_y
track parameter locY
ToolHandle< Trk::ITrackParticleCreatorTool > m_particleCreator
Pointer to track particle creator tool.
int * m_hit_det
detector type for the hit
int m_nhitstrt
number of TRT hits on track (ntrthits in ntuple)
double m_eta
eta of perigee of reconstructed track (eta in ntuple)
virtual void storeHitmap() override
double * m_hit_tpar_x
track parameter locX
double * m_hit_derivy_roty
derivatives of Y-residual wrt.
virtual StatusCode finalize() override
virtual StatusCode fillNtuple() override
double * m_hit_derivx_transx
derivatives of X-residual wrt.
double * m_hit_phi
phi angle of hit (hit_phi in ntuple)
virtual void fillSummary() override
double * m_hit_derivx_rotx
derivatives of X-residual wrt.
int m_nhitssct
number of SCT hits on track (nscthits in ntuple)
double * m_hit_derivx_bowz
derivatives of X-residual wrt.
int m_ndof
number of degrees of freedom of the track fit (ndof in ntuple)
double * m_hit_derivy_bowx
derivatives of Y-residual wrt.
double * m_hit_derivx_transz
derivatives of X-residual wrt.
double * m_hit_derivy_rotz
derivatives of Y-residual wrt.
double * m_hit_derivx_bowx
derivatives of X-residual wrt.
double * m_hit_drd
drift distance to wire for hit (hit_drd in ntuple)
int m_nhpix
number of Pixel holes on track (nhpix in ntuple)
virtual void setNtuple(TFile *ntuple) override
double * m_hit_resy
Y-residual of the hit.
double * m_hit_resy_err
Y-residual error of the hit.
double * m_hit_derivx_roty
derivatives of X-residual wrt.
virtual StatusCode initialize() override
virtual void fillHitmap() override
double * m_hit_rho
radius of hit (hit_rho in ntuple)
double m_pt
pt perigee parameter of reconstructed track (pt in ntuple)
virtual void showStatistics() override
double * m_hit_resx_err
X-residual error of the hit.
Gaudi::Property< int > m_max_hits
max number of hits on track stored in ntuple
PublicToolHandle< Trk::IAlignModuleTool > m_alignModuleTool
Pointer to AlignmModuleTool.
double * m_hit_derivx_transy
derivatives of X-residual wrt.
double * m_hit_yloc
local y coord of hit (hit_yloc in ntuple)
double * m_hit_cotth
cot(theta) of hit (hit_cotth in ntuple)
double m_phi0
phi perigee parameter of reconstructed track (phi0 in ntuple)
double * m_hit_derivx_rotz
derivatives of X-residual wrt.
double m_yvtx
y coord of track perigee (yvtx in ntuple)
double * m_hit_xloc
local x coord of hit (hit_xloc in ntuple)
double * m_hit_z
z coord of hit (hit_z in ntuple)
Gaudi::Property< bool > m_storeDerivatives
double m_theta
theta perigee parameter of reconstructed track (theta in ntuple)
double * m_hit_derivy_transx
derivatives of Y-residual wrt.
double * m_hit_eta
eta angle of hit (hit_eta in ntuple)
double * m_hit_sig
hit error (hit_sig in ntuple)
int m_nhitspix
number of Pixel hits on track (ntrthits in ntuple)
double m_chi2prob
Chi2 probability of the track fit (chi2prob in ntuple).
double m_zvtx
z coord of track perigee (zvtx in ntuple)
int m_nshpix
number of shared Pixel hits on track (nshpix in ntuple)
double m_z0
z0 perigee parameter of reconstructed track (z0 in ntuple)
double * m_hit_derivy_bowz
derivatives of Y-residual wrt.
double m_chi2
Chi2 of the track fit (chi2 in ntuple).
void fillHits(const Trk::AlignTrack *alignTrack)
fills hit information to ntuple
double m_xvtx
x coord of track perigee (xvtx in ntuple)
double * m_hit_derivx_bowy
derivatives of X-residual wrt.
int m_nhsct
number of SCT holes on track (nhsct in ntuple)
int m_nshared
number of shared hits on track (nshared in ntuple)
int m_nhits
number of hits on track [including scattering centers] (nhits in ntuple)
virtual void dumpTrack(const EventContext &ctx, int itrk, const Trk::AlignTrack *alignTrack) override
fills track information to ntuple
double * m_hit_derivy_transy
derivatives of Y-residual wrt.
int m_nshsct
number of shared SCT hits on track (nshsct in ntuple)
double * m_hit_resx
X-residual of the hit.
int m_nholes
number of holes on track (nholes in ntuple)
double * m_hit_derivy_bowy
derivatives of Y-residual wrt.
double * m_hit_zloc
local z coord of hit (hit_zloc in ntuple)
double m_qoverp
Q over p perigee parameter of reconstructed track (qoverp in ntuple).
double m_d0
d0 perigee parameter of reconstructed track (d0 in ntuple)
double * m_hit_derivy_transz
derivatives of Y-residual wrt.
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:84
Primary Vertex Finder.
Ensure that the ATLAS eigen extensions are properly loaded.