LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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  {
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:345
double GetDistanceFrom(SpacePoint const &SomePoint) const
Definition: Seed.cxx:257
Reconstruction base classes.
double GetProjAngleDiscrepancy(Seed const &AnotherSeed) const
Definition: Seed.cxx:168
bool IsValid() const
Definition: Seed.cxx:74
bool fIsValid
Definition: Seed.h:31
double GetAngle(Seed const &AnotherSeed) const
Definition: Seed.cxx:196
void GetPoint(double *Pt, double *Err) const
Definition: Seed.cxx:112
double GetProjDiscrepancy(Seed const &AnotherSeed) const
Definition: Seed.cxx:226
Seed Reverse()
Definition: Seed.cxx:81
friend bool operator<(const Seed &a, const Seed &b)
Definition: Seed.cxx:361
void CrossProd(double x1, double x2, double x3, double y1, double y2, double y3, double &out1, double &out2, double &out3)
Definition: Seed.cxx:335
void SetPoint(double *Pt, double *Err)
Definition: Seed.cxx:148
double fSeedDirectionError[3]
Definition: Seed.h:30
double GetDistance(Seed const &AnotherSeed) const
Definition: Seed.cxx:243
int GetPointingSign(Seed const &AnotherSeed) const
Definition: Seed.cxx:322
void GetVectorBetween(Seed const &AnotherSeed, double *xyz) const
Definition: Seed.cxx:183
double fSeedPoint[3]
Definition: Seed.h:27
void Print() const
Definition: Seed.cxx:59
void SetValidity(bool Validity)
Definition: Seed.cxx:94
void GetDirection(double *Dir, double *Err) const
Definition: Seed.cxx:102
double fSeedPointError[3]
Definition: Seed.h:29
double GetLength() const
Definition: Seed.cxx:159
void SetDirection(double *Dir, double *Err)
Definition: Seed.cxx:137