70 std::unique_ptr<reco::Track>
ret;
72 int nhits = hits.size();
81 std::vector<GlobalPoint> points(nhits);
93 if (circle.curvature() > 1.e-4) {
95 float valPt = 1.f / invPt;
96 float chargeTmp = (points[1].x() - points[0].x()) * (points[2].
y() - points[1].y()) -
97 (points[1].
y() - points[0].y()) * (points[2].
x() - points[1].x());
98 charge = (chargeTmp > 0) ? -1 : 1;
99 float valPhi = (charge > 0) ? std::atan2(circle.center().x(), -circle.center().y())
100 : std::atan2(-circle.center().x(), circle.center().y());
105 initMom *= 10000. / initMom.
perp();
107 theta = initMom.
theta();
115 float sin2th =
sqr(
sin(theta));
118 float zErr = vertexErr.czz();
119 float transverseErr = vertexErr.cxx();
120 C[3][3] = transverseErr;
121 C[4][4] = zErr * sin2th + transverseErr * (1 - sin2th);
131 DetId outerDetId = 0;
133 for (
unsigned int iHit = 0; iHit < hits.size(); iHit++) {
143 outerState = updator.
update(state, *recHit);
149 DetId innerDetId = 0;
151 for (
int iHit = 2; iHit >= 0; --iHit) {
159 innerState = updator.
update(state, *recHit);
166 if (!impactPointState.isValid())
174 MyBeamSpotGeomDet bsgd(
Plane::build(impactPointState.surface().position(), impactPointState.surface().rotation()));
176 impactPointState = updator.
update(impactPointState, bsrh);
179 if (!impactPointState.isValid())
183 int ndof = 2 * hits.size() - 5;
184 GlobalPoint vv = impactPointState.globalPosition();
190 ret = std::make_unique<reco::Track>(
191 chi2,
ndof, pos, mom, impactPointState.charge(), impactPointState.curvilinearError());
float originRBound() const
bounds the particle vertex in the transverse plane
void rescaleError(double factor)
const Propagator * theOPropagator
tuple ret
prodAgent to be discontinued
const Propagator * thePropagator
GlobalPoint const & origin() const
const TrackerGeometry * theTracker
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
const Plane & surface() const
The nominal surface of the GeomDet.
const MagneticField * theField
Geom::Theta< T > theta() const
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
static PlanePointer build(Args &&...args)
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
T inversePt(T curvature, const MagneticField &field)
const TrackerGeomDet * idToDet(DetId) const override
float originZBound() const
bounds the particle vertex in the longitudinal plane
std::shared_ptr< TrackingRecHit const > RecHitPointer
const reco::BeamSpot * theBeamSpot
const TransientTrackingRecHitBuilder * theTTRHBuilder
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
float ptMin() const
minimal pt of interest
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
DetId geographicalId() const
Global3DVector GlobalVector