CMS 3D CMS Logo

List of all members | Static Public Member Functions | Static Public Attributes
HBHERecHitAuxSetter Struct Reference

#include <HBHERecHitAuxSetter.h>

Static Public Member Functions

constexpr static void setAux (const HBHEChannelInfo &info, HBHERecHit *rechit)
 

Static Public Attributes

static const unsigned MASK_ADC = 0xffff
 
static const unsigned MASK_CAPID = 0x3
 
static const unsigned MASK_NSAMPLES = 0xf
 
static const unsigned MASK_SOI = 0xf
 
static const unsigned OFF_ADC = 0
 
static const unsigned OFF_CAPID = 24
 
static const unsigned OFF_CAPID_ERR = 29
 
static const unsigned OFF_COMBINED = 30
 
static const unsigned OFF_DROPPED = 27
 
static const unsigned OFF_LINK_ERR = 28
 
static const unsigned OFF_NSAMPLES = 16
 
static const unsigned OFF_SOI = 20
 
static const unsigned OFF_TDC_TIME = 26
 

Detailed Description

Definition at line 18 of file HBHERecHitAuxSetter.h.

Member Function Documentation

◆ setAux()

constexpr void HBHERecHitAuxSetter::setAux ( const HBHEChannelInfo info,
HBHERecHit rechit 
)
staticconstexpr

Definition at line 47 of file HBHERecHitAuxSetter.h.

47  {
48  using namespace CaloRecHitAuxSetter;
49 
50  uint32_t aux = 0, auxHBHE = 0, auxPhase1 = 0;
51 
52  // Pack ADC values
53  unsigned nSamples = info.nSamples();
54  if (nSamples > 10)
55  nSamples = 10;
56  for (unsigned i = 0; i < 4 && i < nSamples; ++i)
57  setField(&aux, 0xff, i * 8, info.tsAdc(i));
58  for (unsigned i = 4; i < 8 && i < nSamples; ++i)
59  setField(&auxHBHE, 0xff, (i - 4) * 8, info.tsAdc(i));
60  for (unsigned i = 8; i < nSamples; ++i)
61  setField(&auxPhase1, 0xff, (i - 8) * 8, info.tsAdc(i));
62 
63  // Pack other fields
65  unsigned soi = info.soi();
66  if (soi > 10)
67  soi = 10;
68  setField(&auxPhase1, MASK_SOI, OFF_SOI, soi);
69  setField(&auxPhase1, MASK_CAPID, OFF_CAPID, info.capid());
70 
71  // Pack status bits
72  setBit(&auxPhase1, OFF_TDC_TIME, info.hasTimeInfo());
73  setBit(&auxPhase1, OFF_DROPPED, info.isDropped());
74  setBit(&auxPhase1, OFF_LINK_ERR, info.hasLinkError());
75  setBit(&auxPhase1, OFF_CAPID_ERR, info.hasCapidError());
76 
77  // Copy the aux words into the rechit
78  rechit->setAux(aux);
79  rechit->setAuxHBHE(auxHBHE);
80  rechit->setAuxPhase1(auxPhase1);
81 }

References printConversionInfo::aux, mps_fire::i, info(), MASK_CAPID, MASK_NSAMPLES, MASK_SOI, PresampleTask_cfi::nSamples, OFF_CAPID, OFF_CAPID_ERR, OFF_DROPPED, OFF_LINK_ERR, OFF_NSAMPLES, OFF_SOI, OFF_TDC_TIME, CaloRecHit::setAux(), HBHERecHit::setAuxHBHE(), HBHERecHit::setAuxPhase1(), setBit(), and CaloRecHitAuxSetter::setField().

Referenced by SimpleHBHEPhase1Algo::reconstruct().

Member Data Documentation

◆ MASK_ADC

const unsigned HBHERecHitAuxSetter::MASK_ADC = 0xffff
static

Definition at line 19 of file HBHERecHitAuxSetter.h.

◆ MASK_CAPID

const unsigned HBHERecHitAuxSetter::MASK_CAPID = 0x3
static

Definition at line 31 of file HBHERecHitAuxSetter.h.

Referenced by SimplePlan1RechitCombiner::combineAuxInfo(), and setAux().

◆ MASK_NSAMPLES

const unsigned HBHERecHitAuxSetter::MASK_NSAMPLES = 0xf
static

◆ MASK_SOI

const unsigned HBHERecHitAuxSetter::MASK_SOI = 0xf
static

Definition at line 27 of file HBHERecHitAuxSetter.h.

Referenced by SimplePlan1RechitCombiner::combineAuxInfo(), and setAux().

◆ OFF_ADC

