18 : tfDnnLabel_(cfg.getParameter<std::
string>(
"tfDnnLabel")),
24 static const char*
name() {
return "trackTfClassifierDefault"; }
32 if (session_ ==
nullptr) {
33 session_ = es.
getData(tfDnnToken_).getSession();
42 tensorflow::Tensor
input1(tensorflow::DT_FLOAT, {1, 29});
43 tensorflow::Tensor
input2(tensorflow::DT_FLOAT, {1, 1});
45 input1.matrix<
float>()(0, 0) = trk.
pt();
55 input1.matrix<
float>()(0, 10) = trk.
dxy(bestVertex);
56 input1.matrix<
float>()(0, 11) = trk.
dz(bestVertex);
62 input1.matrix<
float>()(0, 17) = trk.
eta();
63 input1.matrix<
float>()(0, 18) = trk.
phi();
71 input1.matrix<
float>()(0, 26) =
73 input1.matrix<
float>()(0, 27) =
87 std::vector<tensorflow::Tensor> outputs;
90 tensorflow::run(const_cast<tensorflow::Session*>(session_), inputs, {
"Identity"}, &outputs);
92 float output = 2.0 * outputs[0].matrix<
float>()(0, 0) - 1.0;
98 const tensorflow::Session* session_;
std::vector< NamedTensor > NamedTensorList
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
double dxyError() const
error on dxy
#define DEFINE_FWK_MODULE(type)
double etaError() const
error on eta
int numberOfValidStripHits() const
double phi() const
azimuthal angle of momentum vector
std::vector< Vertex > VertexCollection
collection of Vertex objects
int numberOfLostTrackerHits(HitCategory category) const
bool getData(T &iHolder) const
std::pair< std::string, Tensor > NamedTensor
double eta() const
pseudorapidity of momentum vector
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)
void run(Session *session, const NamedTensorList &inputs, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const thread::ThreadPoolOptions &threadPoolOptions)
double phiError() const
error on phi
ParameterDescriptionBase * add(U const &iLabel, T const &value)
int trackerLayersTotallyOffOrBad(HitCategory category=TRACK_HITS) 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 dzError() const
error on dz
TrackAlgorithm originalAlgo() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const math::XYZVector & outerMomentum() const
momentum vector at the outermost hit position
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
int trackerLayersWithoutMeasurement(HitCategory category) const
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
Point getBestVertex(reco::Track const &trk, reco::VertexCollection const &vertices, const size_t minNtracks=2)
int numberOfValidPixelHits() const
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...