13 #ifndef MergeCluster_h
14 #define MergeCluster_h
17 #include "art/Framework/Services/Registry/ServiceHandle.h"
18 #include "art_root_io/TFileService.h"
19 #include "canvas/Persistency/Common/Ptr.h"
20 #include "canvas/Persistency/Common/PtrVector.h"
21 namespace fhicl {
class ParameterSet; }
26 namespace geo {
struct WireID; }
36 class MergeClusterAlg;
44 void FindClusterEndPoints(art::PtrVector<recob::Hit>
const&
cluster, TVector2
const& centre, TVector2
const& direction, TVector2& start, TVector2&
end)
const;
45 double FindClusterOverlap(TVector2
const& direction, TVector2
const& centre, TVector2
const& start1, TVector2
const& end1, TVector2
const& start2, TVector2
const& end2)
const;
46 double FindCrossingDistance(TVector2
const &direction1, TVector2
const ¢re1, TVector2
const&direction2, TVector2
const ¢re2)
const;
47 double FindMinSeparation(art::PtrVector<recob::Hit>
const &cluster1, art::PtrVector<recob::Hit>
const &cluster2)
const;
48 double FindProjectedWidth(TVector2
const& centre1, TVector2
const& start1, TVector2
const& end1, TVector2
const& centre2, TVector2
const& start2, TVector2
const& end2)
const;
53 bool PassCuts(
double const&
angle,
double const& crossingDistance,
double const& projectedWidth,
double const& separation,
double const&
overlap,
double const& longLength)
const;
63 art::ServiceHandle<geo::Geometry const>
fGeom;
64 art::ServiceHandle<art::TFileService const>
tfs;
MergeClusterAlg(fhicl::ParameterSet const &pset)
std::map< int, int > trueClusterMap
art::ServiceHandle< geo::Geometry const > fGeom
Declaration of signal hit object.
void FindClusterEndPoints(art::PtrVector< recob::Hit > const &cluster, TVector2 const ¢re, TVector2 const &direction, TVector2 &start, TVector2 &end) const
art::ServiceHandle< art::TFileService const > tfs
void reconfigure(fhicl::ParameterSet const &p)
double FindClusterOverlap(TVector2 const &direction, TVector2 const ¢re, TVector2 const &start1, TVector2 const &end1, TVector2 const &start2, TVector2 const &end2) const
int MergeClusters(std::vector< art::PtrVector< recob::Hit > > const &planeClusters, std::vector< art::PtrVector< recob::Hit > > &clusters) const
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
IDparameter< geo::WireID > WireID
Member type of validated geo::WireID parameter.
bool PassCuts(double const &angle, double const &crossingDistance, double const &projectedWidth, double const &separation, double const &overlap, double const &longLength) const
auto end(FixedBins< T, C > const &) noexcept
double fProjWidthThreshold
TVector2 HitCoordinates(art::Ptr< recob::Hit > const &hit) const
double FindMinSeparation(art::PtrVector< recob::Hit > const &cluster1, art::PtrVector< recob::Hit > const &cluster2) const
double FindCrossingDistance(TVector2 const &direction1, TVector2 const ¢re1, TVector2 const &direction2, TVector2 const ¢re2) const
finds tracks best matching by angle
double GlobalWire(geo::WireID const &wireID) const
double FindProjectedWidth(TVector2 const ¢re1, TVector2 const &start1, TVector2 const &end1, TVector2 const ¢re2, TVector2 const &start2, TVector2 const &end2) const
unsigned int fMinMergeClusterSize
art framework interface to geometry description
double fMaxMergeSeparation