20 unsigned int closest = 0;
29 auto distance2 = (vtxPos - globalPosition).
mag2();
35 if (!nextHit->isValid() )
continue;
36 globalPosition = nextHit->surface()->toGlobal(trajParams[
h].
position());
37 auto nextDistance2 = (vtxPos - globalPosition).
mag2();
38 if (nextDistance2 > distance2)
break;
40 distance2=nextDistance2;
48 auto momDir = recHit->
surface()->
toGlobal(trajParams[closest].direction());
50 float decayLengthHitToVtx = (vtxPos - globalPosition).
dot(momDir);
56 float vertexError2 = ROOT::Math::Similarity(j,vtx.
covariance());
57 auto decayLenError =
std::sqrt(vertexError2);
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
virtual const Surface * surface() const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
double y() const
y coordinate
virtual bool sharesInput(const TrackingRecHit *other, SharedInputType what) const
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
std::pair< uint8_t, Measurement1DFloat > nHitsBeforeVtx(const reco::TrackExtra &track, const reco::Vertex &vtx, float sigmaTolerance=3.0) const
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
float significance() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
double z() const
z coordinate
T const * get() const
Returns C++ pointer to the item.
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
uint8_t nSharedHits(const reco::Track &trk1, const reco::Track &trk2) const
double x() const
x coordinate
T dot(const Basic3DVector &v) const
Scalar product, or "dot" product, with a vector of same type.
static int position[264][3]
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.