16 if (jecValidFileName_) {
38 produces<reco::PFCandidateCollection>();
56 for (reco::PFJetCollection::const_iterator
jet = jets->begin();
jet != jets->end(); ++
jet) {
58 selectedJets.push_back(&(*
jet));
69 auto shiftedPFCandidates = std::make_unique<reco::PFCandidateCollection>();
71 for (reco::PFCandidateCollection::const_iterator originalPFCandidate = originalPFCandidates->begin();
72 originalPFCandidate != originalPFCandidates->end();
73 ++originalPFCandidate) {
75 for (std::vector<const reco::PFJet*>::iterator
jet = selectedJets.begin();
jet != selectedJets.end(); ++
jet) {
76 for (std::vector<reco::PFCandidatePtr>::const_iterator jetConstituent = (*jet)->getPFConstituents().begin();
77 jetConstituent != (*jet)->getPFConstituents().end() && jet_matched ==
nullptr;
79 if (
deltaR2(originalPFCandidate->p4(), (*jetConstituent)->p4()) <
dR2Match)
85 if (jet_matched !=
nullptr) {
97 shiftedPFCandidateP4 *= (1. +
shift);
100 shiftedPFCandidate.
setP4(shiftedPFCandidateP4);
102 shiftedPFCandidates->push_back(shiftedPFCandidate);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
double eta() const final
momentum pseudorapidity
edm::EDGetTokenT< reco::PFCandidateCollection > srcPFCandidatesToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool exists(std::string const ¶meterName) const
checks if a parameter exists
ShiftedPFCandidateProducerForPFNoPUMEt(const edm::ParameterSet &)
double pt() const final
transverse momentum
edm::EDGetTokenT< reco::PFJetCollection > srcJetsToken_
Jets made from PFObjects.
#define DEFINE_FWK_MODULE(type)
LocationCode location() const
Where was the file found?
JetCorrectionUncertainty * jecUncertainty_
std::string jetCorrPayloadName_
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
std::string jetCorrUncertaintyTag_
void setJetEta(float fEta)
JetCorrectorParameters * jetCorrParameters_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::vector< PFJet > PFJetCollection
collection of PFJet objects
Particle reconstructed by the particle flow algorithm.
~ShiftedPFCandidateProducerForPFNoPUMEt() override
void produce(edm::Event &, const edm::EventSetup &) override
edm::FileInPath jetCorrInputFileName_
static unsigned int const shift
std::string fullPath() const
double unclEnUncertainty_
float getUncertainty(bool fDirection)
void setP4(const LorentzVector &p4) final
set 4-momentum