CMS 3D CMS Logo

SiStripApproximateCluster.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_SISTRIPAPPROXIMATECLUSTER_H
2 #define DATAFORMATS_SISTRIPAPPROXIMATECLUSTER_H
3 
4 #include <numeric>
5 #include <cmath>
6 #include <iostream>
7 #include <iomanip>
8 
10 
12 public:
14 
15  explicit SiStripApproximateCluster(float barycenter, uint8_t width, float avgCharge) {
17  width_ = width;
19  }
20 
21  explicit SiStripApproximateCluster(const SiStripCluster& cluster) {
22  barycenter_ = cluster.barycenter();
23  width_ = cluster.size();
24  avgCharge_ = cluster.charge() / cluster.size();
25  }
26 
27  float barycenter() const { return barycenter_; }
28  uint8_t width() const { return width_; }
29  float avgCharge() const { return avgCharge_; }
30 
31 private:
32  float barycenter_ = 0;
33  uint8_t width_ = 0;
34  float avgCharge_ = 0;
35 };
36 #endif // DATAFORMATS_SiStripApproximateCluster_H
int charge() const
auto size() const
SiStripApproximateCluster(float barycenter, uint8_t width, float avgCharge)
SiStripApproximateCluster(const SiStripCluster &cluster)
float barycenter() const