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 68 of file PileupJetIdProducer.cc.
90 vector<StoredPileupJetIdentifier> ids;
91 map<string, vector<float>> mvas;
92 map<string, vector<int>> idflags;
95 VertexCollection::const_iterator
vtx;
115 for (
unsigned int i = 0;
i <
jets.size(); ++
i) {
117 auto algoi =
algos_.begin();
123 patjet = dynamic_cast<const pat::Jet*>(&
jet);
124 ispat = patjet !=
nullptr;
151 std::unique_ptr<reco::Jet> corrJet;
158 corrJet.reset(dynamic_cast<reco::Jet*>(
jet.clone()));
160 corrJet->scaleEnergy(
scale);
168 ids.push_back(puIdentifier);
171 puIdentifier = (*vmap)[
jets.refAt(
i)];
172 puIdentifier.
jetPt(theJet->
pt());
175 ialgo->
set(puIdentifier);
181 mvas[algoi->first].push_back(puIdentifier.
mva());
182 idflags[algoi->first].push_back(puIdentifier.
idFlag());
183 for (++algoi; algoi !=
algos_.end(); ++algoi) {
184 ialgo = algoi->second.get();
185 ialgo->
set(puIdentifier);
187 mvas[algoi->first].push_back(
id.
mva());
188 idflags[algoi->first].push_back(
id.idFlag());
195 for (
const auto& ialgo :
algos_) {
197 vector<float>&
mva = mvas[ialgo.first];
198 auto mvaout = std::make_unique<ValueMap<float>>();
200 mvafiller.insert(jetHandle,
mva.begin(),
mva.end());
205 vector<int>& idflag = idflags[ialgo.first];
206 auto idflagout = std::make_unique<ValueMap<int>>();
208 idflagfiller.insert(jetHandle, idflag.begin(), idflag.end());
215 assert(jetHandle->size() == ids.size());
216 auto idsout = std::make_unique<ValueMap<StoredPileupJetIdentifier>>();
218 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(), Scenarios_cff::scale, PileupJetIdAlgo::set(), GBRForestsAndConstants::usePuppi(), jets_cff::vertexes, and badGlobalMuonTaggersAOD_cff::vtx.