![]() |
![]() |
#include <DataFormats/EcalDetId/interface/EcalElectronicsId.h>
Public Member Functions | |
int | channelId () const |
so far for EndCap only : | |
int | dccId () const |
get the DCC (Ecal Local DCC value not global one) id | |
EcalElectronicsId (int dccid, int towerid, int stripid, int xtalid) | |
Constructor from dcc,tower,channel. | |
EcalElectronicsId (uint32_t) | |
from raw | |
EcalElectronicsId () | |
Default constructor -- invalid value. | |
int | linearIndex () const |
get a fast, compact, unique index for linear lookups (maximum value = 4194303) | |
int | operator!= (const EcalElectronicsId &id) const |
Non-Equality operator. | |
uint32_t | operator() () |
int | operator< (const EcalElectronicsId &id) const |
Compare the id to another id for use in a map. | |
int | operator== (const EcalElectronicsId &id) const |
Equality operator. | |
uint32_t | rawId () const |
int | stripId () const |
get the tower id | |
EcalSubdetector | subdet () const |
get the subdet | |
int | towerId () const |
get the tower id | |
int | xtalId () const |
get the channel id | |
int | zside () const |
zside = +1 or -1 | |
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_ |
Definition at line 19 of file EcalElectronicsId.h.
EcalElectronicsId::EcalElectronicsId | ( | ) |
Default constructor -- invalid value.
Definition at line 8 of file EcalElectronicsId.cc.
References EcalElectronicsId_.
00008 { 00009 EcalElectronicsId_=0xFFFFFFFFu; 00010 }
EcalElectronicsId::EcalElectronicsId | ( | uint32_t | id | ) |
from raw
Definition at line 12 of file EcalElectronicsId.cc.
References EcalElectronicsId_.
00012 { 00013 EcalElectronicsId_=id; 00014 }
Constructor from dcc,tower,channel.
Definition at line 16 of file EcalElectronicsId.cc.
References EcalElectronicsId_, Exception, MAX_DCCID, MAX_STRIPID, MAX_TOWERID, MAX_XTALID, MIN_DCCID, MIN_STRIPID, MIN_TOWERID, and MIN_XTALID.
00016 { 00017 if ( (dccid < MIN_DCCID) || (dccid > MAX_DCCID) || 00018 (towerid < MIN_TOWERID) || (towerid > MAX_TOWERID) || 00019 (stripid < MIN_STRIPID) || (stripid > MAX_STRIPID) || 00020 (xtalid < MIN_XTALID) || (xtalid > MAX_XTALID) ) 00021 throw cms::Exception("InvalidDetId") << "EcalElectronicsId: Cannot create object. Indexes out of bounds. Dcc tower strip xtal " << dccid << " " << towerid << " " << stripid << " " << xtalid << "."; 00022 EcalElectronicsId_= (xtalid&0x7) | ( (stripid&0x7) << 3) | ( (towerid&0x7F) << 6) | ((dccid&0x7F) << 13); 00023 }
int EcalElectronicsId::channelId | ( | ) | const |
so far for EndCap only :
Definition at line 72 of file EcalElectronicsId.cc.
References dccId(), EEQuadrant(), strip(), stripId(), towerId(), and xtalId().
00072 { 00073 int dcc = dccId() ; 00074 int dcc_channel = towerId(); 00075 int quadrant = EEQuadrant(dcc, dcc_channel); 00076 int strip = stripId(); 00077 int xtal = xtalId(); 00078 int channel; 00079 if (quadrant ==1 || quadrant== 3) channel = 5*(strip-1) + xtal; 00080 else channel = 5*(xtal-1) + strip; 00081 return channel; 00082 }
int EcalElectronicsId::dccId | ( | ) | const [inline] |
get the DCC (Ecal Local DCC value not global one) id
Definition at line 34 of file EcalElectronicsId.h.
References EcalElectronicsId_.
Referenced by EcalURecHitHists::analyze(), channelId(), EcalElectronicsMapping::MapItem::dccId(), TowerBlockFormatter::DigiToRaw(), HLTPi0RecHitsFilter::filter(), EcalElectronicsMapping::getDCCandSC(), EcalElectronicsMapping::getLMNumber(), Numbers::iSM(), EEHltTask::iSM(), EBHltTask::iSM(), EcalDigiToRaw::produce(), EcalMipGraphs::selectEBHits(), EcalMipGraphs::selectEEHits(), subdet(), and zside().
00034 { return (EcalElectronicsId_>>13)&0x7F; }
int EcalElectronicsId::linearIndex | ( | ) | const [inline] |
get a fast, compact, unique index for linear lookups (maximum value = 4194303)
Definition at line 49 of file EcalElectronicsId.h.
References EcalElectronicsId_.
00049 { return (EcalElectronicsId_)&0x3FFFFF; }
int EcalElectronicsId::operator!= | ( | const EcalElectronicsId & | id | ) | const [inline] |
Non-Equality operator.
Definition at line 87 of file EcalElectronicsId.h.
References EcalElectronicsId_.
00087 { return id.EcalElectronicsId_!=EcalElectronicsId_; }
uint32_t EcalElectronicsId::operator() | ( | ) | [inline] |
Definition at line 30 of file EcalElectronicsId.h.
References EcalElectronicsId_.
00030 { return EcalElectronicsId_; }
int EcalElectronicsId::operator< | ( | const EcalElectronicsId & | id | ) | const [inline] |
Compare the id to another id for use in a map.
Definition at line 89 of file EcalElectronicsId.h.
References EcalElectronicsId_.
00089 { return EcalElectronicsId_<id.EcalElectronicsId_; }
int EcalElectronicsId::operator== | ( | const EcalElectronicsId & | id | ) | const [inline] |
Equality operator.
Definition at line 85 of file EcalElectronicsId.h.
References EcalElectronicsId_.
00085 { return id.EcalElectronicsId_==EcalElectronicsId_; }
uint32_t EcalElectronicsId::rawId | ( | ) | const [inline] |
Definition at line 31 of file EcalElectronicsId.h.
References EcalElectronicsId_.
00031 { return EcalElectronicsId_; }
int EcalElectronicsId::stripId | ( | ) | const [inline] |
get the tower id
Definition at line 38 of file EcalElectronicsId.h.
References EcalElectronicsId_.
Referenced by channelId(), TowerBlockFormatter::DigiToRaw(), EcalElectronicsMapper::fillMaps(), Numbers::icEE(), EcalMipGraphs::selectEEHits(), and EcalElectronicsMapping::MapItem::stripId().
00038 { return (EcalElectronicsId_>>3)&0x7; }
EcalSubdetector EcalElectronicsId::subdet | ( | ) | const |
get the subdet
Definition at line 26 of file EcalElectronicsId.cc.
References dccId(), EcalBarrel, EcalEndcap, MAX_DCCID_EBM, MAX_DCCID_EBP, MIN_DCCID_EBM, and MIN_DCCID_EBP.
00026 { 00027 int dcc = dccId(); 00028 if ( (dcc >= MIN_DCCID_EBM && dcc <= MAX_DCCID_EBM) || 00029 (dcc >= MIN_DCCID_EBP && dcc <= MAX_DCCID_EBP) ) return EcalBarrel; 00030 else return EcalEndcap; 00031 }
int EcalElectronicsId::towerId | ( | ) | const [inline] |
get the tower id
Definition at line 36 of file EcalElectronicsId.h.
References EcalElectronicsId_.
Referenced by channelId(), TowerBlockFormatter::DigiToRaw(), EcalElectronicsMapping::getDCCandSC(), Numbers::icEE(), Numbers::iTT(), EcalMipGraphs::selectEEHits(), and EcalElectronicsMapping::MapItem::towerId().
00036 { return (EcalElectronicsId_>>6)&0x7F; }
int EcalElectronicsId::xtalId | ( | ) | const [inline] |
get the channel id
Definition at line 40 of file EcalElectronicsId.h.
References EcalElectronicsId_.
Referenced by channelId(), TowerBlockFormatter::DigiToRaw(), EcalElectronicsMapper::fillMaps(), Numbers::icEE(), and EcalMipGraphs::selectEEHits().
00040 { return (EcalElectronicsId_&0x7); }
int EcalElectronicsId::zside | ( | ) | const |
zside = +1 or -1
Definition at line 33 of file EcalElectronicsId.cc.
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.
00033 { 00034 int dcc = dccId(); 00035 if ( (dcc >= MIN_DCCID_EEM && dcc <= MAX_DCCID_EEM)) return -1; 00036 if ( (dcc >= MIN_DCCID_EBM && dcc <= MAX_DCCID_EBM)) return -1; 00037 if ( (dcc >= MIN_DCCID_EEP && dcc <= MAX_DCCID_EEP)) return +1; 00038 if ( (dcc >= MIN_DCCID_EBP && dcc <= MAX_DCCID_EBP)) return +1; 00039 return 0; 00040 }
const int EcalElectronicsId::DCC_EBM = 10 [static] |
Definition at line 78 of file EcalElectronicsId.h.
const int EcalElectronicsId::DCC_EBP = 28 [static] |
Definition at line 79 of file EcalElectronicsId.h.
const int EcalElectronicsId::DCC_EEM = 1 [static] |
const int EcalElectronicsId::DCC_EEP = 46 [static] |
const int EcalElectronicsId::DCCID_PHI0_EBM = 10 [static] |
Definition at line 74 of file EcalElectronicsId.h.
const int EcalElectronicsId::DCCID_PHI0_EBP = 28 [static] |
Definition at line 75 of file EcalElectronicsId.h.
uint32_t EcalElectronicsId::EcalElectronicsId_ [private] |
Definition at line 93 of file EcalElectronicsId.h.
Referenced by dccId(), EcalElectronicsId(), linearIndex(), operator!=(), operator()(), operator<(), operator==(), rawId(), stripId(), towerId(), and xtalId().
const int EcalElectronicsId::kDCCChannelBoundary = 17 [static] |
const int EcalElectronicsId::MAX_CHANNELID = 25 [static] |
Definition at line 60 of file EcalElectronicsId.h.
const int EcalElectronicsId::MAX_DCCID = 54 [static] |
const int EcalElectronicsId::MAX_DCCID_EBM = 27 [static] |
const int EcalElectronicsId::MAX_DCCID_EBP = 45 [static] |
Definition at line 70 of file EcalElectronicsId.h.
Referenced by BlockFormatter::DigiToRaw(), subdet(), and zside().
const int EcalElectronicsId::MAX_DCCID_EEM = 9 [static] |
Definition at line 66 of file EcalElectronicsId.h.
Referenced by TCCBlockFormatter::DigiToRaw(), and zside().
const int EcalElectronicsId::MAX_DCCID_EEP = 54 [static] |
Definition at line 72 of file EcalElectronicsId.h.
Referenced by TCCBlockFormatter::DigiToRaw(), and zside().
const int EcalElectronicsId::MAX_STRIPID = 5 [static] |
const int EcalElectronicsId::MAX_TOWERID = 70 [static] |
const int EcalElectronicsId::MAX_XTALID = 5 [static] |
const int EcalElectronicsId::MIN_CHANNELID = 1 [static] |
Definition at line 61 of file EcalElectronicsId.h.
const int EcalElectronicsId::MIN_DCCID = 1 [static] |
const int EcalElectronicsId::MIN_DCCID_EBM = 10 [static] |
Definition at line 67 of file EcalElectronicsId.h.
Referenced by BlockFormatter::DigiToRaw(), subdet(), and zside().
const int EcalElectronicsId::MIN_DCCID_EBP = 28 [static] |
const int EcalElectronicsId::MIN_DCCID_EEM = 1 [static] |
Definition at line 65 of file EcalElectronicsId.h.
Referenced by TCCBlockFormatter::DigiToRaw(), and zside().
const int EcalElectronicsId::MIN_DCCID_EEP = 46 [static] |
Definition at line 71 of file EcalElectronicsId.h.
Referenced by TCCBlockFormatter::DigiToRaw(), BlockFormatter::DigiToRaw(), and zside().
const int EcalElectronicsId::MIN_STRIPID = 1 [static] |
const int EcalElectronicsId::MIN_TOWERID = 1 [static] |
const int EcalElectronicsId::MIN_XTALID = 1 [static] |