14 #ifndef RECO_CLUSTER3D_H
15 #define RECO_CLUSTER3D_H
22 #include <unordered_map>
26 namespace recob {
class Hit; }
122 unsigned int statusBits,
123 const Eigen::Vector3f& position,
129 float overlapFraction,
130 float chargeAsymmetry,
134 const std::vector<float>& hitDelTSigVec,
135 const std::vector<geo::WireID>& wireIDVec);
140 unsigned int statusBits,
141 const Eigen::Vector3f& position,
147 float overlapFraction,
148 float chargeAsymmetry,
152 const std::vector<float>& hitDelTSigVec,
153 const std::vector<geo::WireID>& wireIDVec);
277 const float* startPosition,
278 const float* endPosition,
343 using EdgeTuple = std::tuple<const reco::ClusterHit3D*,const reco::ClusterHit3D*,double>;
346 using Hit3DToEdgeMap = std::unordered_map<const reco::ClusterHit3D*, reco::EdgeList>;
460 for(
const auto& hit2D : hit3D->
getHits())
468 for(
const auto& hit2D : hit3D->getHits())
514 #endif //RECO_CLUSTER3D_H
void initialize(size_t id, unsigned int statusBits, const Eigen::Vector3f &position, float totalCharge, float avePeakTime, float deltaPeakTime, float sigmaPeakTime, float hitChiSquare, float overlapFraction, float chargeAsymmetry, float docaToAxis, float arclenToPoca, const ClusterHit2DVec &hitVec, const std::vector< float > &hitDelTSigVec, const std::vector< geo::WireID > &wireIDVec)
Hit contains 2D hit from view 2 (w plane)
reco::HitPairListPtr & getBestHitPairListPtr()
void setHit(const recob::Hit *hit)
std::map< int, HitPairListPtr > HitPairClusterMap
PrincipalComponents m_pcaResults
Output of the prinicipal componenets analysis.
reco::ConvexHullKinkTupleList fConvexHullKinkPoints
The points with large kinks along the convex hull.
void setAveHitDoca(double doca) const
float fDeltaPeakTime
Largest delta peak time of associated recob::Hits.
void setWireID(const geo::WireID &wid) const
reco::HitPairListPtr fBestHitPairListPtr
std::list< const reco::ClusterHit2D * > Hit2DListPtr
export some data structure definitions
bool m_svdOK
SVD Decomposition was successful.
Cluster3D operator+(Cluster3D)
std::list< reco::ClusterHit3D > HitPairList
dcel2d::HalfEdgeList fHalfEdgeList
unsigned m_statusBits
Default constructor.
reco::PrincipalComponents fSkeletonPCA
float getTotalCharge() const
void clearStatusBits(unsigned bits) const
float getTimeTicks() const
float fTotalCharge
Sum of charges of all associated recob::Hits.
void flipAxis(size_t axis)
std::list< HalfEdge > HalfEdgeList
double m_aveHitDoca
Average doca of hits used in PCA.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
const Eigen::Vector3f getPosition() const
std::list< ProjectedPoint > ProjectedPointList
3D hit has 2D hits shared between clusters
void setArcLenToPoca(float poca) const
const bool operator<(const reco::ClusterHit3D &other) const
reco::PrincipalComponents & getSkeletonPCA()
Hit labelled outlier in PCA.
void clearStatusBits(unsigned bits) const
The data type to uniquely identify a Plane.
void setArclenToPoca(double poca) const
const geo::WireID & WireID() const
void setDocaToAxis(double doca) const
reco::Hit2DToHit3DListMap & getHit2DToHit3DListMap()
const float * getStartPosition() const
unsigned m_statusBits
Volatile status information of this 3D hit.
dcel2d::VertexList fVertexList
Hit is an "edge" hit.
size_t fID
"id" of this hit (useful for indexing)
Labelled "noise" by a clustering algorithm.
const std::vector< float > getHitDelTSigVec() const
reco::ConvexHull fConvexHull
float getTotalCharge() const
Hit has been rejected for any reason.
reco::EdgeList & getBestEdgeList()
Hit contains 2D hit from view 0 (u plane)
int getNumHitsUsed() const
reco::Hit3DToEdgeMap & getHit3DToEdgeMap()
std::list< HitPairListPtr > HitPairListPtrList
A utility class used in construction of 3D clusters.
reco::HitPairListPtr & getHitPairListPtr()
float getSigmaPeakTime() const
float fSigmaPeakTime
Quad sum of peak time sigmas.
float m_docaToAxis
DOCA of hit at POCA to associated cluster axis.
friend bool operator<(const ClusterHit2D &a, const ClusterHit2D &b)
reco::PlaneToClusterParamsMap & getClusterParams()
float fAvePeakTime
Average peak time of all associated recob::Hits.
float getOverlapFraction() const
reco::Hit3DToEdgeMap fHit3DToEdgeMap
unsigned int getStatusBits() const
const bool operator==(const reco::ClusterHit3D &other) const
float getDocaToAxis() const
friend bool operator<(const Cluster3D &a, const Cluster3D &b)
const recob::Hit * getHit() const
Hit has been used in Cluster Splitting MST.
std::unordered_map< const reco::ClusterHit2D *, HitPairSetPtr > Hit2DToHit3DSetMap
IDparameter< geo::PlaneID > PlaneID
Member type of validated geo::PlaneID parameter.
unsigned getStatusBits() const
std::vector< geo::WireID > fWireIDVector
Wire ID's for the planes making up hit.
ClusterParametersList & daughterList()
float getAvePeakTime() const
float getDocaToAxis() const
const float * getEndPosition() const
std::vector< float > fHitDelTSigVec
Delta t of hit to matching pair / sig.
std::pair< const reco::ClusterHit3D *, reco::EdgeList > Hit3DToEdgePair
std::list< EdgeTuple > EdgeList
EigenValues m_eigenValues
Eigen values from SVD decomposition.
Point is on primary cluster convex hull.
ClusterParametersList fClusterParameters
const recob::Hit * m_hit
Hit we are augmenting.
const EigenValues & getEigenValues() const
process_name standard_reco_uboone reco
PlaneToClusterParamsMap fClusterParams
reco::PrincipalComponents & getFullPCA()
reco::Hit3DToEdgeMap & getConvexHullEdgeMap()
float getChargeAsymmetry() const
float m_arcLenToPoca
arc length to POCA along cluster axis
std::list< Face > FaceList
float m_totalCharge
Total charge in the cluster.
Eigen::Vector3f EigenValues
unsigned int fStatusBits
Volatile status information of this 3D hit.
reco::ProjectedPointList & getConvexHullExtremePoints()
float m_timeTicks
The time (in ticks) for this hit.
reco::ConvexHullKinkTupleList & getConvexHullKinkPoints()
Define a container for working with the convex hull.
std::unordered_map< const reco::ClusterHit2D *, reco::HitPairListPtr > Hit2DToHit3DListMap
const Eigen::Vector3f & getAvePosition() const
float fOverlapFraction
Hit overlap fraction start/stop of triplet.
void clearStatusBits(unsigned bits) const
reco::EdgeList fBestEdgeList
Hit contains 2D hit from view 1 (v plane)
Path checking algorithm has seen this hit.
std::list< ConvexHullKinkTuple > ConvexHullKinkTupleList
float m_endPosition[3]
"end" position for cluster
Eigen::Vector3f m_avePosition
Average position of hits fed to PCA.
std::tuple< const reco::ClusterHit3D *, const reco::ClusterHit3D *, double > EdgeTuple
std::list< const reco::ClusterHit3D * > HitPairListPtr
void UpdateParameters(const reco::ClusterHit2D *hit)
void setDocaToAxis(float doca) const
float getXPosition() const
reco::Hit2DToHit3DListMap fHit2DToHit3DListMap
float fHitChiSquare
Hit ChiSquare relative to the average time.
PlaneID_t Plane
Index of the plane within its TPC.
float fDocaToAxis
DOCA to the associated cluster axis.
std::pair< reco::ClusterParameters *, HitPairSetPtr > ClusterToHitPairSetPair
Definition of data types for geometry description.
friend bool operator<(const ClusterParameters &a, const ClusterParameters &b)
reco::EdgeList fConvexHullEdgeList
An edge list translated back to 3D hits.
std::vector< const reco::ClusterHit2D * > ClusterHit2DVec
std::tuple< ProjectedPoint, Eigen::Vector2f, Eigen::Vector2f > ConvexHullKinkTuple
Point plus edges that point to it.
Is a convex hull extreme point.
std::pair< reco::PrincipalComponents, reco::HitPairClusterMap::iterator > PCAHitPairClusterMapPair
reco::ConvexHull & getConvexHull()
reco::ProjectedPointList fConvexHullPointList
The points on the convex hull.
reco::Hit3DToEdgeMap fConvexHullEdgeMap
Map from 3D hit to associated edge.
ClusterHit2DVec & getHits()
void setID(const size_t &id) const
bool bitsAreSet(const unsigned int &bitsToCheck) const
const PrincipalComponents & getPcaResults() const
float fChargeAsymmetry
Assymetry of average of two closest to third charge.
const float getAveHitDoca() const
float m_startPosition[3]
"start" position for cluster (world coordinates)
Hit has been made into Space Point.
dcel2d::FaceList & getFaceList()
ClusterHit2DVec fHitVector
Hits comprising this 3D hit.
float fArclenToPoca
arc length along axis to DOCA point
geo::WireID m_wireID
Keep track this particular hit's wireID.
const std::vector< geo::WireID > & getWireIDs() const
Eigen::Matrix3f EigenVectors
Hit is part of Seed for track fits.
float getArclenToPoca() const
std::map< size_t, RecobClusterParameters > PlaneToClusterParamsMap
float getDeltaPeakTime() const
int m_clusterIdx
ID for this cluster.
std::unordered_map< const reco::ClusterHit2D *, ClusterToHitPairSetMap > Hit2DToClusterMap
reco::ProjectedPointList fProjectedPointList
The input set of points projected onto plane encompassed by the hull.
Skeleton hit position averaged.
ClusterParameters(reco::HitPairClusterMap::iterator &mapItr)
reco::PrincipalComponents fFullPCA
ClusterHit2DVec m_hitVector
dcel2d::FaceList fFaceList
2D representation of charge deposited in the TDC/wire plane
friend bool operator<(const PrincipalComponents &a, const PrincipalComponents &b)
EigenVectors m_eigenVectors
The three principle axes.
float getHitChiSquare() const
float m_xPosition
The x coordinate for this hit.
std::unordered_map< const reco::ClusterHit3D *, reco::EdgeList > Hit3DToEdgeMap
"visited" by a clustering algorithm
reco::ProjectedPointList & getConvexHullPointList()
Hit is a "skeleton" hit.
reco::ProjectedPointList & getProjectedPointList()
friend std::ostream & operator<<(std::ostream &o, const ClusterHit2D &c)
void setStatusBit(unsigned bits) const
std::unordered_map< reco::ClusterParameters *, HitPairSetPtr > ClusterToHitPairSetMap
reco::EdgeList & getConvexHullEdgeList()
const ClusterHit2DVec & getHits() const
std::tuple< float, float, const reco::ClusterHit3D * > ProjectedPoint
Projected coordinates and pointer to hit.
ClusterParameters(reco::HitPairListPtr &hitList)
void setPosition(const Eigen::Vector3f &pos) const
dcel2d::HalfEdgeList & getHalfEdgeList()
std::list< Vertex > VertexList
reco::HitPairListPtr fHitPairListPtr
int getClusterIdx() const
std::list< ClusterParameters > ClusterParametersList
void UpdateParameters(const reco::ClusterHit2D *hit)
const EigenVectors & getEigenVectors() const
friend std::ostream & operator<<(std::ostream &o, const Cluster3D &c)
void addHit3D(const reco::ClusterHit3D *hit3D)
dcel2d::VertexList & getVertexList()
std::set< const reco::ClusterHit3D * > HitPairSetPtr
Eigen::Vector3f fPosition
position of this hit combination in world coordinates
friend std::ostream & operator<<(std::ostream &o, const ClusterHit3D &c)
float getArcLenToPoca() const
void fillHit2DToHit3DListMap()
reco::ProjectedPointList fConvexHullExtremePoints
The points furthest from each other on hull.
unsigned getStatusBits() const
void setStatusBit(unsigned bits) const
void setStatusBit(unsigned bits) const
int m_numHitsUsed
Number of hits in the decomposition.
friend std::ostream & operator<<(std::ostream &o, const PrincipalComponents &a)