LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
Seed.h
Go to the documentation of this file.
1 //
3 // \brief 3D seed object for kalman tracking and
4 // bezier tracking
5 //
6 // \author Ben Jones, MIT
7 // bjpjones@mit.edu
8 //
10 
11 #ifndef SEED_H
12 #define SEED_H
13 
14 #include <iosfwd>
15 
16 namespace recob {
17 
18  class SpacePoint;
19 
20  class Seed {
21  public:
22  // Basic constructors
23  Seed();
24 
25  private:
26  double fSeedPoint[3];
27  double fSeedDirection[3];
28  double fSeedPointError[3];
30  bool fIsValid;
31 
32  public:
33  Seed(double* Pt, double* Dir, double* PtErr, double* DirErr);
34 
35  // Getters and setters
36  void GetDirection(double* Dir, double* Err) const;
37  void GetPoint(double* Pt, double* Err) const;
38  double GetLength() const;
39 
40  void Print() const;
41 
42  void SetDirection(double* Dir, double* Err);
43  void SetPoint(double* Pt, double* Err);
44 
45  double GetAngle(Seed const& AnotherSeed) const;
46  double GetProjDiscrepancy(Seed const& AnotherSeed) const;
47  double GetProjAngleDiscrepancy(Seed const& AnotherSeed) const;
48  double GetDistance(Seed const& AnotherSeed) const;
49 
50  Seed Reverse();
51  void GetVectorBetween(Seed const& AnotherSeed, double* xyz) const;
52 
53  double GetDistanceFrom(SpacePoint const& SomePoint) const;
54 
55  int GetPointingSign(Seed const& AnotherSeed) const;
56 
57  // Methods for errorless seeds
58  Seed(double* Pt, double* Dir);
59  void SetDirection(double* Dir);
60  void SetPoint(double* Pt);
61 
62  // Seed validity checks
63  bool IsValid() const;
64  void SetValidity(bool Validity);
65 
66  friend std::ostream& operator<<(std::ostream& stream, Seed const& a);
67 
68  friend bool operator<(const Seed& a, const Seed& b);
69  };
70 
71  void CrossProd(double, double, double, double, double, double, double&, double&, double&);
72 }
73 
74 #endif // SEED_H
double fSeedDirection[3]
Definition: Seed.h:27
friend std::ostream & operator<<(std::ostream &stream, Seed const &a)
Definition: Seed.cxx:303
double GetDistanceFrom(SpacePoint const &SomePoint) const
Definition: Seed.cxx:222
Reconstruction base classes.
double GetProjAngleDiscrepancy(Seed const &AnotherSeed) const
Definition: Seed.cxx:139
bool IsValid() const
Definition: Seed.cxx:58
bool fIsValid
Definition: Seed.h:30
double GetAngle(Seed const &AnotherSeed) const
Definition: Seed.cxx:165
void GetPoint(double *Pt, double *Err) const
Definition: Seed.cxx:89
double GetProjDiscrepancy(Seed const &AnotherSeed) const
Definition: Seed.cxx:193
Seed Reverse()
Definition: Seed.cxx:64
friend bool operator<(const Seed &a, const Seed &b)
Definition: Seed.cxx:315
void CrossProd(double x1, double x2, double x3, double y1, double y2, double y3, double &out1, double &out2, double &out3)
Definition: Seed.cxx:287
void SetPoint(double *Pt, double *Err)
Definition: Seed.cxx:122
double fSeedDirectionError[3]
Definition: Seed.h:29
double GetDistance(Seed const &AnotherSeed) const
Definition: Seed.cxx:209
int GetPointingSign(Seed const &AnotherSeed) const
Definition: Seed.cxx:276
void GetVectorBetween(Seed const &AnotherSeed, double *xyz) const
Definition: Seed.cxx:154
double fSeedPoint[3]
Definition: Seed.h:26
void Print() const
Definition: Seed.cxx:50
void SetValidity(bool Validity)
Definition: Seed.cxx:74
void GetDirection(double *Dir, double *Err) const
Definition: Seed.cxx:80
double fSeedPointError[3]
Definition: Seed.h:28
double GetLength() const
Definition: Seed.cxx:132
void SetDirection(double *Dir, double *Err)
Definition: Seed.cxx:112