66 for (
size_t h = 0;
h <
cl.second.
size(); ++
h)
82 TVector2 p1 = hits[0].GetPointCm();
84 for (
size_t i = 0; i < hits.size(); ++i)
85 if (
pma::Dist2(hits[0].GetPointCm(), hits[i].GetPointCm()) < 1.0)
91 TVector2 p2 = hits[id].GetPointCm();
92 TVector2
dir = (p2 - p1) * (1 / (p2 - p1).Mod());
100 std::map<size_t, std::vector<dunefd::Hit2D> > chosen;
109 chosen[
cl.first] =
cl.second;
126 const double thrdist = 10;
130 std::tie(larStart,larEnd) =
trk->Direction<TVector3>();
131 TVector3
dir(larStart[0], larStart[1], larStart[2]);
133 if (!
trk->NumberTrajectoryPoints())
continue;
134 TVector3 pos_p =
trk->LocationAtPoint<TVector3>(0);
135 TVector3 pos_end =
trk->LocationAtPoint<TVector3>(
trk->NumberTrajectoryPoints()-1);
143 if ((cos > maxcos) && (dist < thrdist))
std::vector< dunefd::Hit2D > fCl
double Dist2(const TVector2 &v1, const TVector2 &v2)
Hit2D(TVector2 point2d, size_t key)
std::vector< art::Ptr< recob::Track > > fSelTrks
IniSegAlg(std::map< size_t, std::vector< dunefd::Hit2D > > clusters)
std::map< size_t, std::vector< dunefd::Hit2D > > fClusters
void FeedwithMc(TVector2 const &vtx, TVector2 const &dir, TVector3 const &dir3d)
art::Ptr< recob::Track > fTrk
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
TVector2 ClusterDir(std::vector< Hit2D > const &hits)
std::map< size_t, std::vector< dunefd::Hit2D > > fSelCls