diff --git a/Tr/TrackTools/src/GhostProbabilityTool.cpp b/Tr/TrackTools/src/GhostProbabilityTool.cpp index 1415ecd2cdb01cd22fcc682628be92f3bf98d45b..3dd9e15ab0c0d9fc3d05d924709af349f64447df 100644 --- a/Tr/TrackTools/src/GhostProbabilityTool.cpp +++ b/Tr/TrackTools/src/GhostProbabilityTool.cpp @@ -44,6 +44,7 @@ public: auto output = m_model->model()->evaluate( invec ); auto out_arr = SIMDWrapper::to_array( output( 0 ) ); track.setGhostProbability( std::isnan( out_arr[0] ) ? 1. : 1. - out_arr[0] ); + m_ghostProbCounter += track.ghostProbability(); return StatusCode::SUCCESS; }; @@ -51,6 +52,7 @@ public: // save output in track (assumes it classifies tracks (vs ghosts) not the other way around) auto save_output = [&]( LHCb::Track* track, LHCb::span output ) -> void { track->setGhostProbability( std::isnan( output[0] ) ? 1. : 1. - output[0] ); + m_ghostProbCounter += track->ghostProbability(); }; // runs on one type of track @@ -85,11 +87,12 @@ private: Gaudi::Property m_weightsfilename{ this, "WeightsFileName", {}, "locations of weights files, to be read with ParamFileSvc" }; - LHCb::Track::Types m_tracktype; - Gaudi::Property m_trktypesprop{ this, "TrackType", "", [&]( auto& ) { + LHCb::Track::Types m_tracktype; + Gaudi::Property m_trktypesprop{ this, "TrackType", "", [&]( auto& ) { if ( parse( m_tracktype, m_trktypesprop ).isFailure() ) m_tracktype = LHCb::Track::Types::Unknown; } }; + mutable Gaudi::Accumulators::AveragingCounter m_ghostProbCounter{ this, "ghostProbability" }; private: std::unique_ptr m_model; diff --git a/Tr/TrackUtils/src/TrackBestTrackCreator.cpp b/Tr/TrackUtils/src/TrackBestTrackCreator.cpp index c9b1ea66cb2df0a6fa040c922c834110b7087086..87b85fdd296f26aba89cd995284c59ee0aed0931 100644 --- a/Tr/TrackUtils/src/TrackBestTrackCreator.cpp +++ b/Tr/TrackUtils/src/TrackBestTrackCreator.cpp @@ -154,6 +154,8 @@ namespace LHCb { mutable CounterSet> m_chisqProbSumCounters{ this, "chisqProbSum" }; mutable CounterSet> m_ghostProbCounters{ this, "ghostProbability" }; + mutable CounterSet> m_ghostProbRetentionCounters{ + this, "ghostProbability cut retention" }; mutable CounterSet> m_numOutliersCounters{ this, "numOutliers" }; mutable CounterSet> m_fitFailedCounters{ this, "FitFailed" }; @@ -357,6 +359,8 @@ int LHCb::TrackBestTrackCreator::fitAndSelect( TrackData& td, IGeometryInfo cons td.setAccepted( chi2.chi2PerDoF() < m_maxChi2DoF && chi2T.chi2PerDoF() < m_maxChi2DoFT && chi2Velo.chi2PerDoF() < m_maxChi2DoFVelo && chi2MatchAndUT.chi2PerDoF() < m_maxChi2DoFMatchAndUT && ( !m_addGhostProb || track.ghostProbability() < m_maxGhostProb ) ); + + m_ghostProbRetentionCounters( track.type() ) += ( track.ghostProbability() < m_maxGhostProb ); } if ( msgLevel( MSG::DEBUG ) ) {