18 :
KFbase(settings, nHelixPar, fitterName),
20 kfLayerVsPtToler_(settings->kfLayerVsPtToler()),
21 kfLayerVsD0Cut5_(settings->kfLayerVsD0Cut5()),
22 kfLayerVsZ0Cut5_(settings->kfLayerVsZ0Cut5()),
23 kfLayerVsZ0Cut4_(settings->kfLayerVsZ0Cut4()),
24 kfLayerVsChiSq5_(settings->kfLayerVsChiSq5()),
25 kfLayerVsChiSq4_(settings->kfLayerVsChiSq4()) {}
33 vecX[
Z0] = l1track3D.
z0();
36 vecX[
D0] = l1track3D.
d0();
52 const float inv2Rsigma = 0.0314 * invPtToInv2R;
53 constexpr
float phi0sigma = 0.0102;
54 constexpr
float z0sigma = 5.0;
55 constexpr
float tanLsigma = 0.5;
56 constexpr
float d0Sigma = 1.0;
62 matC[
T][
T] =
pow(tanLsigma, 2);
83 double inv2R2 = inv2R * inv2R;
85 double tanl =
state->vectorX()(
T);
86 double tanl2 = tanl * tanl;
94 double r2 = stub->
r() * stub->
r();
95 double invr2 = 1. /
r2;
99 double sigmaScat2 = sigmaScat * sigmaScat;
102 vphi = (
a * invr2) + sigmaScat2;
106 float scaleTilted = 1.;
109 scaleTilted =
approxB(stub->
z(), stub->
r());
112 scaleTilted =
sin(tilt) +
cos(tilt) * tanl;
115 float scaleTilted2 = scaleTilted * scaleTilted;
117 vz =
b * scaleTilted2;
128 vphi =
a * invr2 + sigmaScat2;
142 vcorr =
b * (
beta * tanl);
146 vphi = (
a * invr2) + (
b * inv2R2) + sigmaScat2;
156 matV(
PHI,
Z) = vcorr;
157 matV(
Z,
PHI) = vcorr;
167 double r = stub->
r();
171 matH(
PHI,
D0) = -1. / r;
188 TVectorD vecX =
state->vectorX();
205 TVectorD vecX =
state->vectorX();
206 TMatrixD matC =
state->matrixC();
208 double delChi2rphi = (vecX[
D0] * vecX[
D0]) / matC[
D0][
D0];
209 chi2rphi =
state->chi2rphi() + delChi2rphi;
232 unsigned nStubLayers =
state.nStubLayers();
233 bool goodState(
true);
236 double qOverPt = vecY[
QOVERPT];
242 if (z0 > kfLayerVsZ0Cut[nStubLayers])
254 double chi2scaled =
state.chi2scaled();
256 if (chi2scaled > kfLayerVsChiSqCut[nStubLayers])
259 const bool countUpdateCalls =
false;
263 std::stringstream
text;
266 text <<
"State veto:";
268 text <<
"State kept:";
269 text <<
" nlay=" << nStubLayers <<
" nskip=" <<
state.nSkippedLayers() <<
" chi2_scaled=" << chi2scaled;
272 text <<
" pt=" <<
pt <<
" q/pt=" << qOverPt <<
" tanL=" << vecY[
T] <<
" z0=" << vecY[
Z0]
273 <<
" phi0=" << vecY[
PHI0];
275 text <<
" d0=" << vecY[
D0];
276 text <<
" fake" << (
tpa_ ==
nullptr);
TVectorD trackParams(const KalmanState *state) const override
constexpr double deltaPhi(double phi1, double phi2)
float phi0() const override
TMatrixD matrixF(const Stub *stub, const KalmanState *state) const override
unsigned int kalmanHOalpha() const
float qOverPt() const override
Sin< T >::type sin(const T &t)
bool kalmanHOtilted() const
float approxB(float z, float r) const
std::vector< double > kfLayerVsZ0Cut5_
TMatrixD matrixH(const Stub *stub) const override
std::vector< double > kfLayerVsChiSq4_
TVectorD trackParams_BeamConstr(const KalmanState *state, double &chi2rphi) const override
unsigned kalmanDebugLevel() const
TVectorD vectorM(const Stub *stub) const override
std::vector< double > kfLayerVsPtToler_
bool isGoodState(const KalmanState &state) const override
std::vector< double > kfLayerVsChiSq5_
std::vector< double > kfLayerVsZ0Cut4_
Cos< T >::type cos(const T &t)
double kalmanMultiScattTerm() const
Abs< T >::type abs(const T &t)
const Settings * settings_
TMatrixD seedC(const L1track3D &l1track3D) const override
bool tiltedBarrel() const
static constexpr float d0
=== This is the base class for the linearised chi-squared track fit algorithms.
unsigned int kalmanHOprojZcorr() const
TVectorD seedX(const L1track3D &l1track3D) const override
Power< A, B >::type pow(const A &a, const B &b)
TMatrixD matrixV(const Stub *stub, const KalmanState *state) const override
std::vector< double > kfLayerVsD0Cut5_
double invPtToInvR() const