MarlinTPC  1.2.0
TrackFitterSimpleChiSquarePads.h
1 #ifndef TRACK_FITTER_SIMPLE_CHI_SQUARE_PADS_H
2 #define TRACK_FITTER_SIMPLE_CHI_SQUARE_PADS_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 "TrackFitterSimpleChiSquare.h"
11 
12 namespace gear
13 {
14 class TPCParameters;
15 class PadRowLayout2D;
16 }//namespace gear
17 
18 namespace marlintpc
19 {
33 {
34  public:
35 
40  TrackFitterSimpleChiSquarePads(gear::TPCParameters const *gearTPCParameters,
41  double transDefocussing, double longDefocussing,
42  double transDiffusion, double longDiffusion);
43 
44  virtual ~TrackFitterSimpleChiSquarePads() {}
45 
47  static TrackFitterBase * getInstance(LCParameters const * parameters);
48 
49  virtual std::string getRevision() const;
50 
52  virtual unsigned char getFitterType() const;
53 
54 
67  virtual DoubleVec calculateResiduals(EVENT::Track const * testTrack,
68  unsigned int testHitNumber,
69  EVENT::Track const * referenceTrack = NULL) const;
70 
77  virtual DoubleVec calculateResiduals(EVENT::TrackerHit const * testHit,
78  EVENT::Track const * trackWithoutTestHit) const;
79 
83  virtual IMPL::TrackImpl *fitTrack(EVENT::Track const * seedTrack) const;
84 
85 
86  protected:
87 
89  gear::TPCParameters const *_TPCParameters;
90 
92  gear::PadRowLayout2D const * _padLayout;
93 
96 
99  void initialiseGEARGeometry(gear::TPCParameters const *gearTPCParameters);
100 
103  // double distanceOnCircle(double phi1, double phi2) const;
104 
105  private:
109  static TrackFitterSimpleChiSquarePads * _theSimpleChiSquarePadsFitter;
110 };
111 
112 }// namespace marlintpc
113 
114 #endif // TRACK_FITTER_BASE_H
static TrackFitterBase * getInstance(LCParameters const *parameters)
Well defined interface to create a new instance of the track fitter.
Definition: TrackFitterSimpleChiSquarePads.cc:45
TrackFitterSimpleChiSquarePads(gear::TPCParameters const *gearTPCParameters, double transDefocussing, double longDefocussing, double transDiffusion, double longDiffusion)
The constructor needs the pad geometry, which is taken grom GEAR.
Definition: TrackFitterSimpleChiSquarePads.cc:24
virtual unsigned char getFitterType() const
Information what fitter implementation this is.
Definition: TrackFitterSimpleChiSquarePads.cc:301
virtual 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: TrackFitterSimpleChiSquarePads.cc:102
gear::TPCParameters const * _TPCParameters
A pointer to the GEAR TPC parameters.
Definition: TrackFitterSimpleChiSquarePads.h:89
int _padLayoutType
The type of pad layout (PadRowLayout2D::CARTESIAN or PadRowLayout2D::POLAR)
Definition: TrackFitterSimpleChiSquarePads.h:95
The TrackFitterBase is a virtual class from which the actual track fitters are derived.
Definition: TrackFitterBase.h:44
void initialiseGEARGeometry(gear::TPCParameters const *gearTPCParameters)
Called from both constructors to set the GEAR information (originally there were two, right now this is obsolete)
Definition: TrackFitterSimpleChiSquarePads.cc:317
virtual IMPL::TrackImpl * fitTrack(EVENT::Track const *seedTrack) const
Perform the actual fitting.
Definition: TrackFitterSimpleChiSquarePads.cc:306
fitter which takes into account the pad geometry.
Definition: TrackFitterSimpleChiSquarePads.h:32
gear::PadRowLayout2D const * _padLayout
A pointer to the GEAR pad layout.
Definition: TrackFitterSimpleChiSquarePads.h:92
Simple implementation of a track fitter.
Definition: TrackFitterSimpleChiSquare.h:20
virtual std::string getRevision() const
returns the revision of this implementation and of the TrackFitterBase it is derrived from ...
Definition: TrackFitterSimpleChiSquarePads.cc:296