LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
KHitBase.cxx
Go to the documentation of this file.
1 
12 
13 #include <ostream>
14 
15 namespace trkf {
16 
18  KHitBase::KHitBase() : fPredDist(0.), fID(0), fMeasPlane(-1) {}
19 
26  KHitBase::KHitBase(const std::shared_ptr<const Surface>& psurf, int plane)
27  : fPredDist(0.), fID(0), fMeasSurf(psurf), fMeasPlane(plane)
28  {}
29 
31  std::ostream& KHitBase::Print(std::ostream& out, bool doTitle) const
32  {
33  if (doTitle) out << "KHitBase:\n";
34  out << " Measurement Surface: " << *fMeasSurf << "\n";
35  out << " Measurement Plane: " << fMeasPlane << "\n";
36  if (fPredSurf.get() != 0) {
37  out << " Prediction Surface: " << *fPredSurf << "\n";
38  out << " Prediction Distance: " << fPredDist << "\n";
39  }
40  return out;
41  }
42 
44  std::ostream& operator<<(std::ostream& out, const KHitBase& trk)
45  {
46  return trk.Print(out);
47  }
48 
49 } // end namespace trkf
std::shared_ptr< const Surface > fMeasSurf
Measurement surface.
Definition: KHitBase.h:122
virtual std::ostream & Print(std::ostream &out, bool doTitle=true) const
Printout.
Definition: KHitBase.cxx:31
std::shared_ptr< const Surface > fPredSurf
Prediction surface.
Definition: KHitBase.h:117
std::ostream & operator<<(std::ostream &out, const KGTrack &trg)
Output operator.
Definition: KGTrack.cxx:300
KHitBase()
Default constructor.
Definition: KHitBase.cxx:18
int fID
Unique id.
Definition: KHitBase.h:119
double fPredDist
Prediction distance.
Definition: KHitBase.h:118
int fMeasPlane
Measurement plane index.
Definition: KHitBase.h:123
Base class for Kalman filter measurement.