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) != 0 ||
56 dynamic_cast<const pat::Electron*>(particle) != 0 ) {
64 }
else if ( dynamic_cast<const reco::Photon*>(particle) != 0 ||
65 dynamic_cast<const pat::Photon*>(particle) != 0 ) {
74 }
else if ( dynamic_cast<const reco::Muon*>(particle) != 0 ||
75 dynamic_cast<const pat::Muon*>(particle) != 0 ) {
79 if ( dynamic_cast<const pat::Muon*>(particle) != 0 ) {
82 }
else if ( dynamic_cast<const reco::Muon*>(particle) != 0 ) {
97 }
else if ( dynamic_cast<const reco::PFTau*>(particle) != 0 ||
98 dynamic_cast<const pat::Tau*>(particle) != 0 ) {
101 if ( dynamic_cast<const pat::Tau*>(particle) != 0 ) {
105 }
else if ( dynamic_cast<const reco::PFTau*>(particle) != 0 ) {
110 }
else if ( dynamic_cast<const reco::PFJet*>(particle) != 0 ||
111 dynamic_cast<const pat::Jet*>(particle) != 0 ) {
113 if ( dynamic_cast<const reco::PFJet*>(particle) != 0 ) {
116 }
else if ( dynamic_cast<const pat::Jet*>(particle) != 0 ) {
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) != 0 ) {
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>
155 std::vector<metsig::SigInputObj>
compResolution(
const std::list<T*>& particles)
const
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);
179 const std::list<T*>& particles)
const
181 for (
typename std::list<T*>::const_iterator particle = particles.begin();
182 particle != particles.end(); ++particle ) {
metsig::SignAlgoResolutions * pfMEtResolution_
bool isNonnull() const
Checks for non-null.
const PFJetRef & jetRef() const
reco::TrackRef track() const
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
PFMEtSignInterfaceBase(const edm::ParameterSet &)
const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
virtual const Point & vertex() const
vertex position (overwritten by PF...)
metsig::SigInputObj evalPF(const reco::PFCandidate *candidate) const
virtual TrackRef track() const
reference to a Track
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
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
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)
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
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Analysis-level muon class.