CMS 3D CMS Logo

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 (int tccid, int towerid, int pseudostripid, int channelid)
 
 EcalTriggerElectronicsId (uint32_t)
 
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 18 of file EcalTriggerElectronicsId.h.

Constructor & Destructor Documentation

◆ EcalTriggerElectronicsId() [1/3]

EcalTriggerElectronicsId::EcalTriggerElectronicsId ( )

Default constructor – invalid value

Definition at line 6 of file EcalTriggerElectronicsId.cc.

6 { EcalTriggerElectronicsId_ = 0xFFFFFFFFu; }

References EcalTriggerElectronicsId_.

◆ EcalTriggerElectronicsId() [2/3]

EcalTriggerElectronicsId::EcalTriggerElectronicsId ( uint32_t  id)

from raw

Definition at line 8 of file EcalTriggerElectronicsId.cc.

References EcalTriggerElectronicsId_, and triggerObjects_cff::id.

◆ EcalTriggerElectronicsId() [3/3]

EcalTriggerElectronicsId::EcalTriggerElectronicsId ( int  tccid,
int  towerid,
int  pseudostripid,
int  channelid 
)

Constructor from tcc,tt,pseudostrip,channel

Definition at line 10 of file EcalTriggerElectronicsId.cc.

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

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

Member Function Documentation

◆ channelId()

int EcalTriggerElectronicsId::channelId ( ) const
inline

get the channel id

Definition at line 37 of file EcalTriggerElectronicsId.h.

37 { return (EcalTriggerElectronicsId_ & 0x7); }

References EcalTriggerElectronicsId_.

Referenced by EcalTPGParamBuilder::analyze(), and ecaldqm::binning::channelName().

◆ linearIndex()

int EcalTriggerElectronicsId::linearIndex ( ) const
inline

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

Definition at line 39 of file EcalTriggerElectronicsId.h.

39 { return (EcalTriggerElectronicsId_)&0xFFFFF; }

References EcalTriggerElectronicsId_.

◆ operator!=()

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

Non-Equality operator

Definition at line 77 of file EcalTriggerElectronicsId.h.

77  {
78  return id.EcalTriggerElectronicsId_ != EcalTriggerElectronicsId_;
79  }

References EcalTriggerElectronicsId_.

◆ operator()()

uint32_t EcalTriggerElectronicsId::operator() ( )
inline

Definition at line 27 of file EcalTriggerElectronicsId.h.

27 { return EcalTriggerElectronicsId_; }

References EcalTriggerElectronicsId_.

◆ operator<()

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

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

Definition at line 81 of file EcalTriggerElectronicsId.h.

81  {
82  return EcalTriggerElectronicsId_ < id.EcalTriggerElectronicsId_;
83  }

References EcalTriggerElectronicsId_.

◆ operator==()

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

Equality operator

Definition at line 73 of file EcalTriggerElectronicsId.h.

73  {
74  return id.EcalTriggerElectronicsId_ == EcalTriggerElectronicsId_;
75  }

References EcalTriggerElectronicsId_.

◆ pseudoStripId()

int EcalTriggerElectronicsId::pseudoStripId ( ) const
inline

◆ rawId()

uint32_t EcalTriggerElectronicsId::rawId ( ) const
inline

◆ subdet()

EcalSubdetector EcalTriggerElectronicsId::subdet ( ) const

get the subdet

Definition at line 32 of file EcalTriggerElectronicsId.cc.

32  {
33  int tcc = tccId();
34  if ((tcc >= MIN_TCCID_EBM && tcc <= MAX_TCCID_EBM) || (tcc >= MIN_TCCID_EBP && tcc <= MAX_TCCID_EBP))
35  return EcalBarrel;
36  else
37  return EcalEndcap;
38 }

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

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

◆ tccId()

int EcalTriggerElectronicsId::tccId ( ) const
inline

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

Definition at line 31 of file EcalTriggerElectronicsId.h.

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

References EcalTriggerElectronicsId_.

Referenced by ecaldqm::binning::channelName(), ecaldqm::TrigPrimTask::runOnRealTPs(), subdet(), ecaldqm::tccId(), EcalElectronicsMapping::MapItem::tccId(), and zside().

