5 std::set<TrackRef> pvTracks;
6 for (std::vector<TrackBaseRef>::const_iterator iter =
pv.tracks_begin(); iter !=
pv.tracks_end(); iter++)
7 if (
pv.trackWeight(*iter) >= minTrackWeight)
8 pvTracks.insert(iter->castTo<
TrackRef>());
10 unsigned int count = 0;
11 for (std::vector<TrackRef>::const_iterator iter = svTracks.begin(); iter != svTracks.end(); iter++)
12 count += pvTracks.count(*iter);
14 return (
double)
count / (double)svTracks.size();
17 const std::vector<CandidatePtr> &svTracks,
18 double minTrackWeight,
20 unsigned int count = 0;
21 for (std::vector<CandidatePtr>::const_iterator iter = svTracks.begin(); iter != svTracks.end(); iter++) {
22 if (
std::abs((*iter)->bestTrack()->dz() -
pv.z()) / (*iter)->bestTrack()->dzError() < maxsigma &&
23 std::abs((*iter)->bestTrack()->dxy(
pv.position()) / (*iter)->bestTrack()->dxyError()) < maxsigma)
26 return (
double)
count / (double)svTracks.size();
29 const std::vector<CandidatePtr> &svTracks,
32 unsigned int count = 0;
33 for (std::vector<CandidatePtr>::const_iterator iter = svTracks.begin(); iter != svTracks.end(); iter++) {
38 return (
double)
count / (double)svTracks.size();
43 double minTrackWeight,
48 std::vector<TrackRef> svTracks;
49 for (std::vector<TrackBaseRef>::const_iterator iter =
sv.tracks_begin(); iter !=
sv.tracks_end(); iter++)
50 if (
sv.trackWeight(*iter) >= minTrackWeight)
51 svTracks.push_back(iter->castTo<
TrackRef>());