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
virtual double pt() const final
transverse momentum
JetCorrectorParameters * jetCorrParameters_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void produce(edm::Event &, const edm::EventSetup &)
virtual double eta() const final
momentum pseudorapidity
JetCorrectionUncertainty * jecUncertainty_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
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.
edm::EDGetTokenT< reco::PFJetCollection > srcJetsToken_
ShiftedPFCandidateProducerForNoPileUpPFMEt(const edm::ParameterSet &)
~ShiftedPFCandidateProducerForNoPileUpPFMEt()
double deltaR(double eta1, double eta2, double phi1, double phi2)
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
LocationCode location() const
Where was the file found?
void setJetEta(float fEta)
virtual void setP4(const LorentzVector &p4) final
set 4-momentum
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
float getUncertainty(bool fDirection)
std::string fullPath() const
double unclEnUncertainty_