Vary energy of PFCandidates coinciding in eta-phi with selected electrons/muons/tau-jets/jets by electron/muon/tau-jet/jet energy uncertainty.
NOTE: Auxiliary class specific to estimating systematic uncertainty on PFMET reconstructed by MVA-based algorithm (implemented in RecoMET/METPUSubtraction/src/PFMETProducerMVA.cc)
- Author
- Christian Veelken, LLR
Definition at line 33 of file ShiftedPFCandidateProducerForPFMVAMEt.h.
Definition at line 25 of file ShiftedPFCandidateProducerForPFMVAMEt.cc.
37 std::vector<bool>
match(shiftedObjects->
size(),
false);
42 unshiftedObject != unshiftedObjects->
end();
44 bool isMatched_Object =
false;
54 double dR2 =
deltaR2(unshiftedObject->p4(), shiftedObject->p4());
56 shiftedObjectP4_matched = shiftedObject->p4();
57 isMatched_Object =
true;
58 dR2bestMatch_Object = dR2;
64 if (isMatched_Object) {
66 match[prevMatch] =
true;
67 objects_.push_back(objectEntryType(shiftedObjectP4_matched, unshiftedObject->p4(),
sqrt(dR2bestMatch_Object)));
73 auto shiftedPFCandidates = std::make_unique<reco::PFCandidateCollection>();
75 for (reco::PFCandidateCollection::const_iterator originalPFCandidate = originalPFCandidates->begin();
76 originalPFCandidate != originalPFCandidates->end();
77 ++originalPFCandidate) {
79 bool applyShift =
false;
80 double dR2bestMatch_PFCandidate =
dRDefault;
84 for (std::vector<objectEntryType>::const_iterator
object =
objects_.begin();
object !=
objects_.end(); ++
object) {
85 if (!
object->isValidMatch_)
90 double dR2 =
deltaR2(originalPFCandidate->p4(),
object->unshiftedObjectP4_);
92 shift =
object->shift_;
94 dR2bestMatch_PFCandidate = dR2;
104 match[prevMatch] =
true;
106 shiftedPFCandidateP4 *= (1. +
shift);
110 shiftedPFCandidate.setP4(shiftedPFCandidateP4);
112 shiftedPFCandidates->push_back(shiftedPFCandidate);
References edm::View< T >::begin(), HLTMuonOfflineAnalyzer_cfi::deltaR2, dR2match_Object_, dR2match_PFCandidate_, dRDefault, edm::View< T >::end(), edm::Event::getByToken(), match(), eostools::move(), resolutioncreator_cfi::object, objects_, edm::Event::put(), reco::LeafCandidate::setP4(), edm::shift, edm::View< T >::size(), mathSSE::sqrt(), srcPFCandidatesToken_, srcShiftedObjectsToken_, and srcUnshiftedObjectsToken_.