29 maskSource_(MaskSource::EventSetup),
30 deadSource_(MaskSource::EventSetup) {
32 produces<RPCRecHitCollection>();
35 theRPCMaskedStripsObj = std::make_unique<RPCMaskedStrips>();
36 theRPCDeadStripsObj = std::make_unique<RPCDeadStrips>();
44 std::cerr <<
"Masked Strips File cannot not be opened" << std::endl;
51 MaskVec.push_back(Item);
64 std::cerr <<
"Dead Strips File cannot not be opened" << std::endl;
84 std::vector<RPCMaskedStrips::MaskItem>::iterator posVec;
85 for (posVec =
MaskVec.begin(); posVec !=
MaskVec.end(); ++posVec) {
87 Item.
rawId = (*posVec).rawId;
88 Item.
strip = (*posVec).strip;
97 std::vector<RPCDeadStrips::DeadItem>::iterator posVec;
98 for (posVec =
DeadVec.begin(); posVec !=
DeadVec.end(); ++posVec) {
100 Item.
rawId = (*posVec).rawId;
101 Item.
strip = (*posVec).strip;
119 auto recHitCollection = std::make_unique<RPCRecHitCollection>();
123 for (
auto rpcdgIt = digis->begin(); rpcdgIt != digis->end(); ++rpcdgIt) {
125 const RPCDetId& rpcId = (*rpcdgIt).first;
128 const RPCRoll* roll = rpcGeom.roll(rpcId);
129 if (roll ==
nullptr) {
130 edm::LogError(
"BadDigiInput") <<
"Failed to find RPCRoll for ID " << rpcId;
139 const int rawId = rpcId.
rawId();
141 if (tomask.rawId == rawId) {
142 const int bit = tomask.strip;
148 if (tomask.rawId == rawId) {
149 const int bit = tomask.strip;
const edm::ESGetToken< RPCGeometry, MuonGeometryRecord > theRPCGeomToken
edm::ESGetToken< RPCDeadStrips, RPCDeadStripsRcd > theReadoutDeadStripsToken
std::unique_ptr< RPCRecHitBaseAlgo > theAlgo
void beginRun(const edm::Run &, const edm::EventSetup &) override
Log< level::Error, false > LogError
enum RPCRecHitProducer::MaskSource deadSource_
void produce(edm::Event &event, const edm::EventSetup &setup) override
The method which produces the rechits.
const edm::EDGetTokenT< RPCDigiCollection > theRPCDigiLabel
std::bitset< maskSIZE > RollMask
std::unique_ptr< RPCMaskedStrips > theRPCMaskedStripsObj
std::vector< RPCDeadStrips::DeadItem > DeadVec
RPCRecHitProducer(const edm::ParameterSet &config)
Constructor.
constexpr uint32_t rawId() const
get the raw id
edm::ESGetToken< RPCMaskedStrips, RPCMaskedStripsRcd > theReadoutMaskedStripsToken
std::pair< const_iterator, const_iterator > Range
std::vector< DeadRegion > DeadVec
enum RPCRecHitProducer::MaskSource maskSource_
std::vector< RPCMaskedStrips::MaskItem > MaskVec
std::unique_ptr< RPCDeadStrips > theRPCDeadStripsObj