55 #include "CLHEP/Random/RandomEngine.h" 94 produces<DTDigiCollection>();
106 CLHEP::HepRandomEngine &randGen = randGenService->
getEngine(
event.streamID());
114 for (
const auto &dtLayerId : (*dtDigis)) {
115 uint32_t rawId = (dtLayerId.first).chamberId().rawId();
116 auto chEffIt =
m_ChEffs.find(rawId);
118 if (chEffIt ==
m_ChEffs.end() || randGen.flat() <= chEffIt->second)
119 filteredDigis->put(dtLayerId.second, dtLayerId.first);
140 descriptions.
add(
"dtChamberMasker",
desc);
edm::ESGetToken< MuonSystemAging, MuonSystemAgingRcd > m_agingObjToken
void beginRun(edm::Run const &, edm::EventSetup const &) override
~DTChamberMasker() override
constexpr bool isUninitialized() const noexcept
std::map< unsigned int, float > m_ChEffs
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
DTChamberMasker(const edm::ParameterSet &)
edm::EDGetTokenT< DTDigiCollection > m_digiToken
#define DEFINE_FWK_MODULE(type)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
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)
MuonDigiCollection< DTLayerId, DTDigi > DTDigiCollection
void produce(edm::Event &, const edm::EventSetup &) override