CMS 3D CMS Logo

List of all members | Public Member Functions | Static Private 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 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)
 
int crystal () const
 
int modType () const
 
int module () 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
 
- 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 Private Attributes

static const uint32_t kBTLCrystalMask = 0x3F
 
static const uint32_t kBTLCrystalOffset = 0
 
static const uint32_t kBTLmodTypeMask = 0x3
 
static const uint32_t kBTLmodTypeOffset = 8
 
static const uint32_t kBTLmoduleMask = 0x3F
 
static const uint32_t kBTLmoduleOffset = 10
 

Additional Inherited Members

- 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
}
 
- 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
 
- Protected Types inherited from MTDDetId
enum  MTDType { typeUNKNOWN =0, BTL =1, ETL =2 }
 
enum  SubDetector { subUNKNOWN =0, FastTime =1 }
 
- Protected Attributes inherited from DetId
uint32_t id_
 
- Static Protected 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
 

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-0 : crystal sequential number within a module ( 0 - 63 )

Definition at line 17 of file BTLDetId.h.

Constructor & Destructor Documentation

BTLDetId::BTLDetId ( )
inline

Construct a null id

Definition at line 33 of file BTLDetId.h.

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

MTDDetId()
Definition: MTDDetId.h:43
static const uint32_t kMTDsubdOffset
Definition: MTDDetId.h:31
static const uint32_t kMTDsubdMask
Definition: MTDDetId.h:32
uint32_t id_
Definition: DetId.h:59
BTLDetId::BTLDetId ( const uint32_t &  raw_id)
inline

Construct from a raw value

Definition at line 36 of file BTLDetId.h.

36 : MTDDetId( raw_id ) {;}
MTDDetId()
Definition: MTDDetId.h:43
BTLDetId::BTLDetId ( const DetId det_id)
inline

Construct from generic DetId

Definition at line 39 of file BTLDetId.h.

39 : MTDDetId( det_id.rawId() ) {;}
MTDDetId()
Definition: MTDDetId.h:43
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:47
BTLDetId::BTLDetId ( uint32_t  zside,
uint32_t  rod,
uint32_t  module,
uint32_t  modtyp,
uint32_t  crystal 
)
inline

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

Definition at line 42 of file BTLDetId.h.

References DetId::id_, kBTLCrystalMask, kBTLmodTypeMask, MTDDetId::kMTDsubdMask, MTDDetId::kMTDsubdOffset, MTDDetId::kRodRingMask, MTDDetId::kRodRingOffset, MTDDetId::kZsideMask, and MTDDetId::kZsideOffset.

47  id_ |= ( MTDType::BTL& kMTDsubdMask ) << kMTDsubdOffset |
48  ( zside& kZsideMask ) << kZsideOffset |
49  ( rod& kRodRingMask ) << kRodRingOffset |
51  ( modtyp& kBTLmodTypeMask ) << kBTLmodTypeOffset |
53 }
static const uint32_t kBTLmodTypeMask
Definition: BTLDetId.h:24
static const uint32_t kRodRingOffset
Definition: MTDDetId.h:35
MTDDetId()
Definition: MTDDetId.h:43
static const uint32_t kBTLCrystalOffset
Definition: BTLDetId.h:25
static const uint32_t kBTLmoduleMask
Definition: BTLDetId.h:22
int zside(DetId const &)
static const uint32_t kZsideOffset
Definition: MTDDetId.h:33
static const uint32_t kMTDsubdOffset
Definition: MTDDetId.h:31
static const uint32_t kBTLCrystalMask
Definition: BTLDetId.h:26
static const uint32_t kRodRingMask
Definition: MTDDetId.h:36
static const uint32_t kBTLmoduleOffset
Definition: BTLDetId.h:21
static const uint32_t kMTDsubdMask
Definition: MTDDetId.h:32
static const uint32_t kZsideMask
Definition: MTDDetId.h:34
uint32_t id_
Definition: DetId.h:59
static const uint32_t kBTLmodTypeOffset
Definition: BTLDetId.h:23
Definition: vlib.h:208
int crystal() const
Definition: BTLDetId.h:64

Member Function Documentation

int BTLDetId::crystal ( ) const
inline

Returns BTL crystal number.

Definition at line 64 of file BTLDetId.h.

References DetId::id_, and operator<<().

64 { return ((id_>>kBTLCrystalOffset)&kBTLCrystalMask) + 1; }
static const uint32_t kBTLCrystalOffset
Definition: BTLDetId.h:25
static const uint32_t kBTLCrystalMask
Definition: BTLDetId.h:26
uint32_t id_
Definition: DetId.h:59
int BTLDetId::modType ( ) const
inline

Returns BTL crystal type number.

Definition at line 61 of file BTLDetId.h.

References DetId::id_, and kBTLmodTypeMask.

static const uint32_t kBTLmodTypeMask
Definition: BTLDetId.h:24
uint32_t id_
Definition: DetId.h:59
static const uint32_t kBTLmodTypeOffset
Definition: BTLDetId.h:23
int BTLDetId::module ( ) const
inline

Returns BTL module number.

Definition at line 58 of file BTLDetId.h.

References DetId::id_, and kBTLmoduleMask.

58 { return (id_>>kBTLmoduleOffset)&kBTLmoduleMask; }
static const uint32_t kBTLmoduleMask
Definition: BTLDetId.h:22
static const uint32_t kBTLmoduleOffset
Definition: BTLDetId.h:21
uint32_t id_
Definition: DetId.h:59

Member Data Documentation

const uint32_t BTLDetId::kBTLCrystalMask = 0x3F
staticprivate

Definition at line 26 of file BTLDetId.h.

Referenced by BTLDetId().

const uint32_t BTLDetId::kBTLCrystalOffset = 0
staticprivate

Definition at line 25 of file BTLDetId.h.

const uint32_t BTLDetId::kBTLmodTypeMask = 0x3
staticprivate

Definition at line 24 of file BTLDetId.h.

Referenced by BTLDetId(), and modType().

const uint32_t BTLDetId::kBTLmodTypeOffset = 8
staticprivate

Definition at line 23 of file BTLDetId.h.

const uint32_t BTLDetId::kBTLmoduleMask = 0x3F
staticprivate

Definition at line 22 of file BTLDetId.h.

Referenced by module().

const uint32_t BTLDetId::kBTLmoduleOffset = 10
staticprivate

Definition at line 21 of file BTLDetId.h.