CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Attributes
EcalElectronicsId Class Reference

Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [2:0] xtal Index starts from 1. More...

#include <EcalElectronicsId.h>

Public Member Functions

int channelId () const
 so far for EndCap only : More...
 
int dccId () const
 get the DCC (Ecal Local DCC value not global one) id More...
 
 EcalElectronicsId ()
 
 EcalElectronicsId (int dccid, int towerid, int stripid, int xtalid)
 
 EcalElectronicsId (uint32_t)
 
int linearIndex () const
 get a fast, compact, unique index for linear lookups (maximum value = 4194303) More...
 
int operator!= (const EcalElectronicsId &id) const
 
uint32_t operator() ()
 
int operator< (const EcalElectronicsId &id) const
 Compare the id to another id for use in a map. More...
 
int operator== (const EcalElectronicsId &id) const
 
uint32_t rawId () const
 
int stripId () const
 get the tower id More...
 
EcalSubdetector subdet () const
 get the subdet More...
 
int towerId () const
 get the tower id More...
 
int xtalId () const
 get the channel id More...
 
int zside () const
 zside = +1 or -1 More...
 

Static Public Attributes

static const int DCC_EBM = 10
 
static const int DCC_EBP = 28
 
static const int DCC_EEM = 1
 
static const int DCC_EEP = 46
 
static const int DCCID_PHI0_EBM = 10
 
static const int DCCID_PHI0_EBP = 28
 
static const int kDCCChannelBoundary = 17
 
static const int MAX_CHANNELID = 25
 
static const int MAX_DCCID = 54
 
static const int MAX_DCCID_EBM = 27
 
static const int MAX_DCCID_EBP = 45
 
static const int MAX_DCCID_EEM = 9
 
static const int MAX_DCCID_EEP = 54
 
static const int MAX_STRIPID = 5
 
static const int MAX_TOWERID = 70
 
static const int MAX_XTALID = 5
 
static const int MIN_CHANNELID = 1
 
static const int MIN_DCCID = 1
 
static const int MIN_DCCID_EBM = 10
 
static const int MIN_DCCID_EBP = 28
 
static const int MIN_DCCID_EEM = 1
 
static const int MIN_DCCID_EEP = 46
 
static const int MIN_STRIPID = 1
 
static const int MIN_TOWERID = 1
 
static const int MIN_XTALID = 1
 

Private Attributes

uint32_t EcalElectronicsId_
 

Detailed Description

Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [2:0] xtal Index starts from 1.

Definition at line 18 of file EcalElectronicsId.h.

Constructor & Destructor Documentation

◆ EcalElectronicsId() [1/3]

EcalElectronicsId::EcalElectronicsId ( )

Default constructor – invalid value

Definition at line 6 of file EcalElectronicsId.cc.

6 { EcalElectronicsId_ = 0xFFFFFFFFu; }

References EcalElectronicsId_.

◆ EcalElectronicsId() [2/3]

EcalElectronicsId::EcalElectronicsId ( uint32_t  id)

from raw

Definition at line 8 of file EcalElectronicsId.cc.

References EcalElectronicsId_, and triggerObjects_cff::id.

◆ EcalElectronicsId() [3/3]

EcalElectronicsId::EcalElectronicsId ( int  dccid,
int  towerid,
int  stripid,
int  xtalid 
)

Constructor from dcc,tower,channel

Definition at line 10 of file EcalElectronicsId.cc.

10  {
11  if ((dccid < MIN_DCCID) || (dccid > MAX_DCCID) || (towerid < MIN_TOWERID) || (towerid > MAX_TOWERID) ||
12  (stripid < MIN_STRIPID) || (stripid > MAX_STRIPID) || (xtalid < MIN_XTALID) || (xtalid > MAX_XTALID))
13  throw cms::Exception("InvalidDetId")
14  << "EcalElectronicsId: Cannot create object. Indexes out of bounds. Dcc tower strip xtal " << dccid << " "
15  << towerid << " " << stripid << " " << xtalid << ".";
16  EcalElectronicsId_ = (xtalid & 0x7) | ((stripid & 0x7) << 3) | ((towerid & 0x7F) << 6) | ((dccid & 0x7F) << 13);
17 }

