36         m_detTypeHelper(nullptr),
 
   37         m_updatorHandle(
"Trk::KalmanUpdator/TrkKalmanUpdator"),
 
   39         m_residualPullCalculator(
"Trk::ResidualPullCalculator/ResidualPullCalculator"),
 
   40         m_holeSearchTool(
"InDet::InDetTrackHoleSearchTool/InDetHoleSearchTool"),
 
   41         m_PixelNtupleHelperToolHandles(this), 
 
   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),
 
   54         m_trkParametersWarning{},
 
   59         m_residualLocX(
nullptr),
 
   60         m_residualLocY(
nullptr),
 
   63         m_DetectorType(
nullptr),
 
   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),
 
   82         m_HoleDetectorType(
nullptr)
 
   84   declareInterface<ITrackValidationNtupleTool>(
this);
 
   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");
 
   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;
 
  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>();
 
  126   m_DetectorType  = 
new std::vector<int>();
 
  127   m_isOutlier     = 
new std::vector<int>();
 
  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>();
 
  142     return StatusCode::FAILURE;
 
  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;
 
  155     m_updator = &(*m_updatorHandle);
 
  157     ATH_MSG_DEBUG (
"No Updator for unbiased track states given, use normal states!");
 
  164     return StatusCode::FAILURE;
 
  171   if ( m_PixelNtupleHelperToolHandles.retrieve().isFailure() ) {
 
  172     msg(MSG::ERROR) << 
"Failed to retreive " << m_PixelNtupleHelperToolHandles << 
endmsg;
 
  176   itTools = m_PixelNtupleHelperToolHandles.begin();
 
  177   for (  ; itTools != m_PixelNtupleHelperToolHandles.end(); ++itTools ) {
 
  179     m_PixelHelperTools.push_back(&(*(*itTools)));
 
  180     m_helperToolWarning[&(*(*itTools))] = 
false;
 
  183   if ( m_SCTNtupleHelperToolHandles.retrieve().isFailure() ) {
 
  184     msg(MSG::ERROR) << 
"Failed to retreive " << m_SCTNtupleHelperToolHandles << 
endmsg;
 
  188   itTools = m_SCTNtupleHelperToolHandles.begin();
 
  189   for (  ; itTools != m_SCTNtupleHelperToolHandles.end(); ++itTools ) {
 
  191     m_SCTHelperTools.push_back(&(*(*itTools)));
 
  192     m_helperToolWarning[&(*(*itTools))] = 
false;
 
  195   if ( m_TRTNtupleHelperToolHandles.retrieve().isFailure() ) {
 
  196     msg(MSG::ERROR) << 
"Failed to retreive " << m_TRTNtupleHelperToolHandles << 
endmsg;
 
  200   itTools = m_TRTNtupleHelperToolHandles.begin();
 
  201   for (  ; itTools != m_TRTNtupleHelperToolHandles.end(); ++itTools ) {
 
  203     m_TRTHelperTools.push_back(&(*(*itTools)));
 
  204     m_helperToolWarning[&(*(*itTools))] = 
false;
 
  207   if ( m_MDTNtupleHelperToolHandles.retrieve().isFailure() ) {
 
  208     msg(MSG::ERROR) << 
"Failed to retreive " << m_MDTNtupleHelperToolHandles << 
endmsg;
 
  212   itTools = m_MDTNtupleHelperToolHandles.begin();
 
  213   for (  ; itTools != m_MDTNtupleHelperToolHandles.end(); ++itTools ) {
 
  215     m_MDTHelperTools.push_back(&(*(*itTools)));
 
  216     m_helperToolWarning[&(*(*itTools))] = 
false;
 
  219   if ( m_CSCNtupleHelperToolHandles.retrieve().isFailure() ) {
 
  220     msg(MSG::ERROR) << 
"Failed to retreive " << m_CSCNtupleHelperToolHandles << 
endmsg;
 
  224   itTools = m_CSCNtupleHelperToolHandles.begin();
 
  225   for (  ; itTools != m_CSCNtupleHelperToolHandles.end(); ++itTools ) {
 
  227     m_CSCHelperTools.push_back(&(*(*itTools)));
 
  228     m_helperToolWarning[&(*(*itTools))] = 
false;
 
  231   if ( m_RPCNtupleHelperToolHandles.retrieve().isFailure() ) {
 
  232     msg(MSG::ERROR) << 
"Failed to retreive " << m_RPCNtupleHelperToolHandles << 
endmsg;
 
  236   itTools = m_RPCNtupleHelperToolHandles.begin();
 
  237   for (  ; itTools != m_RPCNtupleHelperToolHandles.end(); ++itTools ) {
 
  239     m_RPCHelperTools.push_back(&(*(*itTools)));
 
  240     m_helperToolWarning[&(*(*itTools))] = 
false;
 
  243   if ( m_TGCNtupleHelperToolHandles.retrieve().isFailure() ) {
 
  244     msg(MSG::ERROR) << 
"Failed to retreive " << m_TGCNtupleHelperToolHandles << 
endmsg;
 
  248   itTools = m_TGCNtupleHelperToolHandles.begin();
 
  249   for (  ; itTools != m_TGCNtupleHelperToolHandles.end(); ++itTools ) {
 
  251     m_TGCHelperTools.push_back(&(*(*itTools)));
 
  252     m_helperToolWarning[&(*(*itTools))] = 
false;
 
  255   if ( m_GeneralNtupleHelperToolHandles.retrieve().isFailure() ) {
 
  256     msg(MSG::ERROR) << 
"Failed to retreive " << m_GeneralNtupleHelperToolHandles << 
endmsg;
 
  260   itTools = m_GeneralNtupleHelperToolHandles.begin();
 
  261   for (  ; itTools != m_GeneralNtupleHelperToolHandles.end(); ++itTools ) {
 
  263     m_GeneralHelperTools.push_back(&(*(*itTools)));
 
  264     m_helperToolWarning[&(*(*itTools))] = 
false;
 
  268   if (m_residualPullCalculator.empty()) {
 
  269     msg(
MSG::INFO) << 
"No residual/pull calculator for general hit residuals configured." 
  271     msg(
MSG::INFO) << 
"It is recommended to give R/P calculators to the det-specific tool" 
  272                    << 
" handle lists then." << 
endmsg;
 
  274     sc = m_residualPullCalculator.retrieve();
 
  275     if (
sc.isFailure()) {
 
  276       msg(
MSG::FATAL) << 
"Could not retrieve "<< m_residualPullCalculator <<
" (to calculate residuals and pulls) "<< 
endmsg;
 
  279       msg(
MSG::INFO) << 
"Generic hit residuals&pulls will be calculated in one or both " 
  280                      << 
"available local coordinates" << 
endmsg;
 
  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;
 
  293   return StatusCode::SUCCESS;
 
  303   if (!m_residualPullCalculator.empty()) {
 
  306     delete m_residualLocX;
 
  307     delete m_residualLocY;
 
  309   delete m_DetectorType;
 
  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;
 
  321   return StatusCode::SUCCESS;
 
  325     if (!
tree) 
return StatusCode::FAILURE;
 
  330     tree->Branch(
"TrackStatesUnbiased", &m_isUnbiased        );
 
  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        );
 
  340     tree->Branch(
"DetectorType",        &m_DetectorType      );
 
  341     tree->Branch(
"outlierFlag",         &m_isOutlier         );
 
  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          );
 
  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       );
 
  364     itTools = m_PixelNtupleHelperToolHandles.begin();
 
  365     for (  ; itTools != m_PixelNtupleHelperToolHandles.end(); ++itTools ) {
 
  369         msg(MSG::ERROR)<<
"The helper " << (*itTools) << 
" could not add its items" << 
endmsg;
 
  374     itTools = m_SCTNtupleHelperToolHandles.begin();
 
  375     for (  ; itTools != m_SCTNtupleHelperToolHandles.end(); ++itTools ) {
 
  379         msg(MSG::ERROR)<<
"The helper " << (*itTools) << 
" could not add its items" << 
endmsg;
 
  384     itTools = m_TRTNtupleHelperToolHandles.begin();
 
  385     for (  ; itTools != m_TRTNtupleHelperToolHandles.end(); ++itTools ) {
 
  389         msg(MSG::ERROR)<<
"The helper " << (*itTools) << 
" could not add its items" << 
endmsg;
 
  394     itTools = m_MDTNtupleHelperToolHandles.begin();
 
  395     for (  ; itTools != m_MDTNtupleHelperToolHandles.end(); ++itTools ) {
 
  399         msg(MSG::ERROR)<<
"The helper " << (*itTools) << 
" could not add its items" << 
endmsg;
 
  404     itTools = m_CSCNtupleHelperToolHandles.begin();
 
  405     for (  ; itTools != m_CSCNtupleHelperToolHandles.end(); ++itTools ) {
 
  409         msg(MSG::ERROR)<<
"The helper " << (*itTools) << 
" could not add its items" << 
endmsg;
 
  414     itTools = m_RPCNtupleHelperToolHandles.begin();
 
  415     for (  ; itTools != m_RPCNtupleHelperToolHandles.end(); ++itTools ) {
 
  419         msg(MSG::ERROR)<<
"The helper " << (*itTools) << 
" could not add its items" << 
endmsg;
 
  424     itTools = m_TGCNtupleHelperToolHandles.begin();
 
  425     for (  ; itTools != m_TGCNtupleHelperToolHandles.end(); ++itTools ) {
 
  429         msg(MSG::ERROR)<<
"The helper " << (*itTools) << 
" could not add its items" << 
endmsg;
 
  433     itTools = m_GeneralNtupleHelperToolHandles.begin();
 
  434     for (  ; itTools != m_GeneralNtupleHelperToolHandles.end(); ++itTools ) {
 
  438         msg(MSG::ERROR)<<
"The helper " << (*itTools) << 
" could not add its items" << 
endmsg;
 
  442     return StatusCode::SUCCESS;
 
  451     const unsigned int  ) {
 
  454   ATH_MSG_VERBOSE (
"in fillTrackData(trk, indx) filling info about track states");
 
  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;
 
  472   int stateIndexCounter=0;
 
  473   for (
const auto *trackState : *trackStates) {
 
  477       msg(MSG::WARNING) << 
"TrackStateOnSurface == Null" << 
endmsg;
 
  488         msg(MSG::ERROR) << 
"measurementOnTrack == Null for a TrackStateOnSurface " 
  489                         << 
"of type Measurement or Outlier" << 
endmsg;
 
  490         return StatusCode::FAILURE;
 
  503       if (theParameters && m_updator && (m_isUnbiased==1)
 
  506         if ( theParameters->covariance() ) {
 
  508           unbiasedParameters = m_updator->removeFromState( *theParameters,
 
  511           if (unbiasedParameters) {
 
  512             theParameters = unbiasedParameters;
 
  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");
 
  524         } 
else if(!m_UpdatorWarning) {
 
  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;
 
  534       m_DetectorType->push_back((
int)detectorType);
 
  536                        ": detector technology identified as " << detectorType);
 
  538       if ((fillMeasurementData(measurement,
 
  541                                detectorType)).isFailure())
 
  542         msg(MSG::WARNING) << 
"info about TrackState could not be written to ntuple" << 
endmsg;
 
  543       if ((callHelperTools(measurement,
 
  547                            stateIndexCounter)).isFailure())
 
  548         msg(MSG::WARNING) << 
"Could not call helper Tool! " << 
endmsg;
 
  550       delete unbiasedParameters;
 
  557   if (m_doHoleSearch) {
 
  558     std::unique_ptr<const Trk::TrackStates> holesOnTrack (m_holeSearchTool->getHolesOnTrack(
track, 
track.info().particleHypothesis()));
 
  561       msg(MSG::WARNING) << 
"Got no holes on track" << 
endmsg;
 
  562       return StatusCode::SUCCESS;
 
  564     for (
const auto *
it : *holesOnTrack) {
 
  566         msg(MSG::WARNING) << 
"TrackStateOnSurface from hole search tool == Null" << 
endmsg;
 
  569       if (fillHoleData(*it).isFailure()) {
 
  570         msg(MSG::WARNING) << 
"info about TrackState (hole) could not be written to ntuple" << 
endmsg;
 
  575   return StatusCode::SUCCESS;
 
  585   ATH_MSG_WARNING (
"MeasurementVectorNtupleTool not meant to be used with TrackParticles.");
 
  587   return StatusCode::SUCCESS;
 
  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();
 
  612   if (m_doHoleSearch) {
 
  616     m_HoleDetectorType->clear();
 
  620   if (!m_residualPullCalculator.empty()) {
 
  623     m_residualLocX->clear();
 
  624     m_residualLocY->clear();
 
  626   m_DetectorType->clear();
 
  627   m_isOutlier->clear();
 
  630   toolIter = m_PixelHelperTools.begin();
 
  631   for (  ; toolIter != m_PixelHelperTools.end(); ++toolIter ) {
 
  635       msg(MSG::ERROR)<<
"The helper could not reset its ntuple variables" << 
endmsg;
 
  639   toolIter = m_SCTHelperTools.begin();
 
  640   for (  ; toolIter != m_SCTHelperTools.end(); ++toolIter ) {
 
  644       msg(MSG::ERROR)<<
"The helper could not reset its ntuple variables" << 
endmsg;
 
  648   toolIter = m_TRTHelperTools.begin();
 
  649   for (  ; toolIter != m_TRTHelperTools.end(); ++toolIter ) {
 
  653       msg(MSG::ERROR)<<
"The helper could not reset its ntuple variables" << 
endmsg;
 
  657   toolIter = m_MDTHelperTools.begin();
 
  658   for (  ; toolIter != m_MDTHelperTools.end(); ++toolIter ) {
 
  662       msg(MSG::ERROR)<<
"The helper could not reset its ntuple variables" << 
endmsg;
 
  666   toolIter = m_CSCHelperTools.begin();
 
  667   for (  ; toolIter != m_CSCHelperTools.end(); ++toolIter ) {
 
  671       msg(MSG::ERROR)<<
"The helper could not reset its ntuple variables" << 
endmsg;
 
  675   toolIter = m_RPCHelperTools.begin();
 
  676   for (  ; toolIter != m_RPCHelperTools.end(); ++toolIter ) {
 
  680       msg(MSG::ERROR)<<
"The helper could not reset its ntuple variables" << 
endmsg;
 
  684   toolIter = m_TGCHelperTools.begin();
 
  685   for (  ; toolIter != m_TGCHelperTools.end(); ++toolIter ) {
 
  689       msg(MSG::ERROR)<<
"The helper could not reset its ntuple variables" << 
endmsg;
 
  693   toolIter = m_GeneralHelperTools.begin();
 
  694   for (  ; toolIter != m_GeneralHelperTools.end(); ++toolIter ) {
 
  698       msg(MSG::ERROR)<<
"The helper could not reset its ntuple variables" << 
endmsg;
 
  708   return StatusCode::SUCCESS;
 
  718     const bool& isOutlier,
 
  719     const int&  detectorType ) {
 
  723     if (!isOutlier && trkParameters==
nullptr) {
 
  725       if(!m_trkParametersWarning) {
 
  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;
 
  734     m_isOutlier->push_back(isOutlier? 1 : 0);
 
  735     if (!m_residualPullCalculator.empty()) {
 
  740       float residualLocX = s_errorEntry;
 
  741       float residualLocY = s_errorEntry;
 
  742       float pullLocX     = s_errorEntry;
 
  743       float pullLocY     = s_errorEntry;
 
  745         std::optional<Trk::ResidualPull> residualPull
 
  746           = m_residualPullCalculator->residualPull(measurement, trkParameters,
 
  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];
 
  758             if (!m_pullWarning && !isOutlier) {  
 
  759               m_pullWarning = 
true;
 
  760               msg(MSG::WARNING) << 
"no covariance of the track parameters given, can not compute pull!" << 
endmsg;
 
  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;
 
  766               ATH_MSG_DEBUG (
"invalid pull due to missing COV at detector type " << detectorType
 
  767                              << (isOutlier? 
" (flagged as outlier)." : 
"."));
 
  771           msg(MSG::WARNING) << 
"ResidualPullCalculator failed!" << 
endmsg;
 
  774       m_residualLocX->push_back(residualLocX);
 
  775       m_residualLocY->push_back(residualLocY);
 
  776       m_pullLocX->push_back(pullLocX);
 
  777       m_pullLocY->push_back(pullLocY);
 
  780     return StatusCode::SUCCESS;
 
  789     const bool& isOutlier,
 
  790     const int& detectorType,
 
  791     const int& nCurrentHit) {
 
  799     if (m_useROTwithMaxAssgnProb) {
 
  816       std::vector< Trk::IValidationNtupleHelperTool* >::const_iterator toolIter;
 
  817       std::vector< Trk::IValidationNtupleHelperTool* >::const_iterator toolIterEnd;
 
  818       switch (detectorType) {
 
  820         toolIter = m_PixelHelperTools.begin();
 
  821         toolIterEnd = m_PixelHelperTools.end();
 
  822         m_pixelHitIndex->push_back(nCurrentHit-1);
 
  826         toolIter = m_SCTHelperTools.begin();
 
  827         toolIterEnd = m_SCTHelperTools.end();
 
  828         m_sctHitIndex->push_back(nCurrentHit-1);
 
  832         toolIter = m_TRTHelperTools.begin();
 
  833         toolIterEnd = m_TRTHelperTools.end();
 
  834         m_trtHitIndex->push_back(nCurrentHit-1);
 
  838         toolIter = m_MDTHelperTools.begin();
 
  839         toolIterEnd = m_MDTHelperTools.end();
 
  840         m_mdtHitIndex->push_back(nCurrentHit-1);
 
  844         toolIter = m_CSCHelperTools.begin();
 
  845         toolIterEnd = m_CSCHelperTools.end();
 
  846         m_cscHitIndex->push_back(nCurrentHit-1);
 
  850         toolIter = m_RPCHelperTools.begin();
 
  851         toolIterEnd = m_RPCHelperTools.end();
 
  852         m_rpcHitIndex->push_back(nCurrentHit-1);
 
  856         toolIter = m_TGCHelperTools.begin();
 
  857         toolIterEnd = m_TGCHelperTools.end();
 
  858         m_tgcHitIndex->push_back(nCurrentHit-1);
 
  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;
 
  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;
 
  886     return StatusCode::SUCCESS;
 
  891     if (!m_doHoleSearch) 
return StatusCode::SUCCESS;
 
  899     if ( 
id.is_valid() ) {
 
  900         if (m_idHelper->is_pixel(
id) ) {
 
  902         } 
else if (m_idHelper->is_sct(
id)) {
 
  904         } 
else if (m_idHelper->is_trt(
id)) {
 
  906         } 
else if (m_idHelper->is_mdt(
id)) {
 
  908         } 
else if (m_idHelper->is_csc(
id)) {
 
  910         } 
else if (m_idHelper->is_rpc(
id)) {
 
  912         } 
else if (m_idHelper->is_tgc(
id)) {
 
  920     m_HoleDetectorType->push_back(detectorType);
 
  921     ATH_MSG_VERBOSE (
"hole #" << m_nHoles-1 << 
": detector technology identified as " << detectorType);
 
  928         std::vector< Trk::IValidationNtupleHelperTool* >::const_iterator toolIter;
 
  929         std::vector< Trk::IValidationNtupleHelperTool* >::const_iterator toolIterEnd;
 
  930         switch (detectorType) {
 
  932             toolIter = m_PixelHelperTools.begin();
 
  933             toolIterEnd = m_PixelHelperTools.end();
 
  936             toolIter = m_SCTHelperTools.begin();
 
  937             toolIterEnd = m_SCTHelperTools.end();
 
  940             toolIter = m_TRTHelperTools.begin();
 
  941             toolIterEnd = m_TRTHelperTools.end();
 
  944             toolIter = m_MDTHelperTools.begin();
 
  945             toolIterEnd = m_MDTHelperTools.end();
 
  948             toolIter = m_CSCHelperTools.begin();
 
  949             toolIterEnd = m_CSCHelperTools.end();
 
  952             toolIter = m_RPCHelperTools.begin();
 
  953             toolIterEnd = m_RPCHelperTools.end();
 
  956             toolIter = m_TGCHelperTools.begin();
 
  957             toolIterEnd = m_TGCHelperTools.end();
 
  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;
 
  969     if (!m_GeneralHelperTools.empty()) {
 
  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;
 
  977     return StatusCode::SUCCESS;