Skip to content

Commit

Permalink
Merge pull request #46752 from martinamalberti/mm_fixHitPositionTrack…
Browse files Browse the repository at this point in the history
…Extender

MTD reconstruction: save correct outermost hit position also for tracks w/o last hit in mtd
  • Loading branch information
cmsbuild authored Dec 2, 2024
2 parents 3be60c7 + 550e9be commit 81e5ef6
Showing 1 changed file with 11 additions and 3 deletions.
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

0 comments on commit 81e5ef6

Please sign in to comment.