CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Attributes | Private Attributes
EcalTriggerElectronicsId Class Reference

Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pseudo strip (in EB == strip) [2:0] channel in pseudostrip Index starts from 1. More...

#include <EcalTriggerElectronicsId.h>

Public Member Functions

int channelId () const
 get the channel id More...
 
 EcalTriggerElectronicsId ()
 
 EcalTriggerElectronicsId (uint32_t)
 
 EcalTriggerElectronicsId (int tccid, int towerid, int pseudostripid, int channelid)
 
int linearIndex () const
 get a fast, compact, unique index for linear lookups (maximum value = 1048575) More...
 
int operator!= (const EcalTriggerElectronicsId &id) const
 
uint32_t operator() ()
 
int operator< (const EcalTriggerElectronicsId &id) const
 Compare the id to another id for use in a map. More...
 
int operator== (const EcalTriggerElectronicsId &id) const
 
int pseudoStripId () const
 get the tower id More...
 
uint32_t rawId () const
 
EcalSubdetector subdet () const
 get the subdet More...
 
int tccId () const
 get the DCC (Ecal Local DCC value not global one) id More...
 
int ttId () const
 get the tower id More...
 
int zside () const
 get the zside() +1 / -1 More...
 

Static Public Attributes

static const int MAX_CHANNELID = 5
 
static const int MAX_PSEUDOSTRIPID = 5
 
static const int MAX_TCCID = 108
 
static const int MAX_TCCID_EBM = 54
 
static const int MAX_TCCID_EBP = 72
 
static const int MAX_TCCID_EEM = 36
 
static const int MAX_TCCID_EEP = 108
 
static const int MAX_TTID = 68
 
static const int MIN_CHANNELID = 1
 
static const int MIN_PSEUDOSTRIPID = 1
 
static const int MIN_TCCID = 1
 
static const int MIN_TCCID_EBM = 37
 
static const int MIN_TCCID_EBP = 55
 
static const int MIN_TCCID_EEM = 1
 
static const int MIN_TCCID_EEP = 73
 
static const int MIN_TTID = 1
 
static const int TCCID_PHI0_EBM = 37
 
static const int TCCID_PHI0_EBP = 55
 
static const int TCCID_PHI0_EEM_IN = 1
 
static const int TCCID_PHI0_EEM_OUT = 19
 
static const int TCCID_PHI0_EEP_IN = 91
 
static const int TCCID_PHI0_EEP_OUT = 73
 

Private Attributes

uint32_t EcalTriggerElectronicsId_
 

Detailed Description

Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pseudo strip (in EB == strip) [2:0] channel in pseudostrip Index starts from 1.

Definition at line 20 of file EcalTriggerElectronicsId.h.

Constructor & Destructor Documentation

EcalTriggerElectronicsId::EcalTriggerElectronicsId ( )

Default constructor – invalid value

Definition at line 7 of file EcalTriggerElectronicsId.cc.

References EcalTriggerElectronicsId_.

7  {
8  EcalTriggerElectronicsId_=0xFFFFFFFFu;
9 }
EcalTriggerElectronicsId::EcalTriggerElectronicsId ( uint32_t  id)
EcalTriggerElectronicsId::EcalTriggerElectronicsId ( int  tccid,
int  towerid,
int  pseudostripid,
int  channelid 
)

Constructor from tcc,tt,pseudostrip,channel

Definition at line 15 of file EcalTriggerElectronicsId.cc.

References EcalTriggerElectronicsId_, edm::hlt::Exception, MAX_CHANNELID, MAX_PSEUDOSTRIPID, MAX_TCCID, MAX_TTID, MIN_CHANNELID, MIN_PSEUDOSTRIPID, MIN_TCCID, and MIN_TTID.

15  {
16  if ( (tccid < MIN_TCCID) || (tccid > MAX_TCCID) ||
17  (ttid < MIN_TTID) || (ttid > MAX_TTID) ||
18  (pseudostripid < MIN_PSEUDOSTRIPID) || (pseudostripid > MAX_PSEUDOSTRIPID) ||
19  (channelid < MIN_CHANNELID) || (channelid > MAX_CHANNELID) )
20  throw cms::Exception("InvalidDetId") << "EcalTriggerElectronicsId: Cannot create object. Indexes out of bounds.";
21  EcalTriggerElectronicsId_= (channelid&0x7) | ( (pseudostripid&0x7) << 3) | ( (ttid&0x7F) << 6) | ((tccid&0x7F) << 13);
22 }

