12 , srcJetsToken_(consumes<
reco::
PFJetCollection>(cfg.getParameter<edm::InputTag>(
"srcJets")))
16 if ( cfg.
exists(
"jetCorrInputFileName") ) {
26 <<
" from DB/SQLlite file." << std::endl;
36 produces<reco::PFCandidateCollection>();
52 std::vector<const reco::PFJet*> selectedJets;
53 for ( reco::PFJetCollection::const_iterator
jet = jets->begin();
54 jet != jets->end(); ++
jet ) {
68 for ( reco::PFCandidateCollection::const_iterator originalPFCandidate = originalPFCandidates->begin();
69 originalPFCandidate != originalPFCandidates->end(); ++originalPFCandidate ) {
72 for ( std::vector<const reco::PFJet*>::iterator
jet = selectedJets.begin();
73 jet != selectedJets.end(); ++
jet ) {
75 for ( std::vector<reco::PFCandidatePtr>::const_iterator jetConstituent = jetConstituents.begin();
76 jetConstituent != jetConstituents.end() && !jet_matched; ++jetConstituent ) {
77 if (
deltaR(originalPFCandidate->p4(), (*jetConstituent)->p4()) < 1.
e-2 ) jet_matched = (*jet);
94 shiftedPFCandidateP4 *= (1. +
shift);
97 shiftedPFCandidate.
setP4(shiftedPFCandidateP4);
99 shiftedPFCandidates->push_back(shiftedPFCandidate);
102 evt.
put(shiftedPFCandidates);
T getParameter(std::string const &) const
JetCorrectorParameters * jetCorrParameters_
void produce(edm::Event &, const edm::EventSetup &)
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_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
ShiftedPFCandidateProducerForNoPileUpPFMEt(const edm::ParameterSet &)
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
~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)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::string jetCorrPayloadName_
std::vector< PFJet > PFJetCollection
collection of PFJet objects
Particle reconstructed by the particle flow algorithm.
virtual void setP4(const LorentzVector &p4) GCC11_FINAL
set 4-momentum
static unsigned int const shift
virtual std::vector< reco::PFCandidatePtr > getPFConstituents() const
get all constituents
float getUncertainty(bool fDirection)
std::string fullPath() const
virtual float pt() const GCC11_FINAL
transverse momentum
double unclEnUncertainty_