Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,22 +126,28 @@ void SiStripClusters2ApproxClusters::produce(edm::Event& event, edm::EventSetup

int hitStrips;
float hitPredPos;
theFilter->getSizes(detId, cluster, lp, ldir, hitStrips, hitPredPos);

bool peakFilter = false;
SlidingPeakFinder pf(std::max<int>(2, std::ceil(std::abs(hitPredPos) + subclusterWindow_)));
float mipnorm = mip / std::abs(ldir.z());
PeakFinderTest test(mipnorm,
detId,
cluster.firstStrip(),
theNoise_,
seedCutMIPs_,
seedCutSN_,
subclusterCutMIPs_,
subclusterCutSN_);
peakFilter = pf.apply(cluster.amplitudes(), test);

ff.push_back(SiStripApproximateCluster(cluster, maxNSat, hitPredPos, peakFilter));
bool usable = theFilter->getSizes(detId, cluster, lp, ldir, hitStrips, hitPredPos);
// (almost) same logic as in StripSubClusterShapeTrajectoryFilter
bool isTrivial = (std::abs(hitPredPos) < 2.f && hitStrips <= 2);

if (!usable || isTrivial) {
ff.push_back(SiStripApproximateCluster(cluster, maxNSat, hitPredPos, true));
} else {
bool peakFilter = false;
SlidingPeakFinder pf(std::max<int>(2, std::ceil(std::abs(hitPredPos) + subclusterWindow_)));
float mipnorm = mip / std::abs(ldir.z());
PeakFinderTest test(mipnorm,
detId,
cluster.firstStrip(),
theNoise_,
seedCutMIPs_,
seedCutSN_,
subclusterCutMIPs_,
subclusterCutSN_);
peakFilter = pf.apply(cluster.amplitudes(), test);

ff.push_back(SiStripApproximateCluster(cluster, maxNSat, hitPredPos, peakFilter));
}
}
}

Expand Down