CMS 3D CMS Logo

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>

List of all members.

Public Member Functions

int channelId () const
 get the channel id
 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)
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.
int operator== (const EcalTriggerElectronicsId &id) const
int pseudoStripId () const
 get the tower id
uint32_t rawId () const
EcalSubdetector subdet () const
 get the subdet
int tccId () const
 get the DCC (Ecal Local DCC value not global one) id
int ttId () const
 get the tower id
int zside () const
 get the zside() +1 / -1

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_.

                                                   {
  EcalTriggerElectronicsId_=0xFFFFFFFFu;
}
EcalTriggerElectronicsId::EcalTriggerElectronicsId ( uint32_t  id)

from raw

Definition at line 11 of file EcalTriggerElectronicsId.cc.

References EcalTriggerElectronicsId_.

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_, Exception, MAX_CHANNELID, MAX_PSEUDOSTRIPID, MAX_TCCID, MAX_TTID, MIN_CHANNELID, MIN_PSEUDOSTRIPID, MIN_TCCID, and MIN_TTID.

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

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().

{ 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_.

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

Non-Equality operator

Definition at line 80 of file EcalTriggerElectronicsId.h.

References EcalTriggerElectronicsId_.

{ 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_.

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

Equality operator

Definition at line 78 of file EcalTriggerElectronicsId.h.

References EcalTriggerElectronicsId_.

{ 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().

                                                       {
        int tcc = tccId();
        if ( (tcc >= MIN_TCCID_EBM && tcc <= MAX_TCCID_EBM) ||
             (tcc >= MIN_TCCID_EBP && tcc <= MAX_TCCID_EBP) ) return EcalBarrel;
        else return EcalEndcap;
}
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 subdet(), EcalElectronicsMapping::MapItem::tccId(), and zside().

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

get the tower id

Definition at line 37 of file EcalTriggerElectronicsId.h.

References EcalTriggerElectronicsId_.

Referenced by EcalElectronicsMapping::MapItem::ttId().

{ return (EcalTriggerElectronicsId_>>6)&0x7F; }
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().

                                          {
        int tcc = tccId();
        if ( (tcc >= MIN_TCCID_EEM && tcc <= MAX_TCCID_EEM)) return -1;
        if ( (tcc >= MIN_TCCID_EBM && tcc <= MAX_TCCID_EBM)) return -1;
        if ( (tcc >= MIN_TCCID_EEP && tcc <= MAX_TCCID_EEP)) return +1;
        if ( (tcc >= MIN_TCCID_EBP && tcc <= MAX_TCCID_EBP)) return +1;
        return 0;
}

Member Data Documentation

Definition at line 57 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

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().

Definition at line 58 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

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().

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().

Definition at line 73 of file EcalTriggerElectronicsId.h.

Definition at line 74 of file EcalTriggerElectronicsId.h.

Definition at line 69 of file EcalTriggerElectronicsId.h.

Definition at line 70 of file EcalTriggerElectronicsId.h.

Definition at line 71 of file EcalTriggerElectronicsId.h.

Definition at line 72 of file EcalTriggerElectronicsId.h.