ATLAS Offline Software
Loading...
Searching...
No Matches
SimpleIDNtupleTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
22
23class TFile;
24class TTree;
25class TRT_ID;
26
27namespace Trk
28{
29 class AlignTrack;
30 class ITrackParticleCreatorTool;
31 class IAlignModuleTool;
32}
33
34namespace InDet
35{
36 class SimpleIDNtupleTool : virtual public Trk::IFillNtupleTool, public AthAlgTool
37 {
38 public:
39 SimpleIDNtupleTool(const std::string & type, const std::string & name, const IInterface * parent);
40 virtual ~SimpleIDNtupleTool();
41
42 virtual StatusCode initialize() override;
43 virtual StatusCode finalize() override;
44
46 virtual void dumpTrack(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 ToolHandle <Trk::IAlignModuleTool> m_alignModuleTool;
64
66
67 TFile * m_file;
68 TTree * m_tree;
69
70 // Reconstructed variables
73
74 // Track information
75
77 double m_xvtx;
78
80 double m_yvtx;
81
83 double m_zvtx;
84
86 double m_d0;
87
89 double m_z0;
90
92 double m_phi0;
93
95 double m_theta;
96
98 double m_qoverp;
99
101 double m_pt;
102
104 double m_eta;
105
107 double m_chi2;
108
111
114
115 // Hit information
116
119
122
125
128
131
134
137
140
143
146
148 double * m_hit_rho;
149
151 double * m_hit_phi;
152
154 double * m_hit_z;
155
157 double * m_hit_cotth;
158
160 double * m_hit_eta;
161
163 double * m_hit_xloc;
164
166 double * m_hit_yloc;
167
169 double * m_hit_zloc;
170
172 double * m_hit_drd;
173
175 double * m_hit_sig;
176
177 double * m_hit_resx;
178 double * m_hit_resx_err;
179 double * m_hit_resy;
180 double * m_hit_resy_err;
181
182 double * m_hit_tpar_x;
183 double * m_hit_tpar_y;
184
185 int * m_hit_det;
187
206
208
210 }; // end class
211
212} // end namespace
213
214#endif // INDETALIGNNTUPLETOOLS_SIMPLEIDNTUPLETOOL_H
AlignTrack is a generalization of a Trk::Track, used as the basic object to contain track information...
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
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)
virtual void dumpTrack(int itrk, const Trk::AlignTrack *alignTrack) override
fills track information to ntuple
double m_eta
eta of perigee of reconstructed track (eta in ntuple)
virtual void storeHitmap() override
stores hitmap for writing to ntuple
ToolHandle< Trk::IAlignModuleTool > m_alignModuleTool
Pointer to AlignmModuleTool.
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
writes trees and histograms to ntuple
double * m_hit_derivx_transx
derivatives of X-residual wrt.
double * m_hit_phi
phi angle of hit (hit_phi in ntuple)
SimpleIDNtupleTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual void fillSummary() override
fills ntuple with event and track summary information
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
sets the output stream for the logfile
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
fills ntuple with hit information
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
write statistics out to log file
double * m_hit_resx_err
X-residual error of the hit.
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)
int m_max_hits
max number of hits on track stored 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)
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)
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:82
Primary Vertex Finder.
Ensure that the ATLAS eigen extensions are properly loaded.