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"
14 
15 namespace detinfo {
16  class DetectorClocksData;
17  class DetectorPropertiesData;
18 }
19 
20 namespace recob {
21  class SpacePoint;
22  class Seed;
23  class Hit;
24 }
25 
26 namespace trkf {
27 
28  class SpacePointAlg;
30  public:
31  //--------------------------------------
32  // Constructors, destructor, reconfigure
33  //--------------------------------------
34 
36 
37  void reconfigure(fhicl::ParameterSet const& pset);
38 
39  //----------------------
40  // Seedfinding methods
41  //----------------------
42 
43  std::vector<std::vector<recob::Seed>> GetSeedsFromSortedHits(
44  detinfo::DetectorClocksData const& clockData,
45  detinfo::DetectorPropertiesData const& detProp,
48  unsigned int StopAfter = 0) const;
49  // Return a vector of vectors of seeds, one vector for each supplied cluster
50  // combination which has sufficient overlap. The second argument returns
51  // the hits sorted by combo and by seed
52 
53  std::vector<recob::Seed> GetSeedsFromUnSortedHits(
54  detinfo::DetectorClocksData const& clockData,
55  detinfo::DetectorPropertiesData const& detProp,
58  unsigned int StopAfter = 0) const;
59  // Return a vector of seeds formed from an unstructured collection of hits
60 
61  //----------------------
62  // Alg passing
63  //----------------------
64 
67  {
68  return fSptalg;
69  }
70  // Return the SpacePointAlg, as configured for the Seed Finding
71 
72  private:
73  //----------------------
74  // Internal methods
75  //----------------------
76 
77  std::vector<recob::Seed> FindSeeds(detinfo::DetectorClocksData const& clockData,
78  detinfo::DetectorPropertiesData const& detProp,
79  art::PtrVector<recob::Hit> const& HitsFlat,
80  std::vector<art::PtrVector<recob::Hit>>& CataloguedHits,
81  unsigned int StopAfter) const;
82  // Find a collection of seeds, based on the supplied set of hits.
83  // The second argument returns the hits catalogued by which
84  // seed they fell into (if any)
85 
86  recob::Seed FindSeedAtEnd(detinfo::DetectorPropertiesData const& detProp,
87  std::vector<recob::SpacePoint> const&,
88  std::vector<char>&,
89  std::vector<int>&,
90  art::PtrVector<recob::Hit> const& HitsFlat,
91  std::vector<std::vector<std::vector<int>>>& OrgHits) const;
92  // Find one seed at high Z from the spacepoint collection given. Latter arguments are
93  // for internal book keeping.
94 
95  // size_t CountHits(std::vector<recob::SpacePoint> const& Points);
96  // Counting the number of hits in each view which are associated with a set of SPs
97 
98  void GetCenterAndDirection(detinfo::DetectorPropertiesData const& detProp,
99  art::PtrVector<recob::Hit> const& HitsFlat,
100  std::vector<int>& HitsToUse,
101  TVector3& Center,
102  TVector3& Direction,
103  std::vector<double>& ViewRMS,
104  std::vector<int>& HitsPerView) const;
105 
106  void ConsolidateSeed(detinfo::DetectorPropertiesData const& detProp,
107  recob::Seed& TheSeed,
109  std::vector<char>& HitStatus,
110  std::vector<std::vector<std::vector<int>>>& OrgHits,
111  bool Extend) const;
112 
113  void GetHitDistAndProj(detinfo::DetectorPropertiesData const& detProp,
114  recob::Seed const& ASeed,
115  art::Ptr<recob::Hit> const& AHit,
116  double& disp,
117  double& s) const;
118 
119  void CalculateGeometricalElements();
120  // Pre-calculating geometrical factors
121 
122  // Fcl Attributes.
123 
125 
127 
129 
130  int fRefits;
131 
132  std::vector<double> fMaxViewRMS;
133 
135 
137 
138  double fLengthCut;
139 
141 
143 
144  std::vector<double> fPitches;
145  std::vector<TVector3> fPitchDir;
146  std::vector<TVector3> fWireDir;
147  std::vector<double> fWireZeroOffset;
148  TVector3 fXDir, fYDir, fZDir;
149  size_t fNChannels;
150  };
151 
152 }
153 
154 #endif // SEEDFINDER_H
std::vector< double > fPitches
Reconstruction base classes.
struct vector vector
SpacePointAlg * GetSpacePointAlg() const
virtual void reconfigure(fhicl::ParameterSet const &pset)
General LArSoft Utilities.
Contains all timing reference information for the detector.
std::vector< TVector3 > fWireDir
Direction
Definition: AssnsIter.h:13
std::vector< TVector3 > fPitchDir
Algorithm for generating space points from hits.
std::vector< double > fWireZeroOffset
static QCString * s
Definition: config.cpp:1042
std::vector< double > fMaxViewRMS