17 std::vector<RpcCluster> allClusters;
21 typedef std::pair<unsigned int, unsigned int> Cluster;
29 for (
unsigned int iDigi = 0; iDigi < digis.size(); iDigi++) {
35 bool duplicatedDigi =
false;
36 for (
unsigned int iDigi2 = 0; iDigi2 < iDigi; iDigi2++) {
37 if (digis[iDigi].
strip() == digis[iDigi2].strip()) {
38 duplicatedDigi =
true;
47 bool addNewCluster =
true;
49 for (
auto& cluster : allClusters) {
50 if (digis[iDigi].
strip() - cluster.lastStrip == 1) {
51 cluster.lastStrip = digis[iDigi].strip();
52 addNewCluster =
false;
53 }
else if (digis[iDigi].
strip() - cluster.firstStrip == -1) {
54 cluster.firstStrip = digis[iDigi].strip();
55 addNewCluster =
false;
56 }
else if (digis[iDigi].
strip() >= cluster.firstStrip && digis[iDigi].strip() <= cluster.lastStrip) {
57 addNewCluster =
false;
62 allClusters.emplace_back(digis[iDigi].
strip(), digis[iDigi].
strip());
63 allClusters.back().bx = digis[iDigi].bx();
virtual int convertTiming(double timing) const
virtual ~RpcClusterization()
virtual std::vector< RpcCluster > getClusters(const RPCDetId &roll, std::vector< RPCDigi > &digis) const
N.B. digis are sorted inside the function.