CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ClusterVariables.h
Go to the documentation of this file.
1 #ifndef CLUSTERSUMMARY_CLUSTERVARIABLES_H
2 #define CLUSTERSUMMARY_CLUSTERVARIABLES_H
3 
5 
10 #include <numeric>
11 
12 // never seen a more useless class...
14 public:
17 
19 
20  const SiStripCluster* cluster() const { return cluster_ptr; }
21 
22  /*
23  Returns the number of strips in the Cluster
24  */
25  const unsigned clusterSize() const { return cluster()->amplitudes().size(); }
26 
27  auto stripCharges() const -> decltype(cluster()->amplitudes()) { return cluster()->amplitudes(); }
28 
29  /*
30  Returns the total charge of all the strips in the Cluster
31  */
32  uint16_t charge() const { return std::accumulate(stripCharges().begin(), stripCharges().end(), uint16_t(0)); }
33 
34 private:
36 };
37 
38 #endif
ClusterVariables(const SiStripCluster &cluster)
SiStripCluster const & amplitudes() const
const SiStripCluster * cluster_ptr
auto stripCharges() const -> decltype(cluster() ->amplitudes())
auto size() const
uint16_t charge() const
const SiStripCluster * cluster() const
string end
Definition: dataset.py:937
const unsigned clusterSize() const