File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2080,11 +2080,13 @@ void CAFMaker::produce(art::Event& evt) noexcept {
20802080
20812081 if (vertex != NULL ) {
20822082 auto const & tpcID = geom->FindTPCAtPosition (vertex->position ());
2083- for (geo::PlaneID const & p : wireReadout.Iterate <geo::PlaneID>()) {
2084- auto const & planeID = geo::PlaneID{tpcID, p.Plane };
2085- const geo::PlaneGeo& planeGeo = wireReadout.Plane (planeID);
2086- vtx_wire[p.Plane ] = planeGeo.WireCoordinate (vertex->position ()); // /< wire projection
2087- vtx_tick[p.Plane ] = dprop.ConvertXToTicks (vertex->position ().X (), planeID); // /< drift projection
2083+ if (tpcID.isValid ) {
2084+ for (geo::PlaneID const & p : wireReadout.Iterate <geo::PlaneID>()) {
2085+ auto const & planeID = geo::PlaneID{tpcID, p.Plane };
2086+ const geo::PlaneGeo& planeGeo = wireReadout.Plane (planeID);
2087+ vtx_wire[p.Plane ] = planeGeo.WireCoordinate (vertex->position ()); // /< wire projection
2088+ vtx_tick[p.Plane ] = dprop.ConvertXToTicks (vertex->position ().X (), planeID); // /< drift projection
2089+ }
20882090 }
20892091 }
20902092
You can’t perform that action at this time.
0 commit comments