Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate FED25 handling in electron online reconstruction #43555

Merged
merged 2 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions RecoEgamma/EgammaElectronAlgos/src/TrajSeedMatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ int TrajSeedMatcher::getNrValidLayersAlongTraj(const DetId& hitId, const Traject
bool TrajSeedMatcher::layerHasValidHits(const DetLayer& layer,
const TrajectoryStateOnSurface& hitSurState,
const Propagator& propToLayerFromState) const {
//FIXME: do not hardcode with werid magic numbers stolen from ancient tracking code
//FIXME: do not hardcode with weird magic numbers stolen from ancient tracking code
//its taken from https://cmssdt.cern.ch/dxr/CMSSW/source/RecoTracker/TrackProducer/interface/TrackProducerBase.icc#165
//which inspires this code
Chi2MeasurementEstimator estimator(30., -3.0, 0.5, 2.0, 0.5, 1.e12); // same as defauts....
Expand All @@ -353,7 +353,8 @@ bool TrajSeedMatcher::layerHasValidHits(const DetLayer& layer,
else {
DetId id = detWithState.front().first->geographicalId();
MeasurementDetWithData measDet = measTkEvt_.idToDet(id);
if (measDet.isActive())
//Below, measDet.hasBadComponents handles the check that a Pixel module has or not errors like FED25
if (measDet.isActive() && !measDet.hasBadComponents(detWithState.front().second))
return true;
else
return false;
Expand Down
11 changes: 8 additions & 3 deletions RecoTracker/MeasurementDet/plugins/TkPixelMeasurementDet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,19 +153,24 @@ bool TkPixelMeasurementDet::hasBadComponents(const TrajectoryStateOnSurface& tso
return false;

auto lp = tsos.localPosition();
auto le = tsos.localError().positionError();
float xx = 0.;
float yy = 0.;
if (tsos.hasError()) {
xx = tsos.localError().positionError().xx();
yy = tsos.localError().positionError().yy();
}
rappoccio marked this conversation as resolved.
Show resolved Hide resolved
for (auto const& broc : badRocPositions_) {
auto dx = std::abs(broc.x() - lp.x()) - theRocWidth;
auto dy = std::abs(broc.y() - lp.y()) - theRocHeight;
if ((dx <= 0.f) & (dy <= 0.f))
return true;
if ((dx * dx < 9.f * le.xx()) && (dy * dy < 9.f * le.yy()))
if ((dx * dx < 9.f * xx) && (dy * dy < 9.f * yy))
return true;
}

if (badFEDChannelPositions == nullptr)
return false;
float dx = 3.f * std::sqrt(le.xx()) + theRocWidth, dy = 3.f * std::sqrt(le.yy()) + theRocHeight;
float dx = 3.f * std::sqrt(xx) + theRocWidth, dy = 3.f * std::sqrt(yy) + theRocHeight;
for (auto const& p : *badFEDChannelPositions) {
if (lp.x() > (p.first.x() - dx) && lp.x() < (p.second.x() + dx) && lp.y() > (p.first.y() - dy) &&
lp.y() < (p.second.y() + dy)) {
Expand Down