11#include "CLHEP/GenericFunctions/CumulativeChiSquare.hh"
18 const IInterface* p ) :
21 declareInterface<Trk::ITrackScoringTool>(
this);
36 if (!track.trackSummary()) {
50 if (
msgLvl(MSG::VERBOSE))
msg(MSG::VERBOSE) <<
"Summary for track: " << trackSummary <<
endmsg;
52 if (!track.fitQuality()){
53 msg(MSG::WARNING) <<
"No fit quality! Track info=" << track.info().dumpInfo() <<
endmsg;
61 int nWeightedClusters = 2 * pixelhits + scthits;
63 if (
msgLvl(MSG::VERBOSE))
msg(MSG::VERBOSE) <<
"pixelhits: " << pixelhits <<
"; scthits: " << scthits
64 <<
"; trthits: " << trthits <<
"; nWeightedClusters: " << nWeightedClusters <<
endmsg;
69 for (
const auto *i : *track.measurementsOnTrack()){
71 double error=sqrt(i->localCovariance()(0,0));
72 if (
error>1) tubehits++;
79 else hitscore = 10 * (pixelhits + scthits) + trthits;
82 if (track.fitQuality()->numberDoF() > 0) fitscore = 0.0001*track.fitQuality()->chiSquared()
83 / track.fitQuality()->numberDoF();
85 if (
msgLvl(MSG::VERBOSE))
msg(MSG::VERBOSE) <<
"track score: " << hitscore - 0.25*tubehits - fitscore <<
endmsg;
#define ATH_MSG_VERBOSE(x)
bool msgLvl(const MSG::Level lvl) const
Represents 'corrected' measurements from the TRT (for example, corrected for wire sag).
A summary of the information contained by a track.
int get(const SummaryType &type) const
returns the summary information for the passed SummaryType.
ParametersBase< TrackParametersDim, Charged > TrackParameters
@ numberOfSCTHits
number of SCT holes
@ numberOfPixelHits
number of pixel layers on track with absence of hits
@ numberOfTRTHits
number of TRT outliers