File tree Expand file tree Collapse file tree
simulation/g4simulation/g4eval Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -562,12 +562,21 @@ void SvtxEvaluator::fillOutputNtuples(PHCompositeNode *topNode) {
562562 float vy = vertex -> get_y ();
563563 float vz = vertex -> get_z ();
564564 float ntracks = vertex -> size_tracks ();
565- float gvx = point -> get_x ();
566- float gvy = point -> get_y ();
567- float gvz = point -> get_z ();
565+
566+ float gvx = NAN ;
567+ float gvy = NAN ;
568+ float gvz = NAN ;
568569 float gntracks = truthinfo -> GetNumPrimaryVertexParticles ();
569- float nfromtruth = vertexeval -> get_ntracks_contribution (vertex ,point );
570-
570+ float nfromtruth = NAN ;
571+
572+ if (point ) {
573+ gvx = point -> get_x ();
574+ gvy = point -> get_y ();
575+ gvz = point -> get_z ();
576+ gntracks = truthinfo -> GetNumPrimaryVertexParticles ();
577+ nfromtruth = vertexeval -> get_ntracks_contribution (vertex ,point );
578+ }
579+
571580 float vertex_data [10 ] = {_ievent ,
572581 vx ,
573582 vy ,
You can’t perform that action at this time.
0 commit comments