15 : pileupInfoInputTag_(ps.getParameter<
edm::
InputTag>(
"PileupInfoInputTag")),
16 bunchSpacingInputTag_(ps.getParameter<
edm::
InputTag>(
"BunchSpacingInputTag")),
17 cfPlaybackInputTag_(ps.getParameter<
edm::
InputTag>(
"CFPlaybackInputTag")),
19 producesCollector.
produces<std::vector<PileupSummaryInfo>>();
20 producesCollector.
produces<
int>(
"bunchSpacing");
24 producesCollector.
produces<std::vector<reco::GenParticle>>(
tag.label());
32 auto it = std::find_if(
33 pileupInfoHandle->begin(), pileupInfoHandle->end(), [](
const auto&
s) {
return s.getBunchCrossing() == 0; });
34 if (it == pileupInfoHandle->end()) {
35 throw cms::Exception(
"LogicError") <<
"Did not find PileupSummaryInfo in bunch crossing 0";
38 return it->getTrueNumInteractions();
42 LogDebug(
"PreMixingPileupCopy") <<
"\n===============> adding pileup Info from event " << pep.
principal().
id();
53 if (pileupInfoHandle.
isValid()) {
63 if (genPUProtonsHandle.
isValid()) {
67 edm::LogWarning(
"PreMixingPileupCopy") <<
"Missing product with label: " <<
tag.label();
86 e.put(std::make_unique<int>(
bsStorage_),
"bunchSpacing");