20 auto const & forest = *forestP;
21 auto tmva_pt_ = trk.
pt();
22 auto tmva_ndof_ = trk.
ndof();
28 float chi2n_no1Dmod =
chi2n;
32 const auto &
hit = *(*ith);
33 if (
hit.dimension()==1) ++count1dhits;
36 if (count1dhits > 0) {
39 chi2n = (chi2+count1dhits)/
float(ndof+count1dhits);
41 auto tmva_chi2n_ =
chi2n;
42 auto tmva_chi2n_no1dmod_ = chi2n_no1Dmod;
43 auto tmva_eta_ = trk.
eta();
48 auto tmva_minlost_ =
std::min(lostIn,lostOut);
51 float gbrVals_[PROMPT ? 16 : 12];
52 gbrVals_[0] = tmva_pt_;
53 gbrVals_[1] = tmva_lostmidfrac_;
54 gbrVals_[2] = tmva_minlost_;
55 gbrVals_[3] = tmva_nhits_;
56 gbrVals_[4] = tmva_relpterr_;
57 gbrVals_[5] = tmva_eta_;
58 gbrVals_[6] = tmva_chi2n_no1dmod_;
59 gbrVals_[7] = tmva_chi2n_;
60 gbrVals_[8] = tmva_nlayerslost_;
61 gbrVals_[9] = tmva_nlayers3D_;
62 gbrVals_[10] = tmva_nlayers_;
63 gbrVals_[11] = tmva_ndof_;
70 auto tmva_absdzPV_ =
std::abs(trk.
dz(bestVertex));
72 gbrVals_[12] = tmva_absd0PV_;
73 gbrVals_[13] = tmva_absdzPV_;
74 gbrVals_[14] = tmva_absdz_;
75 gbrVals_[15] = tmva_absd0_;
81 return forest.GetClassifier(gbrVals_);
85 static const char *
name();
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
#define DEFINE_FWK_MODULE(type)
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
std::vector< Vertex > VertexCollection
collection of Vertex objects
int pixelLayersWithMeasurement() const
int trackerLayersWithMeasurement() const
int numberOfLostTrackerHits(HitCategory category) const
double eta() const
pseudorapidity of momentum vector
int numberOfValidStripLayersWithMonoAndStereo(uint16_t stripdet, uint16_t layer) const
double chi2() const
chi-squared of the fit
double ndof() const
number of degrees of freedom of the fit
double pt() const
track transverse momentum
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Abs< T >::type abs(const T &t)
unsigned short numberOfValidHits() const
number of valid hits found
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
int trackerLayersWithoutMeasurement(HitCategory category) const
Point getBestVertex(reco::Track const &trk, reco::VertexCollection const &vertices, const size_t minNtracks=2)
const Point & position() const
position
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.