ATLAS Offline Software
MeasurementVectorNtupleTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // MeasurementVectorNtupleTool.cxx
7 // Source file for class MeasurementVectorNtupleTool
9 // (c) ATLAS Detector software
11 // Sebastian.Fleischmann -at- cern.ch, Wolfgang.Liebig -at- cern.ch
13 #include "TTree.h"
14 // Trk
17 #include "TrkTrack/Track.h"
26 #include <cmath>
27 
28 // constructor
30  const std::string& t,
31  const std::string& n,
32  const IInterface* p )
33  :
34  AthAlgTool(t,n,p),
35  m_idHelper(nullptr),
36  m_detTypeHelper(nullptr),
37  m_updatorHandle("Trk::KalmanUpdator/TrkKalmanUpdator"),
38  m_updator(nullptr),
39  m_residualPullCalculator("Trk::ResidualPullCalculator/ResidualPullCalculator"),
40  m_holeSearchTool("InDet::InDetTrackHoleSearchTool/InDetHoleSearchTool"),
41  m_PixelNtupleHelperToolHandles(this), // retrieve as private tools
42  m_SCTNtupleHelperToolHandles(this),
43  m_TRTNtupleHelperToolHandles(this),
44  m_MDTNtupleHelperToolHandles(this),
45  m_CSCNtupleHelperToolHandles(this),
46  m_RPCNtupleHelperToolHandles(this),
47  m_TGCNtupleHelperToolHandles(this),
48  m_GeneralNtupleHelperToolHandles(this),
49  //m_useROTwithMaxAssgnProb
50  //m_ignoreMissTrkCov
51  //vectors could be initialised here
52  m_pullWarning{},
53  m_UpdatorWarning{},
54  m_trkParametersWarning{},
55  m_doTruth{},
56  m_doHoleSearch(true),
57  //map could be initialised here
58  m_isUnbiased{},
59  m_residualLocX(nullptr),
60  m_residualLocY(nullptr),
61  m_pullLocX(nullptr),
62  m_pullLocY(nullptr),
63  m_DetectorType(nullptr),
64  m_isOutlier(nullptr),
65  m_nPixelHits{},
66  m_nSCTHits{},
67  m_nTRTHits{},
68  m_nMDTHits{},
69  m_nCSCHits{},
70  m_nRPCHits{},
71  m_nTGCHits{},
72  m_pixelHitIndex(nullptr),
73  m_sctHitIndex(nullptr),
74  m_trtHitIndex(nullptr),
75  m_mdtHitIndex(nullptr),
76  m_cscHitIndex(nullptr),
77  m_rpcHitIndex(nullptr),
78  m_tgcHitIndex(nullptr),
79  m_nHoles{},
80  m_nPixelHoles{},
81  m_nSctHoles{},
82  m_HoleDetectorType(nullptr)
83 {
84  declareInterface<ITrackValidationNtupleTool>(this);
85 
86  declareProperty("UseROTwithMaxAssgnProb", m_useROTwithMaxAssgnProb = true, "In case of CompetingRIOsOnTrack: Use the ROT with maximum assignment probabilty to calculate residuals, etc or use mean measurement?");
87  declareProperty("IgnoreMissingTrackCovarianceForPulls", m_ignoreMissTrkCov = false, "Do not warn, if track states do not have covariance matries when calculating pulls");
88  declareProperty("UpdatorTool", m_updatorHandle, "Measurement updator to calculate unbiased track states");
89  declareProperty("ResidualPullCalculatorTool", m_residualPullCalculator, "Tool to calculate residuals and pulls");
90  declareProperty("HoleSearchTool", m_holeSearchTool, "Tool to search for holes on track");
91  // these are for detector-internal validation, unless an
92  // specific <-> general index hit mapper is there.
93  declareProperty("PixelNtupleHelperTools", m_PixelNtupleHelperToolHandles,
94  "List of Pixel validation tools");
95  declareProperty("SCTNtupleHelperTools", m_SCTNtupleHelperToolHandles, "List of SCT validation tools");
96  declareProperty("TRTNtupleHelperTools", m_TRTNtupleHelperToolHandles, "List of TRT validation tools");
97  declareProperty("MDTNtupleHelperTools", m_MDTNtupleHelperToolHandles, "List of MDT validation tools");
98  declareProperty("CSCNtupleHelperTools", m_CSCNtupleHelperToolHandles, "List of CSC validation tools");
99  declareProperty("RPCNtupleHelperTools", m_RPCNtupleHelperToolHandles, "List of RPC validation tools");
100  declareProperty("TGCNtupleHelperTools", m_TGCNtupleHelperToolHandles, "List of TGC validation tools");
101  declareProperty("GeneralNtupleHelperTools", m_GeneralNtupleHelperToolHandles, "List of detector independent validation tools");
102  declareProperty("DoTruth", m_doTruth, "Write truth data?");
103  declareProperty("DoHoleSearch", m_doHoleSearch, "Write hole data?");
104  m_UpdatorWarning = false;
105  m_pullWarning = false;
106  m_trkParametersWarning = false;
107 
108 }
109 
110 // destructor
112 
113 
115 // initialize
118 
119  if (!m_residualPullCalculator.empty()) {
120  m_pullLocX = new std::vector<float>();
121  m_pullLocY = new std::vector<float>();
122  m_residualLocX = new std::vector<float>();
123  m_residualLocY = new std::vector<float>();
124  }
125 
126  m_DetectorType = new std::vector<int>();
127  m_isOutlier = new std::vector<int>();
128 
129  m_pixelHitIndex = new std::vector<int>();
130  m_sctHitIndex = new std::vector<int>();
131  m_trtHitIndex = new std::vector<int>();
132  m_mdtHitIndex = new std::vector<int>();
133  m_cscHitIndex = new std::vector<int>();
134  m_rpcHitIndex = new std::vector<int>();
135  m_tgcHitIndex = new std::vector<int>();
136  if (m_doHoleSearch) {
137  m_HoleDetectorType = new std::vector<int>();
138  }
139 
140  if (detStore()->retrieve(m_idHelper, "AtlasID").isFailure()) {
141  ATH_MSG_ERROR ("Could not get AtlasDetectorID helper" );
142  return StatusCode::FAILURE;
143  }
144  m_detTypeHelper = new MeasurementTypeID(m_idHelper);
145 
146  StatusCode sc(StatusCode::SUCCESS);
147  // ----------------------------------
148  // use updator to get unbiased states
149  if ( ! m_updatorHandle.empty() ) {
150  sc = m_updatorHandle.retrieve();
151  if (sc.isFailure()) {
152  msg(MSG::FATAL) << "Could not retrieve measurement updator tool: "<< m_updatorHandle << endmsg;
153  return sc;
154  }
155  m_updator = &(*m_updatorHandle);
156  } else {
157  ATH_MSG_DEBUG ("No Updator for unbiased track states given, use normal states!");
158  m_updator = nullptr;
159  }
160 
161  // need an Atlas id-helper to identify sub-detectors, take the one from detStore
162  if (detStore()->retrieve(m_idHelper, "AtlasID").isFailure()) {
163  ATH_MSG_ERROR ("Could not get AtlasDetectorID helper" );
164  return StatusCode::FAILURE;
165  } // ---------------------------------------
166 
167  // -------------------------------
168  // get given helper tools
170  // get all the given ntuple helper tools for Pixel
171  if ( m_PixelNtupleHelperToolHandles.retrieve().isFailure() ) {
172  msg(MSG::ERROR) << "Failed to retreive " << m_PixelNtupleHelperToolHandles << endmsg;
173  } else {
174  msg(MSG::INFO) << "Retrieved " << m_PixelNtupleHelperToolHandles << endmsg;
175  }
176  itTools = m_PixelNtupleHelperToolHandles.begin();
177  for ( ; itTools != m_PixelNtupleHelperToolHandles.end(); ++itTools ) {
178  // add tool to list
179  m_PixelHelperTools.push_back(&(*(*itTools)));
180  m_helperToolWarning[&(*(*itTools))] = false;
181  }
182  // get all the given ntuple helper tools for SCT
183  if ( m_SCTNtupleHelperToolHandles.retrieve().isFailure() ) {
184  msg(MSG::ERROR) << "Failed to retreive " << m_SCTNtupleHelperToolHandles << endmsg;
185  } else {
186  msg(MSG::INFO) << "Retrieved " << m_SCTNtupleHelperToolHandles << endmsg;
187  }
188  itTools = m_SCTNtupleHelperToolHandles.begin();
189  for ( ; itTools != m_SCTNtupleHelperToolHandles.end(); ++itTools ) {
190  // add tool to list
191  m_SCTHelperTools.push_back(&(*(*itTools)));
192  m_helperToolWarning[&(*(*itTools))] = false;
193  }
194  // get all the given ntuple helper tools for TRT
195  if ( m_TRTNtupleHelperToolHandles.retrieve().isFailure() ) {
196  msg(MSG::ERROR) << "Failed to retreive " << m_TRTNtupleHelperToolHandles << endmsg;
197  } else {
198  msg(MSG::INFO) << "Retrieved " << m_TRTNtupleHelperToolHandles << endmsg;
199  }
200  itTools = m_TRTNtupleHelperToolHandles.begin();
201  for ( ; itTools != m_TRTNtupleHelperToolHandles.end(); ++itTools ) {
202  // add tool to list
203  m_TRTHelperTools.push_back(&(*(*itTools)));
204  m_helperToolWarning[&(*(*itTools))] = false;
205  }
206  // get all the given ntuple helper tools for MDT
207  if ( m_MDTNtupleHelperToolHandles.retrieve().isFailure() ) {
208  msg(MSG::ERROR) << "Failed to retreive " << m_MDTNtupleHelperToolHandles << endmsg;
209  } else {
210  msg(MSG::INFO) << "Retrieved " << m_MDTNtupleHelperToolHandles << endmsg;
211  }
212  itTools = m_MDTNtupleHelperToolHandles.begin();
213  for ( ; itTools != m_MDTNtupleHelperToolHandles.end(); ++itTools ) {
214  // add tool to list
215  m_MDTHelperTools.push_back(&(*(*itTools)));
216  m_helperToolWarning[&(*(*itTools))] = false;
217  }
218  // get all the given ntuple helper tools for CSC
219  if ( m_CSCNtupleHelperToolHandles.retrieve().isFailure() ) {
220  msg(MSG::ERROR) << "Failed to retreive " << m_CSCNtupleHelperToolHandles << endmsg;
221  } else {
222  msg(MSG::INFO) << "Retrieved " << m_CSCNtupleHelperToolHandles << endmsg;
223  }
224  itTools = m_CSCNtupleHelperToolHandles.begin();
225  for ( ; itTools != m_CSCNtupleHelperToolHandles.end(); ++itTools ) {
226  // add tool to list
227  m_CSCHelperTools.push_back(&(*(*itTools)));
228  m_helperToolWarning[&(*(*itTools))] = false;
229  }
230  // get all the given ntuple helper tools for RPC
231  if ( m_RPCNtupleHelperToolHandles.retrieve().isFailure() ) {
232  msg(MSG::ERROR) << "Failed to retreive " << m_RPCNtupleHelperToolHandles << endmsg;
233  } else {
234  msg(MSG::INFO) << "Retrieved " << m_RPCNtupleHelperToolHandles << endmsg;
235  }
236  itTools = m_RPCNtupleHelperToolHandles.begin();
237  for ( ; itTools != m_RPCNtupleHelperToolHandles.end(); ++itTools ) {
238  // add tool to list
239  m_RPCHelperTools.push_back(&(*(*itTools)));
240  m_helperToolWarning[&(*(*itTools))] = false;
241  }
242  // get all the given ntuple helper tools for TGC
243  if ( m_TGCNtupleHelperToolHandles.retrieve().isFailure() ) {
244  msg(MSG::ERROR) << "Failed to retreive " << m_TGCNtupleHelperToolHandles << endmsg;
245  } else {
246  msg(MSG::INFO) << "Retrieved " << m_TGCNtupleHelperToolHandles << endmsg;
247  }
248  itTools = m_TGCNtupleHelperToolHandles.begin();
249  for ( ; itTools != m_TGCNtupleHelperToolHandles.end(); ++itTools ) {
250  // add tool to list
251  m_TGCHelperTools.push_back(&(*(*itTools)));
252  m_helperToolWarning[&(*(*itTools))] = false;
253  }
254  // get all the given ntuple helper tools independent from detector tech
255  if ( m_GeneralNtupleHelperToolHandles.retrieve().isFailure() ) {
256  msg(MSG::ERROR) << "Failed to retreive " << m_GeneralNtupleHelperToolHandles << endmsg;
257  } else {
258  msg(MSG::INFO) << "Retrieved " << m_GeneralNtupleHelperToolHandles << endmsg;
259  }
260  itTools = m_GeneralNtupleHelperToolHandles.begin();
261  for ( ; itTools != m_GeneralNtupleHelperToolHandles.end(); ++itTools ) {
262  // add tool to list
263  m_GeneralHelperTools.push_back(&(*(*itTools)));
264  m_helperToolWarning[&(*(*itTools))] = false;
265  }
266 
267  // get the ResidualPullCalculator
268  if (m_residualPullCalculator.empty()) {
269  msg(MSG::INFO) << "No residual/pull calculator for general hit residuals configured."
270  << endmsg;
271  msg(MSG::INFO) << "It is recommended to give R/P calculators to the det-specific tool"
272  << " handle lists then." << endmsg;
273  } else {
274  sc = m_residualPullCalculator.retrieve();
275  if (sc.isFailure()) {
276  msg(MSG::FATAL) << "Could not retrieve "<< m_residualPullCalculator <<" (to calculate residuals and pulls) "<< endmsg;
277  return sc;
278  } else {
279  msg(MSG::INFO) << "Generic hit residuals&pulls will be calculated in one or both "
280  << "available local coordinates" << endmsg;
281  }
282  }
283  // get the hole search tool if needed
284  if (m_doHoleSearch) {
285  sc = m_holeSearchTool.retrieve();
286  if (sc.isFailure()) {
287  msg(MSG::FATAL) << "Could not retrieve "<< m_holeSearchTool <<" (needed for hole search) "<< endmsg;
288  return sc;
289  }
290  }
291 
292  ATH_MSG_DEBUG ("successfully initialized in " << name());
293  return StatusCode::SUCCESS;
294 }
295 
297 // finalize
300 
301  ATH_MSG_DEBUG ("start finalize() in " << name());
302 
303  if (!m_residualPullCalculator.empty()) {
304  delete m_pullLocX;
305  delete m_pullLocY;
306  delete m_residualLocX;
307  delete m_residualLocY;
308  }
309  delete m_DetectorType;
310  delete m_isOutlier;
311  delete m_pixelHitIndex;
312  delete m_sctHitIndex;
313  delete m_trtHitIndex;
314  delete m_mdtHitIndex;
315  delete m_cscHitIndex;
316  delete m_rpcHitIndex;
317  delete m_tgcHitIndex;
318  if (m_doHoleSearch) delete m_HoleDetectorType;
319  delete m_detTypeHelper;
320 
321  return StatusCode::SUCCESS;
322 }
323 
325  if (!tree) return StatusCode::FAILURE;
326  ATH_MSG_DEBUG ("added branches to ntuple");
327  //-----------------
328  // add items *** Note: Documentation is in the header file, doxygen and wikis! ***
329  //
330  tree->Branch("TrackStatesUnbiased", &m_isUnbiased );
331  m_isUnbiased=999;
332 
333  if (!m_residualPullCalculator.empty()) {
334  tree->Branch("pullLocX", &m_pullLocX );
335  tree->Branch("pullLocY", &m_pullLocY );
336  tree->Branch("residualLocX", &m_residualLocX );
337  tree->Branch("residualLocY", &m_residualLocY );
338  }
339 
340  tree->Branch("DetectorType", &m_DetectorType );
341  tree->Branch("outlierFlag", &m_isOutlier );
342 
343  tree->Branch("nPixelHits", &m_nPixelHits );
344  tree->Branch("nSCTHits", &m_nSCTHits );
345  tree->Branch("nTRTHits", &m_nTRTHits );
346  tree->Branch("nMDTHits", &m_nMDTHits );
347  tree->Branch("nCSCHits", &m_nCSCHits );
348  tree->Branch("nRPCHits", &m_nRPCHits );
349  tree->Branch("nTGCHits", &m_nTGCHits );
350 
351  tree->Branch("pixelHitIndex", &m_pixelHitIndex );
352  tree->Branch("sctHitIndex", &m_sctHitIndex );
353  tree->Branch("trtHitIndex", &m_trtHitIndex );
354  tree->Branch("mdtHitIndex", &m_mdtHitIndex );
355  tree->Branch("cscHitIndex", &m_cscHitIndex );
356  tree->Branch("rpcHitIndex", &m_rpcHitIndex );
357  tree->Branch("tgcHitIndex", &m_tgcHitIndex );
358 
359  ATH_MSG_VERBOSE ("added own branches to ntuple");
360 
361  StatusCode sc(StatusCode::SUCCESS);
363  // get all the given ntuple helper tools for Pixel
364  itTools = m_PixelNtupleHelperToolHandles.begin();
365  for ( ; itTools != m_PixelNtupleHelperToolHandles.end(); ++itTools ) {
366  // let tool add its items
367  sc = (*itTools)->addNtupleItems (tree, TrackState::Pixel);
368  if(sc.isFailure()) {
369  msg(MSG::ERROR)<<"The helper " << (*itTools) << " could not add its items" << endmsg;
370  return sc;
371  }
372  }
373  // SCT helper tools
374  itTools = m_SCTNtupleHelperToolHandles.begin();
375  for ( ; itTools != m_SCTNtupleHelperToolHandles.end(); ++itTools ) {
376  // let tool add its items
377  sc = (*itTools)->addNtupleItems (tree, TrackState::SCT);
378  if(sc.isFailure()) {
379  msg(MSG::ERROR)<<"The helper " << (*itTools) << " could not add its items" << endmsg;
380  return sc;
381  }
382  }
383  // get all the given ntuple helper tools for TRT
384  itTools = m_TRTNtupleHelperToolHandles.begin();
385  for ( ; itTools != m_TRTNtupleHelperToolHandles.end(); ++itTools ) {
386  // let tool add its items
387  sc = (*itTools)->addNtupleItems (tree, TrackState::TRT);
388  if(sc.isFailure()) {
389  msg(MSG::ERROR)<<"The helper " << (*itTools) << " could not add its items" << endmsg;
390  return sc;
391  }
392  }
393  // get all the given ntuple helper tools for MDT
394  itTools = m_MDTNtupleHelperToolHandles.begin();
395  for ( ; itTools != m_MDTNtupleHelperToolHandles.end(); ++itTools ) {
396  // let tool add its items
397  sc = (*itTools)->addNtupleItems (tree, TrackState::MDT);
398  if(sc.isFailure()) {
399  msg(MSG::ERROR)<<"The helper " << (*itTools) << " could not add its items" << endmsg;
400  return sc;
401  }
402  }
403  // get all the given ntuple helper tools for CSC
404  itTools = m_CSCNtupleHelperToolHandles.begin();
405  for ( ; itTools != m_CSCNtupleHelperToolHandles.end(); ++itTools ) {
406  // let tool add its items
407  sc = (*itTools)->addNtupleItems (tree, TrackState::CSC);
408  if(sc.isFailure()) {
409  msg(MSG::ERROR)<<"The helper " << (*itTools) << " could not add its items" << endmsg;
410  return sc;
411  }
412  }
413  // get all the given ntuple helper tools for RPC
414  itTools = m_RPCNtupleHelperToolHandles.begin();
415  for ( ; itTools != m_RPCNtupleHelperToolHandles.end(); ++itTools ) {
416  // let tool add its items
417  sc = (*itTools)->addNtupleItems (tree, TrackState::RPC);
418  if(sc.isFailure()) {
419  msg(MSG::ERROR)<<"The helper " << (*itTools) << " could not add its items" << endmsg;
420  return sc;
421  }
422  }
423  // get all the given ntuple helper tools for TGC
424  itTools = m_TGCNtupleHelperToolHandles.begin();
425  for ( ; itTools != m_TGCNtupleHelperToolHandles.end(); ++itTools ) {
426  // let tool add its items
427  sc = (*itTools)->addNtupleItems (tree, TrackState::TGC);
428  if(sc.isFailure()) {
429  msg(MSG::ERROR)<<"The helper " << (*itTools) << " could not add its items" << endmsg;
430  return sc;
431  }
432  }
433  itTools = m_GeneralNtupleHelperToolHandles.begin();
434  for ( ; itTools != m_GeneralNtupleHelperToolHandles.end(); ++itTools ) {
435  // let tool add its items
436  sc = (*itTools)->addNtupleItems (tree, TrackState::unidentified);
437  if(sc.isFailure()) {
438  msg(MSG::ERROR)<<"The helper " << (*itTools) << " could not add its items" << endmsg;
439  return sc;
440  }
441  }
442  return StatusCode::SUCCESS;
443 }
444 
449  const Trk::Track& track,
450  const int /*iterationIndex*/,
451  const unsigned int /*fitStatCode*/ ) {
452  // const Trk::FitterStatusCode /*fitStatCode*/ ) const {
453 
454  ATH_MSG_VERBOSE ("in fillTrackData(trk, indx) filling info about track states");
455 
456  resetVariables();
457  if (m_updator) {
458  m_isUnbiased = 1;
459  } else {
460  m_isUnbiased = 0;
461  }
462 
463  //----------------------------------------------
464  // fill info about trackstates in ntuple
465  const Trk::TrackStates* trackStates=track.trackStateOnSurfaces();
466  if (trackStates == nullptr) {
467  msg(MSG::WARNING) << "current track does not have any TrackStateOnSurface vector, no data will be written for this track" << endmsg;
468  return StatusCode::FAILURE;
469  }
470 
471  // Loop over all track states on surfaces
472  int stateIndexCounter=0;
473  for (const auto *trackState : *trackStates) {
474 
475 
476  if (!trackState) {
477  msg(MSG::WARNING) << "TrackStateOnSurface == Null" << endmsg;
478  continue;
479  }
480  if (trackState->type(Trk::TrackStateOnSurface::Measurement) ||
481  trackState->type(Trk::TrackStateOnSurface::Outlier) ) {
482 
483  ++stateIndexCounter;
484  ATH_MSG_VERBOSE ("try to get measurement for track state");
485  // Get pointer to measurement on track
486  const Trk::MeasurementBase *measurement = trackState->measurementOnTrack();
487  if (!measurement) {
488  msg(MSG::ERROR) << "measurementOnTrack == Null for a TrackStateOnSurface "
489  << "of type Measurement or Outlier" << endmsg;
490  return StatusCode::FAILURE;
491  } // end if (!measurement)
492  TrackState::MeasurementType detectorType = m_detTypeHelper->defineType(measurement);
493  const Trk::TrackParameters* theParameters = trackState->trackParameters();
494  const Trk::TrackParameters* unbiasedParameters = nullptr;
495 
496  // -----------------------------------------
497  // use unbiased track states or normal ones?
498  // unbiased track parameters are tried to retrieve if the updator tool
499  // is available and if unbiased track states could be produced before
500  // for the current track (ie. if one trial to get unbiased track states
501  // fails, for all following track states of the current track the biased state
502  // will be used).
503  if (theParameters && m_updator && (m_isUnbiased==1)
504  && (detectorType!=TrackState::Pseudo)
505  && (! trackState->type(Trk::TrackStateOnSurface::Outlier)) ) {
506  if ( theParameters->covariance() ) {
507  // Get unbiased state
508  unbiasedParameters = m_updator->removeFromState( *theParameters,
509  measurement->localParameters(),
510  measurement->localCovariance()).release();
511  if (unbiasedParameters) {
512  theParameters = unbiasedParameters;
513  ATH_MSG_VERBOSE ("successfully calculated unbiased state");
514  } else {
515  if (measurement->localParameters().contains(Trk::locX)) {
516  double covTrk = (*theParameters->covariance())(Trk::locX,Trk::locX);
517  double covRot = measurement->localCovariance()(Trk::locX,Trk::locX);
518  if (std::abs(covTrk-covRot)<0.001*covRot) {
519  ATH_MSG_DEBUG("Track not overconstrained in local X (track_cov_x = "<<covTrk<<" vs. meas_cov_x="<<covRot<<" => do not calculate unbiased residual.");
520  } else ATH_MSG_INFO ("Could not get unbiased track parameters, use normal parameters");
521  } else ATH_MSG_INFO ("Could not get unbiased track parameters, use normal parameters");
522  m_isUnbiased = 0;
523  } // end if no unbiased track parameters
524  } else if(!m_UpdatorWarning) {
525  // warn only once!
526  msg(MSG::WARNING) << "TrackParameters contain no covariance: Unbiased track states can not be calculated (ie. pulls and residuals will be too small)" << endmsg;
527  m_UpdatorWarning = true;
528  m_isUnbiased = 0;
529  } else {
530  m_isUnbiased = 0;
531  } // end if no measured track parameters
532  } // end if m_updator
533 
534  m_DetectorType->push_back((int)detectorType);
535  ATH_MSG_VERBOSE ("meas #" << stateIndexCounter <<
536  ": detector technology identified as " << detectorType);
537 
538  if ((fillMeasurementData(measurement,
539  theParameters,
540  (trackState->type(Trk::TrackStateOnSurface::Outlier)),
541  detectorType)).isFailure())
542  msg(MSG::WARNING) << "info about TrackState could not be written to ntuple" << endmsg;
543  if ((callHelperTools(measurement,
544  theParameters,
545  (trackState->type(Trk::TrackStateOnSurface::Outlier)),
546  detectorType,
547  stateIndexCounter)).isFailure())
548  msg(MSG::WARNING) << "Could not call helper Tool! " << endmsg;
549 
550  delete unbiasedParameters;
551  } // end if(TSoS is measurement)
552  } // end for loop on trackstates
553 
554 
555  //----------------------------------------------
556  // do hole search if selected
557  if (m_doHoleSearch) {
558  std::unique_ptr<const Trk::TrackStates> holesOnTrack (m_holeSearchTool->getHolesOnTrack(track, track.info().particleHypothesis()));
559  // loop over holes
560  if (!holesOnTrack) {
561  msg(MSG::WARNING) << "Got no holes on track" << endmsg;
562  return StatusCode::SUCCESS;
563  }
564  for (const auto *it : *holesOnTrack) {
565  if (!it) {
566  msg(MSG::WARNING) << "TrackStateOnSurface from hole search tool == Null" << endmsg;
567  continue;
568  }
569  if (fillHoleData(*it).isFailure()) {
570  msg(MSG::WARNING) << "info about TrackState (hole) could not be written to ntuple" << endmsg;
571  }
572  } // end loop on holes
573  }
574 
575  return StatusCode::SUCCESS;
576 }
577 
582 ( const Trk::TrackParticleBase&)
583 {
584 
585  ATH_MSG_WARNING ("MeasurementVectorNtupleTool not meant to be used with TrackParticles.");
586 
587  return StatusCode::SUCCESS;
588 }
589 
591 // reset variables
594 
595  // reset the counters
596  m_nPixelHits = 0;
597  m_nSCTHits = 0;
598  m_nTRTHits = 0;
599  m_nMDTHits = 0;
600  m_nCSCHits = 0;
601  m_nRPCHits = 0;
602  m_nTGCHits = 0;
603 
604  m_pixelHitIndex->clear();
605  m_sctHitIndex->clear();
606  m_trtHitIndex->clear();
607  m_mdtHitIndex->clear();
608  m_cscHitIndex->clear();
609  m_rpcHitIndex->clear();
610  m_tgcHitIndex->clear();
611 
612  if (m_doHoleSearch) {
613  m_nHoles = 0;
614  m_nPixelHoles = 0;
615  m_nSctHoles = 0;
616  m_HoleDetectorType->clear();
617  }
618 
619  // clear data vectors
620  if (!m_residualPullCalculator.empty()) {
621  m_pullLocX->clear();
622  m_pullLocY->clear();
623  m_residualLocX->clear();
624  m_residualLocY->clear();
625  }
626  m_DetectorType->clear();
627  m_isOutlier->clear();
628 
630  toolIter = m_PixelHelperTools.begin();
631  for ( ; toolIter != m_PixelHelperTools.end(); ++toolIter ) {
632  // let tool reset its variables
633  StatusCode sc = (*toolIter)->resetVariables (TrackState::Pixel);
634  if(sc.isFailure()) {
635  msg(MSG::ERROR)<<"The helper could not reset its ntuple variables" << endmsg;
636  return;
637  }
638  }
639  toolIter = m_SCTHelperTools.begin();
640  for ( ; toolIter != m_SCTHelperTools.end(); ++toolIter ) {
641  // let tool reset its variables
642  StatusCode sc = (*toolIter)->resetVariables (TrackState::SCT);
643  if(sc.isFailure()) {
644  msg(MSG::ERROR)<<"The helper could not reset its ntuple variables" << endmsg;
645  return;
646  }
647  }
648  toolIter = m_TRTHelperTools.begin();
649  for ( ; toolIter != m_TRTHelperTools.end(); ++toolIter ) {
650  // let tool reset its variables
651  StatusCode sc = (*toolIter)->resetVariables (TrackState::TRT);
652  if(sc.isFailure()) {
653  msg(MSG::ERROR)<<"The helper could not reset its ntuple variables" << endmsg;
654  return;
655  }
656  }
657  toolIter = m_MDTHelperTools.begin();
658  for ( ; toolIter != m_MDTHelperTools.end(); ++toolIter ) {
659  // let tool reset its variables
660  StatusCode sc = (*toolIter)->resetVariables (TrackState::MDT);
661  if(sc.isFailure()) {
662  msg(MSG::ERROR)<<"The helper could not reset its ntuple variables" << endmsg;
663  return;
664  }
665  }
666  toolIter = m_CSCHelperTools.begin();
667  for ( ; toolIter != m_CSCHelperTools.end(); ++toolIter ) {
668  // let tool reset its variables
669  StatusCode sc = (*toolIter)->resetVariables (TrackState::CSC);
670  if(sc.isFailure()) {
671  msg(MSG::ERROR)<<"The helper could not reset its ntuple variables" << endmsg;
672  return;
673  }
674  }
675  toolIter = m_RPCHelperTools.begin();
676  for ( ; toolIter != m_RPCHelperTools.end(); ++toolIter ) {
677  // let tool reset its variables
678  StatusCode sc = (*toolIter)->resetVariables (TrackState::RPC);
679  if(sc.isFailure()) {
680  msg(MSG::ERROR)<<"The helper could not reset its ntuple variables" << endmsg;
681  return;
682  }
683  }
684  toolIter = m_TGCHelperTools.begin();
685  for ( ; toolIter != m_TGCHelperTools.end(); ++toolIter ) {
686  // let tool reset its variables
687  StatusCode sc = (*toolIter)->resetVariables (TrackState::TGC);
688  if(sc.isFailure()) {
689  msg(MSG::ERROR)<<"The helper could not reset its ntuple variables" << endmsg;
690  return;
691  }
692  }
693  toolIter = m_GeneralHelperTools.begin();
694  for ( ; toolIter != m_GeneralHelperTools.end(); ++toolIter ) {
695  // let tool reset its variables
696  StatusCode sc = (*toolIter)->resetVariables (TrackState::unidentified);
697  if(sc.isFailure()) {
698  msg(MSG::ERROR)<<"The helper could not reset its ntuple variables" << endmsg;
699  return;
700  }
701  }
702 }
703 
704 StatusCode Trk::MeasurementVectorNtupleTool::fillTrackTruthData ( const TrackParameters*& /*truePerigee*/, const TrackTruth& /*trackTruth*/, const int /*indexInTruthTree*/ )
705 {
706 
707  // implement code here (truth trajectory?)
708  return StatusCode::SUCCESS;
709 
710 }
711 
716  const Trk::MeasurementBase* measurement,
717  const Trk::TrackParameters* trkParameters,
718  const bool& isOutlier,
719  const int& detectorType ) {
720 
721  ATH_MSG_VERBOSE ("in fillMeasurementData");
722 
723  if (!isOutlier && trkParameters==nullptr) {
724  ATH_MSG_VERBOSE ("Given TrackParameters == NULL");
725  if(!m_trkParametersWarning) {
726  // warn once only!
727  msg(MSG::WARNING) << "TSoS (type: measurement) contains no TrackParameters: Residuals, etc. cannot be calculated" << endmsg;
728  msg(MSG::WARNING) << " This is possible for slimmed tracks; if residuals are needed choose another track collection" << endmsg;
729  msg(MSG::WARNING) << " (further warnings will be suppressed)" << endmsg;
730  m_trkParametersWarning = true;
731  }
732  }
733 
734  m_isOutlier->push_back(isOutlier? 1 : 0);
735  if (!m_residualPullCalculator.empty()) {
736  // --------------------------------------
737  // fill general residuals and pulls
738  // for the residuals and pulls always use the ROT.
739  // --------------------------------------
740  float residualLocX = s_errorEntry;
741  float residualLocY = s_errorEntry;
742  float pullLocX = s_errorEntry;
743  float pullLocY = s_errorEntry;
744  if (trkParameters) {
745  std::optional<Trk::ResidualPull> residualPull
746  = m_residualPullCalculator->residualPull(measurement, trkParameters,
747  (m_isUnbiased==1) ? Trk::ResidualPull::Unbiased :
749  if (residualPull) {
750  residualLocX = residualPull->residual()[Trk::loc1];
751  if (residualPull->dimension() >= 2)
752  residualLocY = residualPull->residual()[Trk::loc2];
753  if ((residualPull->isPullValid()) || m_ignoreMissTrkCov ) {
754  pullLocX = residualPull->pull()[Trk::loc1];
755  if (residualPull->dimension() >= 2)
756  pullLocY = residualPull->pull()[Trk::loc2];
757  } else {
758  if (!m_pullWarning && !isOutlier) { // warn only once!!!
759  m_pullWarning = true;
760  msg(MSG::WARNING) << "no covariance of the track parameters given, can not compute pull!" << endmsg;
761  msg(MSG::INFO) << "Detector type "<< detectorType
762  << (isOutlier? " (flagged as outlier)" : "(not an outlier)") << endmsg;
763  msg(MSG::INFO) << "you may want to use the jobOption 'IgnoreMissingTrackCovarianceForPulls' to calculate it anyhow." << endmsg;
764  msg(MSG::INFO) << "No further warnings will be given for this type of situation." << endmsg;
765  } else {
766  ATH_MSG_DEBUG ("invalid pull due to missing COV at detector type " << detectorType
767  << (isOutlier? " (flagged as outlier)." : "."));
768  }
769  }
770  } else {
771  msg(MSG::WARNING) << "ResidualPullCalculator failed!" << endmsg;
772  }
773  }
774  m_residualLocX->push_back(residualLocX);
775  m_residualLocY->push_back(residualLocY);
776  m_pullLocX->push_back(pullLocX);
777  m_pullLocY->push_back(pullLocY);
778  } // end if (!m_residualPullCalculator.empty())
779 
780  return StatusCode::SUCCESS;
781 }
782 
787  const Trk::MeasurementBase* measurement,
788  const Trk::TrackParameters* trkPar,
789  const bool& isOutlier,
790  const int& detectorType,
791  const int& nCurrentHit) {
792 
793  // ------------------------------------
794  // try if measurement is a competingROT and check if joboption
795  // is set to use ROT with highest assgn. prob. in the case of a competingROT.
796  // for general helper tools measurement is always used (the jobOption
797  // has no meaning for them).
798  const Trk::MeasurementBase* measurementBaseOrROT = measurement;
799  if (m_useROTwithMaxAssgnProb) {
800  // use ROT with max assgn prob for calculations
801  const Trk::CompetingRIOsOnTrack* comprot = dynamic_cast<const Trk::CompetingRIOsOnTrack*>(measurement);
802  if (comprot){
803  measurementBaseOrROT = &comprot->rioOnTrack(comprot->indexOfMaxAssignProb());
804  }
805  }
806 
807  // -------------------------------------------
808  // write detector specific data (for used measurements only, i.e. not for outliers)
809  if ( !isOutlier && ( detectorType==TrackState::Pixel ||
810  detectorType==TrackState::SCT ||
811  detectorType==TrackState::TRT ||
812  detectorType==TrackState::MDT ||
813  detectorType==TrackState::CSC ||
814  detectorType==TrackState::RPC ||
815  detectorType==TrackState::TGC) ) {
816  std::vector< Trk::IValidationNtupleHelperTool* >::const_iterator toolIter;
817  std::vector< Trk::IValidationNtupleHelperTool* >::const_iterator toolIterEnd;
818  switch (detectorType) {
819  case TrackState::Pixel:
820  toolIter = m_PixelHelperTools.begin();
821  toolIterEnd = m_PixelHelperTools.end();
822  m_pixelHitIndex->push_back(nCurrentHit-1);
823  m_nPixelHits++;
824  break;
825  case TrackState::SCT:
826  toolIter = m_SCTHelperTools.begin();
827  toolIterEnd = m_SCTHelperTools.end();
828  m_sctHitIndex->push_back(nCurrentHit-1);
829  m_nSCTHits++;
830  break;
831  case TrackState::TRT:
832  toolIter = m_TRTHelperTools.begin();
833  toolIterEnd = m_TRTHelperTools.end();
834  m_trtHitIndex->push_back(nCurrentHit-1);
835  m_nTRTHits++;
836  break;
837  case TrackState::MDT:
838  toolIter = m_MDTHelperTools.begin();
839  toolIterEnd = m_MDTHelperTools.end();
840  m_mdtHitIndex->push_back(nCurrentHit-1);
841  m_nMDTHits++;
842  break;
843  case TrackState::CSC:
844  toolIter = m_CSCHelperTools.begin();
845  toolIterEnd = m_CSCHelperTools.end();
846  m_cscHitIndex->push_back(nCurrentHit-1);
847  m_nCSCHits++;
848  break;
849  case TrackState::RPC:
850  toolIter = m_RPCHelperTools.begin();
851  toolIterEnd = m_RPCHelperTools.end();
852  m_rpcHitIndex->push_back(nCurrentHit-1);
853  m_nRPCHits++;
854  break;
855  case TrackState::TGC:
856  toolIter = m_TGCHelperTools.begin();
857  toolIterEnd = m_TGCHelperTools.end();
858  m_tgcHitIndex->push_back(nCurrentHit-1);
859  m_nTGCHits++;
860  break;
861  }
862  // now run the detector specific helper tools
863  for (; toolIter!=toolIterEnd; ++toolIter) {
864  if (((*toolIter)->fillMeasurementData(measurementBaseOrROT, trkPar, detectorType, isOutlier)).isFailure()) {
865  if (!m_helperToolWarning[(*toolIter)]) {
866  msg(MSG::WARNING) << "sub-det helper tool did not succeed to fill data (further warnings for this tool will be suppressed)" << endmsg;
867  m_helperToolWarning[(*toolIter)] = true;
868  }
869  }
870  }
871  } //end if (detectorType!=TrackState::unidentified && !isOutlier)
872 
873  // call the general tools
874  if (!m_GeneralHelperTools.empty()) {
875  std::vector< Trk::IValidationNtupleHelperTool* >::const_iterator toolIter = m_GeneralHelperTools.begin();
876  for (; toolIter!=m_GeneralHelperTools.end(); ++toolIter) {
877  if (((*toolIter)->fillMeasurementData(measurement, trkPar, detectorType, isOutlier)).isFailure()) {
878  if (!m_helperToolWarning[(*toolIter)]) {
879  msg(MSG::WARNING) << "general helper tool did not succeed to fill general data" << endmsg;
880  m_helperToolWarning[(*toolIter)] = true;
881  }
882  }
883  }
884  }
885 
886  return StatusCode::SUCCESS;
887 }
888 
890  const Trk::TrackStateOnSurface& tsos) {
891  if (!m_doHoleSearch) return StatusCode::SUCCESS;
892  // check if we really have a hole
893  if (!tsos.type(Trk::TrackStateOnSurface::Hole)) return StatusCode::FAILURE;
894  // hole without track pars is not allowed
895  if (!tsos.trackParameters()) return StatusCode::FAILURE;
896  // identify the detector type
897  int detectorType = TrackState::unidentified;
899  if ( id.is_valid() ) {
900  if (m_idHelper->is_pixel(id) ) {
901  detectorType = TrackState::Pixel;
902  } else if (m_idHelper->is_sct(id)) {
903  detectorType = TrackState::SCT;
904  } else if (m_idHelper->is_trt(id)) {
905  detectorType = TrackState::TRT;
906  } else if (m_idHelper->is_mdt(id)) {
907  detectorType = TrackState::MDT;
908  } else if (m_idHelper->is_csc(id)) {
909  detectorType = TrackState::CSC;
910  } else if (m_idHelper->is_rpc(id)) {
911  detectorType = TrackState::RPC;
912  } else if (m_idHelper->is_tgc(id)) {
913  detectorType = TrackState::TGC;
914  } else {
915  detectorType = TrackState::unidentified;
916  }
917  } // end if(isValid)
918  // count the holes
919  m_nHoles++;
920  m_HoleDetectorType->push_back(detectorType);
921  ATH_MSG_VERBOSE ("hole #" << m_nHoles-1 << ": detector technology identified as " << detectorType);
922  if (detectorType == TrackState::Pixel) m_nPixelHoles++;
923  if (detectorType == TrackState::SCT) m_nSctHoles++;
924 
925  // ----------------------------
926  // write detector specific data
927  if ( detectorType!=TrackState::unidentified ) {
928  std::vector< Trk::IValidationNtupleHelperTool* >::const_iterator toolIter;
929  std::vector< Trk::IValidationNtupleHelperTool* >::const_iterator toolIterEnd;
930  switch (detectorType) {
931  case TrackState::Pixel:
932  toolIter = m_PixelHelperTools.begin();
933  toolIterEnd = m_PixelHelperTools.end();
934  break;
935  case TrackState::SCT:
936  toolIter = m_SCTHelperTools.begin();
937  toolIterEnd = m_SCTHelperTools.end();
938  break;
939  case TrackState::TRT:
940  toolIter = m_TRTHelperTools.begin();
941  toolIterEnd = m_TRTHelperTools.end();
942  break;
943  case TrackState::MDT:
944  toolIter = m_MDTHelperTools.begin();
945  toolIterEnd = m_MDTHelperTools.end();
946  break;
947  case TrackState::CSC:
948  toolIter = m_CSCHelperTools.begin();
949  toolIterEnd = m_CSCHelperTools.end();
950  break;
951  case TrackState::RPC:
952  toolIter = m_RPCHelperTools.begin();
953  toolIterEnd = m_RPCHelperTools.end();
954  break;
955  case TrackState::TGC:
956  toolIter = m_TGCHelperTools.begin();
957  toolIterEnd = m_TGCHelperTools.end();
958  break;
959  }
960  // now run the detector specific helper tools
961  for (; toolIter!=toolIterEnd; ++toolIter) {
962  if (((*toolIter)->fillHoleData(tsos, detectorType)).isFailure()) {
963  msg(MSG::WARNING) << "sub-det helper tool did not succeed to fill hole data" << endmsg;
964  }
965  }
966  } //end if (detectorType!=TrackState::unidentified)
967 
968  // call the general tools
969  if (!m_GeneralHelperTools.empty()) {
970  std::vector< Trk::IValidationNtupleHelperTool* >::iterator toolIter = m_GeneralHelperTools.begin();
971  for (; toolIter!=m_GeneralHelperTools.end(); ++toolIter) {
972  if (((*toolIter)->fillHoleData(tsos, detectorType)).isFailure()) {
973  msg(MSG::WARNING) << "general helper tool did not succeed to fill general hole data" << endmsg;
974  }
975  }
976  }
977  return StatusCode::SUCCESS;
978 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Trk::MeasurementVectorNtupleTool::callHelperTools
StatusCode callHelperTools(const Trk::MeasurementBase *, const Trk::TrackParameters *, const bool &isOutlier, const int &detectorType, const int &nCurrentHit)
call the helper tools
Definition: MeasurementVectorNtupleTool.cxx:786
Trk::TrackStateOnSurface::trackParameters
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
MeasurementVectorNtupleTool.h
Trk::TrackState::RPC
@ RPC
Definition: TrackStateDefs.h:33
Trk::MeasurementVectorNtupleTool::finalize
StatusCode finalize()
Definition: MeasurementVectorNtupleTool.cxx:299
Trk::TrackState::Pixel
@ Pixel
Definition: TrackStateDefs.h:28
Trk::TrackState::TRT
@ TRT
Definition: TrackStateDefs.h:30
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Trk::locX
@ locX
Definition: ParamDefs.h:37
CompetingRIOsOnTrack.h
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Trk::ParametersBase::associatedSurface
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
IValidationNtupleHelperTool.h
Trk::TrackState::MDT
@ MDT
Definition: TrackStateDefs.h:31
TrackParticleBase.h
Trk::Surface::associatedDetectorElementIdentifier
Identifier associatedDetectorElementIdentifier() const
return Identifier of the associated Detector Element
tree
TChain * tree
Definition: tile_monitor.h:30
Trk::ResidualPull::Unbiased
@ Unbiased
RP with track state that has measurement not included.
Definition: ResidualPull.h:57
Trk::LocalParameters::contains
bool contains(ParamDefs par) const
The simple check for the clients whether the parameter is contained.
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Trk::loc2
@ loc2
generic first and second local coordinate
Definition: ParamDefs.h:35
Trk::TrackState::TGC
@ TGC
Definition: TrackStateDefs.h:34
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Trk::TrackState::unidentified
@ unidentified
Definition: TrackStateDefs.h:27
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
IUpdator.h
Trk::TrackStateOnSurface::Outlier
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Definition: TrackStateOnSurface.h:122
Track.h
Trk::MeasurementVectorNtupleTool::fillTrackData
virtual StatusCode fillTrackData(const Trk::Track &, const int iterationIndex, const unsigned int fitStatCode)
fill ntuple data of a given track without writing the record.
Definition: MeasurementVectorNtupleTool.cxx:448
Trk::TrackParticleBase
Definition: TrackParticleBase.h:41
Trk::MeasurementVectorNtupleTool::MeasurementVectorNtupleTool
MeasurementVectorNtupleTool(const std::string &, const std::string &, const IInterface *)
Definition: MeasurementVectorNtupleTool.cxx:29
Trk::TrackStateOnSurface::type
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
AtlasDetectorID.h
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Trk::CompetingRIOsOnTrack::rioOnTrack
virtual const RIO_OnTrack & rioOnTrack(unsigned int) const =0
returns the RIO_OnTrack (also known as ROT) objects depending on the integer.
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::TrackStateOnSurface::Hole
@ Hole
A hole on the track - this is defined in the following way.
Definition: TrackStateOnSurface.h:128
Trk::TrackState::Pseudo
@ Pseudo
Definition: TrackStateDefs.h:35
beamspotman.n
n
Definition: beamspotman.py:731
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Trk::CompetingRIOsOnTrack
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
Definition: CompetingRIOsOnTrack.h:64
Trk::TrackState::MeasurementType
MeasurementType
enum describing the flavour of MeasurementBase
Definition: TrackStateDefs.h:26
Trk::ParametersBase
Definition: ParametersBase.h:55
DataVector< const Trk::TrackStateOnSurface >
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
Trk::MeasurementBase
Definition: MeasurementBase.h:58
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
ITrackHoleSearchTool.h
Trk::MeasurementVectorNtupleTool::fillTrackParticleData
virtual StatusCode fillTrackParticleData(const Trk::TrackParticleBase &)
fill ntuple data of a given TrackParticle without writing the record.
Definition: MeasurementVectorNtupleTool.cxx:582
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
RIO_OnTrack.h
Trk::MeasurementTypeID
classifies a MeasurementBase into one of the known inherited flavours or one of the detector types fo...
Definition: MeasurementTypeID.h:26
Trk::MeasurementVectorNtupleTool::initialize
StatusCode initialize()
Definition: MeasurementVectorNtupleTool.cxx:117
Trk::MeasurementVectorNtupleTool::resetVariables
virtual void resetVariables()
reset the variables after writing the record to disk ntuple
Definition: MeasurementVectorNtupleTool.cxx:593
Trk::MeasurementVectorNtupleTool::fillMeasurementData
StatusCode fillMeasurementData(const Trk::MeasurementBase *, const Trk::TrackParameters *, const bool &isOutlier, const int &detectorType)
fill variables with call for each measurement TSoS
Definition: MeasurementVectorNtupleTool.cxx:715
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
IResidualPullCalculator.h
MeasurementTypeID.h
TrackTruth
MC particle associated with a reco track + the quality of match.
Definition: TrackTruth.h:14
Trk::MeasurementVectorNtupleTool::addNtupleItems
virtual StatusCode addNtupleItems(TTree *tree)
add branches to the tree Should be called once (per track collection and tree) dunring the initialisa...
Definition: MeasurementVectorNtupleTool.cxx:324
Trk::ResidualPull::Biased
@ Biased
RP with track state including the hit.
Definition: ResidualPull.h:55
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::TrackState::CSC
@ CSC
Definition: TrackStateDefs.h:32
Trk::MeasurementVectorNtupleTool::~MeasurementVectorNtupleTool
~MeasurementVectorNtupleTool()
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
Trk::TrackState::SCT
@ SCT
Definition: TrackStateDefs.h:29
AthAlgTool
Definition: AthAlgTool.h:26
Trk::MeasurementVectorNtupleTool::fillHoleData
virtual StatusCode fillHoleData(const Trk::TrackStateOnSurface &)
fill ntuple data of holes on track without writing the record
Definition: MeasurementVectorNtupleTool.cxx:889
Trk::CompetingRIOsOnTrack::indexOfMaxAssignProb
unsigned int indexOfMaxAssignProb() const
Index of the ROT with the highest assignment probability.
Definition: CompetingRIOsOnTrack.cxx:101
Trk::loc1
@ loc1
Definition: ParamDefs.h:34
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
Trk::MeasurementVectorNtupleTool::fillTrackTruthData
virtual StatusCode fillTrackTruthData(const TrackParameters *&, const TrackTruth &, const int)
fill data about the truth match (score, parameter-pulls etc)
Definition: MeasurementVectorNtupleTool.cxx:704
Identifier
Definition: IdentifierFieldParser.cxx:14