Skip to content

Commit 1cec7c3

Browse files
committed
do not fill hd0Vs* when it's not booked
1 parent 4eb6ddc commit 1cec7c3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Alignment/OfflineValidation/plugins/GeneralPurposeTrackAnalyzer.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -710,9 +710,12 @@ class GeneralPurposeTrackAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchR
710710
hd0PV->Fill(100);
711711
hdzPV->Fill(100);
712712

713-
hd0vsphi->Fill(track->phi(), -track->dxy());
714-
hd0vseta->Fill(track->eta(), -track->dxy());
715-
hd0vspt->Fill(track->pt(), -track->dxy());
713+
// gotta protect the case in which it's not comsics, but the handle is invalid! (HLT)
714+
if (isCosmics_) {
715+
hd0vsphi->Fill(track->phi(), -track->dxy());
716+
hd0vseta->Fill(track->eta(), -track->dxy());
717+
hd0vspt->Fill(track->pt(), -track->dxy());
718+
}
716719
}
717720

718721
if (DEBUG) {

0 commit comments

Comments
 (0)