src
DataFormats
SiStripCluster
interface
SiStripApproximateCluster.h
Go to the documentation of this file.
1
#ifndef DATAFORMATS_SISTRIPAPPROXIMATECLUSTER_H
2
#define DATAFORMATS_SISTRIPAPPROXIMATECLUSTER_H
3
4
#include <numeric>
5
#include <cmath>
6
#include <iostream>
7
#include <iomanip>
8
9
#include "
DataFormats/SiStripCluster/interface/SiStripCluster.h
"
10
11
class
SiStripApproximateCluster
{
12
public
:
13
SiStripApproximateCluster
() {}
14
15
explicit
SiStripApproximateCluster
(
float
barycenter
, uint8_t
width
,
float
avgCharge
) {
16
barycenter_
=
barycenter
;
17
width_
=
width
;
18
avgCharge_
=
avgCharge
;
19
}
20
21
explicit
SiStripApproximateCluster
(
const
SiStripCluster
& cluster) {
22
barycenter_
= cluster.
barycenter
();
23
width_
= cluster.
size
();
24
avgCharge_
= cluster.
charge
() / cluster.
size
();
25
}
26
27
float
barycenter
()
const
{
return
barycenter_
; }
28
uint8_t
width
()
const
{
return
width_
; }
29
float
avgCharge
()
const
{
return
avgCharge_
; }
30
31
private
:
32
float
barycenter_
= 0;
33
uint8_t
width_
= 0;
34
float
avgCharge_
= 0;
35
};
36
#endif // DATAFORMATS_SiStripApproximateCluster_H
SiStripCluster::charge
int charge() const
Definition:
SiStripCluster.h:77
SiStripApproximateCluster::avgCharge
float avgCharge() const
Definition:
SiStripApproximateCluster.h:29
SiStripApproximateCluster
Definition:
SiStripApproximateCluster.h:11
SiStripApproximateCluster::avgCharge_
float avgCharge_
Definition:
SiStripApproximateCluster.h:34
SiStripApproximateCluster::width_
uint8_t width_
Definition:
SiStripApproximateCluster.h:33
SiStripApproximateCluster::barycenter
float barycenter() const
Definition:
SiStripApproximateCluster.h:27
SiStripApproximateCluster::barycenter_
float barycenter_
Definition:
SiStripApproximateCluster.h:32
SiStripCluster::size
auto size() const
Definition:
SiStripCluster.h:54
SiStripCluster
Definition:
SiStripCluster.h:8
SiStripApproximateCluster::SiStripApproximateCluster
SiStripApproximateCluster(float barycenter, uint8_t width, float avgCharge)
Definition:
SiStripApproximateCluster.h:15
SiStripApproximateCluster::SiStripApproximateCluster
SiStripApproximateCluster()
Definition:
SiStripApproximateCluster.h:13
SiStripApproximateCluster::SiStripApproximateCluster
SiStripApproximateCluster(const SiStripCluster &cluster)
Definition:
SiStripApproximateCluster.h:21
SiStripCluster.h
SiStripCluster::barycenter
float barycenter() const
Definition:
SiStripCluster.cc:25
SiStripApproximateCluster::width
uint8_t width() const
Definition:
SiStripApproximateCluster.h:28
Generated for CMSSW Reference Manual by
1.8.14