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 
14 
15  public:
16 
19 
21 
22 
23  const SiStripCluster * cluster() const {return cluster_ptr;}
24 
25  /*
26  Returns the number of strips in the Cluster
27  */
28  const unsigned clusterSize() const {return cluster()->amplitudes().size();}
29 
30 
31  const std::vector<uint8_t>& stripCharges() const {return cluster()->amplitudes();}
32 
33  /*
34  Returns the total charge of all the strips in the Cluster
35  */
36  uint16_t charge() const {return accumulate( stripCharges().begin(), stripCharges().end(), uint16_t(0));}
37 
38 
39  private:
40 
42 
43 };
44 
45 #endif
ClusterVariables(const SiStripCluster &cluster)
const SiStripCluster * cluster_ptr
uint16_t charge() const
#define end
Definition: vmac.h:37
const SiStripCluster * cluster() const
const std::vector< uint8_t > & stripCharges() const
#define begin
Definition: vmac.h:30
const unsigned clusterSize() const
const std::vector< uint8_t > & amplitudes() const