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