LArSoft  v10_04_05
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  explicit SeedFinderAlgorithm(const fhicl::ParameterSet& pset);
33 
34  //----------------------
35  // Seedfinding methods
36  //----------------------
37 
38  std::vector<std::vector<recob::Seed>> GetSeedsFromSortedHits(
39  detinfo::DetectorClocksData const& clockData,
40  detinfo::DetectorPropertiesData const& detProp,
43  unsigned int StopAfter = 0) const;
44  // Return a vector of vectors of seeds, one vector for each supplied cluster
45  // combination which has sufficient overlap. The second argument returns
46  // the hits sorted by combo and by seed
47 
48  std::vector<recob::Seed> GetSeedsFromUnSortedHits(
49  detinfo::DetectorClocksData const& clockData,
50  detinfo::DetectorPropertiesData const& detProp,
53  unsigned int StopAfter = 0) const;
54  // Return a vector of seeds formed from an unstructured collection of hits
55 
56  //----------------------
57  // Alg passing
58  //----------------------
59 
60  SpacePointAlg* GetSpacePointAlg() const { return fSptalg; }
61  // Return the SpacePointAlg, as configured for the Seed Finding
62 
63  private:
64  //----------------------
65  // Internal methods
66  //----------------------
67 
68  std::vector<recob::Seed> FindSeeds(detinfo::DetectorClocksData const& clockData,
69  detinfo::DetectorPropertiesData const& detProp,
70  art::PtrVector<recob::Hit> const& HitsFlat,
71  std::vector<art::PtrVector<recob::Hit>>& CataloguedHits,
72  unsigned int StopAfter) const;
73  // Find a collection of seeds, based on the supplied set of hits.
74  // The second argument returns the hits catalogued by which
75  // seed they fell into (if any)
76 
77  recob::Seed FindSeedAtEnd(detinfo::DetectorPropertiesData const& detProp,
78  std::vector<recob::SpacePoint> const&,
79  std::vector<char>&,
80  std::vector<int>&,
81  art::PtrVector<recob::Hit> const& HitsFlat,
82  std::vector<std::vector<std::vector<int>>>& OrgHits) const;
83  // Find one seed at high Z from the spacepoint collection given. Latter arguments are
84  // for internal book keeping.
85 
86  // size_t CountHits(std::vector<recob::SpacePoint> const& Points);
87  // Counting the number of hits in each view which are associated with a set of SPs
88 
89  void GetCenterAndDirection(detinfo::DetectorPropertiesData const& detProp,
90  art::PtrVector<recob::Hit> const& HitsFlat,
91  std::vector<int>& HitsToUse,
92  TVector3& Center,
93  TVector3& Direction,
94  std::vector<double>& ViewRMS,
95  std::vector<int>& HitsPerView) const;
96 
97  void ConsolidateSeed(detinfo::DetectorPropertiesData const& detProp,
98  recob::Seed& TheSeed,
100  std::vector<char>& HitStatus,
101  std::vector<std::vector<std::vector<int>>>& OrgHits,
102  bool Extend) const;
103 
104  void GetHitDistAndProj(detinfo::DetectorPropertiesData const& detProp,
105  recob::Seed const& ASeed,
106  art::Ptr<recob::Hit> const& AHit,
107  double& disp,
108  double& s) const;
109 
110  void CalculateGeometricalElements();
111  // Pre-calculating geometrical factors
112 
113  // Fcl Attributes.
114 
116 
118 
120 
121  int fRefits;
122 
123  std::vector<double> fMaxViewRMS;
124 
126 
128 
129  double fLengthCut;
130 
132 
134 
135  std::vector<double> fPitches;
136  std::vector<TVector3> fPitchDir;
137  std::vector<TVector3> fWireDir;
138  std::vector<double> fWireZeroOffset;
139  TVector3 fXDir, fYDir, fZDir;
140  size_t fNChannels;
141  };
142 
143 }
144 
145 #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