37 produces<RPCRecHitCollection>();
44 if (maskSource ==
"File") {
49 std::cerr <<
"Masked Strips File cannot not be opened" << std::endl;
61 if (deadSource ==
"File") {
66 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;
107 std::vector<RPCDeadStrips::DeadItem>::iterator posVec;
108 for ( posVec =
DeadVec.begin(); posVec !=
DeadVec.end(); ++posVec ) {
110 Item.
rawId = (*posVec).rawId;
111 Item.
strip = (*posVec).strip;
131 auto recHitCollection = std::make_unique<RPCRecHitCollection>();
135 for (
auto rpcdgIt = digis->begin(); rpcdgIt != digis->end(); ++rpcdgIt ) {
137 const RPCDetId& rpcId = (*rpcdgIt).first;
141 if (roll ==
nullptr){
142 edm::LogError(
"BadDigiInput")<<
"Failed to find RPCRoll for ID "<<rpcId;
151 const int rawId = rpcId.
rawId();
153 if ( tomask.rawId == rawId ) {
154 const int bit = tomask.strip;
160 if ( tomask.rawId == rawId ) {
161 const int bit = tomask.strip;
170 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
def setup(process, global_tag, zero_tesla=False)
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.
enum RPCRecHitProducer::MaskSource maskSource_
std::vector< DeadItem > DeadVec
std::string fullPath() const
std::vector< RPCMaskedStrips::MaskItem > MaskVec
std::pair< const_iterator, const_iterator > Range
T const * product() const
T get(const Candidate &c)
std::unique_ptr< RPCDeadStrips > theRPCDeadStripsObj
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.