◆ ttId()

int EcalTriggerElectronicsId::ttId ( ) const
inline

◆ zside()

int EcalTriggerElectronicsId::zside ( ) const

get the zside() +1 / -1

Definition at line 19 of file EcalTriggerElectronicsId.cc.

19  {
20  int tcc = tccId();
21  if ((tcc >= MIN_TCCID_EEM && tcc <= MAX_TCCID_EEM))
22  return -1;
23  if ((tcc >= MIN_TCCID_EBM && tcc <= MAX_TCCID_EBM))
24  return -1;
25  if ((tcc >= MIN_TCCID_EEP && tcc <= MAX_TCCID_EEP))
26  return +1;
27  if ((tcc >= MIN_TCCID_EBP && tcc <= MAX_TCCID_EBP))
28  return +1;
29  return 0;
30 }

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

Member Data Documentation

◆ EcalTriggerElectronicsId_

uint32_t EcalTriggerElectronicsId::EcalTriggerElectronicsId_
private

◆ MAX_CHANNELID

const int EcalTriggerElectronicsId::MAX_CHANNELID = 5
static

Definition at line 53 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

◆ MAX_PSEUDOSTRIPID

const int EcalTriggerElectronicsId::MAX_PSEUDOSTRIPID = 5
static

Definition at line 51 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

◆ MAX_TCCID

const int EcalTriggerElectronicsId::MAX_TCCID = 108
static

◆ MAX_TCCID_EBM

const int EcalTriggerElectronicsId::MAX_TCCID_EBM = 54
static

Definition at line 59 of file EcalTriggerElectronicsId.h.

Referenced by subdet(), and zside().

◆ MAX_TCCID_EBP

const int EcalTriggerElectronicsId::MAX_TCCID_EBP = 72
static

Definition at line 61 of file EcalTriggerElectronicsId.h.

Referenced by subdet(), and zside().

◆ MAX_TCCID_EEM

const int EcalTriggerElectronicsId::MAX_TCCID_EEM = 36
static

Definition at line 57 of file EcalTriggerElectronicsId.h.

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

◆ MAX_TCCID_EEP

const int EcalTriggerElectronicsId::MAX_TCCID_EEP = 108
static

Definition at line 63 of file EcalTriggerElectronicsId.h.

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

◆ MAX_TTID

const int EcalTriggerElectronicsId::MAX_TTID = 68
static

Definition at line 49 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

◆ MIN_CHANNELID

const int EcalTriggerElectronicsId::MIN_CHANNELID = 1
static

Definition at line 54 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

◆ MIN_PSEUDOSTRIPID

const int EcalTriggerElectronicsId::MIN_PSEUDOSTRIPID = 1
static

Definition at line 52 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

◆ MIN_TCCID

const int EcalTriggerElectronicsId::MIN_TCCID = 1
static

Definition at line 48 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

◆ MIN_TCCID_EBM

const int EcalTriggerElectronicsId::MIN_TCCID_EBM = 37
static

Definition at line 58 of file EcalTriggerElectronicsId.h.

Referenced by subdet(), and zside().

◆ MIN_TCCID_EBP

const int EcalTriggerElectronicsId::MIN_TCCID_EBP = 55
static

Definition at line 60 of file EcalTriggerElectronicsId.h.

Referenced by subdet(), and zside().

◆ MIN_TCCID_EEM

const int EcalTriggerElectronicsId::MIN_TCCID_EEM = 1
static

Definition at line 56 of file EcalTriggerElectronicsId.h.

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

◆ MIN_TCCID_EEP

const int EcalTriggerElectronicsId::MIN_TCCID_EEP = 73
static

Definition at line 62 of file EcalTriggerElectronicsId.h.

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

◆ MIN_TTID

const int EcalTriggerElectronicsId::MIN_TTID = 1
static

Definition at line 50 of file EcalTriggerElectronicsId.h.

Referenced by EcalTriggerElectronicsId().

◆ TCCID_PHI0_EBM

const int EcalTriggerElectronicsId::TCCID_PHI0_EBM = 37
static

Definition at line 69 of file EcalTriggerElectronicsId.h.

