All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
36  SeedFinderAlgorithm(const fhicl::ParameterSet& pset);
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,
47  std::vector<std::vector<art::PtrVector<recob::Hit>>> const& SortedHits,
48  std::vector<std::vector<art::PtrVector<recob::Hit>>>& HitsPerSeed,
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,
57  art::PtrVector<recob::Hit> const&,
58  std::vector<art::PtrVector<recob::Hit>>&,
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 
68  {
69  return fSptalg;
70  }
71  // Return the SpacePointAlg, as configured for the Seed Finding
72 
73  private:
74  //----------------------
75  // Internal methods
76  //----------------------
77 
78  std::vector<recob::Seed> FindSeeds(detinfo::DetectorClocksData const& clockData,
79  detinfo::DetectorPropertiesData const& detProp,
80  art::PtrVector<recob::Hit> const& HitsFlat,
81  std::vector<art::PtrVector<recob::Hit>>& CataloguedHits,
82  unsigned int StopAfter) const;
83  // Find a collection of seeds, based on the supplied set of hits.
84  // The second argument returns the hits catalogued by which
85  // seed they fell into (if any)
86 
88  std::vector<recob::SpacePoint> const&,
89  std::vector<char>&,
90  std::vector<int>&,
91  art::PtrVector<recob::Hit> const& HitsFlat,
92  std::vector<std::vector<std::vector<int>>>& OrgHits) const;
93  // Find one seed at high Z from the spacepoint collection given. Latter arguments are
94  // for internal book keeping.
95 
96  // size_t CountHits(std::vector<recob::SpacePoint> const& Points);
97  // Counting the number of hits in each view which are associated with a set of SPs
98 
100  art::PtrVector<recob::Hit> const& HitsFlat,
101  std::vector<int>& HitsToUse,
102  TVector3& Center,
103  TVector3& Direction,
104  std::vector<double>& ViewRMS,
105  std::vector<int>& HitsPerView) const;
106 
108  recob::Seed& TheSeed,
109  art::PtrVector<recob::Hit> const&,
110  std::vector<char>& HitStatus,
111  std::vector<std::vector<std::vector<int>>>& OrgHits,
112  bool Extend) const;
113 
115  recob::Seed const& ASeed,
116  art::Ptr<recob::Hit> const& AHit,
117  double& disp,
118  double& s) const;
119 
121  // Pre-calculating geometrical factors
122 
123  // Fcl Attributes.
124 
126 
128 
130 
131  int fRefits;
132 
133  std::vector<double> fMaxViewRMS;
134 
136 
138 
139  double fLengthCut;
140 
142 
144 
145  std::vector<double> fPitches;
146  std::vector<TVector3> fPitchDir;
147  std::vector<TVector3> fWireDir;
148  std::vector<double> fWireZeroOffset;
149  TVector3 fXDir, fYDir, fZDir;
150  size_t fNChannels;
151  };
152 
153 }
154 
155 #endif // SEEDFINDER_H
std::vector< double > fPitches
SeedFinderAlgorithm(const fhicl::ParameterSet &pset)
void GetHitDistAndProj(detinfo::DetectorPropertiesData const &detProp, recob::Seed const &ASeed, art::Ptr< recob::Hit > const &AHit, double &disp, double &s) const
void reconfigure(fhicl::ParameterSet const &pset)
recob::Seed FindSeedAtEnd(detinfo::DetectorPropertiesData const &detProp, std::vector< recob::SpacePoint > const &, std::vector< char > &, std::vector< int > &, art::PtrVector< recob::Hit > const &HitsFlat, std::vector< std::vector< std::vector< int >>> &OrgHits) const
void ConsolidateSeed(detinfo::DetectorPropertiesData const &detProp, recob::Seed &TheSeed, art::PtrVector< recob::Hit > const &, std::vector< char > &HitStatus, std::vector< std::vector< std::vector< int >>> &OrgHits, bool Extend) const
SpacePointAlg * GetSpacePointAlg() const
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
void GetCenterAndDirection(detinfo::DetectorPropertiesData const &detProp, art::PtrVector< recob::Hit > const &HitsFlat, std::vector< int > &HitsToUse, TVector3 &Center, TVector3 &Direction, std::vector< double > &ViewRMS, std::vector< int > &HitsPerView) const
std::vector< recob::Seed > FindSeeds(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, art::PtrVector< recob::Hit > const &HitsFlat, std::vector< art::PtrVector< recob::Hit >> &CataloguedHits, unsigned int StopAfter) const
std::vector< recob::Seed > GetSeedsFromUnSortedHits(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, art::PtrVector< recob::Hit > const &, std::vector< art::PtrVector< recob::Hit >> &, unsigned int StopAfter=0) const
Contains all timing reference information for the detector.
std::vector< TVector3 > fWireDir
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
std::vector< TVector3 > fPitchDir
std::vector< std::vector< recob::Seed > > GetSeedsFromSortedHits(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, std::vector< std::vector< art::PtrVector< recob::Hit >>> const &SortedHits, std::vector< std::vector< art::PtrVector< recob::Hit >>> &HitsPerSeed, unsigned int StopAfter=0) const
std::vector< double > fWireZeroOffset
auto const detProp
std::vector< double > fMaxViewRMS