ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::SimpleIDNtupleTool Class Reference

#include <SimpleIDNtupleTool.h>

Inheritance diagram for InDet::SimpleIDNtupleTool:
Collaboration diagram for InDet::SimpleIDNtupleTool:

Public Member Functions

 SimpleIDNtupleTool (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~SimpleIDNtupleTool ()
virtual StatusCode initialize () override
virtual StatusCode finalize () override
virtual void dumpTrack (int itrk, const Trk::AlignTrack *alignTrack) override
 fills track information to ntuple
void fillHits (const Trk::AlignTrack *alignTrack)
 fills hit information to ntuple
virtual void storeHitmap () override
 stores hitmap for writing to ntuple
virtual void fillHitmap () override
 fills ntuple with hit information
virtual void fillSummary () override
 fills ntuple with event and track summary information
virtual void showStatistics () override
 write statistics out to log file
virtual void setNtuple (TFile *ntuple) override
 sets the output stream for the logfile
virtual StatusCode fillNtuple () override
 writes trees and histograms to ntuple
virtual void fillChi2VChamberShift (const int, const int, int *, double **, double **, double **, double **, double **, double **)
 used for numerical derivatives to write chi2 vs.
virtual void setLogStream (std::ostream *os)
 returns pointer to TFile containing ntuple
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

std::ostream * m_logStream = nullptr
 logfile output stream

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

void initializeNtuple ()
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< Trk::ITrackParticleCreatorToolm_particleCreator
 Pointer to track particle creator tool.
ToolHandle< Trk::IAlignModuleToolm_alignModuleTool
 Pointer to AlignmModuleTool.
const TRT_IDm_idHelper
TFile * m_file
TTree * m_tree
int m_runNumber
int m_evtNumber
double m_xvtx
 x coord of track perigee (xvtx in ntuple)
double m_yvtx
 y coord of track perigee (yvtx in ntuple)
double m_zvtx
 z coord of track perigee (zvtx in ntuple)
double m_d0
 d0 perigee parameter of reconstructed track (d0 in ntuple)
double m_z0
 z0 perigee parameter of reconstructed track (z0 in ntuple)
double m_phi0
 phi perigee parameter of reconstructed track (phi0 in ntuple)
double m_theta
 theta perigee parameter of reconstructed track (theta in ntuple)
double m_qoverp
 Q over p perigee parameter of reconstructed track (qoverp in ntuple)
double m_pt
 pt perigee parameter of reconstructed track (pt in ntuple)
double m_eta
 eta of perigee of reconstructed track (eta in ntuple)
double m_chi2
 Chi2 of the track fit (chi2 in ntuple)
int m_ndof
 number of degrees of freedom of the track fit (ndof in ntuple)
double m_chi2prob
 Chi2 probability of the track fit (chi2prob in ntuple)
int m_nhits
 number of hits on track [including scattering centers] (nhits in ntuple)
int m_nhitstrt
 number of TRT hits on track (ntrthits in ntuple)
int m_nhitssct
 number of SCT hits on track (nscthits in ntuple)
int m_nhitspix
 number of Pixel hits on track (ntrthits in ntuple)
int m_nshared
 number of shared hits on track (nshared in ntuple)
int m_nshsct
 number of shared SCT hits on track (nshsct in ntuple)
int m_nshpix
 number of shared Pixel hits on track (nshpix in ntuple)
int m_nholes
 number of holes on track (nholes in ntuple)
int m_nhsct
 number of SCT holes on track (nhsct in ntuple)
int m_nhpix
 number of Pixel holes on track (nhpix in ntuple)
double * m_hit_rho
 radius of hit (hit_rho in ntuple)
double * m_hit_phi
 phi angle of hit (hit_phi in ntuple)
double * m_hit_z
 z coord of hit (hit_z in ntuple)
double * m_hit_cotth
 cot(theta) of hit (hit_cotth in ntuple)
double * m_hit_eta
 eta angle of hit (hit_eta in ntuple)
double * m_hit_xloc
 local x coord of hit (hit_xloc in ntuple)
double * m_hit_yloc
 local y coord of hit (hit_yloc in ntuple)
double * m_hit_zloc
 local z coord of hit (hit_zloc in ntuple)
double * m_hit_drd
 drift distance to wire for hit (hit_drd in ntuple)
double * m_hit_sig
 hit error (hit_sig in ntuple)
double * m_hit_resx
 X-residual of the hit.
double * m_hit_resx_err
 X-residual error of the hit.
double * m_hit_resy
 Y-residual of the hit.
double * m_hit_resy_err
 Y-residual error of the hit.
double * m_hit_tpar_x
 track parameter locX
double * m_hit_tpar_y
 track parameter locY
int * m_hit_det
 detector type for the hit
int * m_hit_type
 hit type
double * m_hit_derivx_transx
 derivatives of X-residual wrt.
double * m_hit_derivx_transy
 derivatives of X-residual wrt.
double * m_hit_derivx_transz
 derivatives of X-residual wrt.
double * m_hit_derivx_rotx
 derivatives of X-residual wrt.
double * m_hit_derivx_roty
 derivatives of X-residual wrt.
double * m_hit_derivx_rotz
 derivatives of X-residual wrt.
double * m_hit_derivx_bowx
 derivatives of X-residual wrt.
double * m_hit_derivx_bowy
 derivatives of X-residual wrt.
double * m_hit_derivx_bowz
 derivatives of X-residual wrt.
double * m_hit_derivy_transx
 derivatives of Y-residual wrt.
double * m_hit_derivy_transy
 derivatives of Y-residual wrt.
double * m_hit_derivy_transz
 derivatives of Y-residual wrt.
double * m_hit_derivy_rotx
 derivatives of Y-residual wrt.
double * m_hit_derivy_roty
 derivatives of Y-residual wrt.
double * m_hit_derivy_rotz
 derivatives of Y-residual wrt.
double * m_hit_derivy_bowx
 derivatives of Y-residual wrt.
double * m_hit_derivy_bowy
 derivatives of Y-residual wrt.
double * m_hit_derivy_bowz
 derivatives of Y-residual wrt.
int m_max_hits
 max number of hits on track stored in ntuple
bool m_storeDerivatives
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 36 of file SimpleIDNtupleTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ SimpleIDNtupleTool()

InDet::SimpleIDNtupleTool::SimpleIDNtupleTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 38 of file SimpleIDNtupleTool.cxx.

39 : AthAlgTool(type, name, parent)
40 , m_particleCreator("Trk::TrackParticleCreatorTool/TrackParticleCreatorTool", this)
42 , m_idHelper{}
43 , m_file{}
44 , m_tree(nullptr)
45 , m_runNumber{}
46 , m_evtNumber{}
47 , m_xvtx{}
48 , m_yvtx{}
49 , m_zvtx{}
50 , m_d0{}
51 , m_z0{}
52 , m_phi0{}
53 , m_theta{}
54 , m_qoverp{}
55 , m_pt{}
56 , m_eta{}
57 , m_chi2{}
58 , m_ndof{}
59 , m_chi2prob{}
60 , m_nhits{}
61 , m_nhitstrt{}
62 , m_nhitssct{}
63 , m_nhitspix{}
64 , m_nshared{}
65 , m_nshsct{}
66 , m_nshpix{}
67 , m_nholes{}
68 , m_nhsct{}
69 , m_nhpix{}
70 , m_hit_rho{}
71 , m_hit_phi{}
72 , m_hit_z{}
73 , m_hit_cotth{}
74 , m_hit_eta{}
75 , m_hit_xloc{}
76 , m_hit_yloc{}
77 , m_hit_zloc{}
78 , m_hit_drd{}
79 , m_hit_sig{}
80 , m_hit_resx{}
82 , m_hit_resy{}
84 , m_hit_tpar_x{}
85 , m_hit_tpar_y{}
86 , m_hit_det{}
87 , m_hit_type{}
106 , m_max_hits{150}
107 , m_storeDerivatives{false} {
108 declareInterface<Trk::IFillNtupleTool>(this);
109 declareProperty("TrackParticleCreatorTool", m_particleCreator, "tool to build TrackParticle");
110 declareProperty("AlignModuleTool", m_alignModuleTool);
111 declareProperty("MaxHits", m_max_hits);
112 declareProperty("StoreDerivatives", m_storeDerivatives);
113 }
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
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)
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.
double * m_hit_derivx_transx
derivatives of X-residual wrt.
double * m_hit_phi
phi angle of hit (hit_phi in ntuple)
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)
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.
double * m_hit_rho
radius of hit (hit_rho in ntuple)
double m_pt
pt perigee parameter of reconstructed track (pt in ntuple)
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)
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.

