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 42 of file ShiftedPFCandidateProducerForNoPileUpPFMEt.h.
Definition at line 38 of file ShiftedPFCandidateProducerForNoPileUpPFMEt.cc.
References DEFINE_FWK_MODULE, boostedElectronIsolation_cff::deltaR, MillePedeFileConverter_cfg::e, reco::LeafCandidate::eta(), edm::EventSetup::get(), edm::Event::getByToken(), reco::PFJet::getPFConstituents(), JetCorrectionUncertainty::getUncertainty(), jecUncertainty_, metsig::jet, jetCorrPayloadName_, jetCorrUncertaintyTag_, fwrapper::jets, minJetPt_, eostools::move(), reco::LeafCandidate::pt(), edm::Event::put(), objectSelection_cff::selectedJets, JetCorrectionUncertainty::setJetEta(), JetCorrectionUncertainty::setJetPt(), reco::LeafCandidate::setP4(), edm::shift, shiftBy_, srcJetsToken_, srcPFCandidatesToken_, and unclEnUncertainty_.
47 for ( reco::PFJetCollection::const_iterator
jet = jets->begin();
48 jet != jets->end(); ++
jet ) {
60 auto shiftedPFCandidates = std::make_unique<reco::PFCandidateCollection>();
61 for ( reco::PFCandidateCollection::const_iterator originalPFCandidate = originalPFCandidates->begin();
62 originalPFCandidate != originalPFCandidates->end(); ++originalPFCandidate ) {
65 for ( std::vector<const reco::PFJet*>::iterator
jet = selectedJets.begin();
66 jet != selectedJets.end(); ++
jet ) {
68 for ( std::vector<reco::PFCandidatePtr>::const_iterator jetConstituent = jetConstituents.begin();
69 jetConstituent != jetConstituents.end() && !jet_matched; ++jetConstituent ) {
70 if (
deltaR(originalPFCandidate->p4(), (*jetConstituent)->p4()) < 1.
e-2 ) jet_matched = (*jet);
87 shiftedPFCandidateP4 *= (1. +
shift);
90 shiftedPFCandidate.setP4(shiftedPFCandidateP4);
92 shiftedPFCandidates->push_back(shiftedPFCandidate);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
double eta() const final
momentum pseudorapidity
JetCorrectionUncertainty * jecUncertainty_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::PFCandidateCollection > srcPFCandidatesToken_
double pt() const final
transverse momentum
std::string jetCorrUncertaintyTag_
Jets made from PFObjects.
edm::EDGetTokenT< reco::PFJetCollection > srcJetsToken_
void setJetEta(float fEta)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::string jetCorrPayloadName_
Particle reconstructed by the particle flow algorithm.
static unsigned int const shift
virtual std::vector< reco::PFCandidatePtr > getPFConstituents() const
get all constituents
float getUncertainty(bool fDirection)
double unclEnUncertainty_