RecoLocalTracker
SubCollectionProducers
interface
ClusterVariables.h
Go to the documentation of this file.
1
#ifndef CLUSTERSUMMARY_CLUSTERVARIABLES_H
2
#define CLUSTERSUMMARY_CLUSTERVARIABLES_H
3
4
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
5
6
#include "
DataFormats/SiStripCluster/interface/SiStripCluster.h
"
7
#include "
DataFormats/SiStripDigi/interface/SiStripDigi.h
"
8
#include "
DataFormats/SiPixelCluster/interface/SiPixelCluster.h
"
9
#include "
DataFormats/Common/interface/DetSetVectorNew.h
"
10
#include <numeric>
11
12
// never seen a more useless class...
13
class
ClusterVariables
{
14
public
:
15
ClusterVariables
() {}
16
~ClusterVariables
() {}
17
18
ClusterVariables
(
const
SiStripCluster
&
cluster
) :
cluster_ptr
(&
cluster
) {}
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
:
35
const
SiStripCluster
*
cluster_ptr
;
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
Generated for CMSSW Reference Manual by
1.8.16