LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
SeedFinderAlgorithm.h
Go to the documentation of this file.
1 #ifndef SEEDFINDERALG_H
2 #define SEEDFINDERALG_H
3 
4 //
5 // Name: SeedFinderAlgorithm.h
6 //
7 //
8 // Ben Jones, MIT, April 2012
9 // bjpjones@mit.edu
10 //
11 
12 #include "TVector3.h"
13 
14 namespace detinfo {
15  class DetectorClocksData;
16  class DetectorPropertiesData;
17 }
18 
19 namespace recob {
20  class SpacePoint;
21  class Seed;
22  class Hit;
23 }
24 
25 #include <vector>
26 
27 namespace trkf {
28 
29  class SpacePointAlg;
31  public:
32  //--------------------------------------
33  // Constructors, destructor, reconfigure
34  //--------------------------------------
35 
37 
38  void reconfigure(fhicl::ParameterSet const& pset);
39 
40  //----------------------
41  // Seedfinding methods
42  //----------------------
43 
44  std::vector<std::vector<recob::Seed>> GetSeedsFromSortedHits(
45  detinfo::DetectorClocksData const& clockData,
46  detinfo::DetectorPropertiesData const& detProp,
49  unsigned int StopAfter = 0) const;
50  // Return a vector of vectors of seeds, one vector for each supplied cluster
51  // combination which has sufficient overlap. The second argument returns
52  // the hits sorted by combo and by seed
53 
54  std::vector<recob::Seed> GetSeedsFromUnSortedHits(
55  detinfo::DetectorClocksData const& clockData,
56  detinfo::DetectorPropertiesData const& detProp,
59  unsigned int StopAfter = 0) const;
60  // Return a vector of seeds formed from an unstructured collection of hits
61 
62  //----------------------
63  // Alg passing
64  //----------------------
65 
66  SpacePointAlg* GetSpacePointAlg() const { return fSptalg; }
67  // Return the SpacePointAlg, as configured for the Seed Finding
68 
69  private:
70  //----------------------
71  // Internal methods
72  //----------------------
73 
74  std::vector<recob::Seed> FindSeeds(detinfo::DetectorClocksData const& clockData,
75  detinfo::DetectorPropertiesData const& detProp,
76  art::PtrVector<recob::Hit> const& HitsFlat,
77  std::vector<art::PtrVector<recob::Hit>>& CataloguedHits,
78  unsigned int StopAfter) const;
79  // Find a collection of seeds, based on the supplied set of hits.
80  // The second argument returns the hits catalogued by which
81  // seed they fell into (if any)
82 
83  recob::Seed FindSeedAtEnd(detinfo::DetectorPropertiesData const& detProp,
84  std::vector<recob::SpacePoint> const&,
85  std::vector<char>&,
86  std::vector<int>&,
87  art::PtrVector<recob::Hit> const& HitsFlat,
88  std::vector<std::vector<std::vector<int>>>& OrgHits) const;
89  // Find one seed at high Z from the spacepoint collection given. Latter arguments are
90  // for internal book keeping.
91 
92  // size_t CountHits(std::vector<recob::SpacePoint> const& Points);
93  // Counting the number of hits in each view which are associated with a set of SPs
94 
95  void GetCenterAndDirection(detinfo::DetectorPropertiesData const& detProp,
96  art::PtrVector<recob::Hit> const& HitsFlat,
97  std::vector<int>& HitsToUse,
98  TVector3& Center,
99  TVector3& Direction,
100  std::vector<double>& ViewRMS,
101  std::vector<int>& HitsPerView) const;
102 
103  void ConsolidateSeed(detinfo::DetectorPropertiesData const& detProp,
104  recob::Seed& TheSeed,
106  std::vector<char>& HitStatus,
107  std::vector<std::vector<std::vector<int>>>& OrgHits,
108  bool Extend) const;
109 
110  void GetHitDistAndProj(detinfo::DetectorPropertiesData const& detProp,
111  recob::Seed const& ASeed,
112  art::Ptr<recob::Hit> const& AHit,
113  double& disp,
114  double& s) const;
115 
116  void CalculateGeometricalElements();
117  // Pre-calculating geometrical factors
118 
119  // Fcl Attributes.
120 
122 
124 
126 
127  int fRefits;
128 
129  std::vector<double> fMaxViewRMS;
130 
132 
134 
135  double fLengthCut;
136 
138 
140 
141  std::vector<double> fPitches;
142  std::vector<TVector3> fPitchDir;
143  std::vector<TVector3> fWireDir;
144  std::vector<double> fWireZeroOffset;
145  TVector3 fXDir, fYDir, fZDir;
146  size_t fNChannels;
147  };
148 
149 }
150 
151 #endif // SEEDFINDER_H
std::vector< double > fPitches
Reconstruction base classes.
SpacePointAlg * GetSpacePointAlg() const
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
General LArSoft Utilities.
Contains all timing reference information for the detector.
std::vector< TVector3 > fWireDir
Direction
Definition: types.h:12
std::vector< TVector3 > fPitchDir
std::vector< double > fWireZeroOffset
std::vector< double > fMaxViewRMS