64 if (trk->dxy(spot) > 0.) {
71 rho_ =
static_cast<float>(rho);
112 for (
auto&
name : conf.
getParameter<std::vector<std::string> >(
"ModelNames")) {
113 names_.push_back(
name);
119 thresholds_.push_back(
thresh);
121 if (names_.size() != models_.size()) {
123 <<
"'ModelNames' size (" << names_.size() <<
") != 'ModelWeights' size (" << models_.size() <<
").\n";
125 if (models_.size() != thresholds_.size()) {
127 <<
"'ModelWeights' size (" << models_.size() <<
") != 'ModelThresholds' size (" << thresholds_.size()
140 std::vector<std::string>::const_iterator iter =
std::find(names_.begin(), names_.end(),
name);
141 if (iter != names_.end()) {
144 features.set(ecal, hcal, rho, spot, ecalTools);
145 std::vector<float>
inputs = features.get();
146 float output = models_.at(index)->GetResponse(inputs.data());
147 bool pass = output > thresholds_.at(index);
148 ecal.
setMVA(pass, output, index);
152 <<
"'Name given: '" << name <<
"'. Check against configuration file.\n";
T getParameter(std::string const &) const
float ktf_ecal_cluster_r9_
bool isNonnull() const
Checks for non-null.
reco::TrackRef trackRef() const
float ktf_hcal_cluster_e_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
float preid_trk_gsf_chiratio_
float ktf_ecal_cluster_covPhiPhi_
float ktf_ecal_cluster_covEtaPhi_
void setMVA(bool accepted, float mva, unsigned n=0)
std::vector< float > get()
void set(const reco::PreId &ecal, const reco::PreId &hcal, double rho, const reco::BeamSpot &spot, noZS::EcalClusterLazyTools &ecalTools)
float ktf_ecal_cluster_e_
float ktf_ecal_cluster_dphi_
HeavyObjectCache(const edm::ParameterSet &)
float ktf_ecal_cluster_e3x3_
float ktf_hcal_cluster_deta_
bool eval(const std::string &name, reco::PreId &ecal, reco::PreId &hcal, double rho, const reco::BeamSpot &spot, noZS::EcalClusterLazyTools &ecalTools) const
float ktf_ecal_cluster_covEtaEta_
float ktf_ecal_cluster_deta_
static TrackQuality qualityByName(const std::string &name)
float ktf_ecal_cluster_circularity_
PFClusterRef clusterRef() const
const std::vector< float > & geomMatching() const
Access methods.
float ktf_hcal_cluster_dphi_
float ktf_ecal_cluster_e5x5_