55 #include "CLHEP/Random/RandomEngine.h" 89 : m_digiToken(consumes(iConfig.getParameter<
edm::
InputTag>(
"digiTag"))),
90 m_putToken(produces()),
100 CLHEP::HepRandomEngine &randGen = randGenService->
getEngine(
event.streamID());
112 for (
const auto &dtLayerId : (*dtDigis)) {
113 uint32_t
rawId = (dtLayerId.first).chamberId().rawId();
114 auto chEffIt = chEffs.find(
rawId);
116 if (chEffIt == chEffs.end() || randGen.flat() <= chEffIt->second)
117 filteredDigis.put(dtLayerId.second, dtLayerId.first);
129 descriptions.
add(
"dtChamberMasker",
desc);
const edm::EDPutTokenT< DTDigiCollection > m_putToken
constexpr bool isUninitialized() const noexcept
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
DTChamberMasker(const edm::ParameterSet &)
const edm::ESGetToken< MuonSystemAging, MuonSystemAgingRcd > m_agingObjToken
#define DEFINE_FWK_MODULE(type)
void createMaskedChamberCollection(edm::ESHandle< DTGeometry > &)
static void fillDescriptions(edm::ConfigurationDescriptions &)
std::map< unsigned int, float > m_DTChambEffs
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
const edm::EDGetTokenT< DTDigiCollection > m_digiToken