CMS 3D CMS Logo

Functions

reco::tau::qcuts Namespace Reference

Functions

bool AND (const PFCandidate &cand, const RecoTauQualityCuts::QCutFuncCollection &cuts)
bool etMin (const PFCandidate &cand, double cut)
bool mapAndCutByType (const PFCandidate &cand, const RecoTauQualityCuts::QCutFuncMap &funcMap)
bool minTrackVertexWeight (const PFCandidate &cand, const reco::VertexRef *pv, double cut)
bool ptMin (const PFCandidate &cand, double cut)
bool trkChi2 (const PFCandidate &cand, double cut)
bool trkLongitudinalImpactParameter (const PFCandidate &cand, const reco::VertexRef *pv, double cut)
bool trkLongitudinalImpactParameterWrtTrack (const PFCandidate &cand, const reco::TrackBaseRef *trk, double cut)
 DZ cut, with respect to the current lead rack.
bool trkPixelHits (const PFCandidate &cand, int cut)
bool trkTrackerHits (const PFCandidate &cand, int cut)
bool trkTransverseImpactParameter (const PFCandidate &cand, const reco::VertexRef *pv, double cut)

Function Documentation

bool reco::tau::qcuts::AND ( const PFCandidate &  cand,
const RecoTauQualityCuts::QCutFuncCollection &  cuts 
)
bool reco::tau::qcuts::etMin ( const PFCandidate &  cand,
double  cut 
)
bool reco::tau::qcuts::mapAndCutByType ( const PFCandidate &  cand,
const RecoTauQualityCuts::QCutFuncMap &  funcMap 
)

Definition at line 127 of file RecoTauQualityCuts.cc.

References AND(), hpstanc_transforms::cuts, and reco::PFCandidate::particleId().

Referenced by reco::tau::RecoTauQualityCuts::RecoTauQualityCuts().

                                                                   {
  // Find the cuts that for this particle type
  RecoTauQualityCuts::QCutFuncMap::const_iterator cuts =
      funcMap.find(cand.particleId());
  // Return false if we dont' know how to deal w/ this particle type
  if (cuts == funcMap.end())
    return false;
  else
    // Otherwise AND all the cuts
    return AND(cand, cuts->second);
}
bool reco::tau::qcuts::minTrackVertexWeight ( const PFCandidate &  cand,
const reco::VertexRef pv,
double  cut 
)

Definition at line 97 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, edm::Ref< C, T, F >::isNull(), and histoStyle::weight.

Referenced by reco::tau::RecoTauQualityCuts::RecoTauQualityCuts().

                {
  if (pv->isNull()) {
    edm::LogError("QCutsNoPrimaryVertex") << "Primary vertex Ref in " <<
        "RecoTauQualityCuts is invalid. - minTrackVertexWeight";
    return false;
  }
  auto trk = getTrackRef(cand);
  if (!trk) return false;
  double weight = (*pv)->trackWeight(trk);
  return weight >= cut;
}
bool reco::tau::qcuts::ptMin ( const PFCandidate &  cand,
double  cut 
)

Definition at line 32 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, and reco::LeafCandidate::pt().

Referenced by reco::tau::RecoTauQualityCuts::RecoTauQualityCuts().

                                                {
  return cand.pt() > cut;
}
bool reco::tau::qcuts::trkChi2 ( const PFCandidate &  cand,
double  cut 
)

Definition at line 110 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, and reco::tau::getTrack().

Referenced by reco::tau::RecoTauQualityCuts::RecoTauQualityCuts().

                                                  {
  auto trk = getTrack(cand);
  if (!trk) return false;
  return trk->normalizedChi2() <= cut;
}
bool reco::tau::qcuts::trkLongitudinalImpactParameter ( const PFCandidate &  cand,
const reco::VertexRef pv,
double  cut 
)

Definition at line 66 of file RecoTauQualityCuts.cc.

References abs, GOODCOLL_filter_cfg::cut, reco::tau::getTrack(), and edm::Ref< C, T, F >::isNull().

Referenced by reco::tau::RecoTauQualityCuts::RecoTauQualityCuts().

                                                {
  if (pv->isNull()) {
    edm::LogError("QCutsNoPrimaryVertex") << "Primary vertex Ref in " <<
        "RecoTauQualityCuts is invalid. - trkLongitudinalImpactParameter";
    return false;
  }
  auto trk = getTrack(cand);
  if (!trk) return false;
  double difference = std::abs(trk->dz((*pv)->position()));
  //std::cout << "QCUTS LIP: track vz: " << trk->vz() <<
    //" diff: " << difference << " cut: " << cut << std::endl;
  return difference <= cut;
}
bool reco::tau::qcuts::trkLongitudinalImpactParameterWrtTrack ( const PFCandidate &  cand,
const reco::TrackBaseRef trk,
double  cut 
)

DZ cut, with respect to the current lead rack.

Definition at line 83 of file RecoTauQualityCuts.cc.

References abs, GOODCOLL_filter_cfg::cut, reco::tau::getTrack(), and edm::RefToBase< T >::isNull().

Referenced by reco::tau::RecoTauQualityCuts::RecoTauQualityCuts().

                                             {
  if (trk->isNull()) {
    edm::LogError("QCutsNoValidLeadTrack") << "Lead track Ref in " <<
        "RecoTauQualityCuts is invalid. - trkLongitudinalImpactParameterWrtTrack";
    return false;
  }
  auto candTrk = getTrack(cand);
  if (!candTrk) return false;
  double difference = std::abs((*trk)->vz() - candTrk->vz());
  return difference <= cut;
}
bool reco::tau::qcuts::trkPixelHits ( const PFCandidate &  cand,
int  cut 
)

Definition at line 40 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, and reco::tau::getTrack().

Referenced by reco::tau::RecoTauQualityCuts::RecoTauQualityCuts().

                                                    {
  // For some reason, the number of hits is signed
  auto trk = getTrack(cand);
  if (!trk) return false;
  return trk->hitPattern().numberOfValidPixelHits() >= cut;
}
bool reco::tau::qcuts::trkTrackerHits ( const PFCandidate &  cand,
int  cut 
)

Definition at line 47 of file RecoTauQualityCuts.cc.

References GOODCOLL_filter_cfg::cut, and reco::tau::getTrack().

Referenced by reco::tau::RecoTauQualityCuts::RecoTauQualityCuts().

                                                      {
  auto trk = getTrack(cand);
  if (!trk) return false;
  return trk->hitPattern().numberOfValidHits() >= cut;
}
bool reco::tau::qcuts::trkTransverseImpactParameter ( const PFCandidate &  cand,
const reco::VertexRef pv,
double  cut 
)

Definition at line 53 of file RecoTauQualityCuts.cc.

References abs, GOODCOLL_filter_cfg::cut, reco::tau::getTrack(), and edm::Ref< C, T, F >::isNull().

Referenced by reco::tau::RecoTauQualityCuts::RecoTauQualityCuts().

                                              {
  if (pv->isNull()) {
    edm::LogError("QCutsNoPrimaryVertex") << "Primary vertex Ref in " <<
        "RecoTauQualityCuts is invalid. - trkTransverseImpactParameter";
    return false;
  }
  auto trk = getTrack(cand);
  if (!trk) return false;
  return std::abs(trk->dxy((*pv)->position())) <= cut;
}