References EcalElectronicsId_, Exception, MAX_DCCID, MAX_STRIPID, MAX_TOWERID, MAX_XTALID, MIN_DCCID, MIN_STRIPID, MIN_TOWERID, and MIN_XTALID.

Member Function Documentation

◆ channelId()

int EcalElectronicsId::channelId ( ) const

so far for EndCap only :

Definition at line 71 of file EcalElectronicsId.cc.

71  {
72  int dcc = dccId();
73  int dcc_channel = towerId();
74  int quadrant = EEQuadrant(dcc, dcc_channel);
75  int strip = stripId();
76  int xtal = xtalId();
77  int channel;
78  if (quadrant == 1 || quadrant == 3)
79  channel = 5 * (strip - 1) + xtal;
80  else
81  channel = 5 * (xtal - 1) + strip;
82  return channel;
83 }

References dccId(), EEQuadrant(), SiPixelPI::quadrant(), digitizers_cfi::strip, stripId(), towerId(), and xtalId().

Referenced by EcalPerEvtLaserAnalyzer::analyze(), EcalTestPulseAnalyzer::analyze(), EcalABAnalyzer::analyze(), EcalLaserAnalyzer2::analyze(), and EcalLaserAnalyzer::analyze().

◆ dccId()

int EcalElectronicsId::dccId ( ) const
inline

get the DCC (Ecal Local DCC value not global one) id

Definition at line 31 of file EcalElectronicsId.h.

31 { return (EcalElectronicsId_ >> 13) & 0x7F; }

References EcalElectronicsId_.

Referenced by EcalPulseShapeGrapher::analyze(), EcalURecHitHists::analyze(), EcalTPGParamBuilder::analyze(), EcalCosmicsHists::analyze(), channelId(), popcon::EcalChannelStatusHandler::cosmicsAnalysis(), EcalDccWeightBuilder::dbId(), EcalSelectiveReadoutValidation::dccCh(), ecaldqm::dccId(), EcalElectronicsMapping::MapItem::dccId(), TowerBlockFormatter::DigiToRaw(), ecaldqm::MESetDet2D::fill(), ecaldqm::binning::findBinSuperCrystal_(), ecaldqm::binning::findPlotIndex(), EcalElectronicsMapping::getDCCandSC(), EcalMipGraphs::getEEIndex(), EcalDisplaysByEvent::getEEIndex(), EcalElectronicsMapping::getLMNumber(), popcon::EcalChannelStatusHandler::laserAnalysis(), EcalDisplaysByEvent::makeHistos(), ecaldqm::memTowerID(), popcon::EcalChannelStatusHandler::nBadLaserModules(), popcon::EcalChannelStatusHandler::pedAnalysis(), printStatusRecords(), EcalDigiToRaw::produce(), EcalPedOffset::readDACs(), EcalDigiDisplay::readEBDigis(), EcalPedHists::readEBdigis(), EcalDigiDisplay::readEEDigis(), EcalPedHists::readEEdigis(), EcalReadoutTools::readOutUnitOf(), PFEcalEndcapRecHitCreator::readOutUnitOf(), EcalSelectiveReadoutValidation::readOutUnitOf(), EcalMipGraphs::selectDigi(), EcalDisplaysByEvent::selectDigi(), EcalMipGraphs::selectHits(), EcalDisplaysByEvent::selectHits(), subdet(), ecaldqm::towerID(), and zside().

◆ linearIndex()

int EcalElectronicsId::linearIndex ( ) const
inline

get a fast, compact, unique index for linear lookups (maximum value = 4194303)

Definition at line 46 of file EcalElectronicsId.h.

