39 pset.getParameter<double>(
"minTrackSumPt")) {
41 token = consumes<reco::VertexCollection>(
src_);
43 produces<reco::VertexCollection>();
51 auto output = std::make_unique<reco::VertexCollection>();
53 if (vertices_->size() > 1) {
57 std::remove_copy_if(vertices_->begin()+1, vertices_->end(),
58 std::back_inserter(*
output), [
this](
auto const&
vtx){
59 double trackPtSum = 0.;
62 trackPtSum += (*track)->pt();
64 return trackPtSum > this->
minPt_;
81 desc.
add<
double>(
"minTrackSumPt");
83 desc.
add<
bool>(
"filter");
85 descriptions.
add(
"recoTauPileUpVertexSelector", desc);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::VertexCollection > token
RecoTauPileUpVertexSelector(const edm::ParameterSet &pset)
bool filter(edm::Event &evt, const edm::EventSetup &es) override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
~RecoTauPileUpVertexSelector() override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)