All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
KHitsTrack.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 ///
3 /// \file KHitsTrack.h
4 ///
5 /// \brief Basic Kalman filter track class, with measurements.
6 ///
7 /// \author H. Greenlee
8 ///
9 /// This class inherits the following attributes from KFitTrack.
10 ///
11 /// 1. Surface.
12 /// 2. Track state vector.
13 /// 3. Track direction parameter.
14 /// 4. Track error matrix.
15 /// 5. Propagation distance.
16 /// 6. Fit chisquare.
17 /// 7. Fit status.
18 ///
19 /// This class adds the following attributes of its own.
20 ///
21 /// 8. A collection of measurements, in the form of a vector
22 /// of shared pointers to KHitBase.
23 ///
24 ////////////////////////////////////////////////////////////////////////
25 
26 #ifndef KHITSTRACK_H
27 #define KHITSTRACK_H
28 
29 #include <vector>
32 
33 namespace trkf {
34 
35  class KHitsTrack : public KFitTrack
36  {
37  public:
38 
39  /// Default constructor.
40  KHitsTrack();
41 
42  /// Initializing constructor - KFitTrack.
43  KHitsTrack(const KFitTrack& trf);
44 
45  /// Initializing constructor - KETrack.
46  KHitsTrack(const KETrack& tre);
47 
48  /// Destructor.
49  virtual ~KHitsTrack();
50 
51  // Accessor.
52 
53  /// Measurement collection.
54  const std::vector<std::shared_ptr<const KHitBase> >& getHits() {return fHits;}
55 
56  // Modifiers.
57 
58  /// Add a measurement.
59  void addHit(const std::shared_ptr<const KHitBase>& hit) {fHits.push_back(hit);}
60 
61  /// Printout
62  virtual std::ostream& Print(std::ostream& out, bool doTitle = true) const;
63 
64  private:
65 
66  // Attributes.
67 
68  /// Measurement collection.
69  std::vector<std::shared_ptr<const KHitBase> > fHits;
70  };
71 }
72 
73 #endif
void addHit(const std::shared_ptr< const KHitBase > &hit)
Add a measurement.
Definition: KHitsTrack.h:59
const std::vector< std::shared_ptr< const KHitBase > > & getHits()
Measurement collection.
Definition: KHitsTrack.h:54
process_name hit
Definition: cheaterreco.fcl:51
KHitsTrack()
Default constructor.
Definition: KHitsTrack.cxx:16
std::vector< std::shared_ptr< const KHitBase > > fHits
Measurement collection.
Definition: KHitsTrack.h:69
virtual ~KHitsTrack()
Destructor.
Definition: KHitsTrack.cxx:40
virtual std::ostream & Print(std::ostream &out, bool doTitle=true) const
Printout.
Definition: KHitsTrack.cxx:44
Basic Kalman filter track class, with fit information.
Base class for Kalman filter measurement.