161 std::pair<double, double> vertexDist2D, vertexDist3D;
162 std::pair<double, double> tracksDist2D, tracksDist3D;
165 unsigned int nVertexTracks = 0;
179 bool isTrackVertex = (n == 1);
180 ++*(isTrackVertex ? &nTracks : &
nVertices);
182 addMeas(*(isTrackVertex ? &tracksDist2D : &vertexDist2D),
184 addMeas(*(isTrackVertex ? &tracksDist3D : &vertexDist3D),
194 if (hasRefittedTracks) {
197 kin.add(actualTrack, w);
203 (*track)->momentum()),
true);
214 if (nVertices == 1 && nTracks) {
215 vertexDist2D.first += tracksDist2D.first;
216 vertexDist2D.second += tracksDist2D.second;
217 vertexDist3D.first += tracksDist3D.first;
218 vertexDist3D.second += tracksDist3D.second;
219 vertexKinematics += trackKinematics;
223 vertexDist2D.first / vertexDist2D.second,
226 vertexDist3D.first / vertexDist3D.second,
231 }
else if (nTracks) {
233 vertexKinematics = trackKinematics;
236 tracksDist2D.first / tracksDist2D.second,
239 tracksDist3D.first / tracksDist3D.second,
243 if (nVertices || nTracks) {
254 const std::vector<btag::TrackIPData> &ipData =
260 for(
unsigned int i = 0;
i < indices.size();
i++) {
261 std::size_t
idx = indices[
i];
262 const btag::TrackIPData &
data = ipData[
idx];
273 allKinematics.
add(track);
277 trackPairV0Test[0] = tracks[
idx];
279 for(
unsigned int j = 0; j < indices.size(); j++) {
283 std::size_t pairIdx = indices[j];
284 const btag::TrackIPData &pairTrackData =
286 const TrackRef &pairTrackRef = tracks[pairIdx];
287 const Track &pairTrack = *pairTrackRef;
292 trackPairV0Test[1] = pairTrackRef;
304 double trackMag =
std::sqrt(trackMom.Mag2());
330 allKinematics.
vectorSum().Et() / ipInfo.jet()->et(),
true);
333 .
ip3d.significance(),
337 .ip2d.significance(),
347 vertexSum.E() / allSum.E(),
true);
const unsigned int nTracks(const reco::Vertex &sv)
bool isNonnull() const
Checks for non-null.
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
void add(const reco::Track &track, double weight=1.0)
const VTX & secondaryVertex(unsigned int index) const
Track refittedTrack(const TrackBaseRef &track) const
double etaRel(const math::XYZVector &dir, const math::XYZVector &track)
bool hasRefittedTracks() const
Checks whether refitted tracks are stored.
Global3DPoint GlobalPoint
const Container & selectedTracks() const
int pixelLayersWithMeasurement() const
const Vector & momentum() const
track momentum vector
const_iterator end() const
Termination of iteration.
int trackerLayersWithMeasurement() const
const_iterator begin() const
Initialize an iterator over the RefVector.
const edm::Ref< VertexCollection > & primaryVertex() const
input_container vertexTracks() const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
static void addMeas(std::pair< double, double > &sum, Measurement1D meas)
float trackWeight(unsigned int svIndex, unsigned int trackindex) const
std::vector< size_t > sortedIndexes(btag::SortCriteria mode=reco::btag::IP3DSig) const
reco::V0Filter trackPairV0Filter
const GlobalVector & flightDirection(unsigned int index) const
const std::vector< btag::TrackIPData > & impactParameterData() const
double deltaR(double eta1, double eta2, double phi1, double phi2)
unsigned int nVertices() const
double significance() const
unsigned int numberOfTracks() const
reco::btag::SortCriteria sortCriterium
const reco::btag::TrackIPData & threshTrack(const reco::TrackIPTagInfo &trackIPTagInfo, const reco::btag::SortCriteria sort, const reco::Jet &jet, const GlobalPoint &pv) const
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
XYZVectorD XYZVector
spatial vector with cartesian internal representation
char data[epos_bytes_allocation]
const math::XYZTLorentzVector & vectorSum() const
Measurement1D flightDistance(unsigned int index, int dim=0) const
reco::TrackSelector trackSelector
void insert(const TaggingVariable &variable, bool delayed=false)