44 produces<reco::CandidateBaseRefVector>();
51 auto output = std::make_unique<reco::CandidateBaseRefVector>(cands);
54 for (
size_t i = 0;
i < cands->size(); ++
i)
55 output->push_back(cands->refAt(
i));
60 double selectionProb =
63 if (
randy_.Rndm() < selectionProb)
64 output->push_back(cands->refAt(
i));
67 size_t outputSize =
output->size();
69 return ( !
filter_ || outputSize );
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
#define DEFINE_FWK_MODULE(type)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
CandViewRefRandomSelector(const edm::ParameterSet &pset)
bool filter(edm::Event &, const edm::EventSetup &) override