LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 
14 #include "TVector3.h"
16 #include "TTree.h"
17 
18 namespace recob
19 {
20  class SpacePoint;
21  class Seed;
22  class Hit;
23 }
24 
25 namespace trkf {
26 
28  {
29  public:
30 
31  //--------------------------------------
32  // Constructors, destructor, reconfigure
33  //--------------------------------------
34 
37 
38  void reconfigure(fhicl::ParameterSet const& pset);
39 
40 
41 
42  //----------------------
43  // Seedfinding methods
44  //----------------------
45 
46 
47  std::vector<std::vector<recob::Seed> > GetSeedsFromSortedHits( std::vector< std::vector<art::PtrVector<recob::Hit> > > const& SortedHits,
48  std::vector<std::vector<art::PtrVector<recob::Hit> > >& HitsPerSeed, unsigned int StopAfter=0);
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 
54 
55  std::vector<recob::Seed> GetSeedsFromUnSortedHits(art::PtrVector<recob::Hit> const &, std::vector<art::PtrVector<recob::Hit> >&, unsigned int StopAfter=0);
56  // Return a vector of seeds formed from an unstructured collection of hits
57 
58 
59 
60  //----------------------
61  // Alg passing
62  //----------------------
63 
64 
65  SpacePointAlg * GetSpacePointAlg() const { return fSptalg; }
66  // Return the SpacePointAlg, as configured for the Seed Finding
67 
68 
69 
70 
71 
72  private:
73 
74  //----------------------
75  // Internal methods
76  //----------------------
77 
78 
79  std::vector<recob::Seed> FindSeeds( art::PtrVector<recob::Hit> const& HitsFlat, std::vector<art::PtrVector<recob::Hit> >& CataloguedHits, unsigned int StopAfter);
80  // Find a collection of seeds, based on the supplied set of hits.
81  // The second argument returns the hits catalogued by which
82  // seed they fell into (if any)
83 
84 
85 
86  recob::Seed FindSeedAtEnd(std::vector<recob::SpacePoint> const&, std::vector<char>&, std::vector<int>&,
87  art::PtrVector<recob::Hit> const& HitsFlat, std::vector< std::vector< std::vector<int> > >& OrgHits);
88  // Find one seed at high Z from the spacepoint collection given. Latter arguments are
89  // for internal book keeping.
90 
91 
92 
93  size_t CountHits(std::vector<recob::SpacePoint> const& Points);
94  // Counting the number of hits in each view which are associated with a set of SPs
95 
96 
97 
98  void GetCenterAndDirection(art::PtrVector<recob::Hit> const& HitsFlat, std::vector<int>& HitsToUse, TVector3& Center, TVector3& Direction, std::vector<double>& ViewRMS, std::vector<int>& HitsPerView);
99 
100 
101  void ConsolidateSeed(recob::Seed& TheSeed, art::PtrVector<recob::Hit> const&, std::vector<char>& HitStatus,
102  std::vector< std::vector< std::vector<int> > >& OrgHits, bool Extend);
103 
104  void GetHitDistAndProj( recob::Seed const& ASeed, art::Ptr<recob::Hit> const& AHit, double& disp, double& s);
105 
106 
107  void CalculateGeometricalElements();
108  // Pre-calculating geometrical factors
109 
110 
111  // Fcl Attributes.
112 
114 
116 
118 
119  int fRefits;
120 
121  std::vector<double> fMaxViewRMS;
122 
124 
126 
127  double fLengthCut;
128 
130 
132 
133 
134  std::vector<double> fPitches;
135  std::vector<TVector3> fPitchDir;
136  std::vector<TVector3> fWireDir;
137  std::vector<double> fWireZeroOffset;
138  TVector3 fXDir, fYDir, fZDir;
139  size_t fNChannels;
140  };
141 
142 }
143 
144 #endif // SEEDFINDER_H
std::vector< double > fPitches
Float_t s
Definition: plot.C:23
Reconstruction base classes.
SpacePointAlg * GetSpacePointAlg() const
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
std::vector< TVector3 > fWireDir
Direction
Definition: AssnsIter.h:24
std::vector< TVector3 > fPitchDir
Algorithm for generating space points from hits.
std::vector< double > fWireZeroOffset
art framework interface to geometry description
std::vector< double > fMaxViewRMS