diff --git a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/PhysValBTag.cxx b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/PhysValBTag.cxx index 06e2da902ff02d54731553f0010efb92e4957160..d5246d09f0d34cd56e76ced45187d52c1ffbac50 100644 --- a/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/PhysValBTag.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagValidation/JetTagDQA/src/PhysValBTag.cxx @@ -365,11 +365,10 @@ namespace JetTagDQA { // also loop over the tracks associated to the MSV vertices -> can be missing in the other track list // get the MSV vertices - std::vector< ElementLink< xAOD::VertexContainer > > MSV_vertices; static const SG::ConstAccessor<std::vector< ElementLink< xAOD::VertexContainer > > > MSV_verticesAcc("MSV_vertices"); - try { MSV_vertices = MSV_verticesAcc(*btag); } - catch(std::exception& exception) { } + std::vector< ElementLink< xAOD::VertexContainer > > MSV_vertices = + MSV_verticesAcc.withDefault(*btag, std::vector< ElementLink< xAOD::VertexContainer > >()); // loop over the MSV vertices for (unsigned int i = 0; i < MSV_vertices.size(); i++) {