10 float sigmaTolerance)
const {
15 auto const &trajParams =
track.trajParams();
21 for (
auto const &
hit :
track.recHits()) {
28 auto globalPosition =
recHit->surface()->toGlobal(trajParams[0].
position());
29 auto distance2 = (vtxPos - globalPosition).
mag2();
33 auto nextHit =
track.recHit(
h);
34 if (!nextHit->isValid())
36 globalPosition = nextHit->surface()->toGlobal(trajParams[
h].
position());
37 auto nextDistance2 = (vtxPos - globalPosition).
mag2();
38 if (nextDistance2 > distance2)
41 distance2 = nextDistance2;
49 auto momDir =
recHit->surface()->toGlobal(trajParams[
closest].direction());
51 float decayLengthHitToVtx = (vtxPos - globalPosition).
dot(momDir);
57 float vertexError2 = ROOT::Math::Similarity(
j,
vtx.covariance());
58 auto decayLenError =
std::sqrt(vertexError2);
int closest(std::vector< int > const &vec, int value)
uint8_t nSharedHits(const reco::Track &trk1, const reco::Track &trk2) const
virtual bool sharesInput(const TrackingRecHit *other, SharedInputType what) const
T dot(const Basic3DVector &v) const
Scalar product, or "dot" product, with a vector of same type.
std::pair< uint8_t, Measurement1DFloat > nHitsBeforeVtx(const reco::TrackExtra &track, const reco::Vertex &vtx, float sigmaTolerance=3.0) const
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
static int position[264][3]
ROOT::Math::SVector< double, 3 > AlgebraicVector3
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.