File indexing completed on 2024-04-06 12:20:54
0001 #include <cstdint>
0002 #ifndef L1Trigger_CPPFCluster_h
0003 #define L1Trigger_CPPFCluster_h
0004 class CPPFCluster {
0005 public:
0006 CPPFCluster();
0007 CPPFCluster(int fs, int ls, int bx);
0008 ~CPPFCluster();
0009
0010 int firstStrip() const;
0011 int lastStrip() const;
0012 int clusterSize() const;
0013 int bx() const;
0014
0015 bool hasTime() const;
0016 float time() const;
0017 float timeRMS() const;
0018
0019 bool hasY() const;
0020 float y() const;
0021 float yRMS() const;
0022
0023 void addTime(const float time);
0024 void addY(const float y);
0025 void merge(const CPPFCluster& cl);
0026
0027 bool operator<(const CPPFCluster& cl) const;
0028 bool operator==(const CPPFCluster& cl) const;
0029 bool isAdjacent(const CPPFCluster& cl) const;
0030
0031 private:
0032 uint16_t fstrip;
0033 uint16_t lstrip;
0034 int16_t bunchx;
0035
0036 float sumTime, sumTime2;
0037 uint16_t nTime;
0038
0039 float sumY, sumY2;
0040 uint16_t nY;
0041 };
0042 #endif