All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
KETrack.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 ///
3 /// \file KETrack.h
4 ///
5 /// \brief Basic Kalman filter track class, with error.
6 ///
7 /// \author H. Greenlee
8 ///
9 /// This class inherits the following attributes from KTrack.
10 ///
11 /// 1. Surface.
12 /// 2. Track state vector.
13 /// 3. Track direction parameter.
14 ///
15 /// This class adds the following attributes of its own.
16 ///
17 /// 4. Track error matrix.
18 ///
19 ////////////////////////////////////////////////////////////////////////
20 
21 #ifndef KETRACK_H
22 #define KETRACK_H
23 
25 #include <optional>
26 
27 namespace trkf {
28 
29  class KETrack : public KTrack {
30  public:
31  /// Default constructor.
32  KETrack();
33 
34  /// Constructor - specify surface only.
35  KETrack(const std::shared_ptr<const Surface>& psurf);
36 
37  /// Constructor - surface + track parameters + error matrix.
38  KETrack(const std::shared_ptr<const Surface>& psurf,
39  const TrackVector& vec,
40  const TrackError& err,
42  int pdg = 0);
43 
44  /// Constructor - KTrack + error matrix.
45  KETrack(const KTrack& trk, const TrackError& err);
46 
47  /// Destructor.
48  virtual ~KETrack();
49 
50  // Accessors.
51 
52  const TrackError&
53  getError() const
54  {
55  return fErr;
56  } ///< Track error matrix.
57  double PointingError() const; ///< Pointing error (radians).
58 
59  // Modifiers.
60 
61  TrackError&
63  {
64  return fErr;
65  } ///< Modifiable error matrix.
66  void
67  setError(const TrackError& err)
68  {
69  fErr = err;
70  } ///< Set error matrix.
71 
72  /// Combine two tracks.
73  std::optional<double> combineTrack(const KETrack& tre);
74 
75  /// Printout
76  virtual std::ostream& Print(std::ostream& out, bool doTitle = true) const;
77 
78  private:
79  // Attributes.
80 
81  TrackError fErr; ///< Track error matrix.
82  };
83 }
84 
85 #endif
const TrackError & getError() const
Track error matrix.
Definition: KETrack.h:53
TrackDirection
Track direction enum.
var pdg
Definition: selectors.fcl:14
double PointingError() const
Pointing error (radians).
Definition: KETrack.cxx:67
TrackError & getError()
Modifiable error matrix.
Definition: KETrack.h:62
KSymMatrix< 5 >::type TrackError
Track error matrix, dimension 5x5.
EResult err(const char *call)
KETrack()
Default constructor.
Definition: KETrack.cxx:18
void setError(const TrackError &err)
Set error matrix.
Definition: KETrack.h:67
virtual ~KETrack()
Destructor.
Definition: KETrack.cxx:56
std::optional< double > combineTrack(const KETrack &tre)
Combine two tracks.
Definition: KETrack.cxx:89
KVector< 5 >::type TrackVector
Track state vector, dimension 5.
tuple dir
Definition: dropbox.py:28
TrackError fErr
Track error matrix.
Definition: KETrack.h:81
virtual std::ostream & Print(std::ostream &out, bool doTitle=true) const
Printout.
Definition: KETrack.cxx:182
Basic Kalman filter track class, without error.