18 x[
Z0] = l1track3D.
z0();
28 double rInv = x[
INVR];
29 double phi0 = x[
PHI0];
31 for (
unsigned i = 0;
i <
stubs_.size();
i++) {
35 D(j,
INVR) = -0.5 * ri * ri;
47 double width = 0.5 *
stubs_[
i]->trackerModule()->sensorWidth();
48 double nstrip = 0.5 *
stubs_[
i]->nStrips();
50 double Deltai = width * (iphi - nstrip) / nstrip;
53 double DeltaiOverRi = Deltai / ri;
54 double theta0 = DeltaiOverRi + (2. / 3.) * DeltaiOverRi * DeltaiOverRi * DeltaiOverRi;
56 double phi_track = phi0 - 0.5 * rInv * ri;
60 D(j,
INVR) = -1 * ri * ri * ri * rInv;
66 D(j,
INVR) = -0.5 * ri * ri;
68 D(j,
T) = ri * 0.5 * rInv * ri * tInv - ((phi_track - phii) - theta0) * ri * tInv;
69 D(j,
Z0) = ri * 0.5 * rInv * tInv - ((phi_track - phii) - theta0) * tInv;
83 for (
unsigned i = 0;
i <
stubs_.size();
i++) {
84 double sigmaPerp =
stubs_[
i]->sigmaPerp();
85 double sigmaPar =
stubs_[
i]->sigmaPar();
87 sigmaPerp =
sqrt(sigmaPerp * sigmaPerp + sigmaScat * sigmaScat * ri * ri);
89 Vinv(2 *
i, 2 *
i) = 1 / sigmaPerp;
90 Vinv(2 *
i + 1, 2 *
i + 1) = 1 / sigmaPar;
92 Vinv(2 *
i, 2 *
i) = 1 / sigmaPar;
93 Vinv(2 *
i + 1, 2 *
i + 1) = 1 / sigmaPerp;
102 unsigned int n =
stubs_.size();
104 TVectorD
delta(2 * n);
106 double rInv = x[
INVR];
107 double phi0 = x[
PHI0];
121 for (
unsigned int i = 0;
i <
n;
i++) {
124 double phii =
stubs_[
i]->phi();
125 double sigmaPerp =
stubs_[
i]->sigmaPerp();
126 double sigmaPar =
stubs_[
i]->sigmaPar();
127 sigmaPerp =
sqrt(sigmaPerp * sigmaPerp + sigmaScat * sigmaScat * ri * ri);
130 double halfRinvRi = 0.5 * ri * rInv;
131 double aSinHalfRinvRi = halfRinvRi + (2. / 3.) * halfRinvRi * halfRinvRi * halfRinvRi;
132 double deltaphi =
reco::deltaPhi(phi0 - aSinHalfRinvRi - phii, 0.);
133 delta[j++] = (ri * deltaphi) / sigmaPerp;
134 delta[j++] = (z0 + (2.0 / rInv) * t * aSinHalfRinvRi - zi) / sigmaPar;
137 double r_track = (zi - z0) * tInv;
138 double phi_track = phi0 - 0.5 * rInv * (zi - z0) * tInv;
142 double width = 0.5 *
stubs_[
i]->trackerModule()->sensorWidth();
143 double nstrip = 0.5 *
stubs_[
i]->nStrips();
145 double Deltai = width * (iphi - nstrip) / nstrip;
150 double DeltaiOverRi = Deltai / ri;
151 double theta0 = DeltaiOverRi + (2. / 3.) * DeltaiOverRi * DeltaiOverRi * DeltaiOverRi;
152 double Delta = Deltai - r_track * (theta0 - (phi_track - phii));
154 delta[j++] = (r_track - ri) / sigmaPar;
155 delta[j++] = Delta / sigmaPerp;
158 chiSq += delta[j - 2] * delta[j - 2] + delta[j - 1] * delta[j - 1];
constexpr double deltaPhi(double phi1, double phi2)
float phi0() const override
float qOverPt() const override
double invPtToInvR() const
TVectorD seed(const L1track3D &l1track3D) override
Abs< T >::type abs(const T &t)
const Settings * settings_
std::vector< Stub * > stubs_
double kalmanMultiScattTerm() const
TVectorD residuals(const TVectorD &x) override
TMatrixD D(const TVectorD &x) override