41 : srcZCand_{consumes<std::vector<reco::CompositeCandidate>>(
43 produces<std::vector<reco::CompositeCandidate>>();
54 auto bestZ = std::make_unique<std::vector<reco::CompositeCandidate>>();
55 if (!zCandidates->empty()) {
57 double constexpr ZmassPDG{91.18};
59 auto bestZCand = std::min_element(
60 std::cbegin(*zCandidates), std::cend(*zCandidates), [ZmassPDG](
auto const& firstCand,
auto const& secondCand) {
61 return std::abs(firstCand.mass() - ZmassPDG) <
std::abs(secondCand.mass() - ZmassPDG);
63 bestZ->push_back(*bestZCand);
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)
void produce(edm::StreamID, edm::Event &, edm::EventSetup const &) const override
Abs< T >::type abs(const T &t)
ZllArbitrator(edm::ParameterSet const &)
edm::EDGetTokenT< std::vector< reco::CompositeCandidate > > srcZCand_
T getParameter(std::string const &) const