11 using namespace cms::Ort;
14 randomForest_ = std::make_unique<ONNXRuntime>(weightsfile.
fullPath());
15 LogDebug(
"MuonMvaIDEstimator") << randomForest_.get();
21 desc.
add<std::vector<std::string>>(
"flav_names",
22 std::vector<std::string>{
37 const float pt = muon.
pt();
38 const float eta = muon.
eta();
44 Valid_pixel = muon.
innerTrack()->hitPattern().numberOfValidPixelHits();
45 tracker_layers = muon.
innerTrack()->hitPattern().trackerLayersWithMeasurement();
46 validFraction = muon.
innerTrack()->validFraction();
49 tracker_layers = -99.0;
50 validFraction = -99.0;
56 n_Valid_hits = muon.
globalTrack()->hitPattern().numberOfValidMuonHits();
58 norm_chi2 = muon.
innerTrack()->normalizedChi2();
59 n_Valid_hits = muon.
innerTrack()->hitPattern().numberOfValidMuonHits();
64 const std::vector<std::string> input_names_{
"float_input"};
65 std::vector<float>
vars = {global_muon,
77 const std::vector<std::string> flav_names_{
"probBAD",
"probGOOD"};
79 input_values_.emplace_back(vars);
80 std::vector<float> outputs;
81 LogDebug(
"MuonMvaIDEstimator") << randomForest_.get();
82 outputs = randomForest_->run(input_names_, input_values_, {}, {
"probabilities"})[0];
83 assert(outputs.size() == flav_names_.size());
float chi2LocalPosition
chi2 value for the STA-TK matching of local position
MuonMvaIDEstimator(const edm::FileInPath &weightsfile)
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
bool isNonnull() const
Checks for non-null.
double pt() const final
transverse momentum
static void globalEndJob(const cms::Ort::ONNXRuntime *)
std::vector< float > computeMVAID(const pat::Muon &imuon) const
float trkKink
value of the kink algorithm applied to the inner track stub
std::vector< std::vector< float > > FloatArrays
static void fillDescriptions(edm::ConfigurationDescriptions &)
double segmentCompatibility(reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration) const
Returns the segment compatibility, using muon::segmentCompatibility (DataFormats/MuonReco/interface/M...
ArbitrationType
define arbitration schemes
MuonQuality combinedQuality() const
get energy deposition information
ParameterDescriptionBase * add(U const &iLabel, T const &value)
int numberOfMatchedStations(ArbitrationType type=SegmentAndTrackArbitration) const
const reco::Muon::ArbitrationType arbitrationType
reco::TrackRef globalTrack() const override
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) ...
reco::TrackRef innerTrack() const override
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
std::string fullPath() const
Analysis-level muon class.
bool isGlobalMuon() const override
double eta() const final
momentum pseudorapidity