35 str <<
"\t pt: " << pt.value() <<
"+/-" << pt.error() <<
"\t phi: " << phi.value() <<
"+/-" << phi.error()
36 <<
"\t cot: " << cotTheta.value() <<
"+/-" << cotTheta.error() <<
"\t tip: " << tip.value() <<
"+/-"
37 << tip.error() <<
"\t zip: " << zip.value() <<
"+/-" << zip.error() <<
"\t chi2: " << chi2
38 <<
"\t charge: " <<
charge;
47 float theta = track.theta();
48 float cosTheta =
cos(theta);
49 float sinTheta =
sin(theta);
50 float errLambda2 =
sqr(track.lambdaError());
53 float pt_v = track.pt();
54 float errInvP2 =
sqr(track.qoverpError());
55 float covIPtTheta = track.covariance(TrackBase::i_qoverp, TrackBase::i_lambda);
57 (errInvP2 +
sqr(cosTheta / pt_v) * errLambda2 + 2 * (cosTheta / pt_v) * covIPtTheta) /
sqr(sinTheta);
64 return print(pt, phi, cotTheta, tip, zip, track.chi2(), track.charge());
69 float pt_v = state.globalMomentum().perp();
70 float phi_v = state.globalMomentum().phi();
71 float theta_v = state.globalMomentum().theta();
74 float errPhi2 = curv.
matrix()(3, 3);
75 float errLambda2 = curv.
matrix()(2, 2);
76 float errInvP2 = curv.
matrix()(1, 1);
77 float covIPtTheta = curv.
matrix()(1, 2);
78 float cosTheta =
cos(theta_v);
79 float sinTheta =
sin(theta_v);
81 (errInvP2 +
sqr(cosTheta / pt_v) * errLambda2 + 2 * (cosTheta / pt_v) * covIPtTheta) /
sqr(sinTheta);
82 float errCotTheta =
sqrt(errLambda2) /
sqr(sinTheta);
87 float zip_v = state.globalPosition().z();
88 float zip_e =
sqrt(state.localError().matrix()(4, 4));
91 float tip_v = state.localPosition().x();
92 int tip_sign = (state.localMomentum().y() * cotTheta.value() > 0) ? -1 : 1;
93 float tip_e =
sqrt(state.localError().matrix()(3, 3));
96 return print(pt, phi, cotTheta, tip, zip, 0., state.charge());
105 LogTrace(
"") <<
" *** PixelTrackBuilder::checkState: ";
106 LogTrace(
"") <<
"INPUT, ROTATION" <<
'\n' << state.surface().rotation();
117 LogTrace(
"") <<
"CHECK-2 FTS: " << fs;
130 const std::vector<const TrackingRecHit*>& hits,
133 LogDebug(
"PixelTrackBuilder::build") <<
"";
134 LogTrace(
"") <<
"Reconstructed triplet kinematics: " <<
print(pt, phi, cotTheta, tip, zip, chi2, charge);
137 double cosTheta = cotTheta.
value() * sinTheta;
138 int tipSign = tip.
value() > 0 ? 1 : -1;
142 m(0, 0) =
sqr(sinTheta) * (
sqr(invPtErr) +
sqr(cotTheta.
error() / pt.
value() * cosTheta * sinTheta));
160 Plane impPointPlane(origin, rot);
168 checkState(impactPointState, mf);
170 LogTrace(
"") <<
"constructed TSOS:\n" <<
print(impactPointState);
172 int ndof = 2 * hits.size() - 5;
GlobalPoint globalPosition() const
Local3DVector LocalVector
Point3DBase< Scalar, LocalTag > LocalPoint
pointer clone() const override
const FreeTrajectoryState & theState() const
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
TrackCharge charge() const
const SurfaceType & surface() const
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
float __attribute__((vector_size(8))) cms_float32x2_t
Cos< T >::type cos(const T &t)
reco::Track * build(const Measurement1D &pt, const Measurement1D &phi, const Measurement1D &cotTheta, const Measurement1D &tip, const Measurement1D &zip, float chi2, int charge, const std::vector< const TrackingRecHit * > &hits, const MagneticField *mf, const GlobalPoint &reference=GlobalPoint(0, 0, 0)) const
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
void addReference() const
GlobalVector globalMomentum() const
const AlgebraicSymMatrix55 & matrix() const
const RotationType & rotation() const
const CurvilinearTrajectoryError & curvilinearError() const