◆ TCCID_PHI0_EBP

const int EcalTriggerElectronicsId::TCCID_PHI0_EBP = 55
static

Definition at line 70 of file EcalTriggerElectronicsId.h.

◆ TCCID_PHI0_EEM_IN

const int EcalTriggerElectronicsId::TCCID_PHI0_EEM_IN = 1
static

Definition at line 65 of file EcalTriggerElectronicsId.h.

◆ TCCID_PHI0_EEM_OUT

const int EcalTriggerElectronicsId::TCCID_PHI0_EEM_OUT = 19
static

Definition at line 66 of file EcalTriggerElectronicsId.h.

◆ TCCID_PHI0_EEP_IN

const int EcalTriggerElectronicsId::TCCID_PHI0_EEP_IN = 91
static

Definition at line 67 of file EcalTriggerElectronicsId.h.

◆ TCCID_PHI0_EEP_OUT

const int EcalTriggerElectronicsId::TCCID_PHI0_EEP_OUT = 73
static

Definition at line 68 of file EcalTriggerElectronicsId.h.

EcalTriggerElectronicsId::MIN_TCCID_EEM
static const int MIN_TCCID_EEM
Definition: EcalTriggerElectronicsId.h:56
EcalTriggerElectronicsId::MAX_TCCID_EBP
static const int MAX_TCCID_EBP
Definition: EcalTriggerElectronicsId.h:61
EcalTriggerElectronicsId::tccId
int tccId() const
get the DCC (Ecal Local DCC value not global one) id
Definition: EcalTriggerElectronicsId.h:31
EcalTriggerElectronicsId::EcalTriggerElectronicsId_
uint32_t EcalTriggerElectronicsId_
Definition: EcalTriggerElectronicsId.h:86
EcalTriggerElectronicsId::MIN_TCCID_EBP
static const int MIN_TCCID_EBP
Definition: EcalTriggerElectronicsId.h:60
EcalTriggerElectronicsId::MAX_CHANNELID
static const int MAX_CHANNELID
Definition: EcalTriggerElectronicsId.h:53
EcalBarrel
Definition: EcalSubdetector.h:10
EcalTriggerElectronicsId::MIN_TCCID_EEP
static const int MIN_TCCID_EEP
Definition: EcalTriggerElectronicsId.h:62
EcalTriggerElectronicsId::MAX_TCCID
static const int MAX_TCCID
Definition: EcalTriggerElectronicsId.h:47
EcalTriggerElectronicsId::MIN_CHANNELID
static const int MIN_CHANNELID
Definition: EcalTriggerElectronicsId.h:54
EcalTriggerElectronicsId::MAX_TCCID_EBM
static const int MAX_TCCID_EBM
Definition: EcalTriggerElectronicsId.h:59
EcalEndcap
Definition: EcalSubdetector.h:10
EcalTriggerElectronicsId::MIN_TCCID_EBM
static const int MIN_TCCID_EBM
Definition: EcalTriggerElectronicsId.h:58
EcalTriggerElectronicsId::MIN_TCCID
static const int MIN_TCCID
Definition: EcalTriggerElectronicsId.h:48
EcalTriggerElectronicsId::MAX_TTID
static const int MAX_TTID
Definition: EcalTriggerElectronicsId.h:49
EcalTriggerElectronicsId::MIN_TTID
static const int MIN_TTID
Definition: EcalTriggerElectronicsId.h:50
EcalTriggerElectronicsId::MAX_PSEUDOSTRIPID
static const int MAX_PSEUDOSTRIPID
Definition: EcalTriggerElectronicsId.h:51
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
EcalTriggerElectronicsId::MIN_PSEUDOSTRIPID
static const int MIN_PSEUDOSTRIPID
Definition: EcalTriggerElectronicsId.h:52
EcalTriggerElectronicsId::MAX_TCCID_EEM
static const int MAX_TCCID_EEM
Definition: EcalTriggerElectronicsId.h:57
Exception
Definition: hltDiff.cc:246
EcalTriggerElectronicsId::MAX_TCCID_EEP
static const int MAX_TCCID_EEP
Definition: EcalTriggerElectronicsId.h:63