47 #include "CLHEP/Random/RandomEngine.h" 88 : digiTag_(iConfig.getParameter<
edm::
InputTag>(
"digiTag")) {
90 produces<RPCDigiCollection>();
108 CLHEP::HepRandomEngine& randGen = randGenService->
getEngine(
iEvent.streamID());
115 for (
const auto& rpcLayerId : (*rpcDigis)) {
116 int id = (rpcLayerId.first).
rawId();
118 if ((chEffIt !=
m_ChEffs.end()) && (randGen.flat() <= chEffIt->second))
119 filteredDigis->put(rpcLayerId.second, rpcLayerId.first);
133 const auto rolls = rpcGeom->rolls();
135 for (
const auto*
roll : rolls) {
137 uint32_t rollRawId = rollId.
rawId();
139 Float_t chamberEff = 1.;
140 for (
const auto& agingPair : agingObj->m_RPCChambEffs) {
141 if (agingPair.first == rollRawId) {
142 chamberEff = agingPair.second;
165 desc.add<
bool>(
"descopeRE31",
false);
166 desc.add<
bool>(
"descopeRE41",
false);
167 descriptions.
add(
"rpcChamberMasker",
desc);
T getParameter(std::string const &) const
std::map< RPCDetId, float > m_ChEffs
void beginRun(edm::Run const &, edm::EventSetup const &) override
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
MuonDigiCollection< RPCDetId, RPCDigi > RPCDigiCollection
void produce(edm::Event &, const edm::EventSetup &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcGeomToken_
~RPCChamberMasker() override
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
constexpr uint32_t rawId() const
get the raw id
void endRun(edm::Run const &, edm::EventSetup const &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
RPCChamberMasker(const edm::ParameterSet &)
edm::EDGetTokenT< RPCDigiCollection > m_digiTag
edm::ESGetToken< MuonSystemAging, MuonSystemAgingRcd > agingObjToken_