Seed.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////
2 //
3 // \brief 3D seed object for kalman tracking and
4 // bezier tracking
5 //
6 // \author Ben Jones, MIT
7 // bjpjones@mit.edu
8 //
9 ////////////////////////////////////////////////////////////////////////////
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  {
22  public:
23  // Basic constructors
24  Seed();
25 
26  private:
27  double fSeedPoint[3];
28  double fSeedDirection[3];
29  double fSeedPointError[3];
31  bool fIsValid;
32 
33 
34  public:
35 
36  Seed(double* Pt,
37  double * Dir,
38  double* PtErr,
39  double* DirErr);
40 
41 
42  // Getters and setters
43  void GetDirection(double* Dir, double* Err) const;
44  void GetPoint(double* Pt, double* Err) const;
45  double GetLength() const;
46 
47  void Print() const;
48 
49  void SetDirection(double* Dir, double* Err);
50  void SetPoint(double * Pt, double* Err);
51 
52 
53  double GetAngle( Seed const & AnotherSeed ) const;
54  double GetProjDiscrepancy ( Seed const & AnotherSeed ) const;
55  double GetProjAngleDiscrepancy( Seed const & AnotherSeed ) const;
56  double GetDistance( Seed const & AnotherSeed ) const;
57 
58  Seed Reverse();
59  void GetVectorBetween( Seed const & AnotherSeed, double * xyz ) const;
60 
61  double GetDistanceFrom( SpacePoint const & SomePoint) const;
62 
63  int GetPointingSign( Seed const & AnotherSeed ) const;
64 
65  // Methods for errorless seeds
66  Seed(double* Pt, double * Dir);
67  void SetDirection(double* Dir);
68  void SetPoint(double * Pt);
69 
70  // Seed validity checks
71  bool IsValid() const;
72  void SetValidity(bool Validity);
73 
74  friend std::ostream& operator << (std::ostream& stream, Seed const& a);
75 
76  friend bool operator < (const Seed & a, const Seed & b);
77 
78  };
79 
80  void CrossProd(double, double, double,
81  double, double, double,
82  double&, double&, double&);
83 }
84 
85 #endif // SEED_H
double fSeedDirection[3]
Definition: Seed.h:28
friend std::ostream & operator<<(std::ostream &stream, Seed const &a)
Definition: Seed.cxx:341
double GetDistanceFrom(SpacePoint const &SomePoint) const
Definition: Seed.cxx:253
Reconstruction base classes.
double GetProjAngleDiscrepancy(Seed const &AnotherSeed) const
Definition: Seed.cxx:164
bool IsValid() const
Definition: Seed.cxx:70
bool fIsValid
Definition: Seed.h:31
double GetAngle(Seed const &AnotherSeed) const
Definition: Seed.cxx:192
void GetPoint(double *Pt, double *Err) const
Definition: Seed.cxx:108
double GetProjDiscrepancy(Seed const &AnotherSeed) const
Definition: Seed.cxx:222
Seed Reverse()
Definition: Seed.cxx:77
friend bool operator<(const Seed &a, const Seed &b)
Definition: Seed.cxx:357
void CrossProd(double x1, double x2, double x3, double y1, double y2, double y3, double &out1, double &out2, double &out3)
Definition: Seed.cxx:331
void SetPoint(double *Pt, double *Err)
Definition: Seed.cxx:144
double fSeedDirectionError[3]
Definition: Seed.h:30
const double a
double GetDistance(Seed const &AnotherSeed) const
Definition: Seed.cxx:239
int GetPointingSign(Seed const &AnotherSeed) const
Definition: Seed.cxx:318
void GetVectorBetween(Seed const &AnotherSeed, double *xyz) const
Definition: Seed.cxx:179
double fSeedPoint[3]
Definition: Seed.h:27
static bool * b
Definition: config.cpp:1043
void Print() const
Definition: Seed.cxx:55
void SetValidity(bool Validity)
Definition: Seed.cxx:90
void GetDirection(double *Dir, double *Err) const
Definition: Seed.cxx:98
double fSeedPointError[3]
Definition: Seed.h:29
double GetLength() const
Definition: Seed.cxx:155
void SetDirection(double *Dir, double *Err)
Definition: Seed.cxx:133