diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx index 4590f6f8569550719f8982c5cc45423664cc2f40..a8d2646de412238a8f791a50f9fc91e6e9076f74 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysValMonitoringTool.cxx @@ -444,8 +444,10 @@ InDetPhysValMonitoringTool::fillHistograms() { std::vector< const xAOD::TrackParticle* > bestTrack; int SiSPweight(0), TRTSeededweight(0), TRTStandaloneweight(0), other_weight(0); double truth_charge = thisTruth->charge(); + double prod_rad = 0.; const xAOD::TruthVertex* vtx = thisTruth->prodVtx(); - double prod_rad = vtx->perp(); + if (vtx) + prod_rad = vtx->perp(); double best_match = -1; for(const auto& thisTrack: selectedTracks){ double track_charge = thisTrack->charge();