|
|
Go to the documentation of this file.
43 const std::vector<std::string>
names_;
47 std::vector<std::unique_ptr<const GBRForest> >
models_;
56 rho_(consumes<double>(conf.getParameter<
edm::
InputTag>(
"rho"))),
59 passThrough_(conf.getParameter<
bool>(
"PassThrough")),
60 minPtThreshold_(conf.getParameter<double>(
"MinPtThreshold")),
61 maxPtThreshold_(conf.getParameter<double>(
"MaxPtThreshold")),
62 thresholds_(conf.getParameter<
std::
vector<double> >(
"ModelThresholds")),
63 version_(conf.getParameter<
std::
string>(
"Version")) {
69 <<
"'ModelNames' size (" <<
names_.size() <<
") != 'ModelWeights' size (" <<
models_.size() <<
").\n";
73 <<
"'ModelWeights' size (" <<
models_.size() <<
") != 'ModelThresholds' size (" <<
thresholds_.size() <<
").\n";
79 produces<edm::ValueMap<float> >(
name);
95 std::ostringstream os;
96 os <<
"Problem accessing rho collection for low-pT electrons" << std::endl;
104 std::ostringstream os;
105 os <<
"Problem accessing low-pT electrons collection" << std::endl;
114 std::vector<std::vector<float> >
output;
115 for (
unsigned int iname = 0; iname <
names_.size(); ++iname) {
118 for (
unsigned int iele = 0; iele <
electrons->size(); iele++) {
124 const auto&
gsf = ele->
core()->gsfTrack();
131 for (
unsigned int iname = 0; iname <
names_.size(); ++iname) {
137 for (
unsigned int iname = 0; iname <
names_.size(); ++iname) {
151 if (iter !=
names_.end()) {
153 std::vector<float>
inputs;
161 throw cms::Exception(
"Unknown model name") <<
"'Name given: '" <<
name <<
"'. Check against configuration file.\n";
173 desc.add<std::vector<std::string> >(
"ModelNames", {
""});
174 desc.add<std::vector<std::string> >(
175 "ModelWeights", {
"RecoEgamma/ElectronIdentification/data/LowPtElectrons/LowPtElectrons_ID_2020Nov28.root"});
176 desc.add<std::vector<double> >(
"ModelThresholds", {-99.});
177 desc.add<
bool>(
"PassThrough",
false);
178 desc.add<
double>(
"MinPtThreshold", 0.5);
179 desc.add<
double>(
"MaxPtThreshold", 15.);
181 descriptions.
add(
"lowPtGsfElectronID",
desc);
LowPtGsfElectronIDProducer(const edm::ParameterSet &)
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
std::vector< float > features_V1(reco::GsfElectron const &ele, float rho, float unbiased, float field_z)
bool isNull() const
Checks for null.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
virtual GsfElectronCoreRef core() const
std::vector< std::unique_ptr< const GBRForest > > models_
static void fillDescriptions(edm::ConfigurationDescriptions &)
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const std::vector< double > thresholds_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
std::vector< float > features_V0(reco::GsfElectron const &ele, float rho, float unbiased)
const double maxPtThreshold_
double eval(const std::string &name, const edm::Ptr< reco::GsfElectron > &, double rho, float unbiased, float field_z) const
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > electrons_
const edm::EDGetTokenT< double > rho_
T getParameter(std::string const &) const
const edm::EDGetTokenT< edm::ValueMap< float > > unbiased_
const double minPtThreshold_
const std::vector< std::string > names_
const std::string version_