7 namespace l1tVertexFinder {
10 typedef std::vector<edm::Ptr<l1t::Vertex::Track_t>> Tracks_t;
14 for (
const auto&
t : tracks)
15 sumPt +=
t->momentum().transverse();
21 const std::vector<l1t::Vertex>& aVertexCollection,
23 if (aVertexCollection.empty())
24 throw std::invalid_argument(
"Cannot find primary vertex from empty vertex collection");
25 return *std::max_element(aVertexCollection.begin(),
26 aVertexCollection.end(),
28 return (aFunction(v1.
tracks()) < aFunction(v2.tracks()));
auto const & tracks
cannot be loose
const l1t::Vertex & getPrimaryVertex(const std::vector< l1t::Vertex > &aVertexCollection)
Returns primary vertex based on default criterion (max sum pT from all constituent tracks); throws if...
const std::vector< edm::Ptr< Track_t > > & tracks() const