1 #ifndef RecoMET_METPUSubtraction_PFMEtSignInterfaceBase_h 2 #define RecoMET_METPUSubtraction_PFMEtSignInterfaceBase_h 51 double pt = particle->pt();
52 double eta = particle->eta();
53 double phi = particle->phi();
55 if ( dynamic_cast<const reco::GsfElectron*>(particle) !=
nullptr ||
56 dynamic_cast<const pat::Electron*>(particle) !=
nullptr ) {
64 }
else if ( dynamic_cast<const reco::Photon*>(particle) !=
nullptr ||
65 dynamic_cast<const pat::Photon*>(particle) !=
nullptr ) {
74 }
else if ( dynamic_cast<const reco::Muon*>(particle) !=
nullptr ||
75 dynamic_cast<const pat::Muon*>(particle) !=
nullptr ) {
79 if ( dynamic_cast<const pat::Muon*>(particle) !=
nullptr ) {
82 }
else if ( dynamic_cast<const reco::Muon*>(particle) !=
nullptr ) {
97 }
else if ( dynamic_cast<const reco::PFTau*>(particle) !=
nullptr ||
98 dynamic_cast<const pat::Tau*>(particle) !=
nullptr ) {
101 if ( dynamic_cast<const pat::Tau*>(particle) !=
nullptr ) {
105 }
else if ( dynamic_cast<const reco::PFTau*>(particle) !=
nullptr ) {
110 }
else if ( dynamic_cast<const reco::PFJet*>(particle) !=
nullptr ||
111 dynamic_cast<const pat::Jet*>(particle) !=
nullptr ) {
113 if ( dynamic_cast<const reco::PFJet*>(particle) !=
nullptr ) {
116 }
else if ( dynamic_cast<const pat::Jet*>(particle) !=
nullptr ) {
122 <<
"PAT jet not of PF-type !!\n";
128 if (
lut_ && pt > 10. ) {
131 if ( x >
lut_->GetXaxis()->GetXmin() && x <
lut_->GetXaxis()->GetXmax() &&
132 y >
lut_->GetYaxis()->GetXmin() && y <
lut_->GetYaxis()->GetXmax() ) {
133 int binIndex =
lut_->FindBin(x, y);
134 double addJERcorrFactor =
lut_->GetBinContent(binIndex);
143 return pfJetResolution;
144 }
else if ( dynamic_cast<const reco::PFCandidate*>(particle) !=
nullptr ) {
149 <<
"Invalid type of particle:" 150 <<
" valid types = { reco::GsfElectron/pat::Electron, reco::Photon/pat::Photon, reco::Muon/pat::Muon, reco::PFTau/pat::Tau," 151 <<
" reco::PFJet/pat::Jet, reco::PFCandidate } !!\n";
154 template <
typename T>
158 <<
" particles: entries = " << particles.size() << std::endl;
160 std::vector<metsig::SigInputObj> pfMEtSignObjects;
163 return pfMEtSignObjects;
168 template <
typename T>
171 std::vector<metsig::SigInputObj> pfMEtSignObjects =
compResolution(particles);
181 for (
typename std::list<T*>::const_iterator particle = particles.begin();
182 particle != particles.end(); ++particle ) {
metsig::SignAlgoResolutions * pfMEtResolution_
TrackRef track() const override
reference to a Track
bool isNonnull() const
Checks for non-null.
const PFJetRef & jetRef() const
PFMEtSignInterfaceBase(const edm::ParameterSet &)
const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
metsig::SigInputObj evalPF(const reco::PFCandidate *candidate) const
ROOT::Math::SMatrix< double, 2 > METCovMatrix
void addPFMEtSignObjects(std::vector< metsig::SigInputObj > &metSignObjects, const std::list< T * > &particles) const
virtual Constituents getJetConstituents() const
list of constituents
reco::TrackRef track() const override
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
double eval(const resolutionType &type, const resolutionFunc &func, const double &et, const double &phi, const double &eta, const double &p) const
Jets made from PFObjects.
std::vector< metsig::SigInputObj > compResolution(const std::list< T * > &particles) const
const Point & vertex() const override
vertex position (overwritten by PF...)
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
double phiError() const
error on phi
Abs< T >::type abs(const T &t)
const LorentzVector & p4() const final
four-momentum Lorentz vector
T const * get() const
Returns C++ pointer to the item.
~PFMEtSignInterfaceBase()
Analysis-level tau class.
bool isPFJet() const
check to see if the jet is a reco::PFJet
const reco::PFJetRef & pfJetRef() const
Analysis-level calorimeter jet class.
reco::METCovMatrix operator()(const std::list< T * > &particles) const
metsig::SigInputObj evalPFJet(const reco::PFJet *jet) const
Particle reconstructed by the particle flow algorithm.
reco::METCovMatrix operator()(const std::vector< metsig::SigInputObj > &) const
metsig::SigInputObj compResolution(const T *particle) const
Analysis-level muon class.