12 , srcJetsToken_(consumes<
reco::
PFJetCollection>(cfg.getParameter<edm::InputTag>(
"srcJets")))
18 if ( jecValidFileName_ ) {
30 <<
" from DB/SQLlite file." << std::endl;
41 produces<reco::PFCandidateCollection>();
60 std::vector<const reco::PFJet*> selectedJets;
61 for ( reco::PFJetCollection::const_iterator
jet = jets->begin();
62 jet != jets->end(); ++
jet ) {
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);
109 evt.
put(shiftedPFCandidates);
T getParameter(std::string const &) const
virtual float pt() const
transverse momentum
void produce(edm::Event &, const edm::EventSetup &)
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
virtual void setP4(const LorentzVector &p4)
set 4-momentum
ShiftedPFCandidateProducerForPFNoPUMEt(const edm::ParameterSet &)
edm::EDGetTokenT< reco::PFJetCollection > srcJetsToken_
Jets made from PFObjects.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual float eta() const
momentum pseudorapidity
double deltaR2(const T1 &t1, const T2 &t2)
JetCorrectionUncertainty * jecUncertainty_
std::string jetCorrPayloadName_
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
std::string jetCorrUncertaintyTag_
LocationCode location() const
Where was the file found?
void setJetEta(float fEta)
JetCorrectorParameters * jetCorrParameters_
~ShiftedPFCandidateProducerForPFNoPUMEt()
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::vector< PFJet > PFJetCollection
collection of PFJet objects
Particle reconstructed by the particle flow algorithm.
edm::FileInPath jetCorrInputFileName_
static unsigned int const shift
double unclEnUncertainty_
float getUncertainty(bool fDirection)
std::string fullPath() const