MarlinTPC  1.2.0
TrackFitterKalman.h
1 #ifndef TRACK_FITTER_KALMAN_H
2 #define TRACK_FITTER_KALMAN_H
3 
4 #include <string>
5 #include <marlin/StringParameters.h>
6 #include <EVENT/LCRunHeader.h>
7 #include <EVENT/Track.h>
8 #include <IMPL/TrackImpl.h>
9 #include <EVENT/TrackerHit.h>
10 #include "TrackFitterBase.h"
11 #include "marlin/Processor.h"
12 
13 //AIDA
14 #include <AIDA/AIDA.h>
15 #include <marlin/AIDAProcessor.h>
16 #include <AIDA/ITree.h>
17 #include <AIDA/ITupleFactory.h>
18 #include <AIDA/ITuple.h>
19 
20 
21 
22 class EXTPCKalDetector;
23 class TKalTrack;
24 
25 namespace gear
26 {
27 class TPCParameters;
28 class PadRowLayout2D;
29 } //namespace gear
30 
31 namespace AIDA
32 {
33 class ITuple;
34 }
35 
36 namespace marlintpc
37 {
43 //class TrackFitterKalman : public TrackFitterBase, public TrackFitterKalmanProcessor {
45 {
46 
47  private:
48 
55 
56  public:
57 
58  virtual ~TrackFitterKalman();
59 
61  static TrackFitterBase * getInstance(LCParameters const * parameters = 0);
62 
63  virtual std::string getRevision() const;
64 
66  virtual unsigned char getFitterType() const;
67 
68 #if 0
69 
82  virtual DoubleVec calculateResiduals(EVENT::Track const * testTrack,
83  unsigned int testHitNumber,
84  EVENT::Track const *referenceTrack = NULL) const;
85 
92  virtual DoubleVec calculateResiduals(EVENT::TrackerHit const * testHit,
93  EVENT::Track const * trackWithoutTestHit) const;
94 #endif
95 
99  virtual IMPL::TrackImpl *fitTrack(EVENT::Track const * seedTrack) const;
100 
101 
105  void toLCIOTrack(TKalTrack &kaltrack, IMPL::TrackImpl* trk) const;
106 
107  private:
108 
110  gear::TPCParameters const * _TPCParameters;
111 
113  gear::PadRowLayout2D const * _padLayout;
114 
116  static EXTPCKalDetector * _kaldetPtr;
117 
119  int _padLayoutType;
120 
124  static TrackFitterKalman * _theKalmanFilterFitter;
125 
127 #if 1
128  static bool fgIsUpperHit;
129  static bool fgIsLowerHit;
130  static bool fgIsMidHit;
131 #endif
132  // };
133 
134  // Add on Mar for NTuple.
135  public:
136  void SetTuplePtr(AIDA::ITuple * ptrTuple = 0)
137  {
138  _kalmantuple = ptrTuple;
139  }
140 
141  protected:
142  AIDA::ITuple * _kalmantuple;
143 
144  // end
145 
146 };
147 
148 } // namespace marlintpc
149 
150 #endif // TRACK_FITTER_KALMAN_H
Kalman filter track fitter.
Definition: TrackFitterKalman.h:44
virtual EVENT::DoubleVec calculateResiduals(EVENT::Track const *testTrack, unsigned int testHitNumber, EVENT::Track const *referenceTrack=NULL) const
Return the distance of the hit testHitNumber of the testTrack to the point of closest approach on the...
Definition: TrackFitterBase.cc:33
virtual unsigned char getFitterType() const
Information what fitter implementation this is.
void toLCIOTrack(TKalTrack &kaltrack, IMPL::TrackImpl *trk) const
Fill the track state (incl.
The TrackFitterBase is a virtual class from which the actual track fitters are derived.
Definition: TrackFitterBase.h:44
static TrackFitterBase * getInstance(LCParameters const *parameters=0)
Well defined interface to create a new instance of the track fitter.
Definition: TrackFitterKalman.cc:816
virtual std::string getRevision() const
Get the revision of the actual fitter implementation.
virtual IMPL::TrackImpl * fitTrack(EVENT::Track const *seedTrack) const
Perform the actual fitting.