Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
DataFormats
Luminosity
interface
PixelClusterCounts.h
Go to the documentation of this file.
1
#ifndef DataFormats_Luminosity_PixelClusterCounts_h
2
#define DataFormats_Luminosity_PixelClusterCounts_h
3
11
#include <algorithm>
12
#include <string>
13
#include <sstream>
14
#include <iostream>
15
#include <vector>
16
17
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
18
19
#include "
DataFormats/Luminosity/interface/LumiConstants.h
"
20
#include "
DataFormats/Luminosity/interface/PixelClusterCountsInEvent.h
"
21
22
namespace
reco
{
23
class
PixelClusterCounts
{
24
public
:
25
PixelClusterCounts
() :
m_events
(
LumiConstants
::
numBX
) {}
26
27
void
increment
(
int
mD,
unsigned
int
bxID,
int
count
) {
28
size_t
modIndex =
std::distance
(
m_ModID
.begin(),
std::find
(
m_ModID
.begin(),
m_ModID
.end(), mD));
29
if
(modIndex ==
m_ModID
.size()) {
30
m_ModID
.push_back(mD);
31
m_counts
.resize(
m_counts
.size() +
LumiConstants::numBX
, 0);
32
}
33
m_counts
.at(
LumiConstants::numBX
* modIndex + bxID - 1) +=
count
;
34
}
35
36
void
eventCounter
(
unsigned
int
bxID) {
m_events
.at(bxID - 1)++; }
37
38
void
add
(
reco::PixelClusterCountsInEvent
const
& pccInEvent) {
39
std::vector<int>
const
& countsInEvent = pccInEvent.
counts
();
40
std::vector<int>
const
& modIDInEvent = pccInEvent.
modID
();
41
int
bxIDInEvent = pccInEvent.
bxID
();
42
for
(
unsigned
int
i
= 0;
i
< modIDInEvent.size();
i
++) {
43
increment
(modIDInEvent[
i
], bxIDInEvent, countsInEvent.at(
i
));
44
}
45
}
46
47
std::vector<int>
const
&
readCounts
()
const
{
return
(
m_counts
); }
48
std::vector<int>
const
&
readEvents
()
const
{
return
(
m_events
); }
49
std::vector<int>
const
&
readModID
()
const
{
return
(
m_ModID
); }
50
51
private
:
52
std::vector<int>
m_counts
;
53
std::vector<int>
m_events
;
54
std::vector<int>
m_ModID
;
55
};
56
57
}
// namespace reco
58
#endif
reco::PixelClusterCountsInEvent
Definition:
PixelClusterCountsInEvent.h:15
mps_fire.i
i
Definition:
mps_fire.py:428
reco::PixelClusterCounts::readEvents
std::vector< int > const & readEvents() const
Definition:
PixelClusterCounts.h:48
MessageLogger.h
PixelClusterCountsInEvent.h
LumiConstants::numBX
static const unsigned int numBX
Definition:
LumiConstants.h:8
reco::PixelClusterCounts::readCounts
std::vector< int > const & readCounts() const
Definition:
PixelClusterCounts.h:47
reco::PixelClusterCounts::add
void add(reco::PixelClusterCountsInEvent const &pccInEvent)
Definition:
PixelClusterCounts.h:38
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:45
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition:
FindCaloHit.cc:19
reco::PixelClusterCounts
Definition:
PixelClusterCounts.h:23
reco::PixelClusterCounts::readModID
std::vector< int > const & readModID() const
Definition:
PixelClusterCounts.h:49
LumiConstants.h
submitPVResolutionJobs.count
count
Definition:
submitPVResolutionJobs.py:352
reco::PixelClusterCountsInEvent::counts
std::vector< int > const & counts() const
Definition:
PixelClusterCountsInEvent.h:30
reco::PixelClusterCounts::PixelClusterCounts
PixelClusterCounts()
Definition:
PixelClusterCounts.h:25
reco::PixelClusterCountsInEvent::modID
std::vector< int > const & modID() const
Definition:
PixelClusterCountsInEvent.h:32
reco::PixelClusterCounts::increment
void increment(int mD, unsigned int bxID, int count)
Definition:
PixelClusterCounts.h:27
LumiConstants
Definition:
LumiConstants.h:6
reco::PixelClusterCountsInEvent::bxID
unsigned int const & bxID() const
Definition:
PixelClusterCountsInEvent.h:34
reco::PixelClusterCounts::eventCounter
void eventCounter(unsigned int bxID)
Definition:
PixelClusterCounts.h:36
reco::PixelClusterCounts::m_events
std::vector< int > m_events
Definition:
PixelClusterCounts.h:53
reco::PixelClusterCounts::m_counts
std::vector< int > m_counts
Definition:
PixelClusterCounts.h:52
reco::PixelClusterCounts::m_ModID
std::vector< int > m_ModID
Definition:
PixelClusterCounts.h:54
HLT_FULL_cff.distance
distance
Definition:
HLT_FULL_cff.py:7733
Generated for CMSSW Reference Manual by
1.8.16