30 m_inrpcDigis {inrpcDigis}
42 BxToStrips(): m_strips{} {}
44 static bool outOfRange(
int iBX) {
45 return (iBX > max_rpc_bx
or iBX < min_rpc_bx) ;
49 return m_strips[iBX-min_rpc_bx];
52 size_t size()
const {
return m_strips.size(); }
60 std::map<detId_Ext, int>
hits;
61 vector<int> vcluster_size;
62 std::map<RPCDetId, int> bx_hits;
70 int strip_n1 = -10000;
72 if(detid.
region()!=0 )
continue;
73 for(
auto digi = (*chamber).second.first ; digi != (*chamber).second.second; ++digi ) {
74 if(fabs(digi->bx())>3 )
continue;
77 if(
abs(digi->strip()-strip_n1)!=1 || digi->bx()!=bx_n1){
78 if(itr!=0)vcluster_size.push_back(cluster_size);
86 hits[
tmp] = cluster_id;
88 strip_n1 = digi->strip();
92 vcluster_size.push_back(cluster_size);
96 if(detid.
region()!=0 )
continue;
101 for(
auto digi = (*chamber).second.first ; digi != (*chamber).second.second; ++digi ) {
102 if(BxToStrips::outOfRange(digi->bx()) )
continue;
105 int cluster_id = hits[
tmp];
107 if( vcluster_size[cluster_id] >=4 )
continue;
108 if(bx_hits[detid]>digi->bx())
109 bx_hits[detid] = digi->bx();
112 for(
auto digi = (*chamber).second.first ; digi != (*chamber).second.second; ++digi ) {
113 if(fabs(digi->bx())>3 )
continue;
115 int cluster_id = hits[
tmp];
117 if( vcluster_size[cluster_id] >=4 )
continue;
119 if(digi->bx()!=bx_hits[detid] )
continue;
121 if(cluster_n1 != cluster_id) {strips[digi->bx()] = {0}; }
122 strips[digi->bx()] ++ ;
123 cluster_n1 = cluster_id;
125 if( vcluster_size[cluster_id] ==3 && strips[digi->bx()]!=2)
continue;
127 RPCDigi digi_out(digi->strip(), digi->bx());
void run(const edm::EventSetup &c)
RPCHitCleaner(RPCDigiCollection const &inrpcDigis)
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
RPCDigiCollection m_outrpcDigis
Output.
RPCDigiCollection const & m_inrpcDigis
Input.
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.