LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
BezierTrack.h
Go to the documentation of this file.
6 
7 #include "TVector3.h"
8 
9 #include <vector>
10 
11 #ifndef BEZIERTRACK_h
12 #define BEZIERTRACK_h
13 
14 class TVector3;
15 
16 namespace recob
17 {
18  class Hit;
19  class SpacePoint;
20 }
21 
22 namespace calo
23 {
24  class CalorimetryAlg;
25 }
26 
27 namespace trkf {
28 
30  {
31  public:
32  BezierTrack(int id, const recob::Trajectory& traj);
34  BezierTrack(std::vector<TVector3> const& Pos,
35  std::vector<TVector3> const& Dir,
36  std::vector<std::vector<double> > const& dQdx,
37  int id);
38  BezierTrack(std::vector<recob::Seed> const& );
39 
40  int NSegments() const;
41 
42  double GetLength() const;
43  double GetRMSCurvature() const;
44 
45  double GetTotalCharge( unsigned int View ) const;
46  double GetViewdQdx( unsigned int View ) const;
47 
48  TVector3 GetTrackPointV ( double s ) const;
49  TVector3 GetTrackDirectionV ( double s ) const;
50  void GetTrackPoint ( double s, double* xyz ) const;
51  void GetTrackDirection( double s, double* xyz ) const;
52 
53  void FillTrackVectors( std::vector<TVector3>& xyzVector,
54  std::vector<TVector3>& dirVector,
55  double const ds=0.1 ) const;
56 
57  double GetCurvature(double s) const;
58  double GetdQdx(double s, unsigned int View) const ;
59 
60  void GetProjectedPointUVWX( double s, double* uvw, double * x, int c, int t ) const;
61  void GetProjectedPointUVWT( double s, double* uvw, double * ticks, int c, int t ) const;
62 
63  void GetClosestApproach( recob::Hit const& hit, double &s, double& Distance) const;
64  void GetClosestApproach( art::Ptr<recob::Hit> const& hit, double &s, double& Distance) const;
65  void GetClosestApproach( recob::SpacePoint * sp, double &s, double& Distance) const;
66  void GetClosestApproach( recob::Seed const& seed, double &s, double& Distance) const;
67  void GetClosestApproach( TVector3 vec, double &s, double& Distance) const;
68  void GetClosestApproach( uint32_t w, int p, int t, int c, float x, double& s, double& Distance) const;
69 
70 
71  double GetTrackPitch( geo::View_t view, double s, double WirePitch, unsigned int c=0, unsigned int t=0);
72 
73  void GetClosestApproaches( art::PtrVector<recob::Hit> const& hits, std::vector<double>& s, std::vector<double>& Distances) const;
74  void GetClosestApproaches( std::vector< art::Ptr<recob::Hit> > const& hits, std::vector<double>& s, std::vector<double>& Distances) const;
75 
76 
77  void CalculatedQdx(art::PtrVector<recob::Hit>const &);
78  void CalculatedQdx(art::PtrVector<recob::Hit>const &, std::vector<double> const & SValues);
79 
80  anab::Calorimetry GetCalorimetryObject(std::vector<art::Ptr<recob::Hit> > const & Hits, geo::SigType_t sigtype, calo::CalorimetryAlg const& );
81  anab::Calorimetry GetCalorimetryObject(art::PtrVector<recob::Hit > const & Hits, geo::SigType_t sigtype, calo::CalorimetryAlg const& );
82  anab::Calorimetry GetCalorimetryObject(art::PtrVector<recob::Hit> const & Hits, geo::View_t view, calo::CalorimetryAlg const& calalg);
83 
84 
85  BezierTrack Reverse();
86 
87  std::vector<recob::SpacePoint> GetSpacePointTrajectory(int N);
88 
89  BezierTrack GetPartialTrack(double LowS, double HighS);
90 
91  std::vector<recob::Seed> GetSeedVector();
92 
93  int WhichSegment(double S) const;
94 
96  recob::Trajectory const& GetTrajectory() const { return fTraj; }
97 
98  private:
99 
100  void CalculateSegments();
101 
102  void FillTrajectoryVectors();
103  void FillSeedVector();
104 
106  // Clang: private field 'fID' is not used
107  // int fID = -1; ///< Track's ID.
108 
109  std::vector<std::vector<double>> fdQdx;
110 
112  std::vector<double> fSegmentLength;
113  std::vector<double> fCumulativeLength;
114 
115  std::vector<recob::Seed> fSeedCollection;
116 
117  double fTrackLength;
119 
120  };
121 
122  class HitPtrVec
123  {
124  public:
127  std::vector<art::Ptr<recob::Hit> > Hits;
128  };
129 
130 }
131 
132 #endif
Float_t x
Definition: compare.C:6
recob::Trajectory fTraj
Internal trajectory representation.
Definition: BezierTrack.h:105
Float_t s
Definition: plot.C:23
Data product for reconstructed trajectory in space.
Reconstruction base classes.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
std::vector< recob::Seed > fSeedCollection
Definition: BezierTrack.h:115
std::vector< double > fSegmentLength
Definition: BezierTrack.h:112
std::vector< art::Ptr< recob::Hit > > Hits
Definition: BezierTrack.h:127
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
void hits()
Definition: readHits.C:15
std::vector< double > fCumulativeLength
Definition: BezierTrack.h:113
Provides recob::Track data product.
long seed
Definition: chem4.cc:68
enum geo::_plane_sigtype SigType_t
Enumerate the possible plane projections.
recob::Trajectory const & GetTrajectory() const
Returns the current trajectory.
Definition: BezierTrack.h:96
Detector simulation of raw signals on wires.
A trajectory in space reconstructed from hits.
Definition: Trajectory.h:73
std::vector< std::vector< double > > fdQdx
Definition: BezierTrack.h:109
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:49
Float_t track
Definition: plot.C:34
Float_t w
Definition: plot.C:23
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
Definition: Track.h:52
calorimetry