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>{
33 const float local_chi2 =
muon.combinedQuality().chi2LocalPosition;
34 const float kink =
muon.combinedQuality().trkKink;
36 const float n_MatchedStations =
muon.numberOfMatchedStations();
37 const float pt =
muon.pt();
43 if (
muon.innerTrack().isNonnull()) {
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;
54 if (
muon.globalTrack().isNonnull()) {
55 norm_chi2 =
muon.globalTrack()->normalizedChi2();
56 n_Valid_hits =
muon.globalTrack()->hitPattern().numberOfValidMuonHits();
57 }
else if (
muon.innerTrack().isNonnull()) {
58 norm_chi2 =
muon.innerTrack()->normalizedChi2();
59 n_Valid_hits =
muon.innerTrack()->hitPattern().numberOfValidMuonHits();
64 const std::vector<std::string> input_names_{
"float_input"};
77 const std::vector<std::string> flav_names_{
"probBAD",
"probGOOD"};
79 input_values_.emplace_back(
vars);
81 LogDebug(
"MuonMvaIDEstimator") << randomForest_.get();
82 outputs = randomForest_->run(input_names_, input_values_, {}, {
"probabilities"})[0];
MuonMvaIDEstimator(const edm::FileInPath &weightsfile)
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
static void globalEndJob(const cms::Ort::ONNXRuntime *)
std::vector< std::vector< float > > FloatArrays
static void fillDescriptions(edm::ConfigurationDescriptions &)
std::vector< float > computeMVAID(const pat::Muon &imuon) const
ArbitrationType
define arbitration schemes
const reco::Muon::ArbitrationType arbitrationType
const std::string & fullPath() const
Analysis-level muon class.