Go to the documentation of this file.
47 #include "CLHEP/Random/RandomEngine.h"
85 : digiTag_(iConfig.getParameter<
edm::
InputTag>(
"digiTag")) {
87 produces<RPCDigiCollection>();
103 CLHEP::HepRandomEngine& randGen = randGenService->
getEngine(
iEvent.streamID());
110 for (
const auto& rpcLayerId : (*rpcDigis)) {
111 int id = (rpcLayerId.first).rawId();
113 if ((chEffIt !=
m_ChEffs.end()) && (randGen.flat() <= chEffIt->second))
114 filteredDigis->put(rpcLayerId.second, rpcLayerId.first);
131 const auto rolls = rpcGeom->
rolls();
133 for (
const auto* roll : rolls) {
135 uint32_t rollRawId = rollId.
rawId();
137 Float_t chamberEff = 1.;
139 if (agingPair.first == rollRawId) {
140 chamberEff = agingPair.second;
163 desc.add<
bool>(
"descopeRE31",
false);
164 desc.add<
bool>(
"descopeRE41",
false);
165 descriptions.
add(
"rpcChamberMasker",
desc);
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
std::map< unsigned int, float > m_RPCChambEffs
edm::EDGetTokenT< RPCDigiCollection > m_digiTag
~RPCChamberMasker() override
RPCChamberMasker(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void endRun(edm::Run const &, edm::EventSetup const &) override
MuonDigiCollection< RPCDetId, RPCDigi > RPCDigiCollection
void beginRun(edm::Run const &, edm::EventSetup const &) override
constexpr uint32_t rawId() const
get the raw id
std::map< RPCDetId, float > m_ChEffs
void produce(edm::Event &, const edm::EventSetup &) override
T getParameter(std::string const &) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const std::vector< const RPCRoll * > & rolls() const
Return a vector of all RPC rolls.