test
CMS 3D CMS Logo

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