CMS 3D CMS Logo

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::stripCharges
auto stripCharges() const -> decltype(cluster() ->amplitudes())
Definition: ClusterVariables.h:27
SiPixelCluster.h
watchdog.const
const
Definition: watchdog.py:83
end
#define end
Definition: vmac.h:39
SiStripDigi.h
ClusterVariables::clusterSize
const unsigned clusterSize() const
Definition: ClusterVariables.h:25
ClusterVariables::cluster
const SiStripCluster * cluster() const
Definition: ClusterVariables.h:20
SiStripCluster.h
ClusterVariables::~ClusterVariables
~ClusterVariables()
Definition: ClusterVariables.h:16
SiStripCluster::amplitudes
const std::vector< uint8_t > & amplitudes() const
Definition: SiStripCluster.h:51
ClusterVariables::charge
uint16_t charge() const
Definition: ClusterVariables.h:32
ClusterVariables::cluster_ptr
const SiStripCluster * cluster_ptr
Definition: ClusterVariables.h:35
ClusterVariables
Definition: ClusterVariables.h:13
ClusterVariables::ClusterVariables
ClusterVariables(const SiStripCluster &cluster)
Definition: ClusterVariables.h:18
Frameworkfwd.h
ClusterVariables::ClusterVariables
ClusterVariables()
Definition: ClusterVariables.h:15
SiStripCluster
Definition: SiStripCluster.h:9
DetSetVectorNew.h
begin
#define begin
Definition: vmac.h:32