34 produces<RPCRecHitCollection>();
37 const string theAlgoName = config.
getParameter<
string>(
"recAlgo");
46 if (maskSource ==
"File") {
51 std::cerr <<
"Masked Strips File cannot not be opened" << std::endl;
63 if (deadSource ==
"File") {
68 std::cerr <<
"Dead Strips File cannot not be opened" << std::endl;
91 std::vector<RPCMaskedStrips::MaskItem>::iterator posVec;
92 for ( posVec =
MaskVec.begin(); posVec !=
MaskVec.end(); ++posVec ) {
94 Item.
rawId = (*posVec).rawId;
95 Item.
strip = (*posVec).strip;
109 std::vector<RPCDeadStrips::DeadItem>::iterator posVec;
110 for ( posVec =
DeadVec.begin(); posVec !=
DeadVec.end(); ++posVec ) {
112 Item.
rawId = (*posVec).rawId;
113 Item.
strip = (*posVec).strip;
133 auto recHitCollection = std::make_unique<RPCRecHitCollection>();
137 for (
auto rpcdgIt = digis->begin(); rpcdgIt != digis->end(); ++rpcdgIt ) {
139 const RPCDetId& rpcId = (*rpcdgIt).first;
143 if (roll ==
nullptr){
144 edm::LogError(
"BadDigiInput")<<
"Failed to find RPCRoll for ID "<<rpcId;
153 const int rawId = rpcId.
rawId();
155 if ( tomask.rawId == rawId ) {
156 const int bit = tomask.strip;
162 if ( tomask.rawId == rawId ) {
163 const int bit = tomask.strip;
172 recHitCollection->put(rpcId, recHits.
begin(), recHits.
end());
T getParameter(std::string const &) const
def create(alignables, pedeDump, additionalData, outputFile, config)
std::vector< MaskItem > MaskVec
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_
uint32_t rawId() const
get the raw id
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.