LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
KalmanFilterAlg.h
Go to the documentation of this file.
1 
41 #ifndef KALMANFILTERALG_H
42 #define KALMANFILTERALG_H
43 
44 #include <map>
45 #include <memory>
46 #include <vector>
47 
49 
50 namespace fhicl {
51  class ParameterSet;
52 }
53 namespace trkf {
54  class KETrack;
55  class KGTrack;
56  class KTrack;
57  class KHitContainer;
58 }
59 
60 #include "TCanvas.h"
61 
62 class TMarker;
63 class TPaveText;
64 class TVirtualPad;
65 
66 namespace trkf {
67 
69  public:
71 
72  // Accessors.
73 
74  bool getTrace() const { return fTrace; }
75  int getPlane() const { return fPlane; }
76 
77  // Modifiers.
78 
79  void setTrace(bool trace) { fTrace = trace; }
80  void setPlane(int plane) { fPlane = plane; }
81 
82  // Methods.
83 
85  bool buildTrack(const KTrack& trk, // Starting track.
86  KGTrack& trg, // Result global track.
87  const Propagator& prop, // Propagator.
88  const Propagator::PropDirection dir, // Direction.
89  KHitContainer& hits, // Candidate measurements.
90  bool linear) const; // Linear flag.
91 
93  bool smoothTrack(KGTrack& trg, // Global track to be smoothed.
94  KGTrack* trg1, // Result of unidirectional fit.
95  const Propagator& prop) const; // Propagator.
96 
98  bool extendTrack(KGTrack& trg, // Global track.
99  const Propagator& prop, // Propagator.
100  KHitContainer& hits) const; // Candidate measurements.
101 
103  bool fitMomentumRange(const KGTrack& trg, // Global track.
104  KETrack& tremom) const; // Track with updated momentum.
105 
107  bool fitMomentumMS(const KGTrack& trg, // Global track.
108  const Propagator& prop, // Propagator.
109  KETrack& tremom) const; // Track with updated momentum.
110 
112  bool fitMomentum(const KGTrack& trg, // Global track.
113  const Propagator& prop, // Propagator.
114  KETrack& tremom) const; // Track with updated momentum.
115 
117  bool updateMomentum(const KETrack& tremom, // Track with momentum estimate.
118  const Propagator& prop, // Propagator.
119  KGTrack& trg) const; // Global track to be updated.
120 
122  bool smoothTrackIter(int niter, // Number of iterations.
123  KGTrack& trg, // Global track.
124  const Propagator& prop) const; // Propagator.
125 
127  void cleanTrack(KGTrack& trg) const;
128 
129  private:
130  // Fcl parameters.
131 
132  bool fTrace;
133  double fMaxPErr;
134  double fGoodPErr;
135  double fMaxIncChisq;
138  double fMaxEndChisq;
139  int fMinLHits;
140  double fMaxLDist;
141  double fMaxPredDist;
143  double fMaxPropDist;
144  double fMinSortDist;
145  double fMaxSortDist;
147  double fGapDist;
149  double fMinSampleDist;
151  bool fFitMomMS;
152  bool fGTrace;
153  double fGTraceWW;
154  double fGTraceWH;
155  double fGTraceXMin;
156  double fGTraceXMax;
157  std::vector<double> fGTraceZMin;
158  std::vector<double> fGTraceZMax;
159 
160  // Other attributes.
161 
162  int fPlane;
163  mutable std::vector<std::unique_ptr<TCanvas>> fCanvases;
164  mutable std::vector<TVirtualPad*> fPads;
165  mutable TVirtualPad* fInfoPad;
166  mutable TPaveText* fMessages;
167  mutable std::map<int, TMarker*> fMarkerMap;
168  };
169 }
170 
171 #endif
bool fGTrace
Graphical trace flag.
bool fFitMomRange
Fit momentum using range.
double fMaxPropDist
Maximum propagation distance to candidate surface.
double fGapDist
Minimum gap distance.
bool fFitMomMS
Fit momentum using multiple scattering.
std::map< int, TMarker * > fMarkerMap
Markers in current canvas.
double fMaxEndChisq
Maximum incremental chisquare for endpoint hit.
bool fTrace
Trace flag.
void setTrace(bool trace)
Set trace config parameter.
std::vector< double > fGTraceZMin
Graphical trace minimum z for each view.
double fMaxLDist
Maximum distance for linearized propagation.
double fMaxSortDist
Sort high distance threshold.
double fMaxSeedPredDist
Maximum prediciton distance to accept a hit in seed phase.
double fMaxPredDist
Maximum prediciton distance to accept a hit.
M::value_type trace(const M &m)
void hits()
Definition: readHits.C:15
parameter set interface
double fGTraceWH
Window height.
TVirtualPad * fInfoPad
Information pad.
std::vector< std::unique_ptr< TCanvas > > fCanvases
Graphical trace canvases.
double fGTraceXMin
Graphical trace minimum x.
Base class for Kalman filter track propagator.
double fGoodPErr
Pointing error threshold for switching to free propagation.
TPaveText * fMessages
Message box.
double fMaxSeedIncChisq
Maximum incremental chisquare to accept a hit in seed phase.
double fMaxSmoothIncChisq
Maximum incremental chisquare to accept a hit in smooth phase.
double fMaxIncChisq
Maximum incremental chisquare to accept a hit.
double fMinSampleDist
Minimum sample distance (for momentum measurement).
double fMinSortDist
Sort low distance threshold.
TDirectory * dir
Definition: macro.C:5
double fGTraceXMax
Graphical trace maximum x.
std::vector< TVirtualPad * > fPads
View pads in current canvas.
void setPlane(int plane)
Set preferred view plane.
double fGTraceWW
Window width.
int getPlane() const
Preferred view plane.
std::vector< double > fGTraceZMax
Graphical trace maximum z for each view.
int fMaxSamePlane
Maximum consecutive hits in same plane.
int fMaxNoiseHits
Maximum number of hits in noise cluster.
bool getTrace() const
Trace config parameters.
double fMaxPErr
Maximum pointing error for free propagation.
int fMinLHits
Minimum number of hits to turn off linearized propagation.
PropDirection
Propagation direction enum.
Definition: Propagator.h:94
int fPlane
Preferred view plane.