Main Page
Namespaces
Classes
Package Documentation
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
21
22
namespace
reco
{
23
class
PixelClusterCounts
{
24
25
public
:
26
PixelClusterCounts
() :
m_events
(
LumiConstants
::
numBX
){}
27
28
void
increment
(
int
mD,
unsigned
int
bxID,
int
count
){
29
size_t
modIndex =
std::distance
(
m_ModID
.begin(),
std::find
(
m_ModID
.begin(),
m_ModID
.end(), mD));
30
if
(modIndex ==
m_ModID
.size()){
31
m_ModID
.push_back(mD);
32
m_counts
.resize(
m_counts
.size()+
LumiConstants::numBX
, 0);
33
}
34
m_counts
.at(
LumiConstants::numBX
*modIndex+bxID-1) +=
count
;
35
}
36
37
void
eventCounter
(
unsigned
int
bxID){
38
m_events
.at(bxID-1)++;
39
}
40
41
std::vector<int>
const
&
readCounts
()
const
{
42
return
(
m_counts
);
43
}
44
45
46
private
:
47
std::vector<int>
m_counts
;
48
std::vector<int>
m_events
;
49
std::vector<int>
m_ModID
;
50
51
52
};
53
54
}
55
#endif
LumiConstants.h
KineDebug3::count
void count()
Definition:
KinematicConstrainedVertexUpdatorT.h:20
MessageLogger.h
LumiConstants::numBX
static const unsigned int numBX
Definition:
LumiConstants.h:9
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition:
FindCaloHit.cc:20
SoftLeptonByDistance_cfi.distance
distance
Definition:
SoftLeptonByDistance_cfi.py:6
reco::PixelClusterCounts::PixelClusterCounts
PixelClusterCounts()
Definition:
PixelClusterCounts.h:26
reco::PixelClusterCounts::m_events
std::vector< int > m_events
Definition:
PixelClusterCounts.h:48
reco::PixelClusterCounts::readCounts
std::vector< int > const & readCounts() const
Definition:
PixelClusterCounts.h:41
reco::PixelClusterCounts::increment
void increment(int mD, unsigned int bxID, int count)
Definition:
PixelClusterCounts.h:28
LumiConstants
Definition:
LumiConstants.h:6
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:43
reco::PixelClusterCounts
Definition:
PixelClusterCounts.h:23
reco::PixelClusterCounts::m_counts
std::vector< int > m_counts
Definition:
PixelClusterCounts.h:47
reco::PixelClusterCounts::eventCounter
void eventCounter(unsigned int bxID)
Definition:
PixelClusterCounts.h:37
reco::PixelClusterCounts::m_ModID
std::vector< int > m_ModID
Definition:
PixelClusterCounts.h:49
Generated for CMSSW Reference Manual by
1.8.11