CMS 3D CMS Logo

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

Detector identifier class for the Endcap Timing Layer. More...

#include <ETLDetId.h>

Inheritance diagram for ETLDetId:
MTDDetId DetId

Public Member Functions

int discSide () const
 
uint32_t encodeSector (uint32_t &disc, uint32_t &discside, uint32_t &sector) const
 
 ETLDetId ()
 
 ETLDetId (const DetId &det_id)
 
 ETLDetId (const uint32_t &raw_id)
 
 ETLDetId (uint32_t zside, uint32_t disc, uint32_t discside, uint32_t sector, uint32_t module, uint32_t modtyp)
 
 ETLDetId (uint32_t zside, uint32_t ring, uint32_t module, uint32_t modtyp)
 
ETLDetId geographicalId () const
 
int modType () const
 
int module () const
 
int nDisc () const
 
uint32_t newForm (const uint32_t &rawid)
 
int sector () const
 
- Public Member Functions inherited from MTDDetId
 MTDDetId ()
 
 MTDDetId (const DetId &det_id)
 
 MTDDetId (const uint32_t &raw_id)
 
 MTDDetId (Detector det, int subdet)
 
int mtdRR () const
 
int mtdSide () const
 
int mtdSubDetector () const
 
SubDetector subDetector () const
 
int zside () const
 
- Public Member Functions inherited from DetId
constexpr Detector det () const
 get the detector field from this detid More...
 
constexpr DetId ()
 Create an empty or null id (also for persistence) More...
 
constexpr DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
constexpr DetId (uint32_t id)
 Create an id from a raw number. More...
 
constexpr bool null () const
 is this a null id ? More...
 
constexpr operator uint32_t () const
 
constexpr bool operator!= (DetId id) const
 inequality More...
 
constexpr uint32_t operator() () const
 
constexpr bool operator< (DetId id) const
 comparison More...
 
constexpr bool operator== (DetId id) const
 equality More...
 
constexpr uint32_t rawId () const
 get the raw id More...
 
constexpr int subdetId () const
 get the contents of the subdetector field (not cast into any detector's numbering enum) More...
 

Static Public Attributes

static const uint32_t kETLdiscSideMask = 0x1
 
static const uint32_t kETLdiscSideOffset = 2
 
static const uint32_t kETLmodTypeMask = 0x3
 
static const uint32_t kETLmodTypeOffset = 3
 
static const uint32_t kETLmoduleMask = 0x7FF
 
static const uint32_t kETLmoduleOffset = 5
 
static const uint32_t kETLnDiscMask = 0x1
 
static const uint32_t kETLnDiscOffset = 3
 constants for the TDR ETL model More...
 
static const uint32_t kETLsectorMask = 0x3
 
static constexpr int kETLv1maxModule = 176
 
static constexpr int kETLv1maxRing = 11
 
static constexpr int kETLv1nDisc = 1
 
static constexpr int kETLv4maxModule = 248
 
static constexpr int kETLv4maxRing = 16
 
static constexpr int kETLv4maxSector = 4
 
static constexpr int kETLv4nDisc = 2
 
static constexpr int kETLv5maxModule = 517
 
static constexpr int kETLv5maxRing = 14
 
static constexpr int kETLv5maxSector = 2
 
static constexpr int kETLv5nDisc = kETLv4nDisc
 
static constexpr uint32_t kSoff = 4
 
- Static Public Attributes inherited from MTDDetId
static const uint32_t kMTDsubdMask = 0x3
 
static const uint32_t kMTDsubdOffset = 23
 
static const uint32_t kRodRingMask = 0x3F
 
static const uint32_t kRodRingOffset = 16
 
static const uint32_t kZsideMask = 0x1
 
static const uint32_t kZsideOffset = 22
 
- Static Public Attributes inherited from DetId
static const int kDetMask = 0xF
 
static const int kDetOffset = 28
 
static const int kSubdetMask = 0x7
 
static const int kSubdetOffset = 25
 

Static Private Attributes

static const uint32_t kETLformatV2 = 1
 
static const uint32_t kETLoldFieldMask = 0x7FFF
 
static const uint32_t kETLoldToNewShift = 2
 

Additional Inherited Members

- Public Types inherited from MTDDetId
enum  MTDType { typeUNKNOWN = 0, BTL = 1, ETL = 2 }
 
enum  SubDetector { subUNKNOWN = 0, FastTime = 1 }
 
- Public Types inherited from DetId
enum  Detector {
  Tracker = 1, Muon = 2, Ecal = 3, Hcal = 4,
  Calo = 5, Forward = 6, VeryForward = 7, HGCalEE = 8,
  HGCalHSi = 9, HGCalHSc = 10, HGCalTrigger = 11
}
 
- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

Detector identifier class for the Endcap Timing Layer.

bit 15-7 : module sequential number bit 6-5 : module type (unused so far)

Definition at line 15 of file ETLDetId.h.

Constructor & Destructor Documentation

◆ ETLDetId() [1/5]

ETLDetId::ETLDetId ( )
inline

Construct a null id

Definition at line 54 of file ETLDetId.h.

55  id_ |= (MTDType::ETL & kMTDsubdMask) << kMTDsubdOffset;
56  id_ |= kETLformatV2;
57  }