const unsigned HBHERecHitAuxSetter::OFF_ADC = 0
static

Definition at line 20 of file HBHERecHitAuxSetter.h.

Referenced by SimplePlan1RechitCombiner::combineAuxInfo().

◆ OFF_CAPID

const unsigned HBHERecHitAuxSetter::OFF_CAPID = 24
static

Definition at line 32 of file HBHERecHitAuxSetter.h.

Referenced by SimplePlan1RechitCombiner::combineAuxInfo(), and setAux().

◆ OFF_CAPID_ERR

const unsigned HBHERecHitAuxSetter::OFF_CAPID_ERR = 29
static

Definition at line 38 of file HBHERecHitAuxSetter.h.

Referenced by SimplePlan1RechitCombiner::combineAuxInfo(), and setAux().

◆ OFF_COMBINED

const unsigned HBHERecHitAuxSetter::OFF_COMBINED = 30
static

◆ OFF_DROPPED

const unsigned HBHERecHitAuxSetter::OFF_DROPPED = 27
static

Definition at line 36 of file HBHERecHitAuxSetter.h.

Referenced by SimplePlan1RechitCombiner::add(), and setAux().

◆ OFF_LINK_ERR

const unsigned HBHERecHitAuxSetter::OFF_LINK_ERR = 28
static

Definition at line 37 of file HBHERecHitAuxSetter.h.

Referenced by SimplePlan1RechitCombiner::combineAuxInfo(), and setAux().

◆ OFF_NSAMPLES

const unsigned HBHERecHitAuxSetter::OFF_NSAMPLES = 16
static

◆ OFF_SOI

const unsigned HBHERecHitAuxSetter::OFF_SOI = 20
static

Definition at line 28 of file HBHERecHitAuxSetter.h.

Referenced by SimplePlan1RechitCombiner::combineAuxInfo(), and setAux().

◆ OFF_TDC_TIME

const unsigned HBHERecHitAuxSetter::OFF_TDC_TIME = 26
static
HBHERecHitAuxSetter::MASK_CAPID
static const unsigned MASK_CAPID
Definition: HBHERecHitAuxSetter.h:31
CaloRecHitAuxSetter::setField
constexpr void setField(uint32_t *u, const unsigned mask, const unsigned offset, const unsigned value)
Definition: CaloRecHitAuxSetter.h:8
mps_fire.i
i
Definition: mps_fire.py:428
HBHERecHitAuxSetter::OFF_CAPID_ERR
static const unsigned OFF_CAPID_ERR
Definition: HBHERecHitAuxSetter.h:38
HBHERecHitAuxSetter::OFF_TDC_TIME
static const unsigned OFF_TDC_TIME
Definition: HBHERecHitAuxSetter.h:35
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
HBHERecHitAuxSetter::OFF_DROPPED
static const unsigned OFF_DROPPED
Definition: HBHERecHitAuxSetter.h:36
PresampleTask_cfi.nSamples
nSamples
Definition: PresampleTask_cfi.py:7
HBHERecHitAuxSetter::OFF_CAPID
static const unsigned OFF_CAPID
Definition: HBHERecHitAuxSetter.h:32
HBHERecHitAuxSetter::MASK_NSAMPLES
static const unsigned MASK_NSAMPLES
Definition: HBHERecHitAuxSetter.h:23
HBHERecHit::setAuxHBHE
constexpr void setAuxHBHE(const uint32_t aux)
Definition: HBHERecHit.h:52
setBit
void setBit(int &_bitArray, unsigned _iBit)
Definition: EcalCondDBWriter.cc:17
CaloRecHit::setAux
constexpr void setAux(uint32_t value)
Definition: CaloRecHit.h:49
HBHERecHitAuxSetter::MASK_SOI
static const unsigned MASK_SOI
Definition: HBHERecHitAuxSetter.h:27
printConversionInfo.aux
aux
Definition: printConversionInfo.py:19
HBHERecHitAuxSetter::OFF_NSAMPLES
static const unsigned OFF_NSAMPLES
Definition: HBHERecHitAuxSetter.h:24
HBHERecHitAuxSetter::OFF_LINK_ERR
static const unsigned OFF_LINK_ERR
Definition: HBHERecHitAuxSetter.h:37
HBHERecHitAuxSetter::OFF_SOI
static const unsigned OFF_SOI
Definition: HBHERecHitAuxSetter.h:28
CaloRecHitAuxSetter
Definition: CaloRecHitAuxSetter.h:7
HBHERecHit::setAuxPhase1
constexpr void setAuxPhase1(const uint32_t aux)
Definition: HBHERecHit.h:55