31 recoChargedCandidateProducer_ = consumes<reco::RecoChargedCandidateCollection>(
33 pfEcalClusterProducer_ =
35 pfHcalClusterProducer_ =
38 produces<edm::ValueMap<float>>();
48 descriptions.
add((
"hltL3MuonSumCaloPFIsolationProducer"), desc);
53 iEvent.
getByToken(recoChargedCandidateProducer_, recochargedcandHandle);
56 iEvent.
getByToken(pfEcalClusterProducer_, ecalIsolation);
59 iEvent.
getByToken(pfHcalClusterProducer_, hcalIsolation);
61 auto caloIsoMap = std::make_unique<edm::ValueMap<float>>();
62 std::vector<float> isoFloats(recochargedcandHandle->size(), 0);
64 for (
unsigned int iReco = 0; iReco < recochargedcandHandle->size(); iReco++) {
67 float valisoECAL = mapiECAL->
val;
69 float valisoHCAL = mapiHCAL->
val;
70 float caloIso = valisoECAL + valisoHCAL;
71 isoFloats[iReco] = caloIso;
75 isoFloatFiller.
insert(recochargedcandHandle, isoFloats.begin(), isoFloats.end());
76 isoFloatFiller.
fill();
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)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
L3MuonSumCaloPFIsolationProducer(const edm::ParameterSet &)
constructor with config
tuple config
parse the configuration file
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
~L3MuonSumCaloPFIsolationProducer() override