#include <VertexHigherPtSquared.h>
Public Member Functions | |
bool | operator() (const TransientVertex &v1, const TransientVertex &v2) const |
bool | operator() (const reco::Vertex &v1, const reco::Vertex &v2) const |
double | sumPtSquared (const reco::Vertex &v) const |
double | sumPtSquared (const std::vector< reco::TransientTrack > &tks) const |
operator for sorting TransientVertex objects in decreasing order of the sum of the squared track pT's
Definition at line 13 of file VertexHigherPtSquared.h.
bool VertexHigherPtSquared::operator() | ( | const TransientVertex & | v1, |
const TransientVertex & | v2 | ||
) | const |
Definition at line 6 of file VertexHigherPtSquared.cc.
References TransientVertex::originalTracks().
{ // return (sumPtSquared(v1) > sumPtSquared(v2)); V-01-05-02 const std::vector<reco::TransientTrack> & tks1 = v1.originalTracks(); const std::vector<reco::TransientTrack> & tks2 = v2.originalTracks(); return (sumPtSquared(tks1) > sumPtSquared(tks2)); }
bool VertexHigherPtSquared::operator() | ( | const reco::Vertex & | v1, |
const reco::Vertex & | v2 | ||
) | const |
Definition at line 17 of file VertexHigherPtSquared.cc.
{ return (sumPtSquared(v1) > sumPtSquared(v2)); }
double VertexHigherPtSquared::sumPtSquared | ( | const reco::Vertex & | v | ) | const |
Definition at line 26 of file VertexHigherPtSquared.cc.
References reco::Vertex::tracks_begin(), and reco::Vertex::tracks_end().
{ double sum = 0.; double pT; for (Vertex::trackRef_iterator it = v.tracks_begin(); it != v.tracks_end(); it++) { pT = (**it).pt(); double epT=(**it).ptError(); pT=pT>epT ? pT-epT : 0; sum += pT*pT; } return sum; }
double VertexHigherPtSquared::sumPtSquared | ( | const std::vector< reco::TransientTrack > & | tks | ) | const |