DataFormats
HcalDigi
src
CastorTriggerPrimitiveDigi.cc
Go to the documentation of this file.
1
#include "
DataFormats/HcalDigi/interface/CastorTriggerPrimitiveDigi.h
"
2
3
CastorTriggerPrimitiveDigi::CastorTriggerPrimitiveDigi
() : size_(0), hcalPresamples_(0) {}
4
CastorTriggerPrimitiveDigi::CastorTriggerPrimitiveDigi
(
const
HcalCastorDetId
&
id
)
5
: id_(
id
), size_(0), hcalPresamples_(0) {}
6
7
void
CastorTriggerPrimitiveDigi::setSize
(
int
size
) {
8
if
(
size
< 0)
9
size_
= 0;
10
else
if
(
size
>
MAXSAMPLES
)
11
size_
=
MAXSAMPLES
;
12
else
13
size_
=
size
;
14
}
15
void
CastorTriggerPrimitiveDigi::setPresamples
(
int
ps) {
16
if
(ps < 0)
17
hcalPresamples_
&= 0xFFFFFF0;
18
// else if (ps>=size_) hcalPresamples_=size_-1;
19
else
20
hcalPresamples_
|= ps & 0xF;
21
}
22
23
void
CastorTriggerPrimitiveDigi::setZSInfo
(
bool
unsuppressed,
bool
markAndPass
) {
24
if
(
markAndPass
)
25
hcalPresamples_
|= 0x10;
26
if
(unsuppressed)
27
hcalPresamples_
|= 0x20;
28
}
29
30
std::ostream&
operator<<
(std::ostream&
s
,
const
CastorTriggerPrimitiveDigi
& digi) {
31
s
<< digi.
id
() <<
" "
<< digi.
size
() <<
" samples "
<< digi.
presamples
() <<
" presamples"
;
32
if
(digi.
zsUnsuppressed
())
33
s
<<
" zsUS"
;
34
if
(digi.
zsMarkAndPass
())
35
s
<<
" zsM&P"
;
36
s
<< std::endl;
37
s
<<
" SOI tpchannel="
<< digi.
SOI_tpchannel
() <<
" tpdata 0x"
<< std::hex << digi.
SOI_tpdata
() <<
std::dec
38
<< std::endl;
39
for
(
int
i
= 0;
i
< digi.
size
();
i
++) {
40
s
<<
" 0x"
<< std::hex << digi.
sample
(
i
).
raw
() <<
" tpdata 0x"
<< digi.
tpdata
(
i
) <<
std::dec
41
<<
" channel="
<< digi.
tpchannel
(
i
);
42
if
(digi.
isSOI
(
i
))
43
s
<<
" SOI"
;
44
s
<< std::endl;
45
}
46
return
s
;
47
}
CastorTriggerPrimitiveDigi::setPresamples
void setPresamples(int ps)
Definition:
CastorTriggerPrimitiveDigi.cc:15
CastorTriggerPrimitiveDigi::MAXSAMPLES
static const int MAXSAMPLES
Definition:
CastorTriggerPrimitiveDigi.h:51
mps_fire.i
i
Definition:
mps_fire.py:355
CastorTriggerPrimitiveDigi::tpchannel
int tpchannel(int i) const
Definition:
CastorTriggerPrimitiveDigi.h:41
CastorTriggerPrimitiveDigi::sample
const HcalTriggerPrimitiveSample & sample(int i) const
Definition:
CastorTriggerPrimitiveDigi.h:32
CastorTriggerPrimitiveDigi::id
const HcalCastorDetId & id() const
Definition:
CastorTriggerPrimitiveDigi.h:20
CastorTriggerPrimitiveDigi::SOI_tpchannel
int SOI_tpchannel() const
Definition:
CastorTriggerPrimitiveDigi.h:44
CastorTriggerPrimitiveDigi::tpdata
int tpdata(int i) const
Definition:
CastorTriggerPrimitiveDigi.h:42
CastorTriggerPrimitiveDigi::CastorTriggerPrimitiveDigi
CastorTriggerPrimitiveDigi()
Definition:
CastorTriggerPrimitiveDigi.cc:3
CastorTriggerPrimitiveDigi::zsMarkAndPass
bool zsMarkAndPass() const
was ZS MarkAndPass?
Definition:
CastorTriggerPrimitiveDigi.h:25
CastorTriggerPrimitiveDigi::setSize
void setSize(int size)
Definition:
CastorTriggerPrimitiveDigi.cc:7
CastorTriggerPrimitiveDigi::size_
int size_
Definition:
CastorTriggerPrimitiveDigi.h:55
HcalTriggerPrimitiveSample::raw
uint16_t raw() const
get the raw word
Definition:
HcalTriggerPrimitiveSample.h:19
CastorTriggerPrimitiveDigi::size
int size() const
Definition:
CastorTriggerPrimitiveDigi.h:21
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
CastorTriggerPrimitiveDigi
Definition:
CastorTriggerPrimitiveDigi.h:13
DigiNZS_cff.markAndPass
markAndPass
Definition:
DigiNZS_cff.py:6
CastorTriggerPrimitiveDigi::zsUnsuppressed
bool zsUnsuppressed() const
was ZS unsuppressed?
Definition:
CastorTriggerPrimitiveDigi.h:27
CastorTriggerPrimitiveDigi::hcalPresamples_
int hcalPresamples_
Definition:
CastorTriggerPrimitiveDigi.h:56
HcalCastorDetId
Definition:
HcalCastorDetId.h:23
CastorTriggerPrimitiveDigi::SOI_tpdata
int SOI_tpdata() const
Definition:
CastorTriggerPrimitiveDigi.h:45
CastorTriggerPrimitiveDigi::isSOI
bool isSOI(int i) const
Definition:
CastorTriggerPrimitiveDigi.h:43
CastorTriggerPrimitiveDigi.h
CastorTriggerPrimitiveDigi::presamples
int presamples() const
Definition:
CastorTriggerPrimitiveDigi.h:22
CastorTriggerPrimitiveDigi::setZSInfo
void setZSInfo(bool unsuppressed, bool markAndPass)
Definition:
CastorTriggerPrimitiveDigi.cc:23
triggerObjects_cff.id
id
Definition:
triggerObjects_cff.py:31
operator<<
std::ostream & operator<<(std::ostream &s, const CastorTriggerPrimitiveDigi &digi)
Definition:
CastorTriggerPrimitiveDigi.cc:30
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:143
findQualityFiles.size
size
Write out results.
Definition:
findQualityFiles.py:443
Generated for CMSSW Reference Manual by
1.8.16