Description: [one line class summary]
Implementation: [Notes on implementation]
Description: Produces a value map of jet --> pileup jet ID
Implementation: [Notes on implementation]
Definition at line 79 of file PileupJetIdProducer.h.
Definition at line 70 of file PileupJetIdProducer.cc.
92 vector<StoredPileupJetIdentifier> ids;
93 map<string, vector<float>> mvas;
94 map<string, vector<int>> idflags;
97 VertexCollection::const_iterator
vtx;
117 for (
unsigned int i = 0;
i <
jets.size(); ++
i) {
119 auto algoi =
algos_.begin();
125 patjet = dynamic_cast<const pat::Jet*>(&
jet);
126 ispat = patjet !=
nullptr;
153 std::unique_ptr<reco::Jet> corrJet;
158 corrJet = std::make_unique<pat::Jet>(patjet->
correctedJet(0));
160 corrJet.reset(dynamic_cast<reco::Jet*>(
jet.clone()));
162 corrJet->scaleEnergy(
scale);
170 ids.push_back(puIdentifier);
173 puIdentifier = (*vmap)[
jets.refAt(
i)];
174 puIdentifier.
jetPt(theJet->
pt());
177 ialgo->
set(puIdentifier);
183 mvas[algoi->first].push_back(puIdentifier.
mva());
184 idflags[algoi->first].push_back(puIdentifier.
idFlag());
185 for (++algoi; algoi !=
algos_.end(); ++algoi) {
186 ialgo = algoi->second.get();
187 ialgo->
set(puIdentifier);
189 mvas[algoi->first].push_back(
id.
mva());
190 idflags[algoi->first].push_back(
id.idFlag());
197 for (
const auto& ialgo :
algos_) {
199 vector<float>&
mva = mvas[ialgo.first];
200 auto mvaout = std::make_unique<ValueMap<float>>();
202 mvafiller.insert(jetHandle,
mva.begin(),
mva.end());
207 vector<int>& idflag = idflags[ialgo.first];
208 auto idflagout = std::make_unique<ValueMap<int>>();
210 idflagfiller.insert(jetHandle, idflag.begin(), idflag.end());
217 assert(jetHandle->size() == ids.size());
218 auto idsout = std::make_unique<ValueMap<StoredPileupJetIdentifier>>();
220 idsfiller.insert(jetHandle, ids.begin(), ids.end());
References algos_, jetMETDQMOfflineSource_cff::applyJec, GBRForestsAndConstants::applyJec(), cms::cuda::assert(), PileupJetIdAlgo::computeIdVariables(), PileupJetIdAlgo::computeMva(), pat::Jet::correctedJet(), reco::LeafCandidate::eta(), mps_fire::i, PileupJetIdentifier::idFlag(), iEvent, initJetEnergyCorrector(), input_jet_token_, input_rho_token_, input_vertex_token_, input_vm_pujetid_token_, GBRForestsAndConstants::inputIsCorrected(), jetMETDQMOfflineSource_cff::jec, jecCor_, metsig::jet, StoredPileupJetIdentifier::jetEta(), PileupJetIdentifier::jetPhi(), StoredPileupJetIdentifier::jetPt(), singleTopDQM_cfi::jets, eostools::move(), PileupJetIdentifier::mva(), beam_dqm_sourceclient-live_cfg::mva, reco::LeafCandidate::phi(), GBRForestsAndConstants::produceJetIds(), edm::Handle< T >::product(), reco::LeafCandidate::pt(), rho, GBRForestsAndConstants::runMvas(), L1EGammaCrystalsEmulatorProducer_cfi::scale, PileupJetIdAlgo::set(), GBRForestsAndConstants::usePuppi(), jets_cff::vertexes, and extraflags_cff::vtx.