diff --git a/RecoVertex/PrimaryVertexProducer/interface/TrackFilterForPVFinding.h b/RecoVertex/PrimaryVertexProducer/interface/TrackFilterForPVFinding.h index cc4bb74b661c0..a3e67039030dc 100644 --- a/RecoVertex/PrimaryVertexProducer/interface/TrackFilterForPVFinding.h +++ b/RecoVertex/PrimaryVertexProducer/interface/TrackFilterForPVFinding.h @@ -26,7 +26,7 @@ class TrackFilterForPVFinding : public TrackFilterForPVFindingBase { private: float maxD0Sig_, minPt_, maxEta_; float maxD0Error_, maxDzError_; - int minSiLayers_, minPxLayers_; + int minSiLayers_, minPxLayers_, minStripHits_; float maxNormChi2_; reco::TrackBase::TrackQuality quality_; }; diff --git a/RecoVertex/PrimaryVertexProducer/src/TrackFilterForPVFinding.cc b/RecoVertex/PrimaryVertexProducer/src/TrackFilterForPVFinding.cc index 592ceb5c431d7..da9c3f967a8c3 100644 --- a/RecoVertex/PrimaryVertexProducer/src/TrackFilterForPVFinding.cc +++ b/RecoVertex/PrimaryVertexProducer/src/TrackFilterForPVFinding.cc @@ -10,6 +10,7 @@ TrackFilterForPVFinding::TrackFilterForPVFinding(const edm::ParameterSet& conf) maxNormChi2_ = conf.getParameter("maxNormalizedChi2"); minSiLayers_ = conf.getParameter("minSiliconLayersWithHits"); minPxLayers_ = conf.getParameter("minPixelLayersWithHits"); + minStripHits_ = conf.getParameter("minValidStripHits"); // the next few lines are taken from RecoBTag/SecondaryVertex/interface/TrackSelector.h" std::string qualityClass = conf.getParameter("trackQuality"); @@ -33,8 +34,9 @@ bool TrackFilterForPVFinding::operator()(const reco::TransientTrack& tk) const { bool nPxLayCut = tk.hitPattern().pixelLayersWithMeasurement() >= minPxLayers_; bool nSiLayCut = tk.hitPattern().trackerLayersWithMeasurement() >= minSiLayers_; bool trackQualityCut = (quality_ == reco::TrackBase::undefQuality) || tk.track().quality(quality_); + bool nStripHitsCut = tk.hitPattern().numberOfValidStripHits() >= minStripHits_; - return IPSigCut && pTCut && etaCut && normChi2Cut && nPxLayCut && nSiLayCut && trackQualityCut; + return IPSigCut && pTCut && etaCut && normChi2Cut && nPxLayCut && nSiLayCut && trackQualityCut && nStripHitsCut; } // select the vector of tracks that pass the filter cuts @@ -72,4 +74,5 @@ void TrackFilterForPVFinding::fillPSetDescription(edm::ParameterSetDescription& desc.add("trackQuality", "any"); desc.add("minPixelLayersWithHits", 2); desc.add("minSiliconLayersWithHits", 5); + desc.add("minValidStripHits", 0); }