68 if (cfg.
exists(
"jetCorrInputFileName")) {
75 jecUncertainty_ = std::make_unique<JetCorrectionUncertainty>(*jetCorrParameters_);
87 produces<reco::PFCandidateCollection>();
98 for (reco::PFJetCollection::const_iterator
jet = jets->begin();
jet != jets->end(); ++
jet) {
100 selectedJets.push_back(&(*
jet));
106 jecUncertainty_ = std::make_unique<JetCorrectionUncertainty>(jetCorrParameters);
109 auto shiftedPFCandidates = std::make_unique<reco::PFCandidateCollection>();
110 for (reco::PFCandidateCollection::const_iterator originalPFCandidate = originalPFCandidates->begin();
111 originalPFCandidate != originalPFCandidates->end();
112 ++originalPFCandidate) {
114 for (std::vector<const reco::PFJet*>::iterator
jet = selectedJets.begin();
jet != selectedJets.end(); ++
jet) {
116 for (std::vector<reco::PFCandidatePtr>::const_iterator jetConstituent = jetConstituents.begin();
117 jetConstituent != jetConstituents.end() && !jet_matched;
119 if (
deltaR(originalPFCandidate->p4(), (*jetConstituent)->p4()) < 1.
e-2)
120 jet_matched = (*jet);
137 shiftedPFCandidateP4 *= (1. +
shift);
140 shiftedPFCandidate.
setP4(shiftedPFCandidateP4);
142 shiftedPFCandidates->push_back(shiftedPFCandidate);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
double pt() const final
transverse momentum
edm::ESGetToken< JetCorrectorParametersCollection, JetCorrectionsRecord > jetCorrPayloadToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< l1t::PFCandidate > PFCandidateCollection
edm::FileInPath jetCorrInputFileName_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::EDGetTokenT< reco::PFCandidateCollection > srcPFCandidatesToken_
std::string jetCorrUncertaintyTag_
Jets made from PFObjects.
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::PFJetCollection > srcJetsToken_
bool getData(T &iHolder) const
LocationCode location() const
Where was the file found?
ShiftedPFCandidateProducerForNoPileUpPFMEt(const edm::ParameterSet &)
std::unique_ptr< JetCorrectorParameters > jetCorrParameters_
T getParameter(std::string const &) const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::string jetCorrPayloadName_
std::vector< PFJet > PFJetCollection
collection of PFJet objects
Particle reconstructed by the particle flow algorithm.
static unsigned int const shift
virtual std::vector< reco::PFCandidatePtr > getPFConstituents() const
get all constituents
std::string fullPath() const
std::unique_ptr< JetCorrectionUncertainty > jecUncertainty_
void setP4(const LorentzVector &p4) final
set 4-momentum
double eta() const final
momentum pseudorapidity
double unclEnUncertainty_