43 produces<RPCRecHitCollection>();
49 string theAlgoName = config.
getParameter<
string>(
"recAlgo");
59 maskSource = config.
getParameter<std::string>(
"maskSource");
61 if (maskSource ==
"File") {
65 std::cerr <<
"Masked Strips File cannot not be opened" << std::endl;
71 if (
inputFile.good() ) MaskVec.push_back(Item);
76 deadSource = config.
getParameter<std::string>(
"deadSource");
78 if (deadSource ==
"File") {
82 std::cerr <<
"Dead Strips File cannot not be opened" << std::endl;
88 if (
inputFile.good() ) DeadVec.push_back(Item);
99 delete RPCMaskedStripsObj;
100 delete RPCDeadStripsObj;
110 if ( maskSource ==
"EventSetup" ) {
114 RPCMaskedStripsObj->MaskVec = tmp_obj->
MaskVec;
117 else if ( maskSource ==
"File" ) {
118 std::vector<RPCMaskedStrips::MaskItem>::iterator posVec;
119 for ( posVec = MaskVec.begin(); posVec != MaskVec.end(); ++posVec ) {
121 Item.
rawId = (*posVec).rawId;
122 Item.
strip = (*posVec).strip;
123 RPCMaskedStripsObj->MaskVec.push_back(Item);
129 if ( deadSource ==
"EventSetup" ) {
133 RPCDeadStripsObj->DeadVec = tmp_obj->
DeadVec;
136 else if ( deadSource ==
"File" ) {
137 std::vector<RPCDeadStrips::DeadItem>::iterator posVec;
138 for ( posVec = DeadVec.begin(); posVec != DeadVec.end(); ++posVec ) {
140 Item.
rawId = (*posVec).rawId;
141 Item.
strip = (*posVec).strip;
142 RPCDeadStripsObj->DeadVec.push_back(Item);
160 event.getByLabel(theRPCDigiLabel,digis);
164 theAlgo->setES(setup);
173 for (rpcdgIt = digis->begin(); rpcdgIt != digis->end();
177 const RPCDetId& rpcId = (*rpcdgIt).first;
180 const RPCRoll* roll = rpcGeom->roll(rpcId);
189 int rawId = rpcId.
rawId();
190 int Size = RPCMaskedStripsObj->MaskVec.size();
191 for (
int i = 0;
i < Size;
i++ ) {
192 if ( RPCMaskedStripsObj->MaskVec[
i].rawId == rawId ) {
193 int bit = RPCMaskedStripsObj->MaskVec[
i].strip;
198 Size = RPCDeadStripsObj->DeadVec.size();
199 for (
int i = 0;
i < Size;
i++ ) {
200 if ( RPCDeadStripsObj->DeadVec[
i].rawId == rawId ) {
201 int bit = RPCDeadStripsObj->DeadVec[
i].strip;
209 theAlgo->reconstruct(*roll, rpcId, range, mask);
211 if(recHits.
size() > 0)
212 recHitCollection->put(rpcId, recHits.
begin(), recHits.
end());
215 event.put(recHitCollection);
T getParameter(std::string const &) const
std::vector< MaskItem > MaskVec
virtual void beginRun(edm::Run &, const edm::EventSetup &)
uint32_t rawId() const
get the raw id
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
virtual void produce(edm::Event &event, const edm::EventSetup &setup)
The method which produces the rechits.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
T get(const Candidate &c)