1 #ifndef SimGeneral_PreMixingModule_PreMixingMuonWorker_h 2 #define SimGeneral_PreMixingModule_PreMixingMuonWorker_h 14 template <
typename DigiCollection>
29 std::vector<PileupSummaryInfo>
const& ps,
44 template <
typename DigiCollection>
49 pileupTag_(ps.getParameter<
edm::
InputTag>(
"pileInputTag")),
50 collectionDM_(ps.getParameter<
std::
string>(
"collectionDM")) {
54 template <
typename DigiCollection>
57 iEvent.getByToken(signalToken_, digis);
59 accumulated_ = std::make_unique<DigiCollection>(*digis);
62 template <
typename DigiCollection>
66 for (
const auto& elem : *digis) {
67 accumulated_->put(elem.second, elem.first);
71 template <
typename DigiCollection>
void put(edm::Event &iEvent, edm::EventSetup const &iSetup, std::vector< PileupSummaryInfo > const &ps, int bunchSpacing) override
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
void addPileups(PileUpEventPrincipal const &pep, edm::EventSetup const &iSetup) override
void initializeEvent(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
std::unique_ptr< DigiCollection > accumulated_
void addSignals(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
edm::EDGetTokenT< DigiCollection > signalToken_
PreMixingMuonWorker(const edm::ParameterSet &ps, edm::ProducesCollector producesCollector, edm::ConsumesCollector &&iC)
std::string collectionDM_
~PreMixingMuonWorker() override=default
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const