46 { return (EcalElectronicsId_)&0x3FFFFF; }

References EcalElectronicsId_.

◆ operator!=()

int EcalElectronicsId::operator!= ( const EcalElectronicsId id) const
inline

Non-Equality operator

Definition at line 83 of file EcalElectronicsId.h.

83 { return id.EcalElectronicsId_ != EcalElectronicsId_; }

References EcalElectronicsId_.

◆ operator()()

uint32_t EcalElectronicsId::operator() ( )
inline

Definition at line 27 of file EcalElectronicsId.h.

27 { return EcalElectronicsId_; }

References EcalElectronicsId_.

◆ operator<()

int EcalElectronicsId::operator< ( const EcalElectronicsId id) const
inline

Compare the id to another id for use in a map.

Definition at line 85 of file EcalElectronicsId.h.

85 { return EcalElectronicsId_ < id.EcalElectronicsId_; }

References EcalElectronicsId_.

◆ operator==()

int EcalElectronicsId::operator== ( const EcalElectronicsId id) const
inline

Equality operator

Definition at line 81 of file EcalElectronicsId.h.

81 { return id.EcalElectronicsId_ == EcalElectronicsId_; }

References EcalElectronicsId_.

◆ rawId()

uint32_t EcalElectronicsId::rawId ( ) const
inline

◆ stripId()

int EcalElectronicsId::stripId ( ) const
inline

◆ subdet()

EcalSubdetector EcalElectronicsId::subdet ( ) const

get the subdet

Definition at line 19 of file EcalElectronicsId.cc.

19  {
20  int dcc = dccId();
21  if ((dcc >= MIN_DCCID_EBM && dcc <= MAX_DCCID_EBM) || (dcc >= MIN_DCCID_EBP && dcc <= MAX_DCCID_EBP))
22  return EcalBarrel;
23  else
24  return EcalEndcap;
25 }

References dccId(), EcalBarrel, EcalEndcap, MAX_DCCID_EBM, MAX_DCCID_EBP, MIN_DCCID_EBM, and MIN_DCCID_EBP.

Referenced by EcalElectronicsMapping::getElectronicsId(), and EcalDetIdToBeRecoveredProducer::produce().

◆ towerId()

int EcalElectronicsId::towerId ( ) const
inline

◆ xtalId()

int EcalElectronicsId::xtalId ( ) const
inline

◆ zside()

int EcalElectronicsId::zside ( ) const

zside = +1 or -1

Definition at line 27 of file EcalElectronicsId.cc.

27  {
28  int dcc = dccId();
29  if ((dcc >= MIN_DCCID_EEM && dcc <= MAX_DCCID_EEM))
30  return -1;
31  if ((dcc >= MIN_DCCID_EBM && dcc <= MAX_DCCID_EBM))
32  return -1;
33  if ((dcc >= MIN_DCCID_EEP && dcc <= MAX_DCCID_EEP))
34  return +1;
35  if ((dcc >= MIN_DCCID_EBP && dcc <= MAX_DCCID_EBP))
36  return +1;
37  return 0;
38 }

References dccId(), MAX_DCCID_EBM, MAX_DCCID_EBP, MAX_DCCID_EEM, MAX_DCCID_EEP, MIN_DCCID_EBM, MIN_DCCID_EBP, MIN_DCCID_EEM, and MIN_DCCID_EEP.

Referenced by EcalSelectiveReadout::eeRuInterest().

Member Data Documentation

◆ DCC_EBM

const int EcalElectronicsId::DCC_EBM = 10
static

Definition at line 75 of file EcalElectronicsId.h.

◆ DCC_EBP

const int EcalElectronicsId::DCC_EBP = 28
static

Definition at line 76 of file EcalElectronicsId.h.

◆ DCC_EEM

const int EcalElectronicsId::DCC_EEM = 1
static

Definition at line 77 of file EcalElectronicsId.h.

