17 preIdsValueMap_(consumes<
edm::ValueMap<
reco::
PreIdRef> >(conf.getParameter<
edm::InputTag>(
"preIdsValueMap"))),
18 names_(conf.getParameter<
std::vector<
std::
string> >(
"ModelNames"))
20 for (
const auto&
name :
names_ ) { produces< edm::ValueMap<float> >(
name); }
42 std::vector< std::vector<float> >
output;
43 for (
unsigned int iname = 0; iname <
names_.size(); ++iname ) {
44 output.push_back( std::vector<float>(gsfTracks->size(),-999.) );
46 for (
unsigned int igsf = 0; igsf < gsfTracks->size(); igsf++ ) {
55 for (
unsigned int iname = 0; iname <
names_.size(); ++iname ) {
56 output[iname][igsf] = preid->mva(iname);
64 for (
unsigned int iname = 0; iname <
names_.size(); ++iname ) {
67 filler.
insert(gsfTracks, output[iname].
begin(), output[iname].
end());
81 desc.
add< std::vector<std::string> >(
"ModelNames",std::vector<std::string>());
82 descriptions.
add(
"defaultLowPtGsfElectronSeedValueMaps",desc);
const edm::EDGetTokenT< reco::GsfTrackCollection > gsfTracks_
const std::vector< std::string > names_
bool isNonnull() const
Checks for non-null.
#define DEFINE_FWK_MODULE(type)
void insert(const H &h, I begin, I end)
~LowPtGsfElectronSeedValueMapsProducer() override
def setup(process, global_tag, zero_tesla=False)
const edm::EDGetTokenT< edm::ValueMap< reco::PreIdRef > > preIdsValueMap_
std::vector< GsfTrack > GsfTrackCollection
collection of GsfTracks
ParameterDescriptionBase * add(U const &iLabel, T const &value)
LowPtGsfElectronSeedValueMapsProducer(const edm::ParameterSet &)
edm::Ref< reco::PreIdCollection > PreIdRef
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &)
void produce(edm::Event &, const edm::EventSetup &) override