34 chiSq_ += resids[
j] * resids[
j] + resids[j + 1] * resids[j + 1];
40 for (
int i = 0;
i < covX.GetNrows();
i++) {
57 TVectorD x =
seed(l1track3D);
61 TMatrixD dTrans(TMatrixD::kTransposed, d);
62 TMatrixD dtVinv = dTrans *
Vinv();
63 TMatrixD dtVinvTrans(TMatrixD::kTransposed, dtVinv);
65 TMatrixD M = dtVinv * dtVinvTrans;
66 TMatrixD Minv(TMatrixD::kInverted, M);
68 TVectorD deltaX = Minv * dtVinv * resids;
70 TVectorD covX = dTrans *
Vinv() * resids;
74 if (
i < numFittingIterations_ - 1) {
78 bool killWorstStub =
false;
83 std::vector<Stub*> stubsTmp =
stubs_;
116 const unsigned int hitPattern = 0;
117 const float chi2rz = 0;
unsigned int iEtaReg() const override
float qOverPt() const override
virtual TVectorD residuals(const TVectorD &x)=0
double killingResidualCut_
void calculateChiSq(const TVectorD &resids)
unsigned int minStubLayers_
double invPtToInvR() const
virtual TMatrixD D(const TVectorD &x)=0
const std::vector< Stub * > & stubs() const override
virtual TMatrixD Vinv()=0
int numFittingIterations_
unsigned int numTrackFitIterations() const
unsigned int minStubLayersRed_
unsigned int iPhiSec() const override
double generalResidualCut_
virtual TVectorD seed(const L1track3D &l1track3D)=0
Abs< T >::type abs(const T &t)
bool killTrackFitWorstHit() const
const Settings * settings_
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)
unsigned int minStubLayers() const
int killTrackFitWorstHit_
double generalResidualCut() const
unsigned int countLayers(const Settings *settings, const std::vector< const Stub * > &stubs, bool disableReducedLayerID=false, bool onlyPS=false)
unsigned int numLayerCut(Utility::AlgoStep algo, const Settings *settings, unsigned int iPhiSec, unsigned int iEtaReg, float invPt, float eta=0.)
double killingResidualCut() const