Skip to content

Commit

Permalink
filter tracks for vertices with minStrip hits
Browse files Browse the repository at this point in the history
  • Loading branch information
theochatzis committed Sep 10, 2024
1 parent b33390a commit 4f22e0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ TrackFilterForPVFinding::TrackFilterForPVFinding(const edm::ParameterSet& conf)
maxNormChi2_ = conf.getParameter<double>("maxNormalizedChi2");
minSiLayers_ = conf.getParameter<int>("minSiliconLayersWithHits");
minPxLayers_ = conf.getParameter<int>("minPixelLayersWithHits");
minStripHits_ = conf.getParameter<int>("minValidStripHits");

// the next few lines are taken from RecoBTag/SecondaryVertex/interface/TrackSelector.h"
std::string qualityClass = conf.getParameter<std::string>("trackQuality");
Expand All @@ -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
Expand Down Expand Up @@ -72,4 +74,5 @@ void TrackFilterForPVFinding::fillPSetDescription(edm::ParameterSetDescription&
desc.add<std::string>("trackQuality", "any");
desc.add<int>("minPixelLayersWithHits", 2);
desc.add<int>("minSiliconLayersWithHits", 5);
desc.add<int>("minValidStripHits", 0);
}

0 comments on commit 4f22e0e

Please sign in to comment.