src
DataFormats
HGCalDigi
src
HGCalElectronicsId.cc
Go to the documentation of this file.
1
#include "
DataFormats/HGCalDigi/interface/HGCalElectronicsId.h
"
2
3
//
4
HGCalElectronicsId::HGCalElectronicsId
(
5
bool
zside
, uint16_t
fedid
, uint8_t captureblock, uint8_t econdidx, uint8_t econderx, uint8_t halfrocch) {
6
value_
= ((
zside
&
kZsideMask
) <<
kZsideShift
) | ((
fedid
&
kLocalFEDIDMask
) <<
kLocalFEDIDShift
) |
7
((captureblock &
kCaptureBlockMask
) <<
kCaptureBlockShift
) | ((econdidx &
kECONDIdxMask
) <<
kECONDIdxShift
) |
8
((econderx &
kECONDeRxMask
) <<
kECONDeRxShift
) | ((halfrocch &
kHalfROCChannelMask
) <<
kHalfROCChannelShift
);
9
}
10
11
//
12
uint16_t
HGCalElectronicsId::localFEDId
()
const
{
return
(
value_
>>
kLocalFEDIDShift
) &
kLocalFEDIDMask
; }
13
14
//
15
bool
HGCalElectronicsId::zSide
()
const
{
return
(
value_
>>
kZsideShift
) &
kZsideMask
; }
16
17
//
18
bool
HGCalElectronicsId::isCM
()
const
{
19
uint8_t halfrocch =
halfrocChannel
();
20
return
(halfrocch == 37) || (halfrocch == 38);
21
}
22
23
//
24
uint8_t
HGCalElectronicsId::captureBlock
()
const
{
return
(
value_
>>
kCaptureBlockShift
) &
kCaptureBlockMask
; }
25
26
//
27
uint8_t
HGCalElectronicsId::econdIdx
()
const
{
return
(
value_
>>
kECONDIdxShift
) &
kECONDIdxMask
; }
28
29
//
30
uint8_t
HGCalElectronicsId::econdeRx
()
const
{
return
(
value_
>>
kECONDeRxShift
) &
kECONDeRxMask
; }
31
32
//
33
uint8_t
HGCalElectronicsId::halfrocChannel
()
const
{
return
(
value_
>>
kHalfROCChannelShift
) &
kHalfROCChannelMask
; }
34
35
//
36
uint8_t
HGCalElectronicsId::cmWord
()
const
{
return
halfrocChannel
() - 37; }
37
38
//
39
uint8_t
HGCalElectronicsId::rocChannel
()
const
{
40
if
(
isCM
())
41
return
cmWord
() + 2 * (
econdeRx
() % 2);
42
return
halfrocChannel
() + 37 * (
econdeRx
() % 2);
43
}
HGCalElectronicsId.h
HGCalElectronicsId::kECONDeRxMask
Definition:
HGCalElectronicsId.h:28
HGCalElectronicsId::cmWord
uint8_t cmWord() const
Definition:
HGCalElectronicsId.cc:36
HGCalElectronicsId::halfrocChannel
uint8_t halfrocChannel() const
Definition:
HGCalElectronicsId.cc:33
HGCalElectronicsId::rocChannel
uint8_t rocChannel() const
Definition:
HGCalElectronicsId.cc:39
HGCalElectronicsId::kHalfROCChannelShift
Definition:
HGCalElectronicsId.h:37
HGCalElectronicsId::kLocalFEDIDShift
Definition:
HGCalElectronicsId.h:33
HGCalElectronicsId::kZsideShift
Definition:
HGCalElectronicsId.h:32
HGCalElectronicsId::econdIdx
uint8_t econdIdx() const
Definition:
HGCalElectronicsId.cc:27
HGCalElectronicsId::captureBlock
uint8_t captureBlock() const
Definition:
HGCalElectronicsId.cc:24
HGCalElectronicsId::localFEDId
uint16_t localFEDId() const
Definition:
HGCalElectronicsId.cc:12
HGCalElectronicsId::zSide
bool zSide() const
Definition:
HGCalElectronicsId.cc:15
ecaldqm::zside
int zside(DetId const &)
Definition:
EcalDQMCommonUtils.cc:189
HGCalElectronicsId::kECONDIdxShift
Definition:
HGCalElectronicsId.h:35
HGCalElectronicsId::isCM
bool isCM() const
Definition:
HGCalElectronicsId.cc:18
HGCalElectronicsId::HGCalElectronicsId
HGCalElectronicsId()
CTOR.
Definition:
HGCalElectronicsId.h:43
HGCalElectronicsId::kCaptureBlockShift
Definition:
HGCalElectronicsId.h:34
PixelSLinkDataInputSource_cfi.fedid
fedid
Definition:
PixelSLinkDataInputSource_cfi.py:6
HGCalElectronicsId::kECONDIdxMask
Definition:
HGCalElectronicsId.h:27
HGCalElectronicsId::kECONDeRxShift
Definition:
HGCalElectronicsId.h:36
HGCalElectronicsId::kHalfROCChannelMask
Definition:
HGCalElectronicsId.h:29
HGCalElectronicsId::value_
uint32_t value_
Definition:
HGCalElectronicsId.h:74
HGCalElectronicsId::kCaptureBlockMask
Definition:
HGCalElectronicsId.h:26
HGCalElectronicsId::econdeRx
uint8_t econdeRx() const
Definition:
HGCalElectronicsId.cc:30
HGCalElectronicsId::kLocalFEDIDMask
Definition:
HGCalElectronicsId.h:25
HGCalElectronicsId::kZsideMask
Definition:
HGCalElectronicsId.h:24
Generated for CMSSW Reference Manual by
1.8.14