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

[14_2_X backport]: MTD reconstruction: save correct outermost hit position also for tracks w/o last hit in mtd #46849

Merged
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
14 changes: 11 additions & 3 deletions RecoMTD/TrackExtender/plugins/TrackExtenderWithMTD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,8 @@ class TrackExtenderWithMTDT : public edm::stream::EDProducer<> {
const bool useSimVertex_;
const float dzCut_;
const float bsTimeSpread_;

static constexpr float trackMaxBtlEta_ = 1.5;
};

template <class TrackCollection>
Expand Down Expand Up @@ -1004,9 +1006,15 @@ void TrackExtenderWithMTDT<TrackCollection>::produce(edm::Event& ev, const edm::
#endif
npixBarrel.push_back(backtrack.hitPattern().numberOfValidPixelBarrelHits());
npixEndcap.push_back(backtrack.hitPattern().numberOfValidPixelEndcapHits());
outermostHitPosition.push_back(
mBTL.hit ? (float)(*track).outerRadius()
: (float)(*track).outerZ()); // save R of the outermost hit for BTL, z for ETL.

if (mBTL.hit || mETL.hit) {
outermostHitPosition.push_back(
mBTL.hit ? (float)(*track).outerRadius()
: (float)(*track).outerZ()); // save R of the outermost hit for BTL, z for ETL.
} else {
outermostHitPosition.push_back(std::abs(track->eta()) < trackMaxBtlEta_ ? (float)(*track).outerRadius()
: (float)(*track).outerZ());
}

LogTrace("TrackExtenderWithMTD") << "TrackExtenderWithMTD: tmtd " << tmtdMap << " +/- " << sigmatmtdMap
<< " t0 " << t0Map << " +/- " << sigmat0Map << " tof pi/K/p " << tofpiMap
Expand Down