LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
BezierTrackerAlgorithm.h
Go to the documentation of this file.
2 #include "TVector3.h"
3 
4 #ifndef BEZIERTRACKERALG_H
5 #define BEZIERTRACKERALG_H
6 
7 //
8 // Name: BezierTrackerAlgorithm.h
9 //
10 // Purpose: Header file for module BezierTrackerAlgorithm. This
11 // algorithm contains tools for producing and combining bezier
12 // tracks made up of seed segments.
14 // Ben Jones, MIT
15 //
16 
19 
20 namespace recob
21 {
22  class Seed;
23  class Track;
24  class Hit;
25  class Vertex;
26 }
27 
28 
29 
30 namespace trkf {
31 
32  class BezierTrack;
33 
35  {
36  public:
37 
38  // Constructors, destructor
39 
40  explicit BezierTrackerAlgorithm(fhicl::ParameterSet const& pset);
41  virtual ~BezierTrackerAlgorithm();
42 
43 
44 
45  void FilterOverlapTracks(std::vector<trkf::BezierTrack>& BTracks, std::vector<art::PtrVector<recob::Hit> > & HitVecs, std::vector<std::vector<std::pair<int, int> > >& ClustersUsed);
46 
47  void MakeDirectJoins(std::vector<trkf::BezierTrack>& BTracks, std::vector<art::PtrVector<recob::Hit> > & HitVecs, std::vector<std::vector<std::pair<int, int> > >& ClustersUsed);
48 
49  void AddPtrVectors(art::PtrVector<recob::Hit>& Receiever, art::PtrVector<recob::Hit> const & ToAdd);
50 
51 
52 
53  trkf::SeedFinderAlgorithm * GetSeedFinderAlgorithm() { return fTheSeedFinder;}
54 
55  void MakeVertexJoins(std::vector<trkf::BezierTrack>& BTracks, std::vector<recob::Vertex>& Vertices, std::vector<std::vector<int> >& Mapping);
56 
57 
58  void MakeOverlapJoins(std::vector<trkf::BezierTrack>& BTracks, std::vector<art::PtrVector<recob::Hit> > & HitVecs, std::vector<std::vector<std::pair<int, int> > >& ClustersUsed);
59 
60 
61  std::vector<trkf::BezierTrack> MakeTracks(std::vector<std::vector<art::PtrVector<recob::Hit> > >& SortedHits, std::vector<art::PtrVector<recob::Hit> >& HitAssocs, std::vector<std::vector<std::pair<int, int> > >& ClustersUsed);
62 
63  void GetTracksForCombo(std::vector<recob::Seed>& Seeds, art::PtrVector<recob::Hit>& UHits, art::PtrVector<recob::Hit>& VHits, art::PtrVector<recob::Hit>& WHits);
64 
65  std::vector<std::vector< recob::Seed > > OrganizeSeedsIntoTracks(std::vector<recob::Seed >& AllSeeds, std::vector<art::PtrVector<recob::Hit> * >& AllHits, std::vector<art::PtrVector<recob::Hit> >& WhichHitsPerSeed, std::vector<std::vector< std::vector<int> >* >& OrgHits, std::vector<std::vector<std::vector<int> > >& WhichHitsPerTrack);
66 
67  void GetSeedDirProjected(recob::Seed const& TheSeed, std::vector<double>& WireCoord, std::vector<double>& TimeCoord);
68 
69  bool EvaluateOccupancy(recob::Seed& Seed1, recob::Seed& Seed2, double dThresh, std::vector<art::PtrVector<recob::Hit>*>& AllHits, std::vector<std::vector< std::vector<int> >* >& OrgHits, std::vector<uint32_t>& LowChan, std::vector<uint32_t>& HighChan, std::vector<std::vector<int> >& HitStatus, std::vector<std::vector<int> >& TheseHits);
70 
71  void SortTracksByLength(std::vector<trkf::BezierTrack>& BTracks, std::vector<art::PtrVector<recob::Hit> > & HitVecs, std::vector<std::vector<std::pair<int,int> > >& ClustersUsed);
72 
73  void CalculateGeometricalElements();
74 
76 
77 
78 
79  // Overrides.
80 
81  void reconfigure(fhicl::ParameterSet const& pset);
82 
83 
84 
85  private:
86 
87  // Fcl Attributes.
88 
89 
90 
91 
92  double fOverlapCut;
97 
100 
101  std::vector<double> fPitches;
102  std::vector<double> fPlaneTimeOffsets;
103  std::vector<TVector3> fPitchDir;
104  std::vector<TVector3> fWireDir;
105  std::vector<double> fWireZeroOffset;
106  TVector3 fXDir, fYDir, fZDir;
107 
108 
109  void GetImpact(TVector3 t1pt, TVector3 t1dir, TVector3 t2pt, TVector3 t2dir, double& ImpactParam, double& Dist1, double& Dist2);
110 
111 
112 
113 
115 
116  };
117 }
118 
119 #endif
Reconstruction base classes.
double Dist2(const TVector2 &v1, const TVector2 &v2)
Definition: Utilities.cxx:19
std::vector< TVector3 > fPitchDir
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
std::vector< double > fPlaneTimeOffsets
SeedFinderAlgorithm * fTheSeedFinder
std::vector< double > fWireZeroOffset
trkf::SeedFinderAlgorithm * GetSeedFinderAlgorithm()
std::vector< TVector3 > fWireDir
Definition: Track.hh:43