Member Function Documentation

int EcalTriggerElectronicsId::channelId ( ) const
inline

get the channel id

Definition at line 41 of file EcalTriggerElectronicsId.h.

References EcalTriggerElectronicsId_.

Referenced by EcalTPGParamBuilder::analyze(), and EcalDQMBinningService::channelName().

41 { return (EcalTriggerElectronicsId_&0x7); }
int EcalTriggerElectronicsId::linearIndex ( ) const
inline

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

Definition at line 43 of file EcalTriggerElectronicsId.h.

References EcalTriggerElectronicsId_.

43 { return (EcalTriggerElectronicsId_)&0xFFFFF; }
int EcalTriggerElectronicsId::operator!= ( const EcalTriggerElectronicsId id) const
inline

Non-Equality operator

Definition at line 80 of file EcalTriggerElectronicsId.h.

References EcalTriggerElectronicsId_.

80 { return id.EcalTriggerElectronicsId_!=EcalTriggerElectronicsId_; }
uint32_t EcalTriggerElectronicsId::operator() ( )
inline

Definition at line 31 of file EcalTriggerElectronicsId.h.

References EcalTriggerElectronicsId_.

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

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

Definition at line 82 of file EcalTriggerElectronicsId.h.

References EcalTriggerElectronicsId_.

82 { return EcalTriggerElectronicsId_<id.EcalTriggerElectronicsId_; }
int EcalTriggerElectronicsId::operator== ( const EcalTriggerElectronicsId id) const
inline

Equality operator

Definition at line 78 of file EcalTriggerElectronicsId.h.

References EcalTriggerElectronicsId_.

78 { return id.EcalTriggerElectronicsId_==EcalTriggerElectronicsId_; }
int EcalTriggerElectronicsId::pseudoStripId ( ) const
inline
uint32_t EcalTriggerElectronicsId::rawId ( ) const
inline
EcalSubdetector EcalTriggerElectronicsId::subdet ( ) const

get the subdet

Definition at line 34 of file EcalTriggerElectronicsId.cc.

References EcalBarrel, EcalEndcap, MAX_TCCID_EBM, MAX_TCCID_EBP, MIN_TCCID_EBM, MIN_TCCID_EBP, and tccId().

Referenced by EcalElectronicsMapping::getTriggerElectronicsId(), and EcalTPCondAnalyzer::printSTRIP().

34  {
35  int tcc = tccId();
36  if ( (tcc >= MIN_TCCID_EBM && tcc <= MAX_TCCID_EBM) ||
37  (tcc >= MIN_TCCID_EBP && tcc <= MAX_TCCID_EBP) ) return EcalBarrel;
38  else return EcalEndcap;
39 }
int tccId() const
get the DCC (Ecal Local DCC value not global one) id
int EcalTriggerElectronicsId::tccId ( ) const
inline

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

Definition at line 35 of file EcalTriggerElectronicsId.h.

References EcalTriggerElectronicsId_.

Referenced by EcalDQMBinningService::channelName(), ecaldqm::MESetChannel::getIndex_(), subdet(), ecaldqm::tccId(), EcalElectronicsMapping::MapItem::tccId(), and zside().

35 { return (EcalTriggerElectronicsId_>>13)&0x7F; }
int EcalTriggerElectronicsId::ttId ( ) const
inline
int EcalTriggerElectronicsId::zside ( ) const

get the zside() +1 / -1

Definition at line 24 of file EcalTriggerElectronicsId.cc.

References MAX_TCCID_EBM, MAX_TCCID_EBP, MAX_TCCID_EEM, MAX_TCCID_EEP, MIN_TCCID_EBM, MIN_TCCID_EBP, MIN_TCCID_EEM, MIN_TCCID_EEP, and tccId().

