2 namespace vertexTools {
5 double minTrackWeight,
float )
7 std::set<TrackRef> pvTracks;
8 for(std::vector<TrackBaseRef>::const_iterator iter = pv.
tracks_begin();
11 pvTracks.insert(iter->castTo<
TrackRef>());
13 unsigned int count = 0;
14 for(std::vector<TrackRef>::const_iterator iter = svTracks.begin();
15 iter != svTracks.end(); iter++)
16 count += pvTracks.count(*iter);
18 return (
double)count/(double)svTracks.size();
21 double minTrackWeight,
float maxsigma)
23 unsigned int count = 0;
24 for(std::vector<CandidatePtr>::const_iterator iter = svTracks.begin();
25 iter != svTracks.end(); iter++)
27 if(
std::abs((*iter)->bestTrack()->dz()-pv.
z())/(*iter)->bestTrack()->dzError() < maxsigma &&
28 std::abs((*iter)->bestTrack()->dxy(pv.
position())/(*iter)->bestTrack()->dxyError()) < maxsigma
32 return (
double)count/(double)svTracks.size();
36 unsigned int count = 0;
37 for(std::vector<CandidatePtr>::const_iterator iter = svTracks.begin();
38 iter != svTracks.end(); iter++)
43 return (
double)count/(double)svTracks.size();
53 std::vector<TrackRef> svTracks;
54 for(std::vector<TrackBaseRef>::const_iterator iter = sv.
tracks_begin();
57 svTracks.push_back(iter->castTo<
TrackRef>());
trackRef_iterator tracks_end() const
last iterator over tracks
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)
Abs< T >::type abs(const T &t)
double z() const
y coordinate
float trackWeight(const TREF &r) const
returns the weight with which a Track has contributed to the vertex-fit.
const daughters & daughterPtrVector() const
references to daughtes
trackRef_iterator tracks_begin() const
first iterator over tracks