54 #include "CLHEP/Random/RandomEngine.h" 91 produces<DTDigiCollection>();
111 for (
const auto &dtLayerId : (*dtDigis)) {
112 uint32_t rawId = (dtLayerId.first).chamberId().rawId();
113 auto chEffIt =
m_ChEffs.find(rawId);
115 if (chEffIt ==
m_ChEffs.end() || randGen.flat() <= chEffIt->second)
116 filteredDigis->put(dtLayerId.second, dtLayerId.first);
138 descriptions.
add(
"dtChamberMasker", desc);
void beginRun(edm::Run const &, edm::EventSetup const &) override
~DTChamberMasker() override
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)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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
StreamID streamID() const
bool isUninitialized() const
void produce(edm::Event &, const edm::EventSetup &) override