◆ ~SimpleIDNtupleTool()

InDet::SimpleIDNtupleTool::~SimpleIDNtupleTool ( )
virtual

Definition at line 116 of file SimpleIDNtupleTool.cxx.

116 {
117 if (m_hit_rho) {
118 delete [] m_hit_rho;
119 delete [] m_hit_phi;
120 delete [] m_hit_z;
121 delete [] m_hit_cotth;
122 delete [] m_hit_eta;
123 delete [] m_hit_xloc;
124 delete [] m_hit_yloc;
125 delete [] m_hit_zloc;
126 delete [] m_hit_drd;
127 delete [] m_hit_sig;
128 delete [] m_hit_tpar_x;
129 delete [] m_hit_tpar_y;
130 delete [] m_hit_resx;
131 delete [] m_hit_resx_err;
132 delete [] m_hit_resy;
133 delete [] m_hit_resy_err;
134 delete [] m_hit_det;
135 delete [] m_hit_type;
136
138 delete [] m_hit_derivx_transx;
139 delete [] m_hit_derivx_transy;
140 delete [] m_hit_derivx_transz;
141 delete [] m_hit_derivx_rotx;
142 delete [] m_hit_derivx_roty;
143 delete [] m_hit_derivx_rotz;
144 delete [] m_hit_derivx_bowx;
145 delete [] m_hit_derivx_bowy;
146 delete [] m_hit_derivx_bowz;
147 delete [] m_hit_derivy_transx;
148 delete [] m_hit_derivy_transy;
149 delete [] m_hit_derivy_transz;
150 delete [] m_hit_derivy_rotx;
151 delete [] m_hit_derivy_roty;
152 delete [] m_hit_derivy_rotz;
153 delete [] m_hit_derivy_bowx;
154 delete [] m_hit_derivy_bowy;
155 delete [] m_hit_derivy_bowz;
156 }
157 }
158 }

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ dumpTrack()

void InDet::SimpleIDNtupleTool::dumpTrack ( int itrk,
const Trk::AlignTrack * alignTrack )
overridevirtual

fills track information to ntuple

Implements Trk::IFillNtupleTool.

Definition at line 198 of file SimpleIDNtupleTool.cxx.

