CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes
BTLDetId Class Reference

Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0, copy number must be scaled by 1 unit. More...

#include <BTLDetId.h>

Inheritance diagram for BTLDetId:
MTDDetId DetId

Public Types

enum  CrysLayout {
  CrysLayout::tile = 1, CrysLayout::bar = 2, CrysLayout::barzflat = 3, CrysLayout::barphiflat = 4,
  CrysLayout::v2 = 5
}
 
- 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
}
 

Public Member Functions

 BTLDetId ()
 
 BTLDetId (const uint32_t &raw_id)
 
 BTLDetId (const DetId &det_id)
 
 BTLDetId (uint32_t zside, uint32_t rod, uint32_t module, uint32_t modtyp, uint32_t crystal)
 
 BTLDetId (uint32_t zside, uint32_t rod, uint32_t runit, uint32_t module, uint32_t modtyp, uint32_t crystal)
 
int column (unsigned nrows=kCrystalsPerModuleV2) const
 
int crystal () const
 
BTLDetId geographicalId (CrysLayout lay) const
 
int modType () const
 
int module () const
 
int row (unsigned nrows=kCrystalsPerModuleV2) const
 
int runit () const
 
- Public Member Functions inherited from MTDDetId
 MTDDetId ()
 
 MTDDetId (const uint32_t &raw_id)
 
 MTDDetId (const DetId &det_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 (uint32_t id)
 Create an id from a raw number. More...
 
constexpr DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. 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 constexpr uint32_t HALF_ROD = 36
 range constants, need two sets for the time being (one for tiles and one for bars) More...
 
static constexpr uint32_t kBTLCrystalMask = 0x3F
 
static constexpr uint32_t kBTLCrystalOffset = 0
 
static constexpr uint32_t kBTLmodTypeMask = 0x3
 
static constexpr uint32_t kBTLmodTypeOffset = 8
 
static constexpr uint32_t kBTLmoduleMask = 0x3F
 
static constexpr uint32_t kBTLmoduleOffset = 10
 
static constexpr uint32_t kBTLRUMask = 0x3
 
static constexpr uint32_t kBTLRUOffset = 6
 
static constexpr uint32_t kCrystalsBTL
 
static constexpr uint32_t kCrystalsPerModuleV2 = 16
 
static constexpr uint32_t kCrystalTypes = 3
 
static constexpr uint32_t kModulePerTypeBarPhiFlat = 48 / 3
 
static constexpr uint32_t kModulesPerRODBarPhiFlat = 48
 
static constexpr uint32_t kModulesPerRUV2 = 24
 
static constexpr uint32_t kModulesPerTrkV2 = 3
 
static constexpr uint32_t kRUPerTypeV2 = 2
 
- 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
 

Additional Inherited Members

- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0, copy number must be scaled by 1 unit.

bit 15-10: module sequential number bit 9-8 : crystal type (1 - 3) bit 7-6 : readout unit sequential number within a type ( 1 - 2 ) bit 5-0 : crystal sequential number within a module ( 0 - 15 )

Definition at line 19 of file BTLDetId.h.

Member Enumeration Documentation

◆ CrysLayout

enum BTLDetId::CrysLayout
strong
Enumerator
tile 
bar 
barzflat 
barphiflat 
v2 

Definition at line 46 of file BTLDetId.h.

Constructor & Destructor Documentation

◆ BTLDetId() [1/5]

BTLDetId::BTLDetId ( )
inline

Construct a null id

Definition at line 51 of file BTLDetId.h.

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

Referenced by geographicalId().

52  id_ |= (MTDType::BTL & kMTDsubdMask) << kMTDsubdOffset;
53  }
MTDDetId()
Definition: MTDDetId.h:39
static const uint32_t kMTDsubdOffset
Definition: MTDDetId.h:29
static const uint32_t kMTDsubdMask
Definition: MTDDetId.h:30
uint32_t id_
Definition: DetId.h:69

◆ BTLDetId() [2/5]

BTLDetId::BTLDetId ( const uint32_t &  raw_id)
inline

Construct from a raw value

Definition at line 56 of file BTLDetId.h.

56 : MTDDetId(raw_id) { ; }
MTDDetId()
Definition: MTDDetId.h:39

◆ BTLDetId() [3/5]

BTLDetId::BTLDetId ( const DetId det_id)
inline

Construct from generic DetId

Definition at line 59 of file BTLDetId.h.

