CMS 3D CMS Logo

RpcClusterization.h
Go to the documentation of this file.
1 /*
2  * RpcClusterization.h
3  *
4  * Created on: Jan 14, 2019
5  * Author: kbunkow
6  */
7 
8 #ifndef L1T_OmtfP1_RPCCLUSTERIZATION_H_
9 #define L1T_OmtfP1_RPCCLUSTERIZATION_H_
10 
13 
14 #include <vector>
15 
16 class RpcCluster {
17 public:
18  int firstStrip = -1;
19  int lastStrip = -1;
20 
21  int bx = 0;
22 
23  //sub-bx timing, should be already in scale common for all muon subsystems
24  int timing = 0;
25 
27 
28  float halfStrip() { return (lastStrip + firstStrip) / 2.; }
29 
30  unsigned int size() const { return abs(firstStrip - lastStrip) + 1; }
31 };
32 
34 public:
36 
37  virtual ~RpcClusterization();
38 
40  this->maxClusterSize = maxClusterSize;
41  this->maxClusterCnt = maxClusterCnt;
42  this->dropAllClustersIfMoreThanMax = dropAllClustersIfMoreThanMax;
43  }
44 
46  virtual std::vector<RpcCluster> getClusters(const RPCDetId& roll, std::vector<RPCDigi>& digis) const;
47 
48  //converts float timing to the int timing in the scale common for the muon detectors
49  virtual int convertTiming(double timing) const;
50 
51 private:
52  unsigned int maxClusterSize = 3;
53  unsigned int maxClusterCnt = 2;
54 
55  // if true no cluster is return if there is more clusters then maxClusterCnt (counted regardless of the size)
57 };
58 
59 #endif /* L1T_OmtfP1_RPCCLUSTERIZATION_H_ */
virtual int convertTiming(double timing) const
unsigned int size() const
virtual ~RpcClusterization()
RpcCluster(unsigned int firstStrip, unsigned int lastStrip)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float halfStrip()
virtual std::vector< RpcCluster > getClusters(const RPCDetId &roll, std::vector< RPCDigi > &digis) const
N.B. digis are sorted inside the function.
unsigned int maxClusterCnt
void configure(int maxClusterSize, int maxClusterCnt, bool dropAllClustersIfMoreThanMax)
unsigned int maxClusterSize