Referenced by EEQuadrant().

◆ DCC_EEP

const int EcalElectronicsId::DCC_EEP = 46
static

Definition at line 78 of file EcalElectronicsId.h.

Referenced by EEQuadrant().

◆ DCCID_PHI0_EBM

const int EcalElectronicsId::DCCID_PHI0_EBM = 10
static

Definition at line 71 of file EcalElectronicsId.h.

◆ DCCID_PHI0_EBP

const int EcalElectronicsId::DCCID_PHI0_EBP = 28
static

Definition at line 72 of file EcalElectronicsId.h.

◆ EcalElectronicsId_

uint32_t EcalElectronicsId::EcalElectronicsId_
private

◆ kDCCChannelBoundary

const int EcalElectronicsId::kDCCChannelBoundary = 17
static

Definition at line 74 of file EcalElectronicsId.h.

Referenced by EEQuadrant().

◆ MAX_CHANNELID

const int EcalElectronicsId::MAX_CHANNELID = 25
static

Definition at line 57 of file EcalElectronicsId.h.

◆ MAX_DCCID

const int EcalElectronicsId::MAX_DCCID = 54
static

Definition at line 51 of file EcalElectronicsId.h.

Referenced by EcalElectronicsId().

◆ MAX_DCCID_EBM

const int EcalElectronicsId::MAX_DCCID_EBM = 27
static

Definition at line 65 of file EcalElectronicsId.h.

Referenced by subdet(), and zside().

◆ MAX_DCCID_EBP

const int EcalElectronicsId::MAX_DCCID_EBP = 45
static

Definition at line 67 of file EcalElectronicsId.h.

Referenced by BlockFormatter::DigiToRaw(), subdet(), and zside().

◆ MAX_DCCID_EEM

const int EcalElectronicsId::MAX_DCCID_EEM = 9
static

Definition at line 63 of file EcalElectronicsId.h.

Referenced by TCCBlockFormatter::DigiToRaw(), and zside().

◆ MAX_DCCID_EEP

const int EcalElectronicsId::MAX_DCCID_EEP = 54
static

Definition at line 69 of file EcalElectronicsId.h.

Referenced by TCCBlockFormatter::DigiToRaw(), and zside().

◆ MAX_STRIPID

const int EcalElectronicsId::MAX_STRIPID = 5
static

Definition at line 55 of file EcalElectronicsId.h.

Referenced by EcalElectronicsId().

◆ MAX_TOWERID

const int EcalElectronicsId::MAX_TOWERID = 70
static

Definition at line 53 of file EcalElectronicsId.h.

Referenced by EcalElectronicsId().

◆ MAX_XTALID

const int EcalElectronicsId::MAX_XTALID = 5
static

Definition at line 59 of file EcalElectronicsId.h.

Referenced by EcalElectronicsId().

◆ MIN_CHANNELID

const int EcalElectronicsId::MIN_CHANNELID = 1
static

Definition at line 58 of file EcalElectronicsId.h.

◆ MIN_DCCID

const int EcalElectronicsId::MIN_DCCID = 1
static

Definition at line 52 of file EcalElectronicsId.h.

Referenced by EcalElectronicsId().

◆ MIN_DCCID_EBM

const int EcalElectronicsId::MIN_DCCID_EBM = 10
static

Definition at line 64 of file EcalElectronicsId.h.

Referenced by BlockFormatter::DigiToRaw(), subdet(), and zside().

◆ MIN_DCCID_EBP

const int EcalElectronicsId::MIN_DCCID_EBP = 28
static

Definition at line 66 of file EcalElectronicsId.h.

Referenced by subdet(), and zside().

◆ MIN_DCCID_EEM

const int EcalElectronicsId::MIN_DCCID_EEM = 1
static

Definition at line 62 of file EcalElectronicsId.h.

Referenced by TCCBlockFormatter::DigiToRaw(), and zside().

◆ MIN_DCCID_EEP

