24 class VertexTrackPtSumFilter :
public std::unary_function<reco::Vertex, bool> {
26 VertexTrackPtSumFilter(
double minPt):minPt_(minPt){}
28 double trackPtSum = 0.;
31 trackPtSum += (*track)->pt();
33 return trackPtSum > minPt_;
55 pset.getParameter<double>(
"minTrackSumPt")) {
57 token = consumes<reco::VertexCollection>(
src_);
59 produces<reco::VertexCollection>();
67 auto output = std::make_unique<reco::VertexCollection>();
69 if (vertices_->size() > 1) {
73 std::remove_copy_if(vertices_->begin()+1, vertices_->end(),
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
trackRef_iterator tracks_end() const
last iterator over tracks
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
VertexTrackPtSumFilter vtxFilter_
edm::EDGetTokenT< reco::VertexCollection > token
RecoTauPileUpVertexSelector(const edm::ParameterSet &pset)
bool filter(edm::Event &evt, const edm::EventSetup &es) override
~RecoTauPileUpVertexSelector()
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
trackRef_iterator tracks_begin() const
first iterator over tracks