Vary energy of PFCandidates which are (are not) within jets of Pt > 10 GeV by jet energy uncertainty (by 10% "unclustered" energy uncertainty)
NOTE: Auxiliary class specific to estimating systematic uncertainty on PFMET reconstructed by no-PU MET reconstruction algorithm (implemented in JetMETCorrections/Type1MET/src/NoPileUpPFMETProducer.cc)
In case all PFCandidates not within jets of Pt > 30 GeV would be varied by the 10% "unclustered" energy uncertainty, the systematic uncertainty on the reconstructed no-PU MET would be overestimated significantly !!
- Author
- Christian Veelken, LLR
Definition at line 40 of file ShiftedPFCandidateProducerForNoPileUpPFMEt.cc.
Definition at line 90 of file ShiftedPFCandidateProducerForNoPileUpPFMEt.cc.
References PbPb_ZMuSkimMuonDPG_cff::deltaR, MillePedeFileConverter_cfg::e, reco::LeafCandidate::eta(), edm::Event::getByToken(), edm::EventSetup::getData(), reco::PFJet::getPFConstituents(), jecUncertainty_, metsig::jet, jetCorrPayloadName_, jetCorrPayloadToken_, jetCorrUncertaintyTag_, PDWG_EXODelayedJetMET_cff::jets, minJetPt_, eostools::move(), reco::LeafCandidate::pt(), edm::Event::put(), objectSelection_cff::selectedJets, reco::LeafCandidate::setP4(), edm::shift, shiftBy_, srcJetsToken_, srcPFCandidatesToken_, and unclEnUncertainty_.
98 for (reco::PFJetCollection::const_iterator
jet =
jets->begin();
jet !=
jets->end(); ++
jet) {
106 jecUncertainty_ = std::make_unique<JetCorrectionUncertainty>(jetCorrParameters);
109 auto shiftedPFCandidates = std::make_unique<reco::PFCandidateCollection>();
110 for (reco::PFCandidateCollection::const_iterator originalPFCandidate = originalPFCandidates->begin();
111 originalPFCandidate != originalPFCandidates->end();
112 ++originalPFCandidate) {
116 for (std::vector<reco::PFCandidatePtr>::const_iterator jetConstituent = jetConstituents.begin();
117 jetConstituent != jetConstituents.end() && !jet_matched;
119 if (
deltaR(originalPFCandidate->p4(), (*jetConstituent)->p4()) < 1.
e-2)
120 jet_matched = (*jet);
137 shiftedPFCandidateP4 *= (1. +
shift);
140 shiftedPFCandidate.setP4(shiftedPFCandidateP4);
142 shiftedPFCandidates->push_back(shiftedPFCandidate);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
double pt() const final
transverse momentum
edm::ESGetToken< JetCorrectorParametersCollection, JetCorrectionsRecord > jetCorrPayloadToken_
edm::EDGetTokenT< reco::PFCandidateCollection > srcPFCandidatesToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string jetCorrUncertaintyTag_
Jets made from PFObjects.
edm::EDGetTokenT< reco::PFJetCollection > srcJetsToken_
virtual std::vector< reco::PFCandidatePtr > getPFConstituents() const
get all constituents
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::string jetCorrPayloadName_
Particle reconstructed by the particle flow algorithm.
static unsigned int const shift
std::unique_ptr< JetCorrectionUncertainty > jecUncertainty_
double eta() const final
momentum pseudorapidity
double unclEnUncertainty_