const int EcalElectronicsId::MIN_DCCID_EEP = 46
static

◆ MIN_STRIPID

const int EcalElectronicsId::MIN_STRIPID = 1
static

Definition at line 56 of file EcalElectronicsId.h.

Referenced by EcalElectronicsId().

◆ MIN_TOWERID

const int EcalElectronicsId::MIN_TOWERID = 1
static

Definition at line 54 of file EcalElectronicsId.h.

Referenced by EcalElectronicsId().

◆ MIN_XTALID

const int EcalElectronicsId::MIN_XTALID = 1
static

Definition at line 60 of file EcalElectronicsId.h.

Referenced by EcalElectronicsId().

EcalElectronicsId::MIN_XTALID
static const int MIN_XTALID
Definition: EcalElectronicsId.h:60
EcalElectronicsId::MIN_TOWERID
static const int MIN_TOWERID
Definition: EcalElectronicsId.h:54
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
EcalElectronicsId::MIN_STRIPID
static const int MIN_STRIPID
Definition: EcalElectronicsId.h:56
EcalElectronicsId::MAX_XTALID
static const int MAX_XTALID
Definition: EcalElectronicsId.h:59
EcalElectronicsId::dccId
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
Definition: EcalElectronicsId.h:31
EcalElectronicsId::MIN_DCCID
static const int MIN_DCCID
Definition: EcalElectronicsId.h:52
EcalBarrel
Definition: EcalSubdetector.h:10
EcalElectronicsId::towerId
int towerId() const
get the tower id
Definition: EcalElectronicsId.h:33
EcalElectronicsId::MIN_DCCID_EBM
static const int MIN_DCCID_EBM
Definition: EcalElectronicsId.h:64
SiPixelPI::quadrant
int quadrant(const DetId &detid, const TrackerTopology *tTopo_, bool phase_)
Definition: SiPixelPayloadInspectorHelper.h:124
EcalElectronicsId::MAX_DCCID
static const int MAX_DCCID
Definition: EcalElectronicsId.h:51
EcalEndcap
Definition: EcalSubdetector.h:10
EEQuadrant
static int EEQuadrant(int dcc, int dcc_channel)
Definition: EcalElectronicsId.cc:40
EcalElectronicsId::MAX_DCCID_EBP
static const int MAX_DCCID_EBP
Definition: EcalElectronicsId.h:67
EcalElectronicsId::MAX_DCCID_EEM
static const int MAX_DCCID_EEM
Definition: EcalElectronicsId.h:63
EcalElectronicsId::MAX_STRIPID
static const int MAX_STRIPID
Definition: EcalElectronicsId.h:55
EcalElectronicsId::MAX_TOWERID
static const int MAX_TOWERID
Definition: EcalElectronicsId.h:53
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
Exception
Definition: hltDiff.cc:245
EcalElectronicsId::MAX_DCCID_EEP
static const int MAX_DCCID_EEP
Definition: EcalElectronicsId.h:69
EcalElectronicsId::MAX_DCCID_EBM
static const int MAX_DCCID_EBM
Definition: EcalElectronicsId.h:65
EcalElectronicsId::stripId
int stripId() const
get the tower id
Definition: EcalElectronicsId.h:35
EcalElectronicsId::MIN_DCCID_EEM
static const int MIN_DCCID_EEM
Definition: EcalElectronicsId.h:62
EcalElectronicsId::MIN_DCCID_EEP
static const int MIN_DCCID_EEP
Definition: EcalElectronicsId.h:68
EcalElectronicsId::EcalElectronicsId_
uint32_t EcalElectronicsId_
Definition: EcalElectronicsId.h:88
EcalElectronicsId::xtalId
int xtalId() const
get the channel id
Definition: EcalElectronicsId.h:37
EcalElectronicsId::MIN_DCCID_EBP
static const int MIN_DCCID_EBP
Definition: EcalElectronicsId.h:66