1 #ifndef SimGeneral_PreMixingModule_PreMixingMuonWorker_h
2 #define SimGeneral_PreMixingModule_PreMixingMuonWorker_h
14 template <
typename DigiCollection>
29 std::vector<PileupSummaryInfo>
const& ps,
30 int bunchSpacing)
override {
44 template <
typename DigiCollection>
48 : signalToken_(iC.consumes<DigiCollection>(ps.getParameter<edm::
InputTag>(
"digiTagSig"))),
49 pileupTag_(ps.getParameter<edm::
InputTag>(
"pileInputTag")),
50 collectionDM_(ps.getParameter<std::
string>(
"collectionDM")) {
54 template <
typename DigiCollection>
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>
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void put(edm::Event &iEvent, edm::EventSetup const &iSetup, std::vector< PileupSummaryInfo > const &ps, int bunchSpacing) override
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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_
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
PreMixingMuonWorker(const edm::ParameterSet &ps, edm::ProducesCollector producesCollector, edm::ConsumesCollector &&iC)
std::string collectionDM_
~PreMixingMuonWorker() override=default