24  {
25  int tcc = tccId();
26  if ( (tcc >= MIN_TCCID_EEM && tcc <= MAX_TCCID_EEM)) return -1;
27  if ( (tcc >= MIN_TCCID_EBM && tcc <= MAX_TCCID_EBM)) return -1;
28  if ( (tcc >= MIN_TCCID_EEP && tcc <= MAX_TCCID_EEP)) return +1;
29  if ( (tcc >= MIN_TCCID_EBP && tcc <= MAX_TCCID_EBP)) return +1;
30  return 0;
31 }
int tccId() const
get the DCC (Ecal Local DCC value not global one) id

Member Data Documentation

uint32_t EcalTriggerElectronicsId::EcalTriggerElectronicsId_
private
const int EcalTriggerElectronicsId::MAX_CHANNELID = 5
static

Definition at line 57 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

const int EcalTriggerElectronicsId::MAX_PSEUDOSTRIPID = 5
static

Definition at line 55 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

const int EcalTriggerElectronicsId::MAX_TCCID = 108
static
const int EcalTriggerElectronicsId::MAX_TCCID_EBM = 54
static

Definition at line 63 of file EcalTriggerElectronicsId.h.

Referenced by subdet(), and zside().

const int EcalTriggerElectronicsId::MAX_TCCID_EBP = 72
static

Definition at line 65 of file EcalTriggerElectronicsId.h.

Referenced by subdet(), and zside().

const int EcalTriggerElectronicsId::MAX_TCCID_EEM = 36
static

Definition at line 61 of file EcalTriggerElectronicsId.h.

Referenced by EcalElectronicsMapper::fillMaps(), and zside().

const int EcalTriggerElectronicsId::MAX_TCCID_EEP = 108
static

Definition at line 67 of file EcalTriggerElectronicsId.h.

Referenced by EcalElectronicsMapper::fillMaps(), and zside().

const int EcalTriggerElectronicsId::MAX_TTID = 68
static

Definition at line 53 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

const int EcalTriggerElectronicsId::MIN_CHANNELID = 1
static

Definition at line 58 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

const int EcalTriggerElectronicsId::MIN_PSEUDOSTRIPID = 1
static

Definition at line 56 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

const int EcalTriggerElectronicsId::MIN_TCCID = 1
static

Definition at line 52 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

const int EcalTriggerElectronicsId::MIN_TCCID_EBM = 37
static

Definition at line 62 of file EcalTriggerElectronicsId.h.

Referenced by subdet(), and zside().

const int EcalTriggerElectronicsId::MIN_TCCID_EBP = 55
static

Definition at line 64 of file EcalTriggerElectronicsId.h.

Referenced by subdet(), and zside().

const int EcalTriggerElectronicsId::MIN_TCCID_EEM = 1
static

Definition at line 60 of file EcalTriggerElectronicsId.h.

Referenced by EcalElectronicsMapper::fillMaps(), and zside().

const int EcalTriggerElectronicsId::MIN_TCCID_EEP = 73
static

Definition at line 66 of file EcalTriggerElectronicsId.h.

Referenced by EcalElectronicsMapper::fillMaps(), and zside().

const int EcalTriggerElectronicsId::MIN_TTID = 1
static

Definition at line 54 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

const int EcalTriggerElectronicsId::TCCID_PHI0_EBM = 37
static

Definition at line 73 of file EcalTriggerElectronicsId.h.

const int EcalTriggerElectronicsId::TCCID_PHI0_EBP = 55
static

Definition at line 74 of file EcalTriggerElectronicsId.h.

const int EcalTriggerElectronicsId::TCCID_PHI0_EEM_IN = 1
static

Definition at line 69 of file EcalTriggerElectronicsId.h.

const int EcalTriggerElectronicsId::TCCID_PHI0_EEM_OUT = 19
static

Definition at line 70 of file EcalTriggerElectronicsId.h.

const int EcalTriggerElectronicsId::TCCID_PHI0_EEP_IN = 91
static

Definition at line 71 of file EcalTriggerElectronicsId.h.

const int EcalTriggerElectronicsId::TCCID_PHI0_EEP_OUT = 73
static

Definition at line 72 of file EcalTriggerElectronicsId.h.