14 if ( cfg.
exists(
"jetCorrInputFileName") ) {
30 produces<reco::PFCandidateCollection>();
47 for ( reco::PFJetCollection::const_iterator
jet = jets->begin();
48 jet != jets->end(); ++
jet ) {
60 auto shiftedPFCandidates = std::make_unique<reco::PFCandidateCollection>();
61 for ( reco::PFCandidateCollection::const_iterator originalPFCandidate = originalPFCandidates->begin();
62 originalPFCandidate != originalPFCandidates->end(); ++originalPFCandidate ) {
65 for ( std::vector<const reco::PFJet*>::iterator
jet = selectedJets.begin();
66 jet != selectedJets.end(); ++
jet ) {
68 for ( std::vector<reco::PFCandidatePtr>::const_iterator jetConstituent = jetConstituents.begin();
69 jetConstituent != jetConstituents.end() && !jet_matched; ++jetConstituent ) {
70 if (
deltaR(originalPFCandidate->p4(), (*jetConstituent)->p4()) < 1.
e-2 ) jet_matched = (*jet);
87 shiftedPFCandidateP4 *= (1. +
shift);
90 shiftedPFCandidate.
setP4(shiftedPFCandidateP4);
92 shiftedPFCandidates->push_back(shiftedPFCandidate);
T getParameter(std::string const &) const
JetCorrectorParameters * jetCorrParameters_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
double eta() const final
momentum pseudorapidity
JetCorrectionUncertainty * jecUncertainty_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::FileInPath jetCorrInputFileName_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::EDGetTokenT< reco::PFCandidateCollection > srcPFCandidatesToken_
double pt() const final
transverse momentum
std::string jetCorrUncertaintyTag_
Jets made from PFObjects.
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::PFJetCollection > srcJetsToken_
#define DEFINE_FWK_MODULE(type)
LocationCode location() const
Where was the file found?
ShiftedPFCandidateProducerForNoPileUpPFMEt(const edm::ParameterSet &)
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
void setJetEta(float fEta)
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
float getUncertainty(bool fDirection)
~ShiftedPFCandidateProducerForNoPileUpPFMEt() override
void setP4(const LorentzVector &p4) final
set 4-momentum
double unclEnUncertainty_