44 produces<RPCRecHitCollection>();
50 string theAlgoName = config.
getParameter<
string>(
"recAlgo");
62 if (maskSource ==
"File") {
66 std::cerr <<
"Masked Strips File cannot not be opened" << std::endl;
72 if (
inputFile.good() ) MaskVec.push_back(Item);
79 if (deadSource ==
"File") {
83 std::cerr <<
"Dead Strips File cannot not be opened" << std::endl;
89 if (
inputFile.good() ) DeadVec.push_back(Item);
100 delete RPCMaskedStripsObj;
101 delete RPCDeadStripsObj;
111 if ( maskSource ==
"EventSetup" ) {
115 RPCMaskedStripsObj->MaskVec = tmp_obj->
MaskVec;
118 else if ( maskSource ==
"File" ) {
119 std::vector<RPCMaskedStrips::MaskItem>::iterator posVec;
120 for ( posVec = MaskVec.begin(); posVec != MaskVec.end(); ++posVec ) {
122 Item.
rawId = (*posVec).rawId;
123 Item.
strip = (*posVec).strip;
124 RPCMaskedStripsObj->MaskVec.push_back(Item);
130 if ( deadSource ==
"EventSetup" ) {
134 RPCDeadStripsObj->DeadVec = tmp_obj->
DeadVec;
137 else if ( deadSource ==
"File" ) {
138 std::vector<RPCDeadStrips::DeadItem>::iterator posVec;
139 for ( posVec = DeadVec.begin(); posVec != DeadVec.end(); ++posVec ) {
141 Item.
rawId = (*posVec).rawId;
142 Item.
strip = (*posVec).strip;
143 RPCDeadStripsObj->DeadVec.push_back(Item);
161 event.getByLabel(theRPCDigiLabel,digis);
165 theAlgo->setES(setup);
174 for (rpcdgIt = digis->begin(); rpcdgIt != digis->end();
178 const RPCDetId& rpcId = (*rpcdgIt).first;
181 const RPCRoll* roll = rpcGeom->roll(rpcId);
183 edm::LogError(
"BadDigiInput")<<
"Failed to find RPCRoll for ID "<<rpcId;
194 int rawId = rpcId.
rawId();
195 int Size = RPCMaskedStripsObj->MaskVec.size();
196 for (
int i = 0;
i < Size;
i++ ) {
197 if ( RPCMaskedStripsObj->MaskVec[
i].rawId == rawId ) {
198 int bit = RPCMaskedStripsObj->MaskVec[
i].strip;
203 Size = RPCDeadStripsObj->DeadVec.size();
204 for (
int i = 0;
i < Size;
i++ ) {
205 if ( RPCDeadStripsObj->DeadVec[
i].rawId == rawId ) {
206 int bit = RPCDeadStripsObj->DeadVec[
i].strip;
214 theAlgo->reconstruct(*roll, rpcId, range, mask);
216 if(recHits.
size() > 0)
217 recHitCollection->put(rpcId, recHits.
begin(), recHits.
end());
220 event.put(recHitCollection);
T getParameter(std::string const &) const
std::vector< MaskItem > MaskVec
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
uint32_t rawId() const
get the raw id
virtual void produce(edm::Event &event, const edm::EventSetup &setup) override
The method which produces the rechits.
std::bitset< maskSIZE > RollMask
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual ~RPCRecHitProducer()
Destructor.
edm::RangeMap< RPCDetId, edm::OwnVector< RPCRecHit, edm::ClonePolicy< RPCRecHit > >, edm::ClonePolicy< RPCRecHit > > RPCRecHitCollection
RPCRecHitProducer(const edm::ParameterSet &config)
Constructor.
T const * product() const
std::vector< DeadItem > DeadVec
std::pair< const_iterator, const_iterator > Range
std::string fullPath() const
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
T get(const Candidate &c)