CMS 3D CMS Logo

ChiSquaredFitBase.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTMTT_ChiSquaredFitBase_h
2 #define L1Trigger_TrackFindingTMTT_ChiSquaredFitBase_h
3 
5 
7 
12 #include <TMatrixD.h>
13 #include <TVectorD.h>
14 
15 #include <vector>
16 #include <map>
17 #include <utility>
18 
19 namespace tmtt {
20 
22  public:
23  enum PAR_IDS { INVR, PHI0, T, Z0, D0 };
24 
25  public:
26  ChiSquaredFitBase(const Settings* settings, const uint nPar);
27 
28  L1fittedTrack fit(const L1track3D& l1track3D) override;
29 
30  protected:
31  /* Methods */
32  virtual TVectorD seed(const L1track3D& l1track3D) = 0;
33  virtual TVectorD residuals(const TVectorD& x) = 0; // Stub residuals/uncertainty
34  virtual TMatrixD D(const TVectorD& x) = 0; // derivatives
35  virtual TMatrixD Vinv() = 0; // Covariances
36 
37  /* Variables */
38  double qOverPt_seed_;
39  std::vector<Stub*> stubs_;
40  TVectorD trackParams_;
44  double chiSq_;
45 
46  private:
47  void calculateChiSq(const TVectorD& resids);
48  void calculateDeltaChiSq(const TVectorD& deltaX, const TVectorD& covX);
49 
54 
55  unsigned int minStubLayers_;
56  unsigned int minStubLayersRed_;
57  };
58 
59 } // namespace tmtt
60 
61 #endif
virtual TVectorD residuals(const TVectorD &x)=0
void calculateChiSq(const TVectorD &resids)
virtual TMatrixD D(const TVectorD &x)=0
virtual TMatrixD Vinv()=0
virtual TVectorD seed(const L1track3D &l1track3D)=0
ChiSquaredFitBase(const Settings *settings, const uint nPar)
std::vector< Stub * > stubs_
L1fittedTrack fit(const L1track3D &l1track3D) override
void calculateDeltaChiSq(const TVectorD &deltaX, const TVectorD &covX)
=== This is the base class for the linearised chi-squared track fit algorithms.
Definition: Array2D.h:16