30 m_inrpcDigis = inrpcDigis;
41 BxToStrips(): m_strips{} {}
43 static bool outOfRange(
int iBX) {
44 return (iBX > max_rpc_bx
or iBX < min_rpc_bx) ;
48 return m_strips[iBX-min_rpc_bx];
51 size_t size()
const {
return m_strips.size(); }
59 std::map<detId_Ext, int>
hits;
60 vector<int> vcluster_size;
61 std::map<RPCDetId, int> bx_hits;
69 int strip_n1 = -10000;
71 if(detid.
region()!=0 )
continue;
72 for(
auto digi = (*chamber).second.first ; digi != (*chamber).second.second; ++digi ) {
73 if(fabs(digi->bx())>3 )
continue;
76 if(
abs(digi->strip()-strip_n1)!=1 || digi->bx()!=bx_n1){
77 if(itr!=0)vcluster_size.push_back(cluster_size);
85 hits[
tmp] = cluster_id;
87 strip_n1 = digi->strip();
91 vcluster_size.push_back(cluster_size);
95 if(detid.
region()!=0 )
continue;
100 for(
auto digi = (*chamber).second.first ; digi != (*chamber).second.second; ++digi ) {
101 if(BxToStrips::outOfRange(digi->bx()) )
continue;
104 int cluster_id = hits[
tmp];
106 if( vcluster_size[cluster_id] >=4 )
continue;
107 if(bx_hits[detid]>digi->bx())
108 bx_hits[detid] = digi->bx();
111 for(
auto digi = (*chamber).second.first ; digi != (*chamber).second.second; ++digi ) {
112 if(fabs(digi->bx())>3 )
continue;
114 int cluster_id = hits[
tmp];
116 if( vcluster_size[cluster_id] >=4 )
continue;
118 if(digi->bx()!=bx_hits[detid] )
continue;
120 if(cluster_n1 != cluster_id) {strips[digi->bx()] = {0}; }
121 strips[digi->bx()] ++ ;
122 cluster_n1 = cluster_id;
124 if( vcluster_size[cluster_id] ==3 && strips[digi->bx()]!=2)
continue;
126 RPCDigi digi_out(digi->strip(), digi->bx());
127 m_outrpcDigis.insertDigi(detid, digi_out);
void run(const edm::EventSetup &c)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Abs< T >::type abs(const T &t)
T operator[](int i) const
std::vector< std::vector< double > > tmp
RPCHitCleaner(RPCDigiCollection inrpcDigis)
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.