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 ) {
104 }
else if ( dynamic_cast<const reco::PFTau*>(particle) !=
nullptr ) {
108 }
else if ( dynamic_cast<const reco::PFJet*>(particle) !=
nullptr ||
109 dynamic_cast<const pat::Jet*>(particle) !=
nullptr ) {
111 if ( dynamic_cast<const reco::PFJet*>(particle) !=
nullptr ) {
114 }
else if ( dynamic_cast<const pat::Jet*>(particle) !=
nullptr ) {
120 <<
"PAT jet not of PF-type !!\n";
126 if (
lut_ && pt > 10. ) {
129 if ( x >
lut_->GetXaxis()->GetXmin() && x <
lut_->GetXaxis()->GetXmax() &&
130 y >
lut_->GetYaxis()->GetXmin() && y <
lut_->GetYaxis()->GetXmax() ) {
131 int binIndex =
lut_->FindBin(x, y);
132 double addJERcorrFactor =
lut_->GetBinContent(binIndex);
141 return pfJetResolution;
142 }
else if ( dynamic_cast<const reco::PFCandidate*>(particle) !=
nullptr ) {
147 <<
"Invalid type of particle:" 148 <<
" valid types = { reco::GsfElectron/pat::Electron, reco::Photon/pat::Photon, reco::Muon/pat::Muon, reco::PFTau/pat::Tau," 149 <<
" reco::PFJet/pat::Jet, reco::PFCandidate } !!\n";
152 template <
typename T>
156 <<
" particles: entries = " << particles.size() << std::endl;
158 std::vector<metsig::SigInputObj> pfMEtSignObjects;
161 return pfMEtSignObjects;
166 template <
typename T>
169 std::vector<metsig::SigInputObj> pfMEtSignObjects =
compResolution(particles);
179 for (
typename std::list<T*>::const_iterator particle = particles.begin();
180 particle != particles.end(); ++particle ) {
value_type const * get() const
const reco::JetBaseRef & pfJetRef() const
metsig::SignAlgoResolutions * pfMEtResolution_
TrackRef track() const override
reference to a Track
bool isNonnull() const
Checks for non-null.
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.
metsig::SigInputObj evalPFJet(const reco::Jet *jet) const
std::vector< metsig::SigInputObj > compResolution(const std::list< T * > &particles) const
const JetBaseRef & jetRef() 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
Analysis-level calorimeter jet class.
reco::METCovMatrix operator()(const std::list< T * > &particles) 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.