Go to the documentation of this file.
13 #include "lwtnn/LightweightNeuralNetwork.hh"
19 static const char*
name() {
return "TrackLwtnnClassifier"; }
29 neuralNetwork_ = lwtnnHandle.
product();
32 std::pair<float, bool> operator()(
reco::Track const& trk,
35 lwt::ValueMap&
inputs)
const {
48 inputs[
"trk_dxyClosestPV"] = trk.
dxy(bestVertex);
68 auto out = neuralNetwork_->compute(
inputs);
71 throw cms::Exception(
"LogicError") <<
"Expecting exactly one output from NN, got " <<
out.size();
73 float output = 2.0 *
out.begin()->second - 1.0;
78 bool isReliable =
true;
85 if ((
inputs[
"trk_pt"] > 100.0) && (
inputs[
"trk_nChi2"] < 4.0) && (
inputs[
"trk_etaErr"] < 0.001)) {
89 std::pair<float, bool> return_(
output, isReliable);
94 const lwt::LightweightNeuralNetwork* neuralNetwork_;
T const * product() const
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
double lambdaError() const
error on lambda
int trackerLayersWithoutMeasurement(HitCategory category) const
double etaError() const
error on eta
std::vector< Vertex > VertexCollection
collection of Vertex objects
double ndof() const
number of degrees of freedom of the fit
int numberOfLostHits(HitCategory category) const
double dxyError() const
error on dxy
int pixelLayersWithMeasurement() const
double pt() const
track transverse momentum
int stripLayersWithMeasurement() const
#define DEFINE_FWK_MODULE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
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...
Structure Point Contains parameters of Gaussian fits to DMRs.
double eta() const
pseudorapidity of momentum vector
double dzError() const
error on dz
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
TrackAlgorithm algo() const
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
int numberOfValidStripHits() const
int numberOfValidPixelHits() const
Abs< T >::type abs(const T &t)
double lambda() const
Lambda angle.
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
int numberOfValidStripLayersWithMonoAndStereo(uint16_t stripdet, uint16_t layer) const
Point getBestVertex(reco::Track const &trk, reco::VertexCollection const &vertices, const size_t minNtracks=2)