File indexing completed on 2024-04-06 12:21:47
0001 #ifndef L1Trigger_TrackFindingTMTT_ChiSquaredFitBase_h
0002 #define L1Trigger_TrackFindingTMTT_ChiSquaredFitBase_h
0003
0004
0005
0006
0007
0008 #include "L1Trigger/TrackFindingTMTT/interface/Stub.h"
0009 #include "L1Trigger/TrackFindingTMTT/interface/TrackFitGeneric.h"
0010 #include "L1Trigger/TrackFindingTMTT/interface/Settings.h"
0011 #include "L1Trigger/TrackFindingTMTT/interface/L1track3D.h"
0012 #include <TMatrixD.h>
0013 #include <TVectorD.h>
0014
0015 #include <vector>
0016 #include <map>
0017 #include <utility>
0018
0019 namespace tmtt {
0020
0021 class ChiSquaredFitBase : public TrackFitGeneric {
0022 public:
0023 enum PAR_IDS { INVR, PHI0, T, Z0, D0 };
0024
0025 public:
0026 ChiSquaredFitBase(const Settings* settings, const uint nPar);
0027
0028 L1fittedTrack fit(const L1track3D& l1track3D) override;
0029
0030 protected:
0031
0032 virtual TVectorD seed(const L1track3D& l1track3D) = 0;
0033 virtual TVectorD residuals(const TVectorD& x) = 0;
0034 virtual TMatrixD D(const TVectorD& x) = 0;
0035 virtual TMatrixD Vinv() = 0;
0036
0037
0038 double qOverPt_seed_;
0039 std::vector<Stub*> stubs_;
0040 TVectorD trackParams_;
0041 uint nPar_;
0042 float largestresid_;
0043 int ilargestresid_;
0044 double chiSq_;
0045
0046 private:
0047 void calculateChiSq(const TVectorD& resids);
0048 void calculateDeltaChiSq(const TVectorD& deltaX, const TVectorD& covX);
0049
0050 int numFittingIterations_;
0051 int killTrackFitWorstHit_;
0052 double generalResidualCut_;
0053 double killingResidualCut_;
0054
0055 unsigned int minStubLayers_;
0056 unsigned int minStubLayersRed_;
0057 };
0058
0059 }
0060
0061 #endif