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) {
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) {
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_
std::string fullPath() const
std::vector< l1t::PFCandidate > PFCandidateCollection
edm::FileInPath jetCorrInputFileName_
edm::EDGetTokenT< reco::PFCandidateCollection > srcPFCandidatesToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string jetCorrUncertaintyTag_
Jets made from PFObjects.
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::PFJetCollection > srcJetsToken_
virtual std::vector< reco::PFCandidatePtr > getPFConstituents() const
get all constituents
LocationCode location() const
Where was the file found?
#define DEFINE_FWK_MODULE(type)
bool getData(T &iHolder) const
ShiftedPFCandidateProducerForNoPileUpPFMEt(const edm::ParameterSet &)
std::unique_ptr< JetCorrectorParameters > jetCorrParameters_
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
std::unique_ptr< JetCorrectionUncertainty > jecUncertainty_
void setP4(const LorentzVector &p4) final
set 4-momentum
double eta() const final
momentum pseudorapidity
double unclEnUncertainty_