References DetId::id_, kETLformatV2, MTDDetId::kMTDsubdMask, and MTDDetId::kMTDsubdOffset.

◆ ETLDetId() [2/5]

ETLDetId::ETLDetId ( const uint32_t &  raw_id)
inline

Construct from a raw value

Definition at line 60 of file ETLDetId.h.

60  {
61  uint32_t tmpId = raw_id;
62  if ((tmpId & kETLformatV2) == 0) {
63  tmpId = newForm(tmpId);
64  }
65  id_ = MTDDetId(tmpId).rawId();
66  }

References DetId::id_, kETLformatV2, MTDDetId::MTDDetId(), and newForm().

◆ ETLDetId() [3/5]

ETLDetId::ETLDetId ( const DetId det_id)
inline

Construct from generic DetId

Definition at line 69 of file ETLDetId.h.

69  {
70  uint32_t tmpId = det_id.rawId();
71  if ((tmpId & kETLformatV2) == 0) {
72  tmpId = newForm(tmpId);
73  }
74  id_ = MTDDetId(tmpId).rawId();
75  }

References DetId::id_, kETLformatV2, MTDDetId::MTDDetId(), newForm(), and DetId::rawId().

◆ ETLDetId() [4/5]

ETLDetId::ETLDetId ( uint32_t  zside,
uint32_t  ring,
uint32_t  module,
uint32_t  modtyp 
)
inline

◆ ETLDetId() [5/5]

ETLDetId::ETLDetId ( uint32_t  zside,
uint32_t  disc,
uint32_t  discside,
uint32_t  sector,
uint32_t  module,
uint32_t  modtyp 
)
inline

Member Function Documentation

◆ discSide()

int ETLDetId::discSide ( ) const
inline

Definition at line 117 of file ETLDetId.h.

117  {
119  }

References DetId::id_, kETLdiscSideMask, kETLdiscSideOffset, MTDDetId::kRodRingMask, and MTDDetId::kRodRingOffset.

◆ encodeSector()

uint32_t ETLDetId::encodeSector ( uint32_t &  disc,
uint32_t &  discside,
uint32_t &  sector 
) const
inline

ETL TDR Construct and fill only the det and sub-det fields.

Definition at line 88 of file ETLDetId.h.

88  {
89  return (sector + discside * kSoff + 2 * kSoff * disc);
90  }

References TtSemiLepEvtBuilder_cfi::disc, kSoff, and sector().

Referenced by ETLDetId(), and ETLNumberingScheme::getUnitID().

◆ geographicalId()

ETLDetId ETLDetId::geographicalId ( ) const
inline

◆ modType()

int ETLDetId::modType ( ) const
inline

Returns ETL module type number.

Definition at line 106 of file ETLDetId.h.

106 { return (id_ >> kETLmodTypeOffset) & kETLmodTypeMask; }

References DetId::id_, kETLmodTypeMask, and kETLmodTypeOffset.

Referenced by ETLDeviceSim::getHitsResponse().

◆ module()

int ETLDetId::module ( ) const
inline

Returns ETL module number.

Definition at line 103 of file ETLDetId.h.

103 { return (id_ >> kETLmoduleOffset) & kETLmoduleMask; }

References DetId::id_, kETLmoduleMask, and kETLmoduleOffset.

Referenced by ETLDetId(), and ETLDeviceSim::getHitsResponse().

◆ nDisc()

int ETLDetId::nDisc ( ) const
inline

◆ newForm()

uint32_t ETLDetId::newForm ( const uint32_t &  rawid)
inline

Definition at line 126 of file ETLDetId.h.

126  {
127  uint32_t fixedP = rawid & (0xFFFFFFFF - kETLoldFieldMask); // unchanged part of id
128  uint32_t shiftP = (rawid & kETLoldFieldMask) >> kETLoldToNewShift; // shifted part
129  return ((fixedP | shiftP) | kETLformatV2);
130  }

References kETLformatV2, kETLoldFieldMask, and kETLoldToNewShift.

Referenced by ETLDetId().

◆ sector()

int ETLDetId::sector ( ) const
inline

Member Data Documentation

◆ kETLdiscSideMask

const uint32_t ETLDetId::kETLdiscSideMask = 0x1
static

Definition at line 36 of file ETLDetId.h.

Referenced by discSide().

◆ kETLdiscSideOffset

const uint32_t ETLDetId::kETLdiscSideOffset = 2
static

Definition at line 35 of file ETLDetId.h.

Referenced by discSide().

◆ kETLformatV2

const uint32_t ETLDetId::kETLformatV2 = 1
staticprivate

Definition at line 20 of file ETLDetId.h.

Referenced by ETLDetId(), and newForm().

◆ kETLmodTypeMask

const uint32_t ETLDetId::kETLmodTypeMask = 0x3
static

Definition at line 26 of file ETLDetId.h.

Referenced by ETLDetId(), and modType().

◆ kETLmodTypeOffset

const uint32_t ETLDetId::kETLmodTypeOffset = 3
static

Definition at line 25 of file ETLDetId.h.

Referenced by ETLDetId(), and modType().

◆ kETLmoduleMask

const uint32_t ETLDetId::kETLmoduleMask = 0x7FF
static

Definition at line 24 of file ETLDetId.h.

Referenced by ETLDetLayerGeometryBuilder::buildLayer(), ETLDetId(), and module().

◆ kETLmoduleOffset

const uint32_t ETLDetId::kETLmoduleOffset = 5
static

Definition at line 23 of file ETLDetId.h.

Referenced by ETLDetId(), and module().

◆ kETLnDiscMask

const uint32_t ETLDetId::kETLnDiscMask = 0x1
static

Definition at line 34 of file ETLDetId.h.

Referenced by nDisc().

◆ kETLnDiscOffset

const uint32_t ETLDetId::kETLnDiscOffset = 3
static

constants for the TDR ETL model

Definition at line 33 of file ETLDetId.h.

Referenced by nDisc().

◆ kETLoldFieldMask

const uint32_t ETLDetId::kETLoldFieldMask = 0x7FFF
staticprivate

Definition at line 19 of file ETLDetId.h.

Referenced by newForm().

◆ kETLoldToNewShift

const uint32_t ETLDetId::kETLoldToNewShift = 2
staticprivate

Definition at line 18 of file ETLDetId.h.

Referenced by newForm().

◆ kETLsectorMask

const uint32_t ETLDetId::kETLsectorMask = 0x3
static

Definition at line 37 of file ETLDetId.h.

Referenced by sector().

◆ kETLv1maxModule

constexpr int ETLDetId::kETLv1maxModule = 176
staticconstexpr

Definition at line 29 of file ETLDetId.h.

Referenced by ETLNumberingScheme::getUnitID().

◆ kETLv1maxRing

constexpr int ETLDetId::kETLv1maxRing = 11
staticconstexpr

◆ kETLv1nDisc

constexpr int ETLDetId::kETLv1nDisc = 1
staticconstexpr

Definition at line 30 of file ETLDetId.h.

Referenced by ETLDetLayerGeometryBuilder::buildLayers().

◆ kETLv4maxModule

constexpr int ETLDetId::kETLv4maxModule = 248
staticconstexpr

Definition at line 41 of file ETLDetId.h.

Referenced by ETLNumberingScheme::getUnitID().

◆ kETLv4maxRing

constexpr int ETLDetId::kETLv4maxRing = 16
staticconstexpr

Definition at line 39 of file ETLDetId.h.

Referenced by ETLNumberingScheme::getUnitID().

◆ kETLv4maxSector

constexpr int ETLDetId::kETLv4maxSector = 4
staticconstexpr

Definition at line 40 of file ETLDetId.h.

Referenced by ETLDetLayerGeometryBuilder::buildLayers().

◆ kETLv4nDisc

constexpr int ETLDetId::kETLv4nDisc = 2
staticconstexpr

Definition at line 42 of file ETLDetId.h.

Referenced by ETLDetLayerGeometryBuilder::buildLayers().

◆ kETLv5maxModule

constexpr int ETLDetId::kETLv5maxModule = 517
staticconstexpr

Definition at line 46 of file ETLDetId.h.

Referenced by ETLNumberingScheme::getUnitID().

◆ kETLv5maxRing

constexpr int ETLDetId::kETLv5maxRing = 14
staticconstexpr

Definition at line 44 of file ETLDetId.h.

◆ kETLv5maxSector

constexpr int ETLDetId::kETLv5maxSector = 2
staticconstexpr

Definition at line 45 of file ETLDetId.h.

Referenced by ETLDetLayerGeometryBuilder::buildLayers().

◆ kETLv5nDisc

constexpr int ETLDetId::kETLv5nDisc = kETLv4nDisc
staticconstexpr

Definition at line 47 of file ETLDetId.h.

◆ kSoff

constexpr uint32_t ETLDetId::kSoff = 4
staticconstexpr

Definition at line 49 of file ETLDetId.h.

Referenced by encodeSector().

ETLDetId::kETLnDiscOffset
static const uint32_t kETLnDiscOffset
constants for the TDR ETL model
Definition: ETLDetId.h:33
ETLDetId::kETLnDiscMask
static const uint32_t kETLnDiscMask
Definition: ETLDetId.h:34
ETLDetId::kETLmodTypeMask
static const uint32_t kETLmodTypeMask
Definition: ETLDetId.h:26
ETLDetId::newForm
uint32_t newForm(const uint32_t &rawid)
Definition: ETLDetId.h:126
ETLDetId::kETLdiscSideMask
static const uint32_t kETLdiscSideMask
Definition: ETLDetId.h:36
ETLDetId::kETLoldToNewShift
static const uint32_t kETLoldToNewShift
Definition: ETLDetId.h:18
MTDDetId::kZsideMask
static const uint32_t kZsideMask
Definition: MTDDetId.h:32
MTDDetId::kMTDsubdMask
static const uint32_t kMTDsubdMask
Definition: MTDDetId.h:30
ETLDetId::encodeSector
uint32_t encodeSector(uint32_t &disc, uint32_t &discside, uint32_t &sector) const
Definition: ETLDetId.h:88
ETLDetId::kETLmodTypeOffset
static const uint32_t kETLmodTypeOffset
Definition: ETLDetId.h:25
TtSemiLepEvtBuilder_cfi.disc
disc
Definition: TtSemiLepEvtBuilder_cfi.py:60
ETLDetId::module
int module() const
Definition: ETLDetId.h:103
ETLDetId::kETLdiscSideOffset
static const uint32_t kETLdiscSideOffset
Definition: ETLDetId.h:35
ETLDetId::kETLformatV2
static const uint32_t kETLformatV2
Definition: ETLDetId.h:20
MTDDetId::zside
int zside() const
Definition: MTDDetId.h:61
ETLDetId::sector
int sector() const
Definition: ETLDetId.h:114
DetId::id_
uint32_t id_
Definition: DetId.h:69
FastTime
Definition: ForwardSubdetector.h:6
MTDDetId::kRodRingMask
static const uint32_t kRodRingMask
Definition: MTDDetId.h:34
MTDDetId::MTDDetId
MTDDetId()
Definition: MTDDetId.h:39
MTDDetId::kZsideOffset
static const uint32_t kZsideOffset
Definition: MTDDetId.h:31
MTDDetId::kMTDsubdOffset
static const uint32_t kMTDsubdOffset
Definition: MTDDetId.h:29
ETLDetId::kETLmoduleOffset
static const uint32_t kETLmoduleOffset
Definition: ETLDetId.h:23
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
ETLDetId::kETLmoduleMask
static const uint32_t kETLmoduleMask
Definition: ETLDetId.h:24
MTDDetId::kRodRingOffset
static const uint32_t kRodRingOffset
Definition: MTDDetId.h:33
ETLDetId::kSoff
static constexpr uint32_t kSoff
Definition: ETLDetId.h:49
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
ETLDetId::kETLoldFieldMask
static const uint32_t kETLoldFieldMask
Definition: ETLDetId.h:19
ETLDetId::kETLsectorMask
static const uint32_t kETLsectorMask
Definition: ETLDetId.h:37
DetId::Forward
Definition: DetId.h:30