101 int nhits = hits.size();
102 if (nhits <2)
return 0;
118 std::vector<GlobalPoint> points(nhits);
119 points[0] = tracker->idToDet(hits[0]->geographicalId())->toGlobal(hits[0]->localPosition());
120 points[1] = tracker->idToDet(hits[1]->geographicalId())->toGlobal(hits[1]->localPosition());
121 points[2] = tracker->idToDet(hits[2]->geographicalId())->toGlobal(hits[2]->localPosition());
130 if (circle.curvature() > 1.e-4) {
132 float valPt = 1.f/invPt;
133 float chargeTmp = (points[1].x()-points[0].x())*(points[2].
y()-points[1].y())
134 - (points[1].
y()-points[0].y())*(points[2].
x()-points[1].x());
135 charge = (chargeTmp>0) ? -1 : 1;
136 float valPhi = (charge>0) ? std::atan2(circle.center().x(),-circle.center().y()) : std::atan2(-circle.center().x(),circle.center().y());
142 initMom *= 10000./initMom.
perp();
144 theta = initMom.
theta();
152 float sin2th =
sqr(
sin(theta));
155 float zErr = vertexErr.czz();
156 float transverseErr = vertexErr.cxx();
157 C[3][3] = transverseErr;
158 C[4][4] = zErr*sin2th + transverseErr*(1-sin2th);
172 DetId outerDetId = 0;
174 for (
unsigned int iHit = 0; iHit < hits.size(); iHit++) {
176 if (iHit==0) outerState = propagator->propagate(fts,tracker->idToDet(hit->
geographicalId())->surface());
179 if (!state.
isValid())
return 0;
182 outerState = updator.
update(state, *recHit);
183 if (!outerState.
isValid())
return 0;
192 DetId innerDetId = 0;
194 for (
int iHit = 2; iHit >= 0; --iHit) {
198 if (!state.
isValid())
return 0;
201 innerState = updator.
update(state, *recHit);
202 if (!innerState.
isValid())
return 0;
208 if (!impactPointState.
isValid())
return 0;
218 MyBeamSpotHit bsrh(*beamSpot, &bsgd);
219 impactPointState = updator.
update(impactPointState, bsrh);
221 if (!impactPointState.
isValid())
return 0;
224 int ndof = 2*hits.size()-5;
float originRBound() const
bounds the particle vertex in the transverse plane
void rescaleError(double factor)
std::string thePropagatorLabel
TrackCharge charge() const
GlobalPoint const & origin() const
const CurvilinearTrajectoryError & curvilinearError() const
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
GlobalPoint globalPosition() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Geom::Theta< T > theta() const
T inversePt(T curvature, const edm::EventSetup &iSetup)
const SurfaceType & surface() const
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const
static PlanePointer build(Args &&...args)
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
float originZBound() const
bounds the particle vertex in the longitudinal plane
std::shared_ptr< TrackingRecHit const > RecHitPointer
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
float ptMin() const
minimal pt of interest
GlobalVector globalMomentum() const
Square< F >::type sqr(const F &f)
const RotationType & rotation() const
DetId geographicalId() const
std::string thePropagatorOppositeLabel
const PositionType & position() const
std::string theTTRHBuilderName
Global3DVector GlobalVector