Skip to content

Commit

Permalink
Avoid short-circuiting ESWatchers in ElectronSeedGenerator
Browse files Browse the repository at this point in the history
Be sure to call check for all ESWatchers for each event.
  • Loading branch information
Dr15Jones committed Dec 12, 2022
1 parent d2b40c9 commit 2b62829
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion RecoEgamma/EgammaElectronAlgos/src/ElectronSeedGenerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ ElectronSeedGenerator::ElectronSeedGenerator(const edm::ParameterSet &pset,
useRecoVertex_) {}

void ElectronSeedGenerator::setupES(const edm::EventSetup &setup) {
if (magneticFieldWatcher_.check(setup) || trackerGeometryWatcher_.check(setup)) {
auto newMagField = magneticFieldWatcher_.check(setup);
auto newTrackerGeom = trackerGeometryWatcher_.check(setup);
if (newMagField || newTrackerGeom) {
matcher_.setES(setup.getData(magFieldToken_), setup.getData(trackerGeometryToken_));
}
}
Expand Down

0 comments on commit 2b62829

Please sign in to comment.