DataFormats
FP420Cluster
interface
ClusterFP420.h
Go to the documentation of this file.
1
#ifndef ClusterFP420_h
2
#define ClusterFP420_h
3
4
#include <vector>
5
class
HDigiFP420
;
6
7
class
ClusterFP420
{
8
public
:
9
typedef
std::vector<HDigiFP420>::const_iterator
HDigiFP420Iter
;
10
typedef
std::pair<HDigiFP420Iter, HDigiFP420Iter>
HDigiFP420Range
;
11
12
//ClusterFP420() : detId_(0) , xytype_(0) {}
13
ClusterFP420
() :
detId_
(0) {}
14
15
//The range is assumed to be non-empty.
16
ClusterFP420
(
unsigned
int
,
unsigned
int
,
const
HDigiFP420Range
&,
float
&,
float
&);
17
// ClusterFP420( unsigned int detid, const HDigiFP420Range& range, float& cog, float& err);// work also
18
19
// number of the first strip in the cluster
20
short
firstStrip
()
const
{
return
firstStrip_
; }
21
22
//global ID of the corresponding DetUnit --> iu index
23
unsigned
int
globalId
()
const
{
return
detId_
; }
24
25
// since xytype=2 all the time, no sense to record it into collection, so do comment the next line:
26
//unsigned int globalType() const {return xytype_;}
27
28
const
std::vector<short>&
amplitudes
()
const
{
return
amplitudes_
; }
29
30
float
barycenter
()
const
{
return
barycenter_
; }
31
float
barycerror
()
const
{
return
barycerror_
; }
32
33
float
barycenterW
()
const
{
return
barycenterW_
; }
34
float
barycerrorW
()
const
{
return
barycerrorW_
; }
35
36
private
:
37
unsigned
int
detId_
;
38
// unsigned int xytype_;
39
short
firstStrip_
;
40
std::vector<short>
amplitudes_
;
41
float
barycenter_
;
42
float
barycerror_
;
43
float
barycenterW_
;
44
float
barycerrorW_
;
45
};
46
47
// Comparison operators
48
inline
bool
operator<
(
const
ClusterFP420
&
one
,
const
ClusterFP420
&
other
) {
49
if
(
one
.globalId() ==
other
.globalId()) {
50
return
one
.firstStrip() <
other
.firstStrip();
51
}
52
return
one
.globalId() <
other
.globalId();
53
}
54
#endif
ClusterFP420::ClusterFP420
ClusterFP420()
Definition:
ClusterFP420.h:13
ClusterFP420::barycenterW
float barycenterW() const
Definition:
ClusterFP420.h:33
ClusterFP420::barycerrorW
float barycerrorW() const
Definition:
ClusterFP420.h:34
SiPixelPI::one
Definition:
SiPixelPayloadInspectorHelper.h:39
ClusterFP420::HDigiFP420Iter
std::vector< HDigiFP420 >::const_iterator HDigiFP420Iter
Definition:
ClusterFP420.h:9
operator<
bool operator<(const ClusterFP420 &one, const ClusterFP420 &other)
Definition:
ClusterFP420.h:48
ClusterFP420::firstStrip_
short firstStrip_
Definition:
ClusterFP420.h:39
HDigiFP420
Definition:
HDigiFP420.h:4
ClusterFP420::barycerror_
float barycerror_
Definition:
ClusterFP420.h:42
ClusterFP420::barycenter_
float barycenter_
Definition:
ClusterFP420.h:41
trackingPlots.other
other
Definition:
trackingPlots.py:1464
ClusterFP420::firstStrip
short firstStrip() const
Definition:
ClusterFP420.h:20
ClusterFP420::HDigiFP420Range
std::pair< HDigiFP420Iter, HDigiFP420Iter > HDigiFP420Range
Definition:
ClusterFP420.h:10
ClusterFP420::barycenter
float barycenter() const
Definition:
ClusterFP420.h:30
ClusterFP420::amplitudes
const std::vector< short > & amplitudes() const
Definition:
ClusterFP420.h:28
ClusterFP420::globalId
unsigned int globalId() const
Definition:
ClusterFP420.h:23
ClusterFP420::barycenterW_
float barycenterW_
Definition:
ClusterFP420.h:43
ClusterFP420::detId_
unsigned int detId_
Definition:
ClusterFP420.h:37
ClusterFP420::amplitudes_
std::vector< short > amplitudes_
Definition:
ClusterFP420.h:40
ClusterFP420
Definition:
ClusterFP420.h:7
ClusterFP420::barycerrorW_
float barycerrorW_
Definition:
ClusterFP420.h:44
ClusterFP420::barycerror
float barycerror() const
Definition:
ClusterFP420.h:31
Generated for CMSSW Reference Manual by
1.8.16