@@ -55,9 +55,7 @@ namespace BlipUtils {
5555 pinfo.pathLength = PathLength ( part, pinfo.startPoint , pinfo.endPoint );
5656
5757 // Central position of trajectory
58- pinfo.Position .SetXYZ (0.5 *(pinfo.startPoint .X ()+pinfo.endPoint .X ()),
59- 0.5 *(pinfo.startPoint .Y ()+pinfo.endPoint .Y ()),
60- 0.5 *(pinfo.startPoint .Z ()+pinfo.endPoint .Z ()) );
58+ pinfo.Position = geo::vect::middlePoint ({ pinfo.startPoint , pinfo.endPoint });
6159
6260 // Energy/charge deposited by this particle, found using SimEnergyDeposits
6361 pinfo.depEnergy = 0 ;
@@ -200,7 +198,7 @@ namespace BlipUtils {
200198 // check that the times are similar (we don't want to merge
201199 // together a blip that happened much later but in the same spot)
202200 if ( fabs (blip_i.Time - blip_j.Time ) > 5 ) continue ;
203- float d = TMath::Sqrt (( blip_i.Position -blip_j.Position ).Mag2 ());
201+ float d = ( blip_i.Position -blip_j.Position ).R (); // Size of vector spanning two blips
204202 if ( d < dmin ) {
205203 isGrouped.at (j) = true ;
206204 // float totE = blip_i.Energy + blip_j.Energy;
@@ -381,7 +379,7 @@ namespace BlipUtils {
381379 // ------------------------------------------------
382380 // / Look for valid wire intersections between
383381 // central-most hits in each cluster
384- std::vector<TVector3 > wirex;
382+ std::vector<geo::Point_t > wirex;
385383 for (size_t i=0 ; i<hcs.size (); i++) {
386384 int pli = hcs[i].Plane ;
387385 auto const & planegeo = wireReadoutGeom->Get ().Plane (geo::PlaneID{(unsigned int )hcs[i].Cryostat , (unsigned int )hcs[i].TPC , (unsigned int )hcs[i].Plane });
@@ -410,7 +408,7 @@ namespace BlipUtils {
410408 }
411409
412410 if ( match3d ) {
413- TVector3 a ( 0 ., intsec_p.Y (), intsec_p.Z ()) ;
411+ geo::Point_t a{ 0 ., intsec_p.Y (), intsec_p.Z ()} ;
414412 wirex.push_back (a);
415413 newblip.clusters [pli] = hcs[i];
416414 newblip.clusters [plj] = hcs[j];
0 commit comments