LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
KGTrack.h
Go to the documentation of this file.
1 
25 #ifndef KGTRACK_H
26 #define KGTRACK_H
27 
28 #include <map>
29 
32 
36 
37 namespace trkf {
38 
39  class KGTrack
40  {
41  public:
42 
44  KGTrack(int prefplane);
45 
47  ~KGTrack();
48 
49  // Accessors.
50 
51  int getPrefPlane() const {return fPrefPlane;}
52 
54  const std::multimap<double, KHitTrack>& getTrackMap() const {return fTrackMap;}
55 
57  size_t numHits() const {return fTrackMap.size();}
58 
60  const KHitTrack& startTrack() const;
61 
63  const KHitTrack& endTrack() const;
64 
66  bool isValid() const {return fTrackMap.size() > 0;}
67 
68  // Modifiers.
69 
71  std::multimap<double, KHitTrack>& getTrackMap() {return fTrackMap;}
72 
75 
78 
80  void addTrack(const KHitTrack& trh);
81 
83  void recalibrate();
84 
86  void clear() {fTrackMap.clear();}
87 
88  // Methods.
89 
92  int id) const;
93 
96  std::vector<unsigned int>& hittpindex) const;
97 
98  const std::multimap<double, KHitTrack> TrackMap() const { return fTrackMap; }
99 
101  std::ostream& Print(std::ostream& out) const;
102 
103  private:
104 
105  // Attributes.
106 
109 
111  std::multimap<double, KHitTrack> fTrackMap;
112  };
113 
115  std::ostream& operator<<(std::ostream& out, const KGTrack& trg);
116 
117 }
118 
119 #endif
int getPrefPlane() const
Definition: KGTrack.h:51
Basic Kalman filter track class, plus one measurement on same surface.
void fillTrack(recob::Track &track, int id) const
Fill a recob::Track.
Definition: KGTrack.cxx:128
void fillHits(art::PtrVector< recob::Hit > &hits, std::vector< unsigned int > &hittpindex) const
Fill a PtrVector of Hits.
Definition: KGTrack.cxx:219
int fPrefPlane
Preferred plane.
Definition: KGTrack.h:108
void recalibrate()
Recalibrate track map.
Definition: KGTrack.cxx:97
const KHitTrack & endTrack() const
Track at end point.
Definition: KGTrack.cxx:46
std::multimap< double, KHitTrack > & getTrackMap()
Modifiable KHitTrack collection, indexed by path distance.
Definition: KGTrack.h:71
Declaration of signal hit object.
void addTrack(const KHitTrack &trh)
Add track.
Definition: KGTrack.cxx:85
void clear()
Clear track collection.
Definition: KGTrack.h:86
const std::multimap< double, KHitTrack > & getTrackMap() const
KHitTrack collection, indexed by path distance.
Definition: KGTrack.h:54
void hits()
Definition: readHits.C:15
Provides recob::Track data product.
std::ostream & operator<<(std::ostream &out, const KGTrack &trg)
Output operator.
Definition: KGTrack.cxx:306
KGTrack(int prefplane)
Constructor.
Definition: KGTrack.cxx:24
std::multimap< double, KHitTrack > fTrackMap
KHitTrack collection, indexed by path distance.
Definition: KGTrack.h:111
~KGTrack()
Destructor.
Definition: KGTrack.cxx:29
std::ostream & Print(std::ostream &out) const
Printout.
Definition: KGTrack.cxx:253
size_t numHits() const
Number of measurements in track.
Definition: KGTrack.h:57
const std::multimap< double, KHitTrack > TrackMap() const
Definition: KGTrack.h:98
bool isValid() const
Validity flag.
Definition: KGTrack.h:66
Float_t track
Definition: plot.C:34
const KHitTrack & startTrack() const
Track at start point.
Definition: KGTrack.cxx:33
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
Definition: Track.h:52