LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
KGTrack.h
Go to the documentation of this file.
1 
25 #ifndef KGTRACK_H
26 #define KGTRACK_H
27 
28 #include <iosfwd>
29 #include <map>
30 #include <vector>
31 
33 
35 
36 namespace detinfo {
37  class DetectorPropertiesData;
38 }
39 
40 namespace recob {
41  class Hit;
42  class Track;
43 }
44 
45 namespace trkf {
46 
47  class KGTrack {
48  public:
49  KGTrack(int prefplane);
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 
74  KHitTrack& startTrack();
75 
77  KHitTrack& endTrack();
78 
80  void addTrack(const KHitTrack& trh);
81 
83  void recalibrate();
84 
86  void clear() { fTrackMap.clear(); }
87 
88  // Methods.
89 
91  void fillTrack(detinfo::DetectorPropertiesData const& detProp,
93  int id) const;
94 
96  void fillHits(art::PtrVector<recob::Hit>& hits, 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:
106 
108  std::multimap<double, KHitTrack> fTrackMap;
109  };
110 
112  std::ostream& operator<<(std::ostream& out, const KGTrack& trg);
113 
114 }
115 
116 #endif
int getPrefPlane() const
Definition: KGTrack.h:51
Basic Kalman filter track class, plus one measurement on same surface.
Reconstruction base classes.
int fPrefPlane
Preferred plane.
Definition: KGTrack.h:105
std::multimap< double, KHitTrack > & getTrackMap()
Modifiable KHitTrack collection, indexed by path distance.
Definition: KGTrack.h:71
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
General LArSoft Utilities.
void Print(G4Element &ele)
Definition: pyG4Element.cc:55
Stream & operator<<(Stream &&out, CallInfo_t const &info)
Helper operator to insert a call information in a stream with default options.
Definition: DebugUtils.h:389
std::multimap< double, KHitTrack > fTrackMap
KHitTrack collection, indexed by path distance.
Definition: KGTrack.h:108
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:35
Definition: Track.hh:42
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:49