2 namespace vertexTools {
5 std::set<TrackRef> pvTracks;
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;
51 svTracks.push_back(iter->castTo<
TrackRef>());
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const Point & position() const
position
double computeSharedTracks(const reco::Vertex &pv, const std::vector< reco::TrackRef > &svTracks, double minTrackWeight=0.5, float unused=0)
virtual const daughters & daughterPtrVector() const
references to daughtes
Abs< T >::type abs(const T &t)
trackRef_iterator tracks_end() const
last iterator over tracks
double z() const
z coordinate
float trackWeight(const TREF &r) const
returns the weight with which a Track has contributed to the vertex-fit.
trackRef_iterator tracks_begin() const
first iterator over tracks