src
RecoLocalTracker
SiPixelClusterizer
plugins
PixelClusterizerBase.h
Go to the documentation of this file.
1
#ifndef RecoLocalTracker_SiPixelClusterizer_PixelClusterizerBase_H
2
#define RecoLocalTracker_SiPixelClusterizer_PixelClusterizerBase_H
3
4
#include <vector>
5
6
#include "
CalibTracker/SiPixelESProducers/interface/SiPixelGainCalibrationServiceBase.h
"
7
#include "
DataFormats/Common/interface/DetSetVector.h
"
8
#include "
DataFormats/Common/interface/DetSetVectorNew.h
"
9
#include "
DataFormats/SiPixelCluster/interface/SiPixelCluster.h
"
10
#include "
DataFormats/SiPixelDigi/interface/PixelDigi.h
"
11
#include "
DataFormats/TrackerCommon/interface/TrackerTopology.h
"
12
13
class
PixelGeomDetUnit
;
14
18
class
PixelClusterizerBase
{
19
public
:
20
typedef
edm::DetSet<PixelDigi>::const_iterator
DigiIterator
;
21
typedef
edmNew::DetSet<SiPixelCluster>::const_iterator
ClusterIterator
;
22
23
struct
AccretionCluster
{
24
static
constexpr uint16_t
MAXSIZE
= 256;
25
uint16_t
adc
[
MAXSIZE
];
26
uint16_t
x
[
MAXSIZE
];
27
uint16_t
y
[
MAXSIZE
];
28
uint16_t
xmin
= 16000;
29
uint16_t
ymin
= 16000;
30
unsigned
int
isize
= 0;
31
int
charge
= 0;
32
33
// stack interface (unsafe ok for use below)
34
unsigned
int
curr
= 0;
35
uint16_t
top
()
const
{
return
curr
; }
36
void
pop
() { ++
curr
; }
37
bool
empty
() {
return
curr
==
isize
; }
38
39
void
clear
() {
40
xmin
= 16000;
41
ymin
= 16000;
42
isize
= 0;
43
charge
= 0;
44
curr
= 0;
45
}
46
47
bool
add
(
SiPixelCluster::PixelPos
const
&
p
, uint16_t
const
iadc) {
48
if
(
isize
==
MAXSIZE
)
49
return
false
;
50
xmin
= std::min<uint16_t>(
xmin
,
p
.row());
51
ymin
= std::min<uint16_t>(
ymin
,
p
.col());
52
adc
[
isize
] = iadc;
53
x
[
isize
] =
p
.row();
54
y
[
isize
++] =
p
.col();
55
charge
+= iadc;
56
return
true
;
57
}
58
};
59
60
// Virtual destructor, this is a base class.
61
virtual
~PixelClusterizerBase
() {}
62
63
// Build clusters in a DetUnit. Both digi and cluster stored in a DetSet
64
65
virtual
void
clusterizeDetUnit
(
const
edm::DetSet<PixelDigi>
&
input
,
66
const
PixelGeomDetUnit
* pixDet,
67
const
TrackerTopology
* tTopo,
68
const
std::vector<short>& badChannels,
69
edmNew::DetSetVector<SiPixelCluster>::FastFiller
&
output
) = 0;
70
71
virtual
void
clusterizeDetUnit
(
const
edmNew::DetSet<SiPixelCluster>
&
input
,
72
const
PixelGeomDetUnit
* pixDet,
73
const
TrackerTopology
* tTopo,
74
const
std::vector<short>& badChannels,
75
edmNew::DetSetVector<SiPixelCluster>::FastFiller
&
output
) = 0;
76
77
// Configure gain calibration service
78
void
setSiPixelGainCalibrationService
(
SiPixelGainCalibrationServiceBase
*
in
) {
79
theSiPixelGainCalibrationService_
=
in
;
80
}
81
82
protected
:
83
SiPixelGainCalibrationServiceBase
*
theSiPixelGainCalibrationService_
;
84
};
85
86
#endif
PixelClusterizerBase::AccretionCluster::isize
unsigned int isize
Definition:
PixelClusterizerBase.h:30
PixelClusterizerBase::clusterizeDetUnit
virtual void clusterizeDetUnit(const edm::DetSet< PixelDigi > &input, const PixelGeomDetUnit *pixDet, const TrackerTopology *tTopo, const std::vector< short > &badChannels, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output)=0
DetSetVectorNew.h
PixelClusterizerBase::AccretionCluster::ymin
uint16_t ymin
Definition:
PixelClusterizerBase.h:29
PixelClusterizerBase::AccretionCluster::adc
uint16_t adc[MAXSIZE]
Definition:
PixelClusterizerBase.h:25
TrackerTopology
Definition:
TrackerTopology.h:16
edm::DetSet
Definition:
DetSet.h:23
PixelClusterizerBase::AccretionCluster::x
uint16_t x[MAXSIZE]
Definition:
PixelClusterizerBase.h:26
convertSQLitetoXML_cfg.output
output
Definition:
convertSQLitetoXML_cfg.py:72
PixelClusterizerBase::AccretionCluster::charge
int charge
Definition:
PixelClusterizerBase.h:31
edmNew::DetSet::const_iterator
data_type const * const_iterator
Definition:
DetSetNew.h:31
SiPixelCluster::PixelPos
Definition:
SiPixelCluster.h:56
recoMuon::in
Definition:
RecoMuonEnumerators.h:6
PixelClusterizerBase::AccretionCluster::pop
void pop()
Definition:
PixelClusterizerBase.h:36
PixelDigi.h
PixelClusterizerBase::AccretionCluster::xmin
uint16_t xmin
Definition:
PixelClusterizerBase.h:28
input
static std::string const input
Definition:
EdmProvDump.cc:50
DetSetVector.h
PixelGeomDetUnit
Definition:
PixelGeomDetUnit.h:15
SiPixelGainCalibrationServiceBase.h
PixelClusterizerBase::AccretionCluster::clear
void clear()
Definition:
PixelClusterizerBase.h:39
PixelClusterizerBase::AccretionCluster
Definition:
PixelClusterizerBase.h:23
PixelClusterizerBase::~PixelClusterizerBase
virtual ~PixelClusterizerBase()
Definition:
PixelClusterizerBase.h:61
PixelClusterizerBase::AccretionCluster::MAXSIZE
static constexpr uint16_t MAXSIZE
Definition:
PixelClusterizerBase.h:24
PixelClusterizerBase::DigiIterator
edm::DetSet< PixelDigi >::const_iterator DigiIterator
Definition:
PixelClusterizerBase.h:20
edmNew::DetSet
Definition:
DetSetNew.h:22
SiPixelGainCalibrationServiceBase
Definition:
SiPixelGainCalibrationServiceBase.h:30
PixelClusterizerBase::AccretionCluster::curr
unsigned int curr
Definition:
PixelClusterizerBase.h:34
PixelClusterizerBase::AccretionCluster::empty
bool empty()
Definition:
PixelClusterizerBase.h:37
PixelClusterizerBase::ClusterIterator
edmNew::DetSet< SiPixelCluster >::const_iterator ClusterIterator
Definition:
PixelClusterizerBase.h:21
PixelClusterizerBase::theSiPixelGainCalibrationService_
SiPixelGainCalibrationServiceBase * theSiPixelGainCalibrationService_
Definition:
PixelClusterizerBase.h:83
PixelClusterizerBase::AccretionCluster::y
uint16_t y[MAXSIZE]
Definition:
PixelClusterizerBase.h:27
edmNew::DetSetVector::FastFiller
Definition:
DetSetVectorNew.h:198
PixelClusterizerBase::AccretionCluster::top
uint16_t top() const
Definition:
PixelClusterizerBase.h:35
PixelClusterizerBase::AccretionCluster::add
bool add(SiPixelCluster::PixelPos const &p, uint16_t const iadc)
Definition:
PixelClusterizerBase.h:47
TrackerTopology.h
edm::DetSet::const_iterator
collection_type::const_iterator const_iterator
Definition:
DetSet.h:31
PixelClusterizerBase
Definition:
PixelClusterizerBase.h:18
SiPixelCluster.h
PixelClusterizerBase::setSiPixelGainCalibrationService
void setSiPixelGainCalibrationService(SiPixelGainCalibrationServiceBase *in)
Definition:
PixelClusterizerBase.h:78
AlCaHLTBitMon_ParallelJobs.p
def p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
Generated for CMSSW Reference Manual by
1.8.14