KHitBase.cxx
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////
2 ///
3 /// \file KHitBase.cxx
4 ///
5 /// \brief Base class for Kalman filter measurement.
6 ///
7 /// \author H. Greenlee
8 ///
9 ////////////////////////////////////////////////////////////////////////
10 
12 
13 #include <ostream>
14 
15 namespace trkf {
16 
17  /// Default Constructor.
18  KHitBase::KHitBase() : fPredDist(0.), fID(0), fMeasPlane(-1) {}
19 
20  /// Initializing Constructor.
21  ///
22  /// Arguments:
23  ///
24  /// psurf - Measurement surface pointer.
25  ///
26  KHitBase::KHitBase(const std::shared_ptr<const Surface>& psurf, int plane)
27  : fPredDist(0.), fID(0), fMeasSurf(psurf), fMeasPlane(plane)
28  {}
29 
30  /// Printout
31  std::ostream&
32  KHitBase::Print(std::ostream& out, bool doTitle) const
33  {
34  if (doTitle) out << "KHitBase:\n";
35  out << " Measurement Surface: " << *fMeasSurf << "\n";
36  out << " Measurement Plane: " << fMeasPlane << "\n";
37  if (fPredSurf.get() != 0) {
38  out << " Prediction Surface: " << *fPredSurf << "\n";
39  out << " Prediction Distance: " << fPredDist << "\n";
40  }
41  return out;
42  }
43 
44  /// Output operator.
45  std::ostream&
46  operator<<(std::ostream& out, const KHitBase& trk)
47  {
48  return trk.Print(out);
49  }
50 
51 } // end namespace trkf
std::shared_ptr< const Surface > fMeasSurf
Measurement surface.
Definition: KHitBase.h:150
virtual std::ostream & Print(std::ostream &out, bool doTitle=true) const
Printout.
Definition: KHitBase.cxx:32
std::shared_ptr< const Surface > fPredSurf
Prediction surface.
Definition: KHitBase.h:145
std::ostream & operator<<(std::ostream &out, const KGTrack &trg)
Output operator.
Definition: KGTrack.cxx:309
KHitBase()
Default constructor.
Definition: KHitBase.cxx:18
int fID
Unique id.
Definition: KHitBase.h:147
double fPredDist
Prediction distance.
Definition: KHitBase.h:146
int fMeasPlane
Measurement plane index.
Definition: KHitBase.h:151
Base class for Kalman filter measurement.