32 recoChargedCandidateProducer_ = consumes<reco::RecoChargedCandidateCollection>(config.
getParameter<
edm::InputTag>(
"recoChargedCandidateProducer"));
33 pfEcalClusterProducer_ = consumes<reco::RecoChargedCandidateIsolationMap>(config.
getParameter<
edm::InputTag>(
"pfEcalClusterProducer"));
34 pfHcalClusterProducer_ = consumes<reco::RecoChargedCandidateIsolationMap>(config.
getParameter<
edm::InputTag>(
"pfHcalClusterProducer"));
36 produces < edm::ValueMap<float> >();
48 descriptions.
add((
"hltL3MuonSumCaloPFIsolationProducer"), desc);
54 iEvent.
getByToken(recoChargedCandidateProducer_,recochargedcandHandle);
57 iEvent.
getByToken (pfEcalClusterProducer_,ecalIsolation);
60 iEvent.
getByToken (pfHcalClusterProducer_,hcalIsolation);
62 auto caloIsoMap = std::make_unique<edm::ValueMap<float>>();
63 std::vector<float> isoFloats(recochargedcandHandle->size(), 0);
65 for (
unsigned int iReco = 0; iReco < recochargedcandHandle->size(); iReco++) {
68 float valisoECAL = mapiECAL->
val;
70 float valisoHCAL = mapiHCAL->
val;
71 float caloIso = valisoECAL + valisoHCAL;
72 isoFloats[iReco] = caloIso;
76 isoFloatFiller.
insert(recochargedcandHandle, isoFloats.begin(), isoFloats.end());
77 isoFloatFiller.
fill();
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void insert(const H &h, I begin, I end)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
L3MuonSumCaloPFIsolationProducer(const edm::ParameterSet &)
constructor with config
~L3MuonSumCaloPFIsolationProducer() override