198 {
199 ATH_MSG_DEBUG("In dumpTrack()");
200
201 if (!m_tree) initializeNtuple();
202
203 // get run and event numbers
204 ATH_MSG_DEBUG("Retrieving event info.");
205 const xAOD::EventInfo* eventInfo;
206 if (evtStore()->retrieve(eventInfo).isFailure()) ATH_MSG_ERROR("Could not retrieve event info.");
207 else {
208 m_runNumber = eventInfo->runNumber();
209 m_evtNumber = eventInfo->eventNumber();
210 }
211
212 // initialize variables
213 constexpr double invalidParameterValue{-999.};
214 m_d0 = invalidParameterValue;
215 m_z0 = invalidParameterValue;
216 m_phi0 = invalidParameterValue;
217 m_theta = invalidParameterValue;
218 m_qoverp = invalidParameterValue;;
219 m_pt = invalidParameterValue;
220 m_eta = invalidParameterValue;
221 m_xvtx = invalidParameterValue;
222 m_yvtx = invalidParameterValue;
223 m_zvtx = invalidParameterValue;;
224
225 constexpr int initialiseNHits{0};
226 m_nhitspix = initialiseNHits;
227 m_nhitssct = initialiseNHits;
228 m_nhitstrt = initialiseNHits;
229 m_nshared = initialiseNHits;
230 m_nshpix = initialiseNHits;
231 m_nshsct = initialiseNHits;
232 m_nholes = initialiseNHits;
233 m_nhpix = initialiseNHits;
234 m_nhsct = initialiseNHits;
235
236 constexpr double invalidChiSq(-1e12);
237 constexpr int invalidDegreesOfFreedom{-999};
238 m_chi2 = invalidChiSq;
239 m_chi2prob = invalidChiSq;
240 m_ndof = invalidDegreesOfFreedom;
241
242 const Trk::Perigee* aMeasPer = (alignTrack->perigeeParameters());
243 if (not aMeasPer) ATH_MSG_ERROR("Could not get Trk::MeasuredPerigee");
244 else {
245 m_d0 = aMeasPer->parameters()[Trk::d0];
246 m_z0 = aMeasPer->parameters()[Trk::z0];
247 m_phi0 = aMeasPer->parameters()[Trk::phi0];
248 m_theta = aMeasPer->parameters()[Trk::theta];
249 m_qoverp = aMeasPer->parameters()[Trk::qOverP];
250 ATH_MSG_DEBUG(itrk << ". " << " Track Parameters (d0, z0, phi0, theta, q/p)");
251 ATH_MSG_DEBUG(" " << m_d0 << ", " << m_z0 << ", " << m_phi0 << ", " << m_theta << ", " << m_qoverp);
252 m_pt = std::sqrt((aMeasPer->momentum().x()) * (aMeasPer->momentum().x())
253 + (aMeasPer->momentum().y()) * (aMeasPer->momentum().y()));
254 m_eta = aMeasPer->eta();
255 m_xvtx = aMeasPer->position().x();
256 m_yvtx = aMeasPer->position().y();
257 m_zvtx = aMeasPer->position().z();
258
259 xAOD::TrackParticle* trackPart = m_particleCreator->createParticle(*alignTrack);
260 uint8_t iSummaryValue(0); // Dummy counter to retrieve summary values
261
262 if (not trackPart) ATH_MSG_ERROR("Could not get xAOD::TrackParticle");
263 else {
264 // hits
265 m_nhitspix = trackPart->summaryValue(iSummaryValue, xAOD::numberOfPixelHits) ? iSummaryValue : 0;
266 m_nhitssct = trackPart->summaryValue(iSummaryValue, xAOD::numberOfSCTHits) ? iSummaryValue : 0;
267 m_nhitstrt = trackPart->summaryValue(iSummaryValue, xAOD::numberOfTRTHits) ? iSummaryValue : 0;
268
269 ATH_MSG_DEBUG(" -- number of Pixel hits : " << m_nhitspix);
270 ATH_MSG_DEBUG(" -- number of SCT hits : " << m_nhitssct);
271 ATH_MSG_DEBUG(" -- number of TRT hits : " << m_nhitstrt);
272
273 // shared hits
274 m_nshpix = trackPart->summaryValue(iSummaryValue, xAOD::numberOfPixelSharedHits) ? iSummaryValue : 0;
275 m_nshsct = trackPart->summaryValue(iSummaryValue, xAOD::numberOfSCTSharedHits) ? iSummaryValue : 0;
277
278 if (m_nshpix < 0) m_nshpix = 0;
279 if (m_nshsct < 0) m_nshsct = 0;
280 if (m_nshared < 0) m_nshared = 0;
281
282 ATH_MSG_DEBUG(" - number of shared hits : " << m_nshared);
283 ATH_MSG_DEBUG(" -- number of Pixel shared hits : " << m_nshpix);
284 ATH_MSG_DEBUG(" -- number of SCT shared hits : " << m_nshsct);
285
286 // holes
287 m_nhpix = trackPart->summaryValue(iSummaryValue, xAOD::numberOfPixelHoles) ? iSummaryValue : 0;
288 m_nhsct = trackPart->summaryValue(iSummaryValue, xAOD::numberOfSCTHoles) ? iSummaryValue : 0;
290
291 if (m_nhpix < 0) m_nhpix = 0;
292 if (m_nhsct < 0) m_nhsct = 0;
293 if (m_nholes < 0) m_nholes = 0;
294
295 ATH_MSG_DEBUG(" - number of Pixel holes : " << m_nhpix);
296 ATH_MSG_DEBUG(" -- number of SCT holes : " << m_nhsct);
297 ATH_MSG_DEBUG(" -- number of holes : " << m_nholes);
298 }
299
300 // get fit quality and chi2 probability of track
301 const Trk::FitQuality* fitQual = alignTrack->fitQuality();
302 if (not fitQual) ATH_MSG_ERROR("No fit quality assigned to the track");
303 else {
304 if (fitQual->chiSquared() > 0. && fitQual->numberDoF() > 0) {
305 m_chi2 = fitQual->chiSquared();
306 m_ndof = fitQual->numberDoF();
307 m_chi2prob = TMath::Prob(m_chi2, m_ndof);
308
309 ATH_MSG_DEBUG(" - chi2 : " << m_chi2);
310 ATH_MSG_DEBUG(" - ndof : " << m_ndof);
311 ATH_MSG_DEBUG(" - chi2/ndof : " << m_chi2 / (double) m_ndof);
312 ATH_MSG_DEBUG(" - chi2 propability : " << m_chi2prob);
313 }
314 }
315 }
316
317 // store information for all hits on this track, including
318 // scattering centers
319 const Trk::AlignTSOSCollection* alignTSOSCollection = alignTrack->alignTSOSCollection();
320 int nhitsTotal = alignTSOSCollection->size();
321 if (nhitsTotal > m_max_hits) nhitsTotal = m_max_hits;
322
323
324 fillHits(alignTrack);
325
326
327 m_file->cd();
328 m_tree->Fill();
329 ATH_MSG_DEBUG("tree filled");
330
331 ++itrk;
332 return;
333 }
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
ServiceHandle< StoreGateSvc > & evtStore()
size_type size() const noexcept
Returns the number of elements in the collection.
void fillHits(const Trk::AlignTrack *alignTrack)
fills hit information to ntuple
const AlignTSOSCollection * alignTSOSCollection() const
returns collection of alignTSOS
Definition AlignTrack.h:267
const Perigee * perigeeParameters() const
return Perigee.
const FitQuality * fitQuality() const
return a pointer to the fit quality const-overload
uint32_t runNumber() const
The current event's run number.
uint64_t eventNumber() const
The current event's event number.
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
DataVector< AlignTSOS > AlignTSOSCollection
Definition AlignTrack.h:37
@ phi0
Definition ParamDefs.h:65
@ theta
Definition ParamDefs.h:66
@ qOverP
perigee
Definition ParamDefs.h:67
@ d0
Definition ParamDefs.h:63
@ z0
Definition ParamDefs.h:64
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
EventInfo_v1 EventInfo
Definition of the latest event info version.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
@ numberOfTRTHits
number of TRT hits [unit8_t].
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ numberOfPixelSharedHits
number of Pixel all-layer hits shared by several tracks [unit8_t].
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
@ numberOfSCTHoles
number of SCT holes [unit8_t].

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ fillChi2VChamberShift()

virtual void Trk::IFillNtupleTool::fillChi2VChamberShift ( const int ,
const int ,
int * ,
double ** ,
double ** ,
double ** ,
double ** ,
double ** ,
double **  )
inlinevirtualinherited

used for numerical derivatives to write chi2 vs.

chamber positions

Definition at line 59 of file IFillNtupleTool.h.

61 {}

◆ fillHitmap()

void InDet::SimpleIDNtupleTool::fillHitmap ( )
overridevirtual

fills ntuple with hit information

Implements Trk::IFillNtupleTool.

Definition at line 590 of file SimpleIDNtupleTool.cxx.

590 {
591 }

◆ fillHits()

void InDet::SimpleIDNtupleTool::fillHits ( const Trk::AlignTrack * alignTrack)

fills hit information to ntuple

Definition at line 336 of file SimpleIDNtupleTool.cxx.

