File indexing completed on 2024-09-07 04:37:00
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef L1T_OmtfP1_RPCCLUSTERIZATION_H_
0009 #define L1T_OmtfP1_RPCCLUSTERIZATION_H_
0010
0011 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
0012 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
0013
0014 #include <vector>
0015
0016 class RpcCluster {
0017 public:
0018 int firstStrip = -1;
0019 int lastStrip = -1;
0020
0021 int bx = 0;
0022
0023
0024 int timing = 0;
0025
0026 RpcCluster(unsigned int firstStrip, unsigned int lastStrip) : firstStrip(firstStrip), lastStrip(lastStrip) {}
0027
0028 float halfStrip() { return (lastStrip + firstStrip) / 2.; }
0029
0030 unsigned int size() const { return abs(firstStrip - lastStrip) + 1; }
0031 };
0032
0033 class RpcClusterization {
0034 public:
0035 RpcClusterization() {}
0036
0037 virtual ~RpcClusterization();
0038
0039 void configure(int maxClusterSize, int maxClusterCnt, bool dropAllClustersIfMoreThanMax) {
0040 this->maxClusterSize = maxClusterSize;
0041 this->maxClusterCnt = maxClusterCnt;
0042 this->dropAllClustersIfMoreThanMax = dropAllClustersIfMoreThanMax;
0043 }
0044
0045
0046 virtual std::vector<RpcCluster> getClusters(const RPCDetId& roll, std::vector<RPCDigi>& digis) const;
0047
0048
0049 virtual int convertTiming(double timing) const;
0050
0051 private:
0052 unsigned int maxClusterSize = 3;
0053 unsigned int maxClusterCnt = 2;
0054
0055
0056 bool dropAllClustersIfMoreThanMax = true;
0057 };
0058
0059 #endif