LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
Cluster3D.h
Go to the documentation of this file.
1 
14 #ifndef RECO_CLUSTER3D_H
15 #define RECO_CLUSTER3D_H
16 
17 #include <iosfwd>
18 #include <vector>
19 #include <list>
20 #include <set>
21 #include <map>
22 #include <unordered_map>
23 #include <memory>
24 
28 
29 // Eigen
30 #include <Eigen/Dense>
31 
32 namespace reco {
33 
34 // First define a container object to augment the sparse 2D hit information
36 {
37 public:
38 
39  ClusterHit2D(); // Default constructor
40 
41 private:
42 
43  mutable unsigned m_statusBits;
44  mutable float m_docaToAxis;
45  mutable float m_arcLenToPoca;
46  float m_xPosition;
47  float m_timeTicks;
48  const recob::Hit* m_hit;
49 
50 public:
51 
52  enum StatusBits { SHAREDINPAIR = 0x00080000,
53  SHAREDINTRIPLET = 0x00040000,
54  USEDINPAIR = 0x00008000,
55  USEDINTRIPLET = 0x00004000,
56  SHAREDINCLUSTER = 0x00000200,
57  USEDINCLUSTER = 0x00000100,
58  USED = 0x00000001
59  };
60 
61  ClusterHit2D(unsigned statusBits,
62  float doca,
63  float poca,
64  float xPosition,
65  float timeTicks,
66  const recob::Hit& recobHit);
67 
68  unsigned getStatusBits() const {return m_statusBits;}
69  float getDocaToAxis() const {return m_docaToAxis;}
70  float getArcLenToPoca() const {return m_arcLenToPoca;}
71  float getXPosition() const {return m_xPosition;}
72  float getTimeTicks() const {return m_timeTicks;}
73  const recob::Hit& getHit() const {return *m_hit;}
74 
75  void setStatusBit(unsigned bits) const {m_statusBits |= bits;}
76  void clearStatusBits(unsigned bits) const {m_statusBits &= ~bits;}
77  void setDocaToAxis(float doca) const {m_docaToAxis = doca;}
78  void setArcLenToPoca(float poca) const {m_arcLenToPoca = poca;}
79 
80  friend std::ostream& operator << (std::ostream& o, const ClusterHit2D& c);
81  friend bool operator < (const ClusterHit2D & a, const ClusterHit2D & b);
82 
83 };
84 
85 using ClusterHit2DVec = std::vector<const reco::ClusterHit2D*>;
86 
87 // Now define an object with the recob::Hit information that will comprise the 3D cluster
89 {
90 public:
91 
92  enum StatusBits { REJECTEDHIT = 0x80000000,
93  SKELETONHIT = 0x10000000,
94  EDGEHIT = 0x20000000,
95  SEEDHIT = 0x40000000,
96  MADESPACEPOINT = 0x08000000,
97  CONVEXHULLVTX = 0x04000000,
98  EXTREMEPOINT = 0x02000000,
99  SKELETONPOSAVE = 0x00100000,
100  CLUSTERVISITED = 0x00008000,
101  CLUSTERNOISE = 0x00004000,
102  CLUSTERATTACHED = 0x00002000,
103  CLUSTERSHARED = 0x00001000,
104  PATHCHECKED = 0x00000800,
105  SELECTEDBYMST = 0x00000100,
106  PCAOUTLIER = 0x00000080,
107  HITINVIEW0 = 0x00000001,
108  HITINVIEW1 = 0x00000002,
109  HITINVIEW2 = 0x00000004
110  };
111 
112 
113  ClusterHit3D(); // Default constructor
114 
115  ClusterHit3D(size_t id,
116  unsigned int statusBits,
117  const float* position,
118  float totalCharge,
119  float avePeakTime,
120  float deltaPeakTime,
121  float sigmaPeakTime,
122  float hitChiSquare,
123  float docaToAxis,
124  float arclenToPoca,
125  const ClusterHit2DVec& hitVec,
126  const std::vector<float>& hitDelTSigVec,
127  const std::vector<geo::WireID>& wireIDVec);
128 
129  ClusterHit3D(const ClusterHit3D&);
130 
131  void initialize(size_t id,
132  unsigned int statusBits,
133  const float* position,
134  float totalCharge,
135  float avePeakTime,
136  float deltaPeakTime,
137  float sigmaPeakTime,
138  float hitChiSquare,
139  float docaToAxis,
140  float arclenToPoca,
141  const ClusterHit2DVec& hitVec,
142  const std::vector<float>& hitDelTSigVec,
143  const std::vector<geo::WireID>& wireIDVec);
144 
145  size_t getID() const {return m_id;}
146  unsigned int getStatusBits() const {return m_statusBits;}
147  const float* getPosition() const {return m_position;}
148  float getX() const {return m_position[0];}
149  float getY() const {return m_position[1];}
150  float getZ() const {return m_position[2];}
151  float getTotalCharge() const {return m_totalCharge;}
152  float getAvePeakTime() const {return m_avePeakTime;}
153  float getDeltaPeakTime() const {return m_deltaPeakTime;}
154  float getSigmaPeakTime() const {return m_sigmaPeakTime;}
155  float getHitChiSquare() const {return m_hitChiSquare;}
156  float getDocaToAxis() const {return m_docaToAxis;}
157  float getArclenToPoca() const {return m_arclenToPoca;}
158  const ClusterHit2DVec& getHits() const {return m_hitVector;}
159  const std::vector<float> getHitDelTSigVec() const {return m_hitDelTSigVec;}
160  const std::vector<geo::WireID>& getWireIDs() const {return m_wireIDVector;}
161 
162  bool bitsAreSet(const unsigned int& bitsToCheck) const {return m_statusBits & bitsToCheck;}
163 
164  void setID(const size_t& id) const {m_id = id;}
165  void setStatusBit(unsigned bits) const {m_statusBits |= bits;}
166  void clearStatusBits(unsigned bits) const {m_statusBits &= ~bits;}
167  void setDocaToAxis(double doca) const {m_docaToAxis = doca;}
168  void setArclenToPoca(double poca) const {m_arclenToPoca = poca;}
169  void setWireID(const geo::WireID& wid) const;
170 
171  void setPosition(const float* pos) const {m_position[0] = pos[0]; m_position[1] = pos[1]; m_position[2] = pos[2];}
172 
173  const bool operator<(const reco::ClusterHit3D& other) const
174  {
175  if (m_position[2] != other.m_position[2]) return m_position[2] < other.m_position[2];
176  else return m_position[0] < other.m_position[0];
177  }
178 
179  const bool operator==(const reco::ClusterHit3D& other) const
180  {
181  return m_id == other.m_id;
182  }
183 
184  friend std::ostream& operator << (std::ostream& o, const ClusterHit3D& c);
185  //friend bool operator < (const ClusterHit3D & a, const ClusterHit3D & b);
186 
187 private:
188 
189  mutable size_t m_id;
190  mutable unsigned int m_statusBits;
191  mutable float m_position[3];
197  mutable float m_docaToAxis;
198  mutable float m_arclenToPoca;
200  mutable std::vector<float> m_hitDelTSigVec;
201  mutable std::vector<geo::WireID> m_wireIDVector;
202 };
203 
204 // We also need to define a container for the output of the PCA Analysis
206 {
207 public:
208 
209  typedef std::vector<std::vector<float>> EigenVectors;
210 
212 
213 private:
214 
215  bool m_svdOK;
217  float m_eigenValues[3];
218  EigenVectors m_eigenVectors;
219  float m_avePosition[3];
220  mutable double m_aveHitDoca;
221 
222 public:
223 
224  PrincipalComponents(bool ok, int nHits, const float* eigenValues, const EigenVectors& eigenVecs, const float* avePos, const float aveHitDoca = 9999.);
225 
226  bool getSvdOK() const {return m_svdOK;}
227  int getNumHitsUsed() const {return m_numHitsUsed;}
228  const float* getEigenValues() const {return m_eigenValues;}
229  const EigenVectors& getEigenVectors() const {return m_eigenVectors;}
230  const float* getAvePosition() const {return m_avePosition;}
231  const float getAveHitDoca() const {return m_aveHitDoca;}
232 
233  void flipAxis(size_t axis);
234  void setAveHitDoca(double doca) const {m_aveHitDoca = doca;}
235 
236  friend std::ostream& operator << (std::ostream & o, const PrincipalComponents& a);
237  friend bool operator < (const PrincipalComponents& a, const PrincipalComponents& b);
238 
239 };
240 
242 {
243 public:
244 
245  Cluster3D();
246 
247 private:
248 
249  mutable unsigned m_statusBits;
252  float m_startPosition[3];
253  float m_endPosition[3];
255 
256 public:
257  Cluster3D(unsigned statusBits,
258  const PrincipalComponents& pcaResults,
259  float totalCharge,
260  const float* startPosition,
261  const float* endPosition,
262  int idx);
263 
264  unsigned getStatusBits() const {return m_statusBits;}
265  const PrincipalComponents& getPcaResults() const {return m_pcaResults;}
266  float getTotalCharge() const {return m_totalCharge;}
267  const float* getStartPosition() const {return m_startPosition;}
268  const float* getEndPosition() const {return m_endPosition;}
269  int getClusterIdx() const {return m_clusterIdx;}
270 
271  void setStatusBit(unsigned bits) const {m_statusBits |= bits;}
272  void clearStatusBits(unsigned bits) const {m_statusBits &= ~bits;}
273 
275  friend std::ostream& operator << (std::ostream& o, const Cluster3D& c);
276  friend bool operator < (const Cluster3D & a, const Cluster3D & b);
277 };
278 
283 {
284 public:
285  RecobClusterParameters() : m_startTime(999999.),
286  m_sigmaStartTime(1.),
287  m_endTime(0.),
288  m_sigmaEndTime(1.),
289  m_totalCharge(0.),
290  m_startWire(9999999),
291  m_endWire(0),
292  m_plane(100),
293  m_view(geo::kUnknown)
294  {
295  m_hitVector.clear();
296  }
297 
298  void UpdateParameters(const reco::ClusterHit2D* hit);
299 
300  float m_startTime;
302  float m_endTime;
305  unsigned int m_startWire;
306  unsigned int m_endWire;
307  unsigned int m_plane;
310 };
311 
312 
316 using Hit2DListPtr = std::list<const reco::ClusterHit2D*>;
317 using HitPairListPtr = std::list<const reco::ClusterHit3D*>;
318 using HitPairSetPtr = std::set<const reco::ClusterHit3D*>;
319 using HitPairListPtrList = std::list<HitPairListPtr>;
320 using HitPairClusterMap = std::map<int, HitPairListPtr>;
321 using HitPairList = std::list<std::unique_ptr<reco::ClusterHit3D>>;
322 
323 using PCAHitPairClusterMapPair = std::pair<reco::PrincipalComponents, reco::HitPairClusterMap::iterator>;
324 using PlaneToClusterParamsMap = std::map<size_t, RecobClusterParameters>;
325 using EdgeTuple = std::tuple<const reco::ClusterHit3D*,const reco::ClusterHit3D*,double>;
326 using EdgeList = std::list<EdgeTuple>;
327 using Hit3DToEdgePair = std::pair<const reco::ClusterHit3D*, reco::EdgeList>;
328 using Hit3DToEdgeMap = std::unordered_map<const reco::ClusterHit3D*, reco::EdgeList>;
329 using Hit2DToHit3DListMap = std::unordered_map<const reco::ClusterHit2D*, reco::HitPairListPtr>;
330 //using VertexPoint = Eigen::Vector3f;
331 //using VertexPointList = std::list<Eigen::Vector3f>;
332 
333 using ProjectedPoint = std::tuple<float, float, const reco::ClusterHit3D*>;
334 using ProjectedPointList = std::list<ProjectedPoint>;
335 using ConvexHullKinkTuple = std::tuple<ProjectedPoint, Eigen::Vector2f, Eigen::Vector2f>;
336 using ConvexHullKinkTupleList = std::list<ConvexHullKinkTuple>;
337 
342 {
343 public:
345  {
346  fProjectedPointList.clear(),
347  fConvexHullEdgeMap.clear(),
348  fConvexHullEdgeList.clear(),
349  fConvexHullExtremePoints.clear(),
350  fConvexHullKinkPoints.clear();
351  }
352 
353  void clear()
354  {
355  fProjectedPointList.clear(),
356  fConvexHullEdgeMap.clear(),
357  fConvexHullEdgeList.clear(),
358  fConvexHullExtremePoints.clear(),
359  fConvexHullKinkPoints.clear();
360  }
361 
362  reco::ProjectedPointList& getProjectedPointList() {return fProjectedPointList;}
363  reco::Hit3DToEdgeMap& getConvexHullEdgeMap() {return fConvexHullEdgeMap;}
364  reco::EdgeList& getConvexHullEdgeList() {return fConvexHullEdgeList;}
365  reco::ProjectedPointList& getConvexHullExtremePoints() {return fConvexHullExtremePoints;}
366  reco::ConvexHullKinkTupleList& getConvexHullKinkPoints() {return fConvexHullKinkPoints;}
367 
368 
369 private:
375 };
376 
380 class ClusterParameters;
381 using ClusterParametersList = std::list<ClusterParameters>;
382 
384 {
385 public:
387  {
388  fClusterParams.clear();
389  fHitPairListPtr.clear();
390  fHit2DToHit3DListMap.clear();
391  fHit3DToEdgeMap.clear();
392  fBestHitPairListPtr.clear();
393  fBestEdgeList.clear();
394  fConvexHull.clear();
395  fFaceList.clear();
396  fVertexList.clear();
397  fHalfEdgeList.clear();
398  fClusterParameters.clear();
399  }
400 
401  ClusterParameters(reco::HitPairClusterMap::iterator& mapItr) : fHitPairListPtr(mapItr->second)
402  {
403  fClusterParams.clear();
404  fHit2DToHit3DListMap.clear();
405  fHit3DToEdgeMap.clear();
406  fBestHitPairListPtr.clear();
407  fBestEdgeList.clear();
408  fConvexHull.clear();
409  fFaceList.clear();
410  fVertexList.clear();
411  fHalfEdgeList.clear();
412  }
413 
414  ClusterParameters(reco::HitPairListPtr& hitList) : fHitPairListPtr(hitList)
415  {
416  fClusterParams.clear();
417  fHit2DToHit3DListMap.clear();
418  fHit3DToEdgeMap.clear();
419  fBestHitPairListPtr.clear();
420  fBestEdgeList.clear();
421  fConvexHull.clear();
422  fFaceList.clear();
423  fVertexList.clear();
424  fHalfEdgeList.clear();
425  }
426 
427  ClusterParametersList& daughterList() {return fClusterParameters;}
428 
430  {
431  fClusterParams[hit->getHit().WireID().Plane].UpdateParameters(hit);
432  }
433 
434  void addHit3D(const reco::ClusterHit3D* hit3D)
435  {
436  fHitPairListPtr.emplace_back(hit3D);
437 
438  for(const auto& hit2D : hit3D->getHits())
439  if (hit2D) fHit2DToHit3DListMap[hit2D].emplace_back(hit3D);
440  }
441 
443  {
444  for(const auto& hit3D : fHitPairListPtr)
445  {
446  for(const auto& hit2D : hit3D->getHits())
447  if (hit2D) fHit2DToHit3DListMap[hit2D].emplace_back(hit3D);
448  }
449  }
450 
452  reco::Hit2DToHit3DListMap& getHit2DToHit3DListMap() {return fHit2DToHit3DListMap;}
453  reco::HitPairListPtr& getHitPairListPtr() {return fHitPairListPtr;}
454  reco::PrincipalComponents& getFullPCA() {return fFullPCA;}
455  reco::PrincipalComponents& getSkeletonPCA() {return fSkeletonPCA;}
456  reco::Hit3DToEdgeMap& getHit3DToEdgeMap() {return fHit3DToEdgeMap;}
457  reco::HitPairListPtr& getBestHitPairListPtr() {return fBestHitPairListPtr;}
458  reco::EdgeList& getBestEdgeList() {return fBestEdgeList;}
459  reco::ConvexHull& getConvexHull() {return fConvexHull;}
460  dcel2d::FaceList& getFaceList() {return fFaceList;}
461  dcel2d::VertexList& getVertexList() {return fVertexList;}
462  dcel2d::HalfEdgeList& getHalfEdgeList() {return fHalfEdgeList;}
463 
464  friend bool operator < (const ClusterParameters &a, const ClusterParameters& b)
465  {
466  return a.fHitPairListPtr.size() > b.fHitPairListPtr.size();
467  }
468 
469 private:
471  reco::HitPairListPtr fHitPairListPtr; // This contains the list of 3D hits in the cluster
472  reco::Hit2DToHit3DListMap fHit2DToHit3DListMap; // Provides a mapping between 2D hits and 3D hits they make
473  reco::PrincipalComponents fFullPCA; // PCA run over full set of 3D hits
474  reco::PrincipalComponents fSkeletonPCA; // PCA run over just the "skeleton" 3D hits
477  reco::EdgeList fBestEdgeList; // This has become multiuse... really need to split it up
478  reco::ConvexHull fConvexHull; // Convex hull object
479  dcel2d::FaceList fFaceList; // Keeps track of "faces" from Voronoi Diagram
480  dcel2d::VertexList fVertexList; // Keeps track of "vertices" from Voronoi Diagram
481  dcel2d::HalfEdgeList fHalfEdgeList; // Keeps track of "halfedges" from Voronoi Diagram
482  ClusterParametersList fClusterParameters; // For possible daughter clusters
483 };
484 
485 using ClusterToHitPairSetPair = std::pair<reco::ClusterParameters*,HitPairSetPtr>;
486 using ClusterToHitPairSetMap = std::unordered_map<reco::ClusterParameters*,HitPairSetPtr>;
487 using Hit2DToHit3DSetMap = std::unordered_map<const reco::ClusterHit2D*,HitPairSetPtr>;
488 using Hit2DToClusterMap = std::unordered_map<const reco::ClusterHit2D*,ClusterToHitPairSetMap>;
489 
490 }
491 
492 #endif //RECO_CLUSTER3D_H
reco::HitPairListPtr & getBestHitPairListPtr()
Definition: Cluster3D.h:457
std::map< int, HitPairListPtr > HitPairClusterMap
Definition: Cluster3D.h:320
PrincipalComponents m_pcaResults
Output of the prinicipal componenets analysis.
Definition: Cluster3D.h:250
reco::ConvexHullKinkTupleList fConvexHullKinkPoints
The points with large kinks along the convex hull.
Definition: Cluster3D.h:374
void setAveHitDoca(double doca) const
Definition: Cluster3D.h:234
reco::HitPairListPtr fBestHitPairListPtr
Definition: Cluster3D.h:476
std::list< const reco::ClusterHit2D * > Hit2DListPtr
export some data structure definitions
Definition: Cluster3D.h:316
bool m_svdOK
SVD Decomposition was successful.
Definition: Cluster3D.h:215
size_t m_id
"id" of this hit (useful for indexing)
Definition: Cluster3D.h:189
dcel2d::HalfEdgeList fHalfEdgeList
Definition: Cluster3D.h:481
bool getSvdOK() const
Definition: Cluster3D.h:226
unsigned m_statusBits
Default constructor.
Definition: Cluster3D.h:249
reco::PrincipalComponents fSkeletonPCA
Definition: Cluster3D.h:474
float getTotalCharge() const
Definition: Cluster3D.h:266
void clearStatusBits(unsigned bits) const
Definition: Cluster3D.h:76
float getTimeTicks() const
Definition: Cluster3D.h:72
float m_hitChiSquare
Hit ChiSquare relative to the average time.
Definition: Cluster3D.h:196
float m_arclenToPoca
arc length along axis to DOCA point
Definition: Cluster3D.h:198
intermediate_table::iterator iterator
std::list< HalfEdge > HalfEdgeList
Definition: DCEL.h:180
double m_aveHitDoca
Average doca of hits used in PCA.
Definition: Cluster3D.h:220
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
std::list< ProjectedPoint > ProjectedPointList
Definition: Cluster3D.h:334
Unknown view.
Definition: geo_types.h:83
geo::WireID WireID() const
Initial tdc tick for hit.
Definition: Hit.h:234
void setArcLenToPoca(float poca) const
Definition: Cluster3D.h:78
const bool operator<(const reco::ClusterHit3D &other) const
Definition: Cluster3D.h:173
Declaration of signal hit object.
float m_deltaPeakTime
Largest delta peak time of associated recob::Hits.
Definition: Cluster3D.h:194
reco::PrincipalComponents & getSkeletonPCA()
Definition: Cluster3D.h:455
void clearStatusBits(unsigned bits) const
Definition: Cluster3D.h:166
void setArclenToPoca(double poca) const
Definition: Cluster3D.h:168
void setDocaToAxis(double doca) const
Definition: Cluster3D.h:167
reco::Hit2DToHit3DListMap & getHit2DToHit3DListMap()
Definition: Cluster3D.h:452
const float * getStartPosition() const
Definition: Cluster3D.h:267
unsigned m_statusBits
Volatile status information of this 3D hit.
Definition: Cluster3D.h:43
dcel2d::VertexList fVertexList
Definition: Cluster3D.h:480
const std::vector< float > getHitDelTSigVec() const
Definition: Cluster3D.h:159
reco::ConvexHull fConvexHull
Definition: Cluster3D.h:478
float getTotalCharge() const
Definition: Cluster3D.h:151
reco::EdgeList & getBestEdgeList()
Definition: Cluster3D.h:458
const float * getAvePosition() const
Definition: Cluster3D.h:230
int getNumHitsUsed() const
Definition: Cluster3D.h:227
reco::Hit3DToEdgeMap & getHit3DToEdgeMap()
Definition: Cluster3D.h:456
std::list< HitPairListPtr > HitPairListPtrList
Definition: Cluster3D.h:319
A utility class used in construction of 3D clusters.
Definition: Cluster3D.h:282
reco::HitPairListPtr & getHitPairListPtr()
Definition: Cluster3D.h:453
float getSigmaPeakTime() const
Definition: Cluster3D.h:154
float m_docaToAxis
DOCA of hit at POCA to associated cluster axis.
Definition: Cluster3D.h:44
friend bool operator<(const ClusterHit2D &a, const ClusterHit2D &b)
Definition: Cluster3D.cxx:47
reco::PlaneToClusterParamsMap & getClusterParams()
Definition: Cluster3D.h:451
reco::Hit3DToEdgeMap fHit3DToEdgeMap
Definition: Cluster3D.h:475
unsigned int getStatusBits() const
Definition: Cluster3D.h:146
const bool operator==(const reco::ClusterHit3D &other) const
Definition: Cluster3D.h:179
float getDocaToAxis() const
Definition: Cluster3D.h:156
std::unordered_map< const reco::ClusterHit2D *, HitPairSetPtr > Hit2DToHit3DSetMap
Definition: Cluster3D.h:487
std::list< std::unique_ptr< reco::ClusterHit3D >> HitPairList
Definition: Cluster3D.h:321
float getY() const
Definition: Cluster3D.h:149
unsigned getStatusBits() const
Definition: Cluster3D.h:264
ClusterParametersList & daughterList()
Definition: Cluster3D.h:427
float getAvePeakTime() const
Definition: Cluster3D.h:152
float m_sigmaPeakTime
Quad sum of peak time sigmas.
Definition: Cluster3D.h:195
float getDocaToAxis() const
Definition: Cluster3D.h:69
const float * getEndPosition() const
Definition: Cluster3D.h:268
std::pair< const reco::ClusterHit3D *, reco::EdgeList > Hit3DToEdgePair
Definition: Cluster3D.h:327
std::list< EdgeTuple > EdgeList
Definition: Cluster3D.h:326
ClusterParametersList fClusterParameters
Definition: Cluster3D.h:482
const recob::Hit * m_hit
Hit we are augmenting.
Definition: Cluster3D.h:48
float m_avePeakTime
Average peak time of all associated recob::Hits.
Definition: Cluster3D.h:193
PlaneToClusterParamsMap fClusterParams
Definition: Cluster3D.h:470
reco::PrincipalComponents & getFullPCA()
Definition: Cluster3D.h:454
reco::Hit3DToEdgeMap & getConvexHullEdgeMap()
Definition: Cluster3D.h:363
float m_arcLenToPoca
arc length to POCA along cluster axis
Definition: Cluster3D.h:45
std::list< Face > FaceList
Definition: DCEL.h:179
float m_totalCharge
Total charge in the cluster.
Definition: Cluster3D.h:251
reco::ProjectedPointList & getConvexHullExtremePoints()
Definition: Cluster3D.h:365
float m_docaToAxis
DOCA to the associated cluster axis.
Definition: Cluster3D.h:197
float m_timeTicks
The time (in ticks) for this hit.
Definition: Cluster3D.h:47
reco::ConvexHullKinkTupleList & getConvexHullKinkPoints()
Definition: Cluster3D.h:366
Define a container for working with the convex hull.
Definition: Cluster3D.h:341
std::unordered_map< const reco::ClusterHit2D *, reco::HitPairListPtr > Hit2DToHit3DListMap
Definition: Cluster3D.h:329
void clearStatusBits(unsigned bits) const
Definition: Cluster3D.h:272
reco::EdgeList fBestEdgeList
Definition: Cluster3D.h:477
std::vector< geo::WireID > m_wireIDVector
Wire ID&#39;s for the planes making up hit.
Definition: Cluster3D.h:201
const recob::Hit & getHit() const
Definition: Cluster3D.h:73
std::list< ConvexHullKinkTuple > ConvexHullKinkTupleList
Definition: Cluster3D.h:336
size_t getID() const
Definition: Cluster3D.h:145
std::tuple< const reco::ClusterHit3D *, const reco::ClusterHit3D *, double > EdgeTuple
Definition: Cluster3D.h:325
std::list< const reco::ClusterHit3D * > HitPairListPtr
Definition: Cluster3D.h:317
void UpdateParameters(const reco::ClusterHit2D *hit)
Definition: Cluster3D.h:429
float m_totalCharge
Sum of charges of all associated recob::Hits.
Definition: Cluster3D.h:192
void setDocaToAxis(float doca) const
Definition: Cluster3D.h:77
float getXPosition() const
Definition: Cluster3D.h:71
std::vector< std::vector< float > > EigenVectors
Definition: Cluster3D.h:209
reco::Hit2DToHit3DListMap fHit2DToHit3DListMap
Definition: Cluster3D.h:472
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:258
std::pair< reco::ClusterParameters *, HitPairSetPtr > ClusterToHitPairSetPair
Definition: Cluster3D.h:485
Definition of data types for geometry description.
const float * getPosition() const
Definition: Cluster3D.h:147
reco::EdgeList fConvexHullEdgeList
This has become multiuse... really need to split it up.
Definition: Cluster3D.h:372
Detector simulation of raw signals on wires.
std::vector< const reco::ClusterHit2D * > ClusterHit2DVec
Definition: Cluster3D.h:85
std::tuple< ProjectedPoint, Eigen::Vector2f, Eigen::Vector2f > ConvexHullKinkTuple
Point plus edges that point to it.
Definition: Cluster3D.h:335
unsigned int m_statusBits
Volatile status information of this 3D hit.
Definition: Cluster3D.h:190
std::pair< reco::PrincipalComponents, reco::HitPairClusterMap::iterator > PCAHitPairClusterMapPair
Definition: Cluster3D.h:323
reco::ConvexHull & getConvexHull()
Definition: Cluster3D.h:459
reco::Hit3DToEdgeMap fConvexHullEdgeMap
Map from 3D hit to associated edge.
Definition: Cluster3D.h:371
void setID(const size_t &id) const
Definition: Cluster3D.h:164
bool bitsAreSet(const unsigned int &bitsToCheck) const
Definition: Cluster3D.h:162
const float * getEigenValues() const
Definition: Cluster3D.h:228
const PrincipalComponents & getPcaResults() const
Definition: Cluster3D.h:265
void setPosition(const float *pos) const
Definition: Cluster3D.h:171
const float getAveHitDoca() const
Definition: Cluster3D.h:231
QuadExpr operator+(double v, const QuadExpr &e)
Definition: QuadExpr.h:37
dcel2d::FaceList & getFaceList()
Definition: Cluster3D.h:460
const std::vector< geo::WireID > & getWireIDs() const
Definition: Cluster3D.h:160
Definition of utility objects for use in the 3D clustering for LArSoft.
Definition: Cluster3D.cxx:17
float getArclenToPoca() const
Definition: Cluster3D.h:157
std::map< size_t, RecobClusterParameters > PlaneToClusterParamsMap
Definition: Cluster3D.h:324
float getDeltaPeakTime() const
Definition: Cluster3D.h:153
int m_clusterIdx
ID for this cluster.
Definition: Cluster3D.h:254
std::unordered_map< const reco::ClusterHit2D *, ClusterToHitPairSetMap > Hit2DToClusterMap
Definition: Cluster3D.h:488
std::vector< float > m_hitDelTSigVec
Delta t of hit to matching pair / sig.
Definition: Cluster3D.h:200
reco::ProjectedPointList fProjectedPointList
The input set of points projected onto plane encompassed by the hull.
Definition: Cluster3D.h:370
ClusterParameters(reco::HitPairClusterMap::iterator &mapItr)
Definition: Cluster3D.h:401
reco::PrincipalComponents fFullPCA
Definition: Cluster3D.h:473
ClusterHit2DVec m_hitVector
Definition: Cluster3D.h:309
dcel2d::FaceList fFaceList
Definition: Cluster3D.h:479
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:49
EigenVectors m_eigenVectors
The three principle axes.
Definition: Cluster3D.h:218
float getHitChiSquare() const
Definition: Cluster3D.h:155
float m_xPosition
The x coordinate for this hit.
Definition: Cluster3D.h:46
std::unordered_map< const reco::ClusterHit3D *, reco::EdgeList > Hit3DToEdgeMap
Definition: Cluster3D.h:328
reco::ProjectedPointList & getProjectedPointList()
Definition: Cluster3D.h:362
friend std::ostream & operator<<(std::ostream &o, const ClusterHit2D &c)
Definition: Cluster3D.cxx:40
void setStatusBit(unsigned bits) const
Definition: Cluster3D.h:271
std::unordered_map< reco::ClusterParameters *, HitPairSetPtr > ClusterToHitPairSetMap
Definition: Cluster3D.h:486
Namespace collecting geometry-related classes utilities.
reco::EdgeList & getConvexHullEdgeList()
Definition: Cluster3D.h:364
float m_position[3]
position of this hit combination in world coordinates
Definition: Cluster3D.h:191
const ClusterHit2DVec & getHits() const
Definition: Cluster3D.h:158
float getZ() const
Definition: Cluster3D.h:150
ClusterHit2DVec m_hitVector
Hits comprising this 3D hit.
Definition: Cluster3D.h:199
std::tuple< float, float, const reco::ClusterHit3D * > ProjectedPoint
Projected coordinates and pointer to hit.
Definition: Cluster3D.h:333
ClusterParameters(reco::HitPairListPtr &hitList)
Definition: Cluster3D.h:414
dcel2d::HalfEdgeList & getHalfEdgeList()
Definition: Cluster3D.h:462
std::list< Vertex > VertexList
Definition: DCEL.h:178
reco::HitPairListPtr fHitPairListPtr
Definition: Cluster3D.h:471
int getClusterIdx() const
Definition: Cluster3D.h:269
std::list< ClusterParameters > ClusterParametersList
Definition: Cluster3D.h:381
const EigenVectors & getEigenVectors() const
Definition: Cluster3D.h:229
void addHit3D(const reco::ClusterHit3D *hit3D)
Definition: Cluster3D.h:434
dcel2d::VertexList & getVertexList()
Definition: Cluster3D.h:461
std::set< const reco::ClusterHit3D * > HitPairSetPtr
Definition: Cluster3D.h:318
float getArcLenToPoca() const
Definition: Cluster3D.h:70
float getX() const
Definition: Cluster3D.h:148
void fillHit2DToHit3DListMap()
Definition: Cluster3D.h:442
reco::ProjectedPointList fConvexHullExtremePoints
The points furthest from each other on hull.
Definition: Cluster3D.h:373
unsigned getStatusBits() const
Definition: Cluster3D.h:68
void setStatusBit(unsigned bits) const
Definition: Cluster3D.h:165
void setStatusBit(unsigned bits) const
Definition: Cluster3D.h:75
int m_numHitsUsed
Number of hits in the decomposition.
Definition: Cluster3D.h:216