15 pileupInfoInputTag_(ps.getParameter<
edm::
InputTag>(
"PileupInfoInputTag")),
16 bunchSpacingInputTag_(ps.getParameter<
edm::
InputTag>(
"BunchSpacingInputTag")),
17 cfPlaybackInputTag_(ps.getParameter<
edm::
InputTag>(
"CFPlaybackInputTag")),
18 genPUProtonsInputTags_(ps.getParameter<
std::vector<
edm::
InputTag> >(
"GenPUProtonsInputTags"))
20 producer.
produces<std::vector<PileupSummaryInfo> >();
21 producer.
produces<
int>(
"bunchSpacing");
25 producer.
produces<std::vector<reco::GenParticle> >(
tag.label());
33 auto it = std::find_if(pileupInfoHandle->begin(), pileupInfoHandle->end(),
35 return s.getBunchCrossing() == 0;
37 if(it == pileupInfoHandle->end()) {
38 throw cms::Exception(
"LogicError") <<
"Did not find PileupSummaryInfo in bunch crossing 0";
41 return it->getTrueNumInteractions();
46 LogDebug(
"PreMixingPileupCopy") <<
"\n===============> adding pileup Info from event "<<pep.
principal().
id();
57 if(pileupInfoHandle.
isValid()) {
67 if(genPUProtonsHandle.
isValid()) {
72 edm::LogWarning(
"PreMixingPileupCopy") <<
"Missing product with label: " <<
tag.label();
BranchAliasSetterT< ProductType > produces()
declare what type of product will make and with which optional label
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
PreMixingPileupCopy(const edm::ParameterSet &ps, edm::ProducerBase &producer, edm::ConsumesCollector &&iC)
std::vector< std::vector< reco::GenParticle > > genPUProtons_
EventID const & id() const
void putPileupInfo(edm::Event &e)
CrossingFramePlaybackInfoNew crossingFramePlaybackStorage_
edm::InputTag cfPlaybackInputTag_
std::vector< std::string > genPUProtons_labels_
void addPileupInfo(PileUpEventPrincipal const &pep)
edm::EventPrincipal const & principal()
std::vector< PileupSummaryInfo > pileupSummaryStorage_
std::vector< edm::InputTag > genPUProtonsInputTags_
float getTrueNumInteractions(PileUpEventPrincipal const &pep) const
edm::InputTag bunchSpacingInputTag_
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
edm::InputTag pileupInfoInputTag_