336 {
337 ATH_MSG_DEBUG("In fillHits()");
338
339 // store information for all hits on this track
340 // initialize ntuple variables
341 for (int i = 0; i < m_max_hits; i++) {
342 m_hit_rho[i] = -999.;
343 m_hit_phi[i] = -999.;
344 m_hit_z[i] = -999.;
345 m_hit_cotth[i] = -999.;
346 m_hit_eta[i] = -999.;
347 m_hit_xloc[i] = -999.;
348 m_hit_yloc[i] = -999.;
349 m_hit_zloc[i] = -999.;
350 m_hit_drd[i] = -999.;
351 m_hit_sig[i] = -999.;
352
353 m_hit_tpar_x[i] = -999.;
354 m_hit_tpar_y[i] = -999.;
355
356 m_hit_resx[i] = -999.;
357 m_hit_resx_err[i] = -999.;
358 m_hit_resy[i] = -999.;
359 m_hit_resy_err[i] = -999.;
360
361 m_hit_det[i] = -999;
362 m_hit_type[i] = -999;
363
364 if (m_storeDerivatives) {
365 m_hit_derivx_transx[i] = -999.;
366 m_hit_derivx_transy[i] = -999.;
367 m_hit_derivx_transz[i] = -999.;
368 m_hit_derivx_rotx[i] = -999.;
369 m_hit_derivx_roty[i] = -999.;
370 m_hit_derivx_rotz[i] = -999.;
371 m_hit_derivx_bowx[i] = -999.;
372 m_hit_derivx_bowy[i] = -999.;
373 m_hit_derivx_bowz[i] = -999.;
374
375 m_hit_derivy_transx[i] = -999.;
376 m_hit_derivy_transy[i] = -999.;
377 m_hit_derivy_transz[i] = -999.;
378 m_hit_derivy_rotx[i] = -999.;
379 m_hit_derivy_roty[i] = -999.;
380 m_hit_derivy_rotz[i] = -999.;
381 m_hit_derivy_bowx[i] = -999.;
382 m_hit_derivy_bowy[i] = -999.;
383 m_hit_derivy_bowz[i] = -999.;
384 }
385 }
386
387 const Trk::AlignTSOSCollection* alignTSOSCollection = alignTrack->alignTSOSCollection();
388 m_nhits = alignTSOSCollection->size();
389 ATH_MSG_DEBUG("have " << m_nhits << " hits on alignTrack in total");
390
391 int nhits = 0;
392
393 DataVector<Trk::AlignTSOS>::const_iterator atsit = alignTSOSCollection->begin();
394 DataVector<Trk::AlignTSOS>::const_iterator atsit_end = alignTSOSCollection->end();
395 for (; atsit != atsit_end; ++atsit) {
396 const Trk::AlignTSOS* atsos = *atsit;
397 ATH_MSG_DEBUG("in loop over AlignTSOS, nhits=" << nhits);
398 if (nhits == m_max_hits) break;
399
400 if (!atsos->type(Trk::TrackStateOnSurface::Measurement)) continue;
401
402 m_hit_det[nhits] = atsos->measType();
403 ATH_MSG_DEBUG("measurement type: " << atsos->dumpMeasType());
404
405
406 // get RIO
407 const Trk::RIO_OnTrack* rio = atsos->rio();
408 ATH_MSG_DEBUG("have RIO");
410
411 double locPosX(0.);
412 if (rio->localParameters().contains(Trk::locX)) locPosX = rio->localParameters()[Trk::locX];
413 double locPosY(0.);
414 if (rio->localParameters().contains(Trk::locY)) locPosY = rio->localParameters()[Trk::locY];
415 double locPosZ(0.);
416 if (rio->localParameters().contains(Trk::locZ)) locPosZ = rio->localParameters()[Trk::locZ];
417
418 double error = Amg::error(rio->localCovariance(), Trk::locX);
419 ATH_MSG_DEBUG("error: " << error);
420
421 Identifier id = rio->identify();
422
423
424 m_hit_xloc[nhits] = locPosX;
425 m_hit_yloc[nhits] = locPosY;
426 m_hit_zloc[nhits] = locPosZ;
427
428 m_hit_rho[nhits] = pos.perp();
429 m_hit_phi[nhits] = pos.phi();
430 m_hit_z[nhits] = pos.z();
431 m_hit_sig[nhits] = error;
432
433 // get residual x
434 std::vector<Trk::Residual>::const_iterator ires = atsos->firstResidual();
435
436 m_hit_resx[nhits] = ires->residual();
437 m_hit_resx_err[nhits] = ires->error();
438
439 // get residual y if applicable
440 if (atsos->nResDim() > 1) {
441 ++ires;
442 m_hit_resy[nhits] = ires->residual();
443 m_hit_resy_err[nhits] = ires->error();
444 }
445
446 // get local track parameters
447 const Trk::TrackParameters* trackPars = nullptr;
448 if (atsos->firstResidual()->residualType() == Trk::HitOnly) trackPars = atsos->trackParameters();
449 else trackPars = atsos->unbiasedTrackPars();
450
451 m_hit_tpar_x[nhits] = trackPars->parameters()[Trk::locX];
452 m_hit_tpar_y[nhits] = trackPars->parameters()[Trk::locY];
453
454
455 if (m_idHelper->is_barrel(id)) {
456 m_hit_cotth[nhits] = 0.;
457 m_hit_eta[nhits] = 0.;
458 } else {
459 m_hit_cotth[nhits] = 1. / std::tan(pos.theta());
460 double etaval = -std::log(std::tan(std::atan(1. / std::abs(m_hit_cotth[nhits])) / 2.));
461 if (m_hit_cotth[nhits] < 0.) etaval *= -1.;
462 m_hit_eta[nhits] = etaval;
463 }
464 if (atsos->measType() != Trk::TrackState::TRT) m_hit_drd[nhits] = locPosX;
465
466 // fill derivatives
467 if (m_storeDerivatives) {
468 //const std::vector<CLHEP::HepVector> * derivs = atsos->derivatives();
469 const std::vector<Amg::VectorX>* derivs = atsos->derivatives();
470 if (derivs) {
471 int npar = derivs->at(0).rows();
472
473 const DataVector<Trk::AlignPar>* alignPars = m_alignModuleTool->getAlignPars(atsos->module());
474 int naPar = alignPars->size();
475
476 if (npar != naPar) ATH_MSG_WARNING("number of derivatives on AlignTSOS doesn't match the one on AlignModule");
477
478 else {
479 for (int i = 0; i < npar; i++) {
480 double derivative = (*derivs)[0][i];
481 Trk::AlignModule::TransformParameters ptype = alignPars->at(i)->paramType();
482 switch (ptype) {
485 break;
486
489 break;
490
493 break;
494
497 break;
498
501 break;
502
505 break;
506
509 break;
510
513 break;
514
517 break;
518
519 default:
520 ATH_MSG_WARNING("Unknown parameter type " << ptype);
521 }
522 }
523 if (atsos->nResDim() > 1) {
524 for (int i = 0; i < npar; i++) {
525 double derivative = (*derivs)[1][i];
526 Trk::AlignModule::TransformParameters ptype = alignPars->at(i)->paramType();
527 switch (ptype) {
530 break;
531
534 break;
535
538 break;
539
542 break;
543
546 break;
547
550 break;
551
554 break;
555
558 break;
559
562 break;
563
564 default:
565 ATH_MSG_WARNING("Unknown parameter type " << ptype);
566 }
567 }
568 }
569 }
570 }
571 } // end of storing derivatives
572
573 ++nhits;
574
575 if (nhits >= m_max_hits) {
576 ATH_MSG_WARNING("Number of hits on track more that maximum: " << m_nhits << " > " << m_max_hits << " "
577 << "Some hits will not be stored.");
578 break;
579 }
580 } //atsos
581
582 ATH_MSG_DEBUG("done with loop over TSOS");
583 }
#define ATH_MSG_WARNING(x)
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition DataVector.h:838
const T * at(size_type n) const
Access an element, as an rvalue.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
TransformParameters
enum to keep track of transformation coordinates
Definition AlignModule.h:54
const RIO_OnTrack * rio() const
returns RIO_OnTrack or leading RIO of CompetingRIOsOnTrack (assigned by c'tor)
const TrackParameters * unbiasedTrackPars() const
returns pointer to unbiased track parameters if present
Definition AlignTSOS.h:134
const std::vector< Amg::VectorX > * derivatives() const
returns pointer to vector of derivatives
Definition AlignTSOS.h:140
int nResDim() const
returns number of measurement residual + scatterer residual dimensions
Definition AlignTSOS.h:77
std::vector< Residual >::const_iterator firstResidual() const
returns first Residual iterator
Definition AlignTSOS.h:104
const AlignModule * module() const
accessor method for AlignModule to which tsos belongs
Definition AlignTSOS.h:69
std::string dumpMeasType() const
returns string corresponding to the measurement type
TrackState::MeasurementType measType() const
returns measurement type enum
Definition AlignTSOS.h:80
bool contains(ParamDefs par) const
The simple check for the clients whether the parameter is contained.
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Identifier identify() const
return the identifier -extends MeasurementBase
virtual const Amg::Vector3D & globalPosition() const override=0
Interface method to get the global Position.
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Eigen::Matrix< double, 3, 1 > Vector3D
constexpr double derivative(const double x)
Evaluates the d-th derivative of the n-th Legendre polynomial at x.
@ locY
local cartesian
Definition ParamDefs.h:38
@ locX
Definition ParamDefs.h:37
@ locZ
local cylindrical
Definition ParamDefs.h:42
ParametersBase< TrackParametersDim, Charged > TrackParameters

◆ fillNtuple()

StatusCode InDet::SimpleIDNtupleTool::fillNtuple ( )
overridevirtual

writes trees and histograms to ntuple

Implements Trk::IFillNtupleTool.

Definition at line 181 of file SimpleIDNtupleTool.cxx.

181 {
182 if (m_file && m_file->IsOpen()) {
183 m_file->cd();
184 if (m_tree) m_tree->Write();
185 else ATH_MSG_WARNING("Variable m_tree not set, nothing to write.");
186 } else ATH_MSG_WARNING("Variable m_file not set or not pointing to open output file.");
187 return StatusCode::SUCCESS;
188 }

◆ fillSummary()

void InDet::SimpleIDNtupleTool::fillSummary ( )
overridevirtual

fills ntuple with event and track summary information

Implements Trk::IFillNtupleTool.

Definition at line 594 of file SimpleIDNtupleTool.cxx.

594 {
595 }

◆ finalize()

StatusCode InDet::SimpleIDNtupleTool::finalize ( )
overridevirtual

Implements Trk::IFillNtupleTool.

Definition at line 191 of file SimpleIDNtupleTool.cxx.

191 {
192 ATH_MSG_DEBUG("finalize() of SimpleIDNtupleTool");
193
194 return StatusCode::SUCCESS;
195 }

◆ initialize()

StatusCode InDet::SimpleIDNtupleTool::initialize ( )
overridevirtual

Implements Trk::IFillNtupleTool.

Definition at line 161 of file SimpleIDNtupleTool.cxx.

161 {
162 ATH_MSG_DEBUG("initialize() of SimpleIDNtupleTool");
163
164 // retrieve TRT ID helper
165 ATH_CHECK(detStore()->retrieve(m_idHelper, "TRT_ID"));
166
167 // get TrackParticleCreatorTool
168 ATH_CHECK(m_particleCreator.retrieve());
169
170 // get AlignModuleTool
171 if (m_alignModuleTool.empty() || m_alignModuleTool.retrieve().isFailure()) {
172 ATH_MSG_FATAL("Failed to retrieve tool " << m_alignModuleTool);
173 return StatusCode::FAILURE;
174 }
175 ATH_MSG_INFO("Retrieved tool " << m_alignModuleTool);
176
177 return StatusCode::SUCCESS;
178 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
const ServiceHandle< StoreGateSvc > & detStore() const

◆ initializeNtuple()

void InDet::SimpleIDNtupleTool::initializeNtuple ( )
private

Definition at line 602 of file SimpleIDNtupleTool.cxx.

602 {
603 m_hit_rho = new double[m_max_hits];
604 m_hit_phi = new double[m_max_hits];
605 m_hit_z = new double[m_max_hits];
606 m_hit_cotth = new double[m_max_hits];
607 m_hit_eta = new double[m_max_hits];
608 m_hit_xloc = new double[m_max_hits];
609 m_hit_yloc = new double[m_max_hits];
610 m_hit_zloc = new double[m_max_hits];
611 m_hit_drd = new double[m_max_hits];
612 m_hit_sig = new double[m_max_hits];
613
614 m_hit_tpar_x = new double[m_max_hits];
615 m_hit_tpar_y = new double[m_max_hits];
616
617 m_hit_resx = new double[m_max_hits];
618 m_hit_resx_err = new double[m_max_hits];
619 m_hit_resy = new double[m_max_hits];
620 m_hit_resy_err = new double[m_max_hits];
621
622 m_hit_det = new int[m_max_hits];
623 m_hit_type = new int[m_max_hits];
624
625 m_file->cd();
626 m_tree = new TTree("IDAlign", "Inner Detector Alignment Ntuple");
627
628 m_tree->Branch("run", &m_runNumber, "run/I");
629 m_tree->Branch("evt", &m_evtNumber, "evt/I");
630
631 m_tree->Branch("xvtx", &m_xvtx, "xvtx/D");
632 m_tree->Branch("yvtx", &m_yvtx, "yvtx/D");
633 m_tree->Branch("zvtx", &m_zvtx, "zvtx/D");
634 m_tree->Branch("d0", &m_d0, "d0/D");
635 m_tree->Branch("z0", &m_z0, "z0/D");
636 m_tree->Branch("phi0", &m_phi0, "phi0/D");
637 m_tree->Branch("theta", &m_theta, "theta/D");
638 m_tree->Branch("qoverp", &m_qoverp, "qoverp/D");
639 m_tree->Branch("pt", &m_pt, "pt/D");
640 m_tree->Branch("eta", &m_eta, "eta/D");
641 m_tree->Branch("chi2", &m_chi2, "chi2/D");
642 m_tree->Branch("ndof", &m_ndof, "ndof/I");
643 m_tree->Branch("chi2prob", &m_chi2prob, "chi2prob/D");
644
645 m_tree->Branch("nhits", &m_nhits, "nhits/I");
646 m_tree->Branch("nhitstrt", &m_nhitstrt, "nhitstrt/I");
647 m_tree->Branch("nhitssct", &m_nhitssct, "nhitssct/I");
648 m_tree->Branch("nhitspix", &m_nhitspix, "nhitspix/I");
649 m_tree->Branch("nshared", &m_nshared, "nshared/I");
650 m_tree->Branch("nshsct", &m_nshsct, "nshsct/I");
651 m_tree->Branch("nshpix", &m_nshpix, "nshpix/I");
652 m_tree->Branch("nholes", &m_nholes, "nholes/I");
653 m_tree->Branch("nhsct", &m_nhsct, "nhsct/I");
654 m_tree->Branch("nhpix", &m_nhpix, "nhpix/I");
655
656 m_tree->Branch("hit_rho", m_hit_rho, "hit_rho[nhits]/D");
657 m_tree->Branch("hit_phi", m_hit_phi, "hit_phi[nhits]/D");
658 m_tree->Branch("hit_z", m_hit_z, "hit_z[nhits]/D");
659 m_tree->Branch("hit_cotth", m_hit_cotth, "hit_cotth[nhits]/D");
660 m_tree->Branch("hit_eta", m_hit_eta, "hit_eta[nhits]/D");
661 m_tree->Branch("hit_xloc", m_hit_xloc, "hit_xloc[nhits]/D");
662 m_tree->Branch("hit_yloc", m_hit_yloc, "hit_yloc[nhits]/D");
663 m_tree->Branch("hit_zloc", m_hit_zloc, "hit_zloc[nhits]/D");
664 m_tree->Branch("hit_drd", m_hit_drd, "hit_drd[nhits]/D");
665 m_tree->Branch("hit_sig", m_hit_sig, "hit_sig[nhits]/D");
666
667 m_tree->Branch("hit_tpar_x", m_hit_tpar_x, "hit_tpar_x[nhits]/D");
668 m_tree->Branch("hit_tpar_y", m_hit_tpar_y, "hit_tpar_y[nhits]/D");
669
670 m_tree->Branch("hit_resx", m_hit_resx, "hit_resx[nhits]/D");
671 m_tree->Branch("hit_resx_err", m_hit_resx_err, "hit_resx_err[nhits]/D");
672 m_tree->Branch("hit_resy", m_hit_resy, "hit_resy[nhits]/D");
673 m_tree->Branch("hit_resy_err", m_hit_resy_err, "hit_resy_err[nhits]/D");
674
675 m_tree->Branch("hit_det", m_hit_det, "hit_det[nhits]/I");
676 m_tree->Branch("hit_type", m_hit_type, "hit_type[nhits]/I");
677
678 if (m_storeDerivatives) {
679 m_hit_derivx_transx = new double[m_max_hits];
680 m_hit_derivx_transy = new double[m_max_hits];
681 m_hit_derivx_transz = new double[m_max_hits];
682 m_hit_derivx_rotx = new double[m_max_hits];
683 m_hit_derivx_roty = new double[m_max_hits];
684 m_hit_derivx_rotz = new double[m_max_hits];
685 m_hit_derivx_bowx = new double[m_max_hits];
686 m_hit_derivx_bowy = new double[m_max_hits];
687 m_hit_derivx_bowz = new double[m_max_hits];
688 m_hit_derivy_transx = new double[m_max_hits];
689 m_hit_derivy_transy = new double[m_max_hits];
690 m_hit_derivy_transz = new double[m_max_hits];
691 m_hit_derivy_rotx = new double[m_max_hits];
692 m_hit_derivy_roty = new double[m_max_hits];
693 m_hit_derivy_rotz = new double[m_max_hits];
694 m_hit_derivy_bowx = new double[m_max_hits];
695 m_hit_derivy_bowy = new double[m_max_hits];
696 m_hit_derivy_bowz = new double[m_max_hits];
697
698 m_tree->Branch("derivx_transx", m_hit_derivx_transx, "derivx_transx[nhits]/D");
699 m_tree->Branch("derivx_transy", m_hit_derivx_transy, "derivx_transy[nhits]/D");
700 m_tree->Branch("derivx_transz", m_hit_derivx_transz, "derivx_transz[nhits]/D");
701 m_tree->Branch("derivx_rotx", m_hit_derivx_rotx, "derivx_rotx[nhits]/D");
702 m_tree->Branch("derivx_roty", m_hit_derivx_roty, "derivx_roty[nhits]/D");
703 m_tree->Branch("derivx_rotz", m_hit_derivx_rotz, "derivx_rotz[nhits]/D");
704 m_tree->Branch("derivx_bowx", m_hit_derivx_bowx, "derivx_bowx[nhits]/D");
705 m_tree->Branch("derivx_bowy", m_hit_derivx_bowy, "derivx_bowy[nhits]/D");
706 m_tree->Branch("derivx_bowz", m_hit_derivx_bowz, "derivx_bowz[nhits]/D");
707 m_tree->Branch("derivy_transx", m_hit_derivy_transx, "derivy_transx[nhits]/D");
708 m_tree->Branch("derivy_transy", m_hit_derivy_transy, "derivy_transy[nhits]/D");
709 m_tree->Branch("derivy_transz", m_hit_derivy_transz, "derivy_transz[nhits]/D");
710 m_tree->Branch("derivy_rotx", m_hit_derivy_rotx, "derivy_rotx[nhits]/D");
711 m_tree->Branch("derivy_roty", m_hit_derivy_roty, "derivy_roty[nhits]/D");
712 m_tree->Branch("derivy_rotz", m_hit_derivy_rotz, "derivy_rotz[nhits]/D");
713 m_tree->Branch("derivy_bowx", m_hit_derivy_bowx, "derivy_bowx[nhits]/D");
714 m_tree->Branch("derivy_bowy", m_hit_derivy_bowy, "derivy_bowy[nhits]/D");
715 m_tree->Branch("derivy_bowz", m_hit_derivy_bowz, "derivy_bowz[nhits]/D");
716 }
717 return;
718 }

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & IFillNtupleTool::interfaceID ( )
inlinestaticinherited

Definition at line 80 of file IFillNtupleTool.h.

static const InterfaceID IID_TRKALIGNINTERFACES_IFillNtupleTool("IFillNtupleTool", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setLogStream()

virtual void Trk::IFillNtupleTool::setLogStream ( std::ostream * os)
inlinevirtualinherited

returns pointer to TFile containing ntuple

sets the output stream for the logfile

Definition at line 67 of file IFillNtupleTool.h.

67{ m_logStream = os; }
std::ostream * m_logStream
logfile output stream

◆ setNtuple()

virtual void InDet::SimpleIDNtupleTool::setNtuple ( TFile * ntuple)
inlineoverridevirtual

sets the output stream for the logfile

Implements Trk::IFillNtupleTool.

Definition at line 56 of file SimpleIDNtupleTool.h.

56{ m_file=ntuple; }

◆ showStatistics()

void InDet::SimpleIDNtupleTool::showStatistics ( )
overridevirtual

write statistics out to log file

Implements Trk::IFillNtupleTool.

Definition at line 598 of file SimpleIDNtupleTool.cxx.

598 {
599 }

◆ storeHitmap()

void InDet::SimpleIDNtupleTool::storeHitmap ( )
overridevirtual

stores hitmap for writing to ntuple

Implements Trk::IFillNtupleTool.

Definition at line 586 of file SimpleIDNtupleTool.cxx.

586 {
587 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_alignModuleTool

ToolHandle<Trk::IAlignModuleTool> InDet::SimpleIDNtupleTool::m_alignModuleTool
private

Pointer to AlignmModuleTool.

Definition at line 63 of file SimpleIDNtupleTool.h.

◆ m_chi2

double InDet::SimpleIDNtupleTool::m_chi2
private

Chi2 of the track fit (chi2 in ntuple)

Definition at line 107 of file SimpleIDNtupleTool.h.

◆ m_chi2prob

double InDet::SimpleIDNtupleTool::m_chi2prob
private

Chi2 probability of the track fit (chi2prob in ntuple)

Definition at line 113 of file SimpleIDNtupleTool.h.

◆ m_d0

double InDet::SimpleIDNtupleTool::m_d0
private

d0 perigee parameter of reconstructed track (d0 in ntuple)

Definition at line 86 of file SimpleIDNtupleTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eta

double InDet::SimpleIDNtupleTool::m_eta
private

eta of perigee of reconstructed track (eta in ntuple)

Definition at line 104 of file SimpleIDNtupleTool.h.

◆ m_evtNumber

int InDet::SimpleIDNtupleTool::m_evtNumber
private

Definition at line 72 of file SimpleIDNtupleTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_file

TFile* InDet::SimpleIDNtupleTool::m_file
private

Definition at line 67 of file SimpleIDNtupleTool.h.

◆ m_hit_cotth

double* InDet::SimpleIDNtupleTool::m_hit_cotth
private

cot(theta) of hit (hit_cotth in ntuple)

Definition at line 157 of file SimpleIDNtupleTool.h.

◆ m_hit_derivx_bowx

double* InDet::SimpleIDNtupleTool::m_hit_derivx_bowx
private

derivatives of X-residual wrt.

rotation X

Definition at line 194 of file SimpleIDNtupleTool.h.

◆ m_hit_derivx_bowy

double* InDet::SimpleIDNtupleTool::m_hit_derivx_bowy
private

derivatives of X-residual wrt.

rotation Y

Definition at line 195 of file SimpleIDNtupleTool.h.

◆ m_hit_derivx_bowz

double* InDet::SimpleIDNtupleTool::m_hit_derivx_bowz
private

derivatives of X-residual wrt.

rotation Y

Definition at line 196 of file SimpleIDNtupleTool.h.

◆ m_hit_derivx_rotx

double* InDet::SimpleIDNtupleTool::m_hit_derivx_rotx
private

derivatives of X-residual wrt.

rotation X

Definition at line 191 of file SimpleIDNtupleTool.h.

◆ m_hit_derivx_roty

double* InDet::SimpleIDNtupleTool::m_hit_derivx_roty
private

derivatives of X-residual wrt.

rotation Y

Definition at line 192 of file SimpleIDNtupleTool.h.

◆ m_hit_derivx_rotz

double* InDet::SimpleIDNtupleTool::m_hit_derivx_rotz
private

derivatives of X-residual wrt.

rotation Y

Definition at line 193 of file SimpleIDNtupleTool.h.

◆ m_hit_derivx_transx

double* InDet::SimpleIDNtupleTool::m_hit_derivx_transx
private

derivatives of X-residual wrt.

translation X

Definition at line 188 of file SimpleIDNtupleTool.h.

◆ m_hit_derivx_transy

double* InDet::SimpleIDNtupleTool::m_hit_derivx_transy
private

derivatives of X-residual wrt.

translation Y

Definition at line 189 of file SimpleIDNtupleTool.h.

◆ m_hit_derivx_transz

double* InDet::SimpleIDNtupleTool::m_hit_derivx_transz
private

derivatives of X-residual wrt.

translation Y

Definition at line 190 of file SimpleIDNtupleTool.h.

◆ m_hit_derivy_bowx

double* InDet::SimpleIDNtupleTool::m_hit_derivy_bowx
private

derivatives of Y-residual wrt.

rotation X

Definition at line 203 of file SimpleIDNtupleTool.h.

◆ m_hit_derivy_bowy

double* InDet::SimpleIDNtupleTool::m_hit_derivy_bowy
private

derivatives of Y-residual wrt.

rotation Y

Definition at line 204 of file SimpleIDNtupleTool.h.

◆ m_hit_derivy_bowz

double* InDet::SimpleIDNtupleTool::m_hit_derivy_bowz
private

derivatives of Y-residual wrt.

rotation Y

Definition at line 205 of file SimpleIDNtupleTool.h.

◆ m_hit_derivy_rotx

double* InDet::SimpleIDNtupleTool::m_hit_derivy_rotx
private

derivatives of Y-residual wrt.

rotation X

Definition at line 200 of file SimpleIDNtupleTool.h.

◆ m_hit_derivy_roty

double* InDet::SimpleIDNtupleTool::m_hit_derivy_roty
private

derivatives of Y-residual wrt.

rotation Y

Definition at line 201 of file SimpleIDNtupleTool.h.

◆ m_hit_derivy_rotz

double* InDet::SimpleIDNtupleTool::m_hit_derivy_rotz
private

derivatives of Y-residual wrt.

rotation Y

Definition at line 202 of file SimpleIDNtupleTool.h.

◆ m_hit_derivy_transx

double* InDet::SimpleIDNtupleTool::m_hit_derivy_transx
private

derivatives of Y-residual wrt.

translation X

Definition at line 197 of file SimpleIDNtupleTool.h.

◆ m_hit_derivy_transy

double* InDet::SimpleIDNtupleTool::m_hit_derivy_transy
private

derivatives of Y-residual wrt.

translation Y

Definition at line 198 of file SimpleIDNtupleTool.h.

◆ m_hit_derivy_transz

double* InDet::SimpleIDNtupleTool::m_hit_derivy_transz
private

derivatives of Y-residual wrt.

translation Y

Definition at line 199 of file SimpleIDNtupleTool.h.

◆ m_hit_det

int* InDet::SimpleIDNtupleTool::m_hit_det
private

detector type for the hit

Definition at line 185 of file SimpleIDNtupleTool.h.

◆ m_hit_drd

double* InDet::SimpleIDNtupleTool::m_hit_drd
private

drift distance to wire for hit (hit_drd in ntuple)

Definition at line 172 of file SimpleIDNtupleTool.h.

◆ m_hit_eta

double* InDet::SimpleIDNtupleTool::m_hit_eta
private

eta angle of hit (hit_eta in ntuple)

Definition at line 160 of file SimpleIDNtupleTool.h.

◆ m_hit_phi

double* InDet::SimpleIDNtupleTool::m_hit_phi
private

phi angle of hit (hit_phi in ntuple)

Definition at line 151 of file SimpleIDNtupleTool.h.

◆ m_hit_resx

double* InDet::SimpleIDNtupleTool::m_hit_resx
private

X-residual of the hit.

Definition at line 177 of file SimpleIDNtupleTool.h.

◆ m_hit_resx_err

double* InDet::SimpleIDNtupleTool::m_hit_resx_err
private

X-residual error of the hit.

Definition at line 178 of file SimpleIDNtupleTool.h.

◆ m_hit_resy

double* InDet::SimpleIDNtupleTool::m_hit_resy
private

Y-residual of the hit.

Definition at line 179 of file SimpleIDNtupleTool.h.

◆ m_hit_resy_err

double* InDet::SimpleIDNtupleTool::m_hit_resy_err
private

Y-residual error of the hit.

Definition at line 180 of file SimpleIDNtupleTool.h.

◆ m_hit_rho

double* InDet::SimpleIDNtupleTool::m_hit_rho
private

radius of hit (hit_rho in ntuple)

Definition at line 148 of file SimpleIDNtupleTool.h.

◆ m_hit_sig

double* InDet::SimpleIDNtupleTool::m_hit_sig
private

hit error (hit_sig in ntuple)

Definition at line 175 of file SimpleIDNtupleTool.h.

◆ m_hit_tpar_x

double* InDet::SimpleIDNtupleTool::m_hit_tpar_x
private

track parameter locX

Definition at line 182 of file SimpleIDNtupleTool.h.

◆ m_hit_tpar_y

double* InDet::SimpleIDNtupleTool::m_hit_tpar_y
private

track parameter locY

Definition at line 183 of file SimpleIDNtupleTool.h.

◆ m_hit_type

int* InDet::SimpleIDNtupleTool::m_hit_type
private

hit type

Definition at line 186 of file SimpleIDNtupleTool.h.

◆ m_hit_xloc

double* InDet::SimpleIDNtupleTool::m_hit_xloc
private

local x coord of hit (hit_xloc in ntuple)

Definition at line 163 of file SimpleIDNtupleTool.h.

◆ m_hit_yloc

double* InDet::SimpleIDNtupleTool::m_hit_yloc
private

local y coord of hit (hit_yloc in ntuple)

Definition at line 166 of file SimpleIDNtupleTool.h.

◆ m_hit_z

double* InDet::SimpleIDNtupleTool::m_hit_z
private

z coord of hit (hit_z in ntuple)

Definition at line 154 of file SimpleIDNtupleTool.h.

◆ m_hit_zloc

double* InDet::SimpleIDNtupleTool::m_hit_zloc
private

local z coord of hit (hit_zloc in ntuple)

Definition at line 169 of file SimpleIDNtupleTool.h.

◆ m_idHelper

const TRT_ID* InDet::SimpleIDNtupleTool::m_idHelper
private

Definition at line 65 of file SimpleIDNtupleTool.h.

◆ m_logStream

std::ostream* Trk::IFillNtupleTool::m_logStream = nullptr
protectedinherited

logfile output stream

Definition at line 76 of file IFillNtupleTool.h.

◆ m_max_hits

int InDet::SimpleIDNtupleTool::m_max_hits
private

max number of hits on track stored in ntuple

Definition at line 207 of file SimpleIDNtupleTool.h.

◆ m_ndof

int InDet::SimpleIDNtupleTool::m_ndof
private

number of degrees of freedom of the track fit (ndof in ntuple)

Definition at line 110 of file SimpleIDNtupleTool.h.

◆ m_nhits

int InDet::SimpleIDNtupleTool::m_nhits
private

number of hits on track [including scattering centers] (nhits in ntuple)

Definition at line 118 of file SimpleIDNtupleTool.h.

◆ m_nhitspix

int InDet::SimpleIDNtupleTool::m_nhitspix
private

number of Pixel hits on track (ntrthits in ntuple)

Definition at line 127 of file SimpleIDNtupleTool.h.

◆ m_nhitssct

int InDet::SimpleIDNtupleTool::m_nhitssct
private

number of SCT hits on track (nscthits in ntuple)

Definition at line 124 of file SimpleIDNtupleTool.h.

◆ m_nhitstrt

int InDet::SimpleIDNtupleTool::m_nhitstrt
private

number of TRT hits on track (ntrthits in ntuple)

Definition at line 121 of file SimpleIDNtupleTool.h.

◆ m_nholes

int InDet::SimpleIDNtupleTool::m_nholes
private

number of holes on track (nholes in ntuple)

Definition at line 139 of file SimpleIDNtupleTool.h.

◆ m_nhpix

int InDet::SimpleIDNtupleTool::m_nhpix
private

number of Pixel holes on track (nhpix in ntuple)

Definition at line 145 of file SimpleIDNtupleTool.h.

◆ m_nhsct

int InDet::SimpleIDNtupleTool::m_nhsct
private

number of SCT holes on track (nhsct in ntuple)

Definition at line 142 of file SimpleIDNtupleTool.h.

◆ m_nshared

int InDet::SimpleIDNtupleTool::m_nshared
private

number of shared hits on track (nshared in ntuple)

Definition at line 130 of file SimpleIDNtupleTool.h.

◆ m_nshpix

int InDet::SimpleIDNtupleTool::m_nshpix
private

number of shared Pixel hits on track (nshpix in ntuple)

Definition at line 136 of file SimpleIDNtupleTool.h.

◆ m_nshsct

int InDet::SimpleIDNtupleTool::m_nshsct
private

number of shared SCT hits on track (nshsct in ntuple)

Definition at line 133 of file SimpleIDNtupleTool.h.

◆ m_particleCreator

ToolHandle<Trk::ITrackParticleCreatorTool> InDet::SimpleIDNtupleTool::m_particleCreator
private

Pointer to track particle creator tool.

Definition at line 62 of file SimpleIDNtupleTool.h.

◆ m_phi0

double InDet::SimpleIDNtupleTool::m_phi0
private

phi perigee parameter of reconstructed track (phi0 in ntuple)

Definition at line 92 of file SimpleIDNtupleTool.h.

◆ m_pt

double InDet::SimpleIDNtupleTool::m_pt
private

pt perigee parameter of reconstructed track (pt in ntuple)

Definition at line 101 of file SimpleIDNtupleTool.h.

◆ m_qoverp

double InDet::SimpleIDNtupleTool::m_qoverp
private

Q over p perigee parameter of reconstructed track (qoverp in ntuple)

Definition at line 98 of file SimpleIDNtupleTool.h.

◆ m_runNumber

int InDet::SimpleIDNtupleTool::m_runNumber
private

Definition at line 71 of file SimpleIDNtupleTool.h.

◆ m_storeDerivatives

bool InDet::SimpleIDNtupleTool::m_storeDerivatives
private

Definition at line 209 of file SimpleIDNtupleTool.h.

◆ m_theta

double InDet::SimpleIDNtupleTool::m_theta
private

theta perigee parameter of reconstructed track (theta in ntuple)

Definition at line 95 of file SimpleIDNtupleTool.h.

◆ m_tree

TTree* InDet::SimpleIDNtupleTool::m_tree
private

Definition at line 68 of file SimpleIDNtupleTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_xvtx

double InDet::SimpleIDNtupleTool::m_xvtx
private

x coord of track perigee (xvtx in ntuple)

Definition at line 77 of file SimpleIDNtupleTool.h.

◆ m_yvtx

double InDet::SimpleIDNtupleTool::m_yvtx
private

y coord of track perigee (yvtx in ntuple)

Definition at line 80 of file SimpleIDNtupleTool.h.

◆ m_z0

double InDet::SimpleIDNtupleTool::m_z0
private

z0 perigee parameter of reconstructed track (z0 in ntuple)

Definition at line 89 of file SimpleIDNtupleTool.h.

◆ m_zvtx

double InDet::SimpleIDNtupleTool::m_zvtx
private

z coord of track perigee (zvtx in ntuple)

Definition at line 83 of file SimpleIDNtupleTool.h.


The documentation for this class was generated from the following files: