33 recoChargedCandidateProducer_ = consumes<reco::RecoChargedCandidateCollection>(config.
getParameter<
edm::InputTag>(
"recoChargedCandidateProducer"));
34 pfEcalClusterProducer_ = consumes<reco::RecoChargedCandidateIsolationMap>(config.
getParameter<
edm::InputTag>(
"pfEcalClusterProducer"));
35 pfHcalClusterProducer_ = consumes<reco::RecoChargedCandidateIsolationMap>(config.
getParameter<
edm::InputTag>(
"pfHcalClusterProducer"));
37 produces < edm::ValueMap<float> >();
49 descriptions.
add((
"hltL3MuonSumCaloPFIsolationProducer"), desc);
55 iEvent.
getByToken(recoChargedCandidateProducer_,recochargedcandHandle);
58 iEvent.
getByToken (pfEcalClusterProducer_,ecalIsolation);
61 iEvent.
getByToken (pfHcalClusterProducer_,hcalIsolation);
64 std::vector<float> isoFloats(recochargedcandHandle->size(), 0);
66 for (
unsigned int iReco = 0; iReco < recochargedcandHandle->size(); iReco++) {
69 float valisoECAL = mapiECAL->val;
71 float valisoHCAL = mapiHCAL->val;
72 float caloIso = valisoECAL + valisoHCAL;
73 isoFloats[iReco] = caloIso;
77 isoFloatFiller.
insert(recochargedcandHandle, isoFloats.begin(), isoFloats.end());
78 isoFloatFiller.
fill();
79 iEvent.
put(caloIsoMap);
T getParameter(std::string const &) const
friend struct const_iterator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void insert(const H &h, I begin, I end)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void produce(edm::Event &, const edm::EventSetup &)
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()