CMS 3D CMS Logo

Classes | Public Member Functions | Private Member Functions | Private Attributes

reco::tau::RecoTauIsolationMasking Class Reference

#include <RecoTauIsolationMasking.h>

List of all members.

Classes

struct  IsoMaskResult

Public Member Functions

IsoMaskResult mask (const reco::PFTau &) const
 Return a new isolation collections with masking applied.
 RecoTauIsolationMasking (const edm::ParameterSet &pset)
void setMaxSigmas (double maxSigmas)
 ~RecoTauIsolationMasking ()

Private Member Functions

bool inCone (const reco::PFCandidate &track, const reco::PFCandidate &cand) const
double resolution (const reco::PFCandidate &cand) const

Private Attributes

double ecalCone_
double finalHcalCone_
double hcalCone_
double maxSigmas_
std::auto_ptr< PFEnergyResolutionresolutions_

Detailed Description

Definition at line 24 of file RecoTauIsolationMasking.h.


Constructor & Destructor Documentation

reco::tau::RecoTauIsolationMasking::RecoTauIsolationMasking ( const edm::ParameterSet pset)

Definition at line 63 of file RecoTauIsolationMasking.cc.

References ecalCone_, finalHcalCone_, edm::ParameterSet::getParameter(), hcalCone_, and maxSigmas_.

                                :resolutions_(new PFEnergyResolution) {
  ecalCone_ = pset.getParameter<double>("ecalCone");
  hcalCone_ = pset.getParameter<double>("hcalCone");
  finalHcalCone_ = pset.getParameter<double>("finalHcalCone");
  maxSigmas_ = pset.getParameter<double>("maxSigmas");
}
reco::tau::RecoTauIsolationMasking::~RecoTauIsolationMasking ( )

Definition at line 72 of file RecoTauIsolationMasking.cc.

{}

Member Function Documentation

bool reco::tau::RecoTauIsolationMasking::inCone ( const reco::PFCandidate track,
const reco::PFCandidate cand 
) const [private]

Definition at line 163 of file RecoTauIsolationMasking.cc.

References reco::deltaR(), alignCSCRings::e, ecalCone_, reco::PFCandidate::gamma, reco::PFCandidate::h0, hcalCone_, reco::LeafCandidate::p4(), reco::PFCandidate::particleId(), and reco::PFCandidate::positionAtECALEntrance().

                                       {
  double openingDR = reco::deltaR(track.positionAtECALEntrance(), cand.p4());
  if (cand.particleId() == reco::PFCandidate::h0) {
    return (openingDR < hcalCone_);
  } else if (cand.particleId() == reco::PFCandidate::gamma ||
      cand.particleId() == reco::PFCandidate::e) {
    return openingDR < ecalCone_;
  } else {
    edm::LogWarning("IsoMask::inCone (bad pf id)")
      << "Unknown PF ID: " << cand.particleId()
      << " " <<  reco::PFCandidate::e;
  }
  return -1;
}
RecoTauIsolationMasking::IsoMaskResult reco::tau::RecoTauIsolationMasking::mask ( const reco::PFTau tau) const

Return a new isolation collections with masking applied.

Definition at line 114 of file L1GtPatternWriter.cc.

                                                { 
    if(length < 32) { 
        return ~((~0) << length);
    } else { 
        return ~0;
    }
}
double reco::tau::RecoTauIsolationMasking::resolution ( const reco::PFCandidate cand) const [private]

Definition at line 145 of file RecoTauIsolationMasking.cc.

References alignCSCRings::e, reco::LeafCandidate::energy(), reco::LeafCandidate::eta(), reco::PFCandidate::gamma, reco::PFCandidate::h0, reco::PFCandidate::particleId(), reco::LeafCandidate::phi(), and resolutions_.

                                       {
  if (cand.particleId() == reco::PFCandidate::h0) {
    // NB for HCAL it returns relative energy
    return cand.energy()*resolutions_->getEnergyResolutionHad(cand.energy(),
        cand.eta(), cand.phi());
  } else if (cand.particleId() == reco::PFCandidate::gamma) {
    return resolutions_->getEnergyResolutionEm(cand.energy(), cand.eta());
  } else if (cand.particleId() == reco::PFCandidate::e) {
    // FIXME what is the electron resolution??
    return 0.15;
  } else {
    edm::LogWarning("IsoMask::res (bad pf id)")
      << "Unknown PF ID: " << cand.particleId();
  }
  return -1;
}
void reco::tau::RecoTauIsolationMasking::setMaxSigmas ( double  maxSigmas) [inline]

Definition at line 36 of file RecoTauIsolationMasking.h.

References maxSigmas_.

{maxSigmas_ = maxSigmas;}

Member Data Documentation

Definition at line 44 of file RecoTauIsolationMasking.h.

Referenced by inCone(), and RecoTauIsolationMasking().

Definition at line 47 of file RecoTauIsolationMasking.h.

Referenced by RecoTauIsolationMasking().

Definition at line 45 of file RecoTauIsolationMasking.h.

Referenced by inCone(), and RecoTauIsolationMasking().

Definition at line 46 of file RecoTauIsolationMasking.h.

Referenced by RecoTauIsolationMasking(), and setMaxSigmas().

Definition at line 48 of file RecoTauIsolationMasking.h.

Referenced by resolution().