31 constexpr
int max_rpc_bx = 3;
32 constexpr
int min_rpc_bx = -3;
38 BxToStrips() : m_strips{} {}
40 static bool outOfRange(
int iBX) {
return (iBX > max_rpc_bx
or iBX < min_rpc_bx); }
42 int&
operator[](
int iBX) {
return m_strips[iBX - min_rpc_bx]; }
44 size_t size()
const {
return m_strips.size(); }
52 std::map<detId_Ext, int>
hits;
53 vector<int> vcluster_size;
54 std::map<RPCDetId, int> bx_hits;
62 int strip_n1 = -10000;
66 for (
auto digi = (*chamber).second.first; digi != (*chamber).second.second; ++digi) {
67 if (fabs(digi->bx()) > 3)
71 if (
abs(digi->strip() - strip_n1) != 1 || digi->bx() != bx_n1) {
73 vcluster_size.push_back(cluster_size);
83 strip_n1 = digi->strip();
87 vcluster_size.push_back(cluster_size);
97 for (
auto digi = (*chamber).second.first; digi != (*chamber).second.second; ++digi) {
98 if (BxToStrips::outOfRange(digi->bx()))
104 if (vcluster_size[cluster_id] >= 4)
106 if (bx_hits[detid] > digi->bx())
107 bx_hits[detid] = digi->bx();
110 for (
auto digi = (*chamber).second.first; digi != (*chamber).second.second; ++digi) {
111 if (fabs(digi->bx()) > 3)
116 if (vcluster_size[cluster_id] >= 4)
119 if (digi->bx() != bx_hits[detid])
122 if (cluster_n1 != cluster_id) {
126 cluster_n1 = cluster_id;
128 if (vcluster_size[cluster_id] == 3 &&
strips[digi->bx()] != 2)
131 RPCDigi digi_out(digi->strip(), digi->bx());