Skip to content

Commit

Permalink
Merge pull request #36451 from mmusich/overlapValidationHotFix_121x
Browse files Browse the repository at this point in the history
[12.1.X] `OverlapValidation`: bugfix to `esConsumes` migration
  • Loading branch information
cmsbuild authored Dec 12, 2021
2 parents 36ea799 + e5a229f commit 5d743d3
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Alignment/OfflineValidation/plugins/OverlapValidation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ class OverlapValidation : public edm::one::EDAnalyzer<> {
void analyze(const edm::Event&, const edm::EventSetup&) override;
void endJob() override;

virtual void analyze(const Trajectory&, const Propagator&, TrackerHitAssociator&, const TrackerTopology* const tTopo);
virtual void analyzeTrajectory(const Trajectory&,
const Propagator&,
TrackerHitAssociator&,
const TrackerTopology* const tTopo);
int layerFromId(const DetId&, const TrackerTopology* const tTopo) const;

// ----------member data ---------------------------
Expand Down Expand Up @@ -292,7 +295,7 @@ void OverlapValidation::analyze(const edm::Event& iEvent, const edm::EventSetup&
//
// mag field & search tracker
//
const MagneticField* magField_ = &iSetup.getData(magFieldToken_);
magField_ = &iSetup.getData(magFieldToken_);
//
// propagator
//
Expand Down Expand Up @@ -326,16 +329,16 @@ void OverlapValidation::analyze(const edm::Event& iEvent, const edm::EventSetup&
// loop over trajectories from refit
const TrackerTopology* const tTopo = &iSetup.getData(topoToken_);
for (const auto& trajectory : *trajectoryCollection)
analyze(trajectory, propagator, *associator, tTopo);
analyzeTrajectory(trajectory, propagator, *associator, tTopo);

run_ = iEvent.id().run();
event_ = iEvent.id().event();
}

void OverlapValidation::analyze(const Trajectory& trajectory,
const Propagator& propagator,
TrackerHitAssociator& associator,
const TrackerTopology* const tTopo) {
void OverlapValidation::analyzeTrajectory(const Trajectory& trajectory,
const Propagator& propagator,
TrackerHitAssociator& associator,
const TrackerTopology* const tTopo) {
typedef std::pair<const TrajectoryMeasurement*, const TrajectoryMeasurement*> Overlap;
typedef vector<Overlap> OverlapContainer;
++overlapCounts_[0];
Expand Down

0 comments on commit 5d743d3

Please sign in to comment.