Main Page
Namespaces
Classes
Package Documentation
SimCalorimetry
HcalTrigPrimAlgos
src
HcalFinegrainBit.cc
Go to the documentation of this file.
1
#include "
SimCalorimetry/HcalTrigPrimAlgos/interface/HcalFinegrainBit.h
"
2
3
#include <cassert>
4
5
std::bitset<4>
6
HcalFinegrainBit::compute
(
const
HcalFinegrainBit::Tower
& tower)
const
7
{
8
if
(
version_
== 0) {
9
// Currently assumes that the bits that are set are mutually
10
// exclusive!
11
assert((tower[
is_mip
] & tower[
is_above_mip
]).
count
() == 0);
12
13
std::bitset<4>
result
;
14
15
// First layer consistent with a MIP
16
result[0] = tower[
is_mip
][0];
17
18
// First layer consistent with a MIP, at least one layer with more
19
// than MIP energy deposition
20
result[1] = result[0] & (tower[
is_above_mip
].count() > 0);
21
22
// There layers consistent with a MIP
23
result[2] = tower[
is_mip
].count() >= 3;
24
25
// Unset
26
result[3] =
false
;
27
28
return
result
;
29
}
30
return
0;
31
}
HcalFinegrainBit::Tower
std::array< std::bitset< 6 >, 2 > Tower
Definition:
HcalFinegrainBit.h:11
KineDebug3::count
void count()
Definition:
KinematicConstrainedVertexUpdatorT.h:20
HcalFinegrainBit::is_mip
const int is_mip
Definition:
HcalFinegrainBit.h:18
HcalFinegrainBit::is_above_mip
const int is_above_mip
Definition:
HcalFinegrainBit.h:19
mps_fire.result
result
Definition:
mps_fire.py:226
HcalFinegrainBit::compute
std::bitset< 4 > compute(const Tower &) const
Definition:
HcalFinegrainBit.cc:6
HcalFinegrainBit::version_
int version_
Definition:
HcalFinegrainBit.h:21
HcalFinegrainBit.h
Generated for CMSSW Reference Manual by
1.8.11