Go to the documentation of this file.
54 #include "CLHEP/Random/RandomEngine.h"
91 produces<DTDigiCollection>();
103 CLHEP::HepRandomEngine &randGen = randGenService->
getEngine(
event.streamID());
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);
static void fillDescriptions(edm::ConfigurationDescriptions &)
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
std::map< unsigned int, float > m_ChEffs
ParameterDescriptionBase * add(U const &iLabel, T const &value)
MuonDigiCollection< DTLayerId, DTDigi > DTDigiCollection
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::Event &, const edm::EventSetup &) override
bool isUninitialized() const
void beginRun(edm::Run const &, edm::EventSetup const &) override
~DTChamberMasker() override
void createMaskedChamberCollection(edm::ESHandle< DTGeometry > &)
edm::EDGetTokenT< DTDigiCollection > m_digiToken
std::map< unsigned int, float > m_DTChambEffs
DTChamberMasker(const edm::ParameterSet &)