18 if ( jecValidFileName_ ) {
30 <<
" from DB/SQLlite file." << std::endl;
41 produces<reco::PFCandidateCollection>();
61 for ( reco::PFJetCollection::const_iterator
jet = jets->begin();
62 jet != jets->end(); ++
jet ) {
74 auto shiftedPFCandidates = std::make_unique<reco::PFCandidateCollection>();
76 for ( reco::PFCandidateCollection::const_iterator originalPFCandidate = originalPFCandidates->begin();
77 originalPFCandidate != originalPFCandidates->end(); ++originalPFCandidate ) {
80 for ( std::vector<const reco::PFJet*>::iterator
jet = selectedJets.begin();
81 jet != selectedJets.end(); ++
jet ) {
82 for ( std::vector<reco::PFCandidatePtr>::const_iterator jetConstituent = (*jet)->getPFConstituents().begin();
83 jetConstituent != (*jet)->getPFConstituents().end() && jet_matched==
nullptr; ++jetConstituent ) {
84 if (
deltaR2(originalPFCandidate->p4(), (*jetConstituent)->p4()) <
dR2Match ) jet_matched = (*jet);
89 if ( jet_matched!=
nullptr ) {
101 shiftedPFCandidateP4 *= (1. +
shift);
104 shiftedPFCandidate.
setP4(shiftedPFCandidateP4);
106 shiftedPFCandidates->push_back(shiftedPFCandidate);
T getParameter(std::string const &) const
virtual double pt() const final
transverse momentum
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
edm::EDGetTokenT< reco::PFCandidateCollection > srcPFCandidatesToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
ShiftedPFCandidateProducerForPFNoPUMEt(const edm::ParameterSet &)
edm::EDGetTokenT< reco::PFJetCollection > srcJetsToken_
Jets made from PFObjects.
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)
virtual void setP4(const LorentzVector &p4) final
set 4-momentum
JetCorrectorParameters * jetCorrParameters_
~ShiftedPFCandidateProducerForPFNoPUMEt()
math::XYZTLorentzVector LorentzVector
Lorentz vector.
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
std::vector< PFJet > PFJetCollection
collection of PFJet objects
Particle reconstructed by the particle flow algorithm.
edm::FileInPath jetCorrInputFileName_
static unsigned int const shift
std::string fullPath() const
double unclEnUncertainty_
float getUncertainty(bool fDirection)