diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonSFTestHelper.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonSFTestHelper.cxx index f79401d6fe905d7c4ac3801ef6021c39bbe57d22..34fb5811805a110fd59d823411d20ec73686c1a6 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonSFTestHelper.cxx +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonSFTestHelper.cxx @@ -86,9 +86,12 @@ namespace TestMuonSF { MuonSFBranches::MuonSFBranches(TTree* tree, const ToolHandle<CP::IMuonEfficiencyScaleFactors> &handle, const std::string& rel_name) : MuonEffiBranches(tree), m_handle(handle), - m_uncorrelate_sys(dynamic_cast<const CP::MuonEfficiencyScaleFactors*>(handle.operator->())->uncorrelate_sys()), m_release(rel_name), - m_SFs() { + m_SFs() + { + auto mesf = dynamic_cast<const CP::MuonEfficiencyScaleFactors*>(handle.operator->()); + if (!mesf) std::abort(); + m_uncorrelate_sys = mesf->uncorrelate_sys(); } CP::CorrectionCode MuonSFBranches::fill(const xAOD::Muon& muon) { /// Only the raw systematic sets have been activated