MarlinTPC  1.2.0
KalTrackingStraight.h
1 #ifndef KALTRACKINGSTRAIGHT_H
2 #define KALTRACKINGSTRAIGHT_H
3 
4 #include "KalTrackingTemplate.h"
5 #include "StraightTrackParameters.h"
6 #include <TObject.h>
7 
8 #include <cmath>
9 #include <TMatrixD.h>
10 
11 namespace marlintpc
12 {
13 
20 class KalTrackingStraight : public KalTrackingTemplate<StraightTrackParameters>
21 {
22  public:
23  KalTrackingStraight(const gear::GearMgr &gearMgr,
24  unsigned int minTrackHits,
25  unsigned int maxSkipRows,
26  double maxDeltaChi2,
27  int hitDistanceFactor,
28  int hitStartingMode,
29  double vDrift,
30  std::string moduleNotUsed);
31 
34  inline int getType()
35  {
36  return 0;
37  }
38 
39  inline double getSlope()
40  {
41  return _containerTrack->_sv[0][0];
42  }
43 
44  inline double getIntercept()
45  {
46  return _containerTrack->_sv[1][0];
47  }
48 
51  inline double getDeltaChi2()
52  {
53  return _containerTrack->_deltaChi2;
54  }
55 
56  protected:
59  virtual bool doAddAndFilter(StraightTrackParameters * track, ModuleRowHit hit) ;
60 
61  //TODO::
62  //this function is not implemented correctly now
63  virtual double getTrackTangentAndLayerAngle(StraightTrackParameters * track){return 1.;}
64 
65  //
66  //virtual StraightTrackParameters * createTrackCandidate( ModuleRowHit hit );
67 
70  virtual bool searchTrack(ModuleRowHit hit);
71 
72  virtual void setLCIOTrackParameters(IMPL::TrackImpl* trk);
73 
74  void printStateVector();
75 
78  virtual double calculateDeltaChi2(StraightTrackParameters * trackCandidate);
79 
80  virtual Intersection extrapolateIntoNextLayer(int targetDistance,
81  bool useFarHit);
82  virtual const kaldet::GearTPCMeasLayer* extrapolateIntoNextLayer(int targetDistance);
83 
84  private:
85  KalTrackingStraight(const KalTrackingStraight& orig);
86  KalTrackingStraight & operator=(const KalTrackingStraight&);
87 
88  // a friend class for unit testing the protected member functions
89  friend class KalTrackingStraightTester;
90 };
91 
92 }//namespace
93 #endif
This is the straight track class, which inherits from AttKalTrack.
Definition: KalTrackingStraight.h:20
virtual bool doAddAndFilter(StraightTrackParameters *track, ModuleRowHit hit)
Add a new site to track and update track parameters.
double getDeltaChi2()
Get the Chi2 increment at one step.
Definition: KalTrackingStraight.h:51
virtual bool searchTrack(ModuleRowHit hit)
Search track starting from hit.
void printStateVector()
Convenience function for printing.
Struct to hold module and row and a hit in this row.
Definition: TPCHitMap.h:79
virtual double calculateDeltaChi2(StraightTrackParameters *trackCandidate)
Get the deltaChi2 from the track candidate.
A helper struct to store track parameters for KalTrackingStraight.
Definition: StraightTrackParameters.h:13
This is a base KalDet tracking class.
Definition: KalTrackingTemplate.h:31
virtual Intersection extrapolateIntoNextLayer(int targetDistance, bool useFarHit)
Use the current track state of the containerTrack to extrapolate into the next layer.
int getType()
Get track type: straight line.
Definition: KalTrackingStraight.h:34