ClusterCrawlerAlg.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // ClusterCrawlerAlg.h
3 //
4 // ClusterCrawlerAlg class
5 //
6 // Bruce Baller
7 //
8 ///////////////////////////////////////////////////////////////////////
9 #ifndef CLUSTERCRAWLERALG_H
10 #define CLUSTERCRAWLERALG_H
11 
12 // C/C++ standard libraries
13 #include <array>
14 #include <utility> // std::pair<>
15 #include <vector>
16 
17 // framework libraries
19 namespace geo {
20  class Geometry;
21 }
22 
23 // LArSoft libraries
28 namespace detinfo {
29  class DetectorClocksData;
30  class DetectorPropertiesData;
31 }
32 
33 namespace cluster {
34 
36  public:
37  // some functions to handle the CTP_t type
38  typedef unsigned int CTP_t;
39 
40  static constexpr unsigned int CTPpad = 1000; // alignment for CTP sub-items
41  static CTP_t
42  EncodeCTP(unsigned int cryo, unsigned int tpc, unsigned int plane)
43  {
44  return cryo * CTPpad * CTPpad + tpc * CTPpad + plane;
45  }
46  static CTP_t
47  EncodeCTP(const geo::PlaneID& planeID)
48  {
49  return EncodeCTP(planeID.Cryostat, planeID.TPC, planeID.Plane);
50  }
51  static geo::PlaneID
52  DecodeCTP(CTP_t CTP)
53  {
54  return {CTP / (CTPpad * CTPpad), CTP / CTPpad % CTPpad, CTP % CTPpad};
55  }
56 
57  /// @{
58  /// @name Data structures for the reconstruction results
59 
60  /// struct of temporary clusters
61  struct ClusterStore {
62  short ID; // Cluster ID. ID < 0 = abandoned cluster
63  short ProcCode; // Processor code for debugging
64  short StopCode; // code for the reason for stopping cluster tracking
65  CTP_t CTP; // Cryostat/TPC/Plane code
66  float BeginSlp; // beginning slope (= DS end = high wire number)
67  float BeginSlpErr; // error
68  float BeginAng;
69  unsigned int BeginWir; // begin wire
70  float BeginTim; // begin time
71  float BeginChg; // beginning average charge
72  float BeginChgNear; // charge near the cluster Begin
73  short BeginVtx; // ID of the Begin vertex
74  float EndSlp; // end slope (= US end = low wire number)
75  float EndAng;
76  float EndSlpErr; // error
77  unsigned int EndWir; // end wire
78  float EndTim; // ending time
79  float EndChg; // ending average charge
80  float EndChgNear; // charge near the cluster End
81  short EndVtx; // ID of the end vertex
82  std::vector<unsigned int> tclhits; // hits on the cluster
83  }; // ClusterStore
84 
85  /// struct of temporary 2D vertices (end points)
86  struct VtxStore {
87  float Wire;
88  float WireErr;
89  float Time;
90  float TimeErr;
91  unsigned short NClusters; // = 0 for abandoned vertices
92  float ChiDOF;
93  short Topo; // 1 = US-US, 2 = US-DS, 3 = DS-US, 4 = DS-DS, 5 = Star,
94  // 6 = hammer, 7 = vtx3clustermatch, 8 = vtx3clustersplit, 9 = FindTrajVertices
95  CTP_t CTP;
96  bool Fixed; // Vertex position fixed (should not be re-fit)
97  };
98 
99  /// struct of temporary 3D vertices
100  struct Vtx3Store {
101  std::array<short, 3> Ptr2D; // pointers to 2D vertices in each plane
102  float X; // x position
103  float XErr; // x position error
104  float Y; // y position
105  float YErr; // y position error
106  float Z; // z position
107  float ZErr; // z position error
108  short Wire; // wire number for an incomplete 3D vertex
109  unsigned short CStat;
110  unsigned short TPC;
111  unsigned short ProcCode;
112  };
113 
114  explicit ClusterCrawlerAlg(fhicl::ParameterSet const& pset);
115 
116  void RunCrawler(detinfo::DetectorClocksData const& clock_data,
117  detinfo::DetectorPropertiesData const& det_prop,
118  std::vector<recob::Hit> const& srchits);
119 
120  /// @{
121  /// @name Result retrieval
122 
123  std::vector<short> const&
124  GetinClus() const
125  {
126  return inClus;
127  }
128 
129  /// Returns (and loses) the collection of reconstructed hits
130  std::vector<recob::Hit>&&
132  {
133  return std::move(fHits);
134  }
135 
136  /// Returns the collection of reconstructed hits
137  std::vector<recob::Hit>
139  {
140  return fHits;
141  }
142 
143  /// Returns a constant reference to the clusters found
144  std::vector<ClusterStore> const&
145  GetClusters() const
146  {
147  return tcl;
148  }
149 
150  /// Returns a constant reference to the 2D end points found
151  std::vector<VtxStore> const&
152  GetEndPoints() const
153  {
154  return vtx;
155  }
156 
157  /// Returns a constant reference to the 3D vertices found
158  std::vector<Vtx3Store> const&
159  GetVertices() const
160  {
161  return vtx3;
162  }
163 
164  /// Deletes all the results (might saves memory)
165  /// @note The current implementation typically does NOT save memory.
166  void ClearResults();
167 
168  /// @}
169 
170  /// Comparison for sorting hits by wire and hit multiplet
171  static bool SortByMultiplet(recob::Hit const& a, recob::Hit const& b);
172 
173  ////////////////////////////////////
174 
175  private:
176  unsigned short fNumPass; ///< number of passes over the hit collection
177  std::vector<unsigned short> fMaxHitsFit; ///< Max number of hits fitted
178  std::vector<unsigned short> fMinHits; ///< Min number of hits to make a cluster
179  std::vector<unsigned short> fNHitsAve; ///< number of US hits used to compute fAveChg
180  ///< set to > 2 to do a charge fit using fNHitsAve hits
181  std::vector<float> fChiCut; ///< stop adding hits to clusters if chisq too high
182  std::vector<float> fKinkChiRat; ///< Max consecutive chisq increase for the last
183  ///< 3 hits on the cluster
184  std::vector<float> fKinkAngCut; ///< kink angle cut made after fKinkChiRat
185  std::vector<float> fChgCut; ///< charge difference cut for adding a hit to a cluster
186  std::vector<unsigned short>
187  fMaxWirSkip; ///< max number of wires that can be skipped while crawling
188  std::vector<unsigned short> fMinWirAfterSkip; ///< minimum number of hits on consecutive wires
189  ///< after skipping
190  std::vector<bool> fDoMerge; ///< try to merge clusters?
191  std::vector<float> fTimeDelta; ///< max time difference for matching
192  std::vector<float> fMergeChgCut; ///< max charge ratio for matching
193  std::vector<bool> fFindVertices; ///< run vertexing code after clustering?
194  std::vector<bool> fLACrawl; ///< Crawl Large Angle clusters on pass?
195  bool fFindHammerClusters; ///< look for hammer type clusters
196  // bool fFindVLAClusters; ///< look for Very Large Angle clusters
198 
199  std::vector<float> fMinAmp; ///< expected minimum signal in each wire plane
200 
205  // bool fFindTrajVertices;
206 
207  // global cuts and parameters
208  float fHitErrFac; ///< hit time error = fHitErrFac * hit RMS used for cluster fit
209  float fHitMinAmp; ///<< ignore hits with Amp < this value
210  float fClProjErrFac; ///< cluster projection error factor
211  float fMinHitFrac;
212  float fLAClusAngleCut; ///< call Large Angle Clustering code if > 0
213  unsigned short fLAClusMaxHitsFit; ///< max hits fitted on a Large Angle cluster
216  float fHitMergeChiCut; ///< Merge cluster hit-multiplets if the separation chisq
217  ///< is < cut. Set < 0 for no merging
218  float fMergeOverlapAngCut; ///< angle cut for merging overlapping clusters
219  unsigned short fAllowNoHitWire;
220  float fVertex2DCut; ///< 2D vtx -> cluster matching cut (chisq/dof)
222  float fVertex3DCut; ///< 2D vtx -> 3D vtx matching cut (chisq/dof)
223 
225  int fDebugWire; ///< set to the Begin Wire and Hit of a cluster to print
226  int fDebugHit; ///< out detailed information while crawling
227 
228  // Wires that have been determined by some filter (e.g. NoiseFilter) to be good
229  std::vector<geo::WireID> fFilteredWires;
230 
231  // these variables define the cluster used during crawling
232  float clpar[3]; ///< cluster parameters for the current fit with
233  ///< origin at the US wire on the cluster (in clpar[2])
234  float clparerr[2]; ///< cluster parameter errors
235  float clChisq; ///< chisq of the current fit
236  float fAveChg; ///< average charge at leading edge of cluster
237  // float fChgRMS; ///< average charge RMS at leading edge of cluster
238  float fChgSlp; ///< slope of the charge vs wire
239  float fAveHitWidth; ///< average width (EndTick - StartTick) of hits
240 
241  bool prt;
242  bool vtxprt;
243  unsigned short NClusters;
244 
246 
247  std::vector<recob::Hit> fHits; ///< our version of the hits
248  std::vector<short> inClus; ///< Hit used in cluster (-1 = obsolete, 0 = free)
249  std::vector<bool> mergeAvailable; ///< set true if hit is with HitMergeChiCut of a neighbor hit
250  std::vector<ClusterStore> tcl; ///< the clusters we are creating
251  std::vector<VtxStore> vtx; ///< the endpoints we are reconstructing
252  std::vector<Vtx3Store> vtx3; ///< the 3D vertices we are reconstructing
253 
255 
256  float clBeginSlp; ///< begin slope (= DS end = high wire number)
257  float clBeginAng;
259  unsigned int clBeginWir; ///< begin wire
260  float clBeginTim; ///< begin time
261  float clBeginChg; ///< begin average charge
262  float clBeginChgNear; ///< nearby charge
263  float clEndSlp; ///< slope at the end (= US end = low wire number)
264  float clEndAng;
265  float clEndSlpErr;
266  unsigned int clEndWir; ///< begin wire
267  float clEndTim; ///< begin time
268  float clEndChg; ///< end average charge
269  float clEndChgNear; ///< nearby charge
270  short clStopCode; ///< code for the reason for stopping cluster tracking
271  ///< 0 = no signal on the next wire
272  ///< 1 = skipped too many occupied/dead wires
273  ///< 2 = failed the fMinWirAfterSkip cut
274  ///< 3 = ended on a kink. Fails fKinkChiRat
275  ///< 4 = failed the fChiCut cut
276  ///< 5 = cluster split by VtxClusterSplit
277  ///< 6 = stop at a vertex
278  ///< 7 = LA crawl stopped due to slope cut
279  ///< 8 = SPECIAL CODE FOR STEP CRAWLING
280  short clProcCode; ///< Processor code = pass number
281  ///< + 10 ChkMerge
282  ///< + 20 ChkMerge with overlapping hits
283  ///< + 100 ChkMerge12
284  ///< + 200 ClusterFix
285  ///< + 300 LACrawlUS
286  ///< + 500 MergeOverlap
287  ///< + 666 KillGarbageClusters
288  ///< + 1000 VtxClusterSplit
289  ///< + 2000 failed pass N cuts but passes pass N=1 cuts
290  ///< + 5000 ChkClusterDS
291  ///< +10000 Vtx3ClusterSplit
292  CTP_t clCTP; ///< Cryostat/TPC/Plane code
293  bool clLA; ///< using Large Angle crawling code
294 
295  unsigned int fFirstWire; ///< the first wire with a hit
296  unsigned int fFirstHit; ///< first hit used
297  unsigned int fLastWire; ///< the last wire with a hit
298  unsigned int cstat; // the current cryostat
299  unsigned int tpc; // the current TPC
300  unsigned int plane; // the current plane
301  unsigned int fNumWires; // number of wires in the current plane
302  unsigned int fMaxTime; // number of time samples in the current plane
303  float fScaleF; ///< scale factor from Tick/Wire to dx/du
304 
305  unsigned short pass;
306 
307  // vector of pairs of first (.first) and last+1 (.second) hit on each wire
308  // in the range fFirstWire to fLastWire. A value of -2 indicates that there
309  // are no hits on the wire. A value of -1 indicates that the wire is dead
310  std::vector<std::pair<int, int>> WireHitRange;
311 
312  std::vector<unsigned int> fcl2hits; ///< vector of hits used in the cluster
313  std::vector<float> chifits; ///< fit chisq for monitoring kinks, etc
314  std::vector<short> hitNear; ///< Number of nearby
315  ///< hits that were merged have hitnear < 0
316 
317  std::vector<float> chgNear; ///< charge near a cluster on each wire
318  float fChgNearWindow; ///< window (ticks) for finding nearby charge
319  float fChgNearCut; ///< cut on ratio of nearby/cluster charge to
320  ///< to define a shower-like cluster
321 
323  // ******** crawling routines *****************
324 
325  // Loops over wires looking for seed clusters
326  void ClusterLoop();
327  // Returns true if the hits on a cluster have a consistent width
328  bool ClusterHitsOK(short nHitChk);
329  // Finds a hit on wire kwire, adds it to the cluster and re-fits it
330  void AddHit(unsigned int kwire, bool& HitOK, bool& SigOK);
331  // Finds a hit on wire kwire, adds it to a LargeAngle cluster and re-fits it
332  void AddLAHit(unsigned int kwire, bool& ChkCharge, bool& HitOK, bool& SigOK);
333  // Fits the cluster hits in fcl2hits to a straight line
334  void FitCluster();
335  // Fits the charge of the cluster hits in fcl2hits
336  void FitClusterChg();
337  // Fits the middle of a temporary cluster it1 using hits iht to iht + nhit
338  void FitClusterMid(unsigned short it1, unsigned int iht, short nhit);
339  void FitClusterMid(std::vector<unsigned int>& hitVec, unsigned int iht, short nhit);
340  // Crawls along a trail of hits UpStream
341  void CrawlUS();
342  // Crawls along a trail of hits UpStream - Large Angle version
343  void LACrawlUS();
344 
345  void KillGarbageClusters();
346 
347  // ************** cluster merging routines *******************
348 
349  // Compares two cluster combinations to see if they should be merged
350  void ChkMerge();
351  // Checks merge for cluster cl2 within the bounds of cl1
352  void ChkMerge12(unsigned short it1, unsigned short it2, bool& didit);
353  // Merges clusters cl1 and cl2
354  void DoMerge(unsigned short it1, unsigned short it2, short ProcCode);
355 
356  // ************** hit merging routines *******************
357  // check the number of nearby hits to the ones added to the current cluster.
358  // If there are too many, merge the hits and re-fit
359  void ChkClusterNearbyHits(bool prt);
360  // merge the hits in a multiplet into one hit
361  void MergeHits(const unsigned int theHit, bool& didMerge);
362  /// Resets the local index and multiplicity of all the hits in [begin;end[
363  void FixMultipletLocalIndices(size_t begin, size_t end, short int multiplicity = -1);
364 
365  // ************** cluster finish routines *******************
366 
367  // Check the fraction of wires with hits
368  void CheckClusterHitFrac(bool prt);
369 
370  // Try to extend clusters downstream
371  void ChkClusterDS();
372 
373  // Try to merge overlapping clusters
374  void MergeOverlap();
375 
376  /// Marks the cluster as obsolete and frees hits still associated with it
377  void MakeClusterObsolete(unsigned short icl);
378  /// Restores an obsolete cluster
379  void RestoreObsoleteCluster(unsigned short icl);
380 
381  /// Removes obsolete hits from hits, updating the indices
382  void RemoveObsoleteHits();
383 
384  // ************** 2D vertex routines *******************
385 
386  // Find 2D vertices
387  void FindVertices();
388  // Find 2D star topology vertices
389  void FindStarVertices();
390  // check a vertex (vw, fvt) made with clusters it1, and it2 against the
391  // vector of existing clusters
392  void ChkVertex(float fvw, float fvt, unsigned short it1, unsigned short it2, short topo);
393  // try to attach a cluster to an existing vertex
394  void ClusterVertex(unsigned short it2);
395  // try to attach a cluster to a specified vertex
396  void VertexCluster(unsigned short ivx);
397  // Refine cluster ends near vertices
398  void RefineVertexClusters(unsigned short ivx);
399  // Split clusters that cross a vertex
400  bool VtxClusterSplit();
401  // returns true if a vertex is encountered while crawling
402  bool CrawlVtxChk(unsigned int kwire);
403  // returns true if this cluster is between a vertex and another
404  // cluster that is associated with the vertex
405  bool CrawlVtxChk2();
406  // use a vertex constraint to start a cluster
407  void VtxConstraint(unsigned int iwire,
408  unsigned int ihit,
409  unsigned int jwire,
410  unsigned int& useHit,
411  bool& doConstrain);
412  // fit the vertex position
413  void FitVtx(unsigned short iv);
414  // weight and fit all vertices
415  void FitAllVtx(CTP_t inCTP);
416 
417  // ************** 3D vertex routines *******************
418 
419  // match vertices between planes
420  void VtxMatch(detinfo::DetectorClocksData const& clock_data,
421  detinfo::DetectorPropertiesData const& det_prop,
422  geo::TPCID const& tpcid);
423  // Match clusters to endpoints using 3D vertex information
424  void Vtx3ClusterMatch(detinfo::DetectorClocksData const& clock_data,
425  detinfo::DetectorPropertiesData const& det_prop,
426  geo::TPCID const& tpcid);
427  // split clusters using 3D vertex information
428  void Vtx3ClusterSplit(detinfo::DetectorClocksData const& clock_data,
429  detinfo::DetectorPropertiesData const& det_prop,
430  geo::TPCID const& tpcid);
431  // look for a long cluster that stops at a short cluster in two views
432  void FindHammerClusters(detinfo::DetectorClocksData const& clock_data,
433  detinfo::DetectorPropertiesData const& det_prop);
434 
435  // ************** utility routines *******************
436 
437  // inits everything
438  void CrawlInit();
439  // inits the cluster stuff
440  void ClusterInit();
441  // fills the wirehitrange vector for the supplied Cryostat/TPC/Plane code
442  void GetHitRange(CTP_t CTP);
443  // Stores cluster information in a temporary vector
444  bool TmpStore();
445  // Gets a temp cluster and puts it into the working cluster variables
446  void TmpGet(unsigned short it1);
447  // Does just what it says
448  void CalculateAveHitWidth();
449  // Shortens the fcl2hits, chifits, etc vectors by the specified amount
450  void FclTrimUS(unsigned short nTrim);
451  // Splits a cluster into two clusters at position pos. Associates the
452  // new clusters with a vertex
453  bool SplitCluster(unsigned short icl, unsigned short pos, unsigned short ivx);
454  // Counts the number of dead wires in the range spanned by fcl2hits
455  unsigned int DeadWireCount();
456  unsigned int DeadWireCount(unsigned int inWire1, unsigned int inWire2);
457  // return true if the pre-merged it1 and it2 clusters will meet the quality requirement
458  bool ChkMergedClusterHitFrac(unsigned short it1, unsigned short it2);
459  // Prints cluster information to the screen
460  void PrintClusters();
461  void PrintVertices();
462  // check for a signal on all wires between two points
463  bool ChkSignal(unsigned int iht, unsigned int jht);
464  bool ChkSignal(unsigned int wire1, float time1, unsigned int wire2, float time2);
465  // returns an angle-dependent scale factor for weighting fits, etc
466  float AngleFactor(float slope);
467  // calculate the kink angle between hits 0-2 and 3 - 5 on the leading edge of
468  // the cluster under construction
469  float EndKinkAngle();
470  /// Returns true if there are no duplicates in the hit list for next cluster
471  bool CheckHitDuplicates(std::string location, std::string marker = "") const;
472  // Find the distance of closest approach between the end of a cluster and a (wire,tick) position
473  float DoCA(short icl, unsigned short end, float vwire, float vtick);
474  // Find the Chisq/DOF between the end of a cluster and a (wire,tick) position
475  float ClusterVertexChi(short icl, unsigned short end, unsigned short ivx);
476  // Find the Chisq/DOF between a point and a vertex
477  float PointVertexChi(float wire, float tick, unsigned short ivx);
478  std::string PrintHit(unsigned int iht);
479 
480  /// Returns a pair of first and past-the-last index
481  /// of all the contiguous hits belonging to the same multiplet
482  std::pair<size_t, size_t> FindHitMultiplet(size_t iHit) const;
483 
484  void CheckHitClusterAssociations();
485 
486  /// Returns whether the two hits belong to the same multiplet
487  static bool areInSameMultiplet(recob::Hit const& first_hit, recob::Hit const& second_hit);
488 
489  }; // class ClusterCrawlerAlg
490 
491 } // namespace cluster
492 
493 #endif // ifndef CLUSTERCRAWLERALG_H
float fScaleF
scale factor from Tick/Wire to dx/du
std::vector< short > hitNear
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
float fAveChg
average charge at leading edge of cluster
std::vector< ClusterStore > tcl
the clusters we are creating
std::vector< std::pair< int, int > > WireHitRange
std::vector< float > fTimeDelta
max time difference for matching
struct of temporary 2D vertices (end points)
std::string string
Definition: nybbler.cc:12
std::vector< float > fChgCut
charge difference cut for adding a hit to a cluster
std::vector< Vtx3Store > vtx3
the 3D vertices we are reconstructing
float clBeginChg
begin average charge
std::vector< unsigned short > fMinWirAfterSkip
std::vector< recob::Hit > GetHits()
Returns the collection of reconstructed hits.
int fDebugWire
set to the Begin Wire and Hit of a cluster to print
void PrintClusters()
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
std::vector< ClusterStore > const & GetClusters() const
Returns a constant reference to the clusters found.
float clEndSlp
slope at the end (= US end = low wire number)
std::vector< unsigned short > fMaxWirSkip
max number of wires that can be skipped while crawling
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:212
std::vector< float > fMinAmp
expected minimum signal in each wire plane
Cluster finding and building.
CTP_t clCTP
Cryostat/TPC/Plane code.
std::vector< float > fMergeChgCut
max charge ratio for matching
float fHitErrFac
hit time error = fHitErrFac * hit RMS used for cluster fit
art::ServiceHandle< geo::Geometry const > geom
struct of temporary 3D vertices
float fAveHitWidth
average width (EndTick - StartTick) of hits
art framework interface to geometry description
static geo::PlaneID DecodeCTP(CTP_t CTP)
float fHitMinAmp
< ignore hits with Amp < this value
int fDebugHit
out detailed information while crawling
std::vector< bool > fLACrawl
Crawl Large Angle clusters on pass?
std::vector< short > inClus
Hit used in cluster (-1 = obsolete, 0 = free)
unsigned int fLastWire
the last wire with a hit
std::vector< float > fChiCut
stop adding hits to clusters if chisq too high
float fChgNearWindow
window (ticks) for finding nearby charge
unsigned short fNumPass
number of passes over the hit collection
std::vector< recob::Hit > && YieldHits()
Returns (and loses) the collection of reconstructed hits.
std::vector< VtxStore > const & GetEndPoints() const
Returns a constant reference to the 2D end points found.
float fMergeOverlapAngCut
angle cut for merging overlapping clusters
unsigned int fFirstWire
the first wire with a hit
float DeadWireCount(const TCSlice &slc, const TrajPoint &tp1, const TrajPoint &tp2)
Definition: Utils.cxx:2139
static CTP_t EncodeCTP(const geo::PlaneID &planeID)
unsigned int clEndWir
begin wire
float fVertex2DCut
2D vtx -> cluster matching cut (chisq/dof)
uint8_t nhit
Definition: CRTFragment.hh:201
const double a
def move(depos, offset)
Definition: depos.py:107
std::vector< float > fKinkAngCut
kink angle cut made after fKinkChiRat
float fVertex3DCut
2D vtx -> 3D vtx matching cut (chisq/dof)
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:75
void MergeOverlap(std::string inFcnLabel, TCSlice &slc, const CTP_t &inCTP, bool prt)
Definition: TCShower.cxx:2401
unsigned short fLAClusMaxHitsFit
max hits fitted on a Large Angle cluster
std::string PrintHit(const TCHit &tch)
Definition: Utils.cxx:6514
std::vector< float > fKinkChiRat
General LArSoft Utilities.
std::vector< bool > fFindVertices
run vertexing code after clustering?
The data type to uniquely identify a TPC.
Definition: geo_types.h:386
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:493
float clBeginSlp
begin slope (= DS end = high wire number)
Definition of data types for geometry description.
std::vector< unsigned short > fMaxHitsFit
Max number of hits fitted.
static CTP_t EncodeCTP(unsigned int cryo, unsigned int tpc, unsigned int plane)
float clChisq
chisq of the current fit
bool clLA
using Large Angle crawling code
std::vector< recob::Hit > fHits
our version of the hits
std::vector< unsigned short > fMinHits
Min number of hits to make a cluster.
Declaration of signal hit object.
float clEndChg
end average charge
std::vector< float > chifits
fit chisq for monitoring kinks, etc
Contains all timing reference information for the detector.
std::vector< Vtx3Store > const & GetVertices() const
Returns a constant reference to the 3D vertices found.
unsigned int clBeginWir
begin wire
float fLAClusAngleCut
call Large Angle Clustering code if > 0
std::vector< bool > mergeAvailable
set true if hit is with HitMergeChiCut of a neighbor hit
float fClProjErrFac
cluster projection error factor
CTP_t EncodeCTP(unsigned int cryo, unsigned int tpc, unsigned int plane)
Definition: DataStructs.h:54
unsigned int fFirstHit
first hit used
float clBeginChgNear
nearby charge
static bool * b
Definition: config.cpp:1043
std::vector< float > chgNear
charge near a cluster on each wire
std::vector< VtxStore > vtx
the endpoints we are reconstructing
bool fFindHammerClusters
look for hammer type clusters
std::vector< short > const & GetinClus() const
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:48
float clEndChgNear
nearby charge
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:406
std::vector< unsigned int > fcl2hits
vector of hits used in the cluster
float fChgSlp
slope of the charge vs wire
LArSoft geometry interface.
Definition: ChannelGeo.h:16
static struct @2 tcl
std::vector< geo::WireID > fFilteredWires
std::vector< unsigned short > fNHitsAve
std::vector< bool > fDoMerge
try to merge clusters?