59 : MTDDetId(det_id.rawId()) { ; }
MTDDetId()
Definition: MTDDetId.h:39
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ BTLDetId() [4/5]

BTLDetId::BTLDetId ( uint32_t  zside,
uint32_t  rod,
uint32_t  module,
uint32_t  modtyp,
uint32_t  crystal 
)
inline

Construct from complete geometry information, v1

Definition at line 62 of file BTLDetId.h.

References crystal(), DetId::id_, kBTLCrystalMask, kBTLCrystalOffset, kBTLmodTypeMask, kBTLmodTypeOffset, kBTLmoduleMask, kBTLmoduleOffset, MTDDetId::kMTDsubdMask, MTDDetId::kMTDsubdOffset, MTDDetId::kRodRingMask, MTDDetId::kRodRingOffset, MTDDetId::kZsideMask, MTDDetId::kZsideOffset, and MTDDetId::zside().

64  id_ |= (MTDType::BTL & kMTDsubdMask) << kMTDsubdOffset | (zside & kZsideMask) << kZsideOffset |
67  }
static const uint32_t kRodRingOffset
Definition: MTDDetId.h:33
MTDDetId()
Definition: MTDDetId.h:39
static constexpr uint32_t kBTLmodTypeOffset
Definition: BTLDetId.h:23
static constexpr uint32_t kBTLmodTypeMask
Definition: BTLDetId.h:24
static const uint32_t kZsideOffset
Definition: MTDDetId.h:31
static const uint32_t kMTDsubdOffset
Definition: MTDDetId.h:29
static const uint32_t kRodRingMask
Definition: MTDDetId.h:34
static constexpr uint32_t kBTLmoduleOffset
Definition: BTLDetId.h:21
static const uint32_t kMTDsubdMask
Definition: MTDDetId.h:30
static const uint32_t kZsideMask
Definition: MTDDetId.h:32
uint32_t id_
Definition: DetId.h:69
int zside() const
Definition: MTDDetId.h:61
static constexpr uint32_t kBTLCrystalOffset
Definition: BTLDetId.h:27
static constexpr uint32_t kBTLmoduleMask
Definition: BTLDetId.h:22
int crystal() const
Definition: BTLDetId.h:87
static constexpr uint32_t kBTLCrystalMask
Definition: BTLDetId.h:28

◆ BTLDetId() [5/5]

BTLDetId::BTLDetId ( uint32_t  zside,
uint32_t  rod,
uint32_t  runit,
uint32_t  module,
uint32_t  modtyp,
uint32_t  crystal 
)
inline

Construct from complete geometry information, v2

Definition at line 70 of file BTLDetId.h.

References crystal(), DetId::id_, kBTLCrystalMask, kBTLCrystalOffset, kBTLmodTypeMask, kBTLmodTypeOffset, kBTLmoduleMask, kBTLmoduleOffset, kBTLRUMask, kBTLRUOffset, MTDDetId::kMTDsubdMask, MTDDetId::kMTDsubdOffset, MTDDetId::kRodRingMask, MTDDetId::kRodRingOffset, MTDDetId::kZsideMask, MTDDetId::kZsideOffset, runit(), and MTDDetId::zside().

72  id_ |= (MTDType::BTL & kMTDsubdMask) << kMTDsubdOffset | (zside & kZsideMask) << kZsideOffset |
76  }
static const uint32_t kRodRingOffset
Definition: MTDDetId.h:33
MTDDetId()
Definition: MTDDetId.h:39
static constexpr uint32_t kBTLmodTypeOffset
Definition: BTLDetId.h:23
static constexpr uint32_t kBTLmodTypeMask
Definition: BTLDetId.h:24
static const uint32_t kZsideOffset
Definition: MTDDetId.h:31
static const uint32_t kMTDsubdOffset
Definition: MTDDetId.h:29
static constexpr uint32_t kBTLRUOffset
Definition: BTLDetId.h:25
static const uint32_t kRodRingMask
Definition: MTDDetId.h:34
static constexpr uint32_t kBTLRUMask
Definition: BTLDetId.h:26
static constexpr uint32_t kBTLmoduleOffset
Definition: BTLDetId.h:21
static const uint32_t kMTDsubdMask
Definition: MTDDetId.h:30
static const uint32_t kZsideMask
Definition: MTDDetId.h:32
uint32_t id_
Definition: DetId.h:69
int runit() const
Definition: BTLDetId.h:90
int zside() const
Definition: MTDDetId.h:61
static constexpr uint32_t kBTLCrystalOffset
Definition: BTLDetId.h:27
static constexpr uint32_t kBTLmoduleMask
Definition: BTLDetId.h:22
int crystal() const
Definition: BTLDetId.h:87
static constexpr uint32_t kBTLCrystalMask
Definition: BTLDetId.h:28

Member Function Documentation

◆ column()

int BTLDetId::column ( unsigned  nrows = kCrystalsPerModuleV2) const
inline

return the column in GeomDetLanguage

Definition at line 98 of file BTLDetId.h.

References crystal().

Referenced by BTLDeviceSim::getHitsResponse().

98 { return (crystal() - 1) / nrows; }
int crystal() const
Definition: BTLDetId.h:87

◆ crystal()

int BTLDetId::crystal ( ) const
inline

Returns BTL crystal number.

Definition at line 87 of file BTLDetId.h.

References DetId::id_, kBTLCrystalMask, and kBTLCrystalOffset.

Referenced by BTLDetId(), column(), mtd::MTDGeomUtil::crystalInModule(), and row().

87 { return ((id_ >> kBTLCrystalOffset) & kBTLCrystalMask) + 1; }
uint32_t id_
Definition: DetId.h:69
static constexpr uint32_t kBTLCrystalOffset
Definition: BTLDetId.h:27
static constexpr uint32_t kBTLCrystalMask
Definition: BTLDetId.h:28

◆ geographicalId()

BTLDetId BTLDetId::geographicalId ( CrysLayout  lay) const

create a Geographical DetId for Tracking

Definition at line 3 of file BTLDetId.cc.

References barphiflat, BTLDetId(), kCrystalsPerModuleV2, kModulePerTypeBarPhiFlat, modType(), module(), MTDDetId::mtdRR(), MTDDetId::mtdSide(), runit(), and v2.

Referenced by BTLDeviceSim::getHitsResponse(), MTDTimeCalib::getTimeCalib(), and BTLNumberingScheme::getUnitID().

3  {
4  // For tracking geometry navigation
5 
6  if (lay == CrysLayout::barphiflat) {
7  // barphiflat: count modules in a rod, combining all types
8  return BTLDetId(mtdSide(), mtdRR(), module() + kModulePerTypeBarPhiFlat * (modType() - 1), 0, 1);
9  } else if (lay == CrysLayout::v2) {
10  // v2: set number of crystals to 17 to distinguish from crystal BTLDetId
11  return BTLDetId(mtdSide(), mtdRR(), runit(), module(), modType(), kCrystalsPerModuleV2 + 1);
12  }
13 
14  return 0;
15 }
static constexpr uint32_t kModulePerTypeBarPhiFlat
Definition: BTLDetId.h:33
int mtdSide() const
Definition: MTDDetId.h:59
int modType() const
Definition: BTLDetId.h:84
BTLDetId()
Definition: BTLDetId.h:51
int mtdRR() const
Definition: MTDDetId.h:64
int module() const
Definition: BTLDetId.h:81
int runit() const
Definition: BTLDetId.h:90
static constexpr uint32_t kCrystalsPerModuleV2
Definition: BTLDetId.h:36

◆ modType()

int BTLDetId::modType ( ) const
inline

Returns BTL crystal type number.

Definition at line 84 of file BTLDetId.h.

References DetId::id_, kBTLmodTypeMask, and kBTLmodTypeOffset.

Referenced by geographicalId().

84 { return (id_ >> kBTLmodTypeOffset) & kBTLmodTypeMask; }
static constexpr uint32_t kBTLmodTypeOffset
Definition: BTLDetId.h:23
static constexpr uint32_t kBTLmodTypeMask
Definition: BTLDetId.h:24
uint32_t id_
Definition: DetId.h:69

◆ module()

int BTLDetId::module ( ) const
inline

Returns BTL module number.

Definition at line 81 of file BTLDetId.h.

References DetId::id_, kBTLmoduleMask, and kBTLmoduleOffset.

Referenced by geographicalId(), and mtd::MTDGeomUtil::module().

81 { return (id_ >> kBTLmoduleOffset) & kBTLmoduleMask; }
static constexpr uint32_t kBTLmoduleOffset
Definition: BTLDetId.h:21
uint32_t id_
Definition: DetId.h:69
static constexpr uint32_t kBTLmoduleMask
Definition: BTLDetId.h:22

◆ row()

int BTLDetId::row ( unsigned  nrows = kCrystalsPerModuleV2) const
inline

return the row in GeomDet language

Definition at line 93 of file BTLDetId.h.

References crystal().

Referenced by BTLDeviceSim::getHitsResponse().

93  {
94  return (crystal() - 1) % nrows; // anything else for now
95  }
int crystal() const
Definition: BTLDetId.h:87

◆ runit()

int BTLDetId::runit ( ) const
inline

Returns BTL readout unit number per type.

Definition at line 90 of file BTLDetId.h.

References DetId::id_, kBTLRUMask, and kBTLRUOffset.

Referenced by BTLDetId(), and geographicalId().

90 { return (id_ >> kBTLRUOffset) & kBTLRUMask; }
static constexpr uint32_t kBTLRUOffset
Definition: BTLDetId.h:25
static constexpr uint32_t kBTLRUMask
Definition: BTLDetId.h:26
uint32_t id_
Definition: DetId.h:69

Member Data Documentation

◆ HALF_ROD

constexpr uint32_t BTLDetId::HALF_ROD = 36
static

range constants, need two sets for the time being (one for tiles and one for bars)

Definition at line 31 of file BTLDetId.h.

Referenced by BTLDetLayerGeometryBuilder::buildLayers(), and BTLNumberingScheme::getUnitID().

◆ kBTLCrystalMask

constexpr uint32_t BTLDetId::kBTLCrystalMask = 0x3F
static

Definition at line 28 of file BTLDetId.h.

Referenced by BTLDetId(), and crystal().

◆ kBTLCrystalOffset

constexpr uint32_t BTLDetId::kBTLCrystalOffset = 0
static

Definition at line 27 of file BTLDetId.h.

Referenced by BTLDetId(), and crystal().

◆ kBTLmodTypeMask

constexpr uint32_t BTLDetId::kBTLmodTypeMask = 0x3
static

Definition at line 24 of file BTLDetId.h.

Referenced by BTLDetId(), and modType().

◆ kBTLmodTypeOffset

constexpr uint32_t BTLDetId::kBTLmodTypeOffset = 8
static

Definition at line 23 of file BTLDetId.h.

Referenced by BTLDetId(), and modType().

◆ kBTLmoduleMask

constexpr uint32_t BTLDetId::kBTLmoduleMask = 0x3F
static

Definition at line 22 of file BTLDetId.h.

Referenced by BTLDetId(), and module().

◆ kBTLmoduleOffset

constexpr uint32_t BTLDetId::kBTLmoduleOffset = 10
static

Definition at line 21 of file BTLDetId.h.

Referenced by BTLDetId(), and module().

◆ kBTLRUMask

constexpr uint32_t BTLDetId::kBTLRUMask = 0x3
static

Definition at line 26 of file BTLDetId.h.

Referenced by BTLDetId(), and runit().

◆ kBTLRUOffset

constexpr uint32_t BTLDetId::kBTLRUOffset = 6
static

Definition at line 25 of file BTLDetId.h.

Referenced by BTLDetId(), and runit().

◆ kCrystalsBTL

constexpr uint32_t BTLDetId::kCrystalsBTL
static

◆ kCrystalsPerModuleV2

constexpr uint32_t BTLDetId::kCrystalsPerModuleV2 = 16
static

Definition at line 36 of file BTLDetId.h.

Referenced by geographicalId(), and BTLNumberingScheme::getUnitID().

◆ kCrystalTypes

constexpr uint32_t BTLDetId::kCrystalTypes = 3
static

Definition at line 38 of file BTLDetId.h.

Referenced by BTLDetLayerGeometryBuilder::buildLayers().

◆ kModulePerTypeBarPhiFlat

constexpr uint32_t BTLDetId::kModulePerTypeBarPhiFlat = 48 / 3
static

Definition at line 33 of file BTLDetId.h.

Referenced by geographicalId().

◆ kModulesPerRODBarPhiFlat

constexpr uint32_t BTLDetId::kModulesPerRODBarPhiFlat = 48
static

Definition at line 32 of file BTLDetId.h.

Referenced by BTLDetLayerGeometryBuilder::buildLayers().

◆ kModulesPerRUV2

constexpr uint32_t BTLDetId::kModulesPerRUV2 = 24
static

◆ kModulesPerTrkV2

constexpr uint32_t BTLDetId::kModulesPerTrkV2 = 3
static

Definition at line 37 of file BTLDetId.h.

Referenced by BTLDetLayerGeometryBuilder::buildLayers().

◆ kRUPerTypeV2

constexpr uint32_t BTLDetId::kRUPerTypeV2 = 2
static