RecoLocalTracker
SiPhase2Clusterizer
plugins
Phase2TrackerClusterizerSequentialAlgorithm.h
Go to the documentation of this file.
1
#ifndef RecoLocalTracker_SiPhase2Clusterizer_Phase2TrackerClusterizerSequentialAlgorithm_h
2
#define RecoLocalTracker_SiPhase2Clusterizer_Phase2TrackerClusterizerSequentialAlgorithm_h
3
4
#include "
DataFormats/Common/interface/DetSetVector.h
"
5
#include "
DataFormats/Common/interface/DetSetVectorNew.h
"
6
#include "
DataFormats/Phase2TrackerDigi/interface/Phase2TrackerDigi.h
"
7
#include "
DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h
"
8
9
class
Phase2TrackerClusterizerSequentialAlgorithm
{
10
public
:
11
inline
void
clusterizeDetUnit
(
const
edm::DetSet<Phase2TrackerDigi>
&,
12
Phase2TrackerCluster1DCollectionNew::FastFiller
&)
const
;
13
};
14
15
void
Phase2TrackerClusterizerSequentialAlgorithm::clusterizeDetUnit
(
16
const
edm::DetSet<Phase2TrackerDigi>
& digis,
Phase2TrackerCluster1DCollectionNew::FastFiller
&
clusters
)
const
{
17
if
(digis.
empty
())
18
return
;
19
auto
di = digis.
begin
();
20
unsigned
int
sizeCluster = 1;
21
Phase2TrackerDigi
firstDigi = *di;
22
bool
HIPbit = firstDigi.
overThreshold
();
23
auto
previous = firstDigi;
24
++di;
25
for
(; di != digis.
end
(); ++di) {
26
auto
digi = *di;
27
#ifdef VERIFY_PH2_TK_CLUS
28
if
(!(previous < digi))
29
std::cout
<<
"not ordered "
<< previous <<
' '
<< digi << std::endl;
30
#endif
31
if
(digi - previous == 1) {
32
HIPbit |= digi.overThreshold();
33
++sizeCluster;
34
}
else
{
35
clusters
.push_back(
Phase2TrackerCluster1D
(firstDigi, sizeCluster, HIPbit));
36
firstDigi = digi;
37
HIPbit = digi.
overThreshold
();
38
sizeCluster = 1;
39
}
40
previous = digi;
41
}
42
clusters
.push_back(
Phase2TrackerCluster1D
(firstDigi, sizeCluster, HIPbit));
43
}
44
45
#endif
Phase2TrackerCluster1D
Definition:
Phase2TrackerCluster1D.h:10
edm::DetSet
Definition:
DetSet.h:23
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
edm::DetSet::begin
iterator begin()
Definition:
DetSet.h:57
edm::DetSet::empty
bool empty() const
Definition:
DetSet.h:62
Phase2TrackerClusterizerSequentialAlgorithm
Definition:
Phase2TrackerClusterizerSequentialAlgorithm.h:9
bsc_activity_cfg.clusters
clusters
Definition:
bsc_activity_cfg.py:36
Phase2TrackerDigi.h
DetSetVector.h
Phase2TrackerDigi
Definition:
Phase2TrackerDigi.h:12
Phase2TrackerCluster1D.h
edmNew::DetSetVector::FastFiller
Definition:
DetSetVectorNew.h:202
edm::DetSet::end
iterator end()
Definition:
DetSet.h:58
DetSetVectorNew.h
Phase2TrackerClusterizerSequentialAlgorithm::clusterizeDetUnit
void clusterizeDetUnit(const edm::DetSet< Phase2TrackerDigi > &, Phase2TrackerCluster1DCollectionNew::FastFiller &) const
Definition:
Phase2TrackerClusterizerSequentialAlgorithm.h:15
Phase2TrackerDigi::overThreshold
bool overThreshold() const
Definition:
Phase2TrackerDigi.h:37
Generated for CMSSW Reference Manual by
1.8.16