37 produces<RPCRecHitCollection>();
44 if (maskSource ==
"File") {
49 std::cerr <<
"Masked Strips File cannot not be opened" << std::endl;
62 if (deadSource ==
"File") {
67 std::cerr <<
"Dead Strips File cannot not be opened" << std::endl;
89 std::vector<RPCMaskedStrips::MaskItem>::iterator posVec;
90 for (posVec =
MaskVec.begin(); posVec !=
MaskVec.end(); ++posVec) {
92 Item.
rawId = (*posVec).rawId;
93 Item.
strip = (*posVec).strip;
106 std::vector<RPCDeadStrips::DeadItem>::iterator posVec;
107 for (posVec =
DeadVec.begin(); posVec !=
DeadVec.end(); ++posVec) {
109 Item.
rawId = (*posVec).rawId;
110 Item.
strip = (*posVec).strip;
129 auto recHitCollection = std::make_unique<RPCRecHitCollection>();
133 for (
auto rpcdgIt = digis->begin(); rpcdgIt != digis->end(); ++rpcdgIt) {
135 const RPCDetId& rpcId = (*rpcdgIt).first;
139 if (roll ==
nullptr) {
140 edm::LogError(
"BadDigiInput") <<
"Failed to find RPCRoll for ID " << rpcId;
149 const int rawId = rpcId.
rawId();
151 if (tomask.rawId == rawId) {
152 const int bit = tomask.strip;
158 if (tomask.rawId == rawId) {
159 const int bit = tomask.strip;
167 if (!recHits.
empty())
168 recHitCollection->put(rpcId, recHits.
begin(), recHits.
end());
T getParameter(std::string const &) const
std::vector< MaskItem > MaskVec
constexpr uint32_t rawId() const
get the raw id
std::unique_ptr< RPCRecHitBaseAlgo > theAlgo
void beginRun(const edm::Run &, const edm::EventSetup &) override
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.
std::pair< const_iterator, const_iterator > Range
enum RPCRecHitProducer::MaskSource maskSource_
std::vector< DeadItem > DeadVec
std::string fullPath() const
std::vector< RPCMaskedStrips::MaskItem > MaskVec
T const * product() const
std::unique_ptr< RPCDeadStrips > theRPCDeadStripsObj
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.