CMS 3D CMS Logo

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

Detector identifier base class for the MIP Timing Layer. More...

#include <MTDDetId.h>

Inheritance diagram for MTDDetId:
DetId BTLDetId ETLDetId

Public Types

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

 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 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 base class for the MIP Timing Layer.

bit 31-28: Detector Forward bit 27-25: Subdetctor FastTiming

bit 24-23: MTD subdetector BTL/ETL bit 22 : side (positive = 1, negative = 0) bit 21-16: rod/ring sequential number

Definition at line 21 of file MTDDetId.h.

Member Enumeration Documentation

◆ MTDType

Enumerated type for MTD sub-deteector systems.

Enumerator
typeUNKNOWN 
BTL 
ETL 

Definition at line 27 of file MTDDetId.h.

◆ SubDetector

Enumerated type for Forward sub-deteector systems.

Enumerator
subUNKNOWN 
FastTime 

Definition at line 24 of file MTDDetId.h.

Constructor & Destructor Documentation

◆ MTDDetId() [1/4]

MTDDetId::MTDDetId ( )
inline

Construct a null id

Definition at line 39 of file MTDDetId.h.

Referenced by ETLDetId::ETLDetId().

39 : DetId() { ; }
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38

◆ MTDDetId() [2/4]

MTDDetId::MTDDetId ( const uint32_t &  raw_id)
inline

Construct from a raw value

Definition at line 42 of file MTDDetId.h.

42 : DetId(raw_id) { ; }
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38

◆ MTDDetId() [3/4]

MTDDetId::MTDDetId ( const DetId det_id)
inline

Construct from generic DetId

Definition at line 45 of file MTDDetId.h.

45 : DetId(det_id.rawId()) { ; }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38

◆ MTDDetId() [4/4]

MTDDetId::MTDDetId ( Detector  det,
int  subdet 
)
inline

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

Definition at line 48 of file MTDDetId.h.

48 : DetId(det, subdet) { ; }
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38

Member Function Documentation

◆ mtdRR()

int MTDDetId::mtdRR ( ) const
inline

Returns MTD rod/ring number.

Definition at line 64 of file MTDDetId.h.

References DetId::id_, kRodRingMask, and kRodRingOffset.

Referenced by EtlLocalRecoValidation::analyze(), BtlLocalRecoValidation::analyze(), BTLDetId::geographicalId(), ETLDeviceSim::getHitsResponse(), BTLDetId::iphi(), and MTDTopology::orderETLSector().

64 { return (id_ >> kRodRingOffset) & kRodRingMask; }
static const uint32_t kRodRingOffset
Definition: MTDDetId.h:33
static const uint32_t kRodRingMask
Definition: MTDDetId.h:34
uint32_t id_
Definition: DetId.h:69

◆ mtdSide()

int MTDDetId::mtdSide ( ) const
inline

Returns MTD side, i.e. Z-=0 or Z+=1.

Definition at line 59 of file MTDDetId.h.

References DetId::id_, kZsideMask, and kZsideOffset.

Referenced by BtlLocalRecoValidation::analyze(), BTLDetId::geographicalId(), ETLDeviceSim::getHitsResponse(), and zside().

59 { return (id_ >> kZsideOffset) & kZsideMask; }
static const uint32_t kZsideOffset
Definition: MTDDetId.h:31
static const uint32_t kZsideMask
Definition: MTDDetId.h:32
uint32_t id_
Definition: DetId.h:69

◆ mtdSubDetector()

int MTDDetId::mtdSubDetector ( ) const
inline

Returns enumerated type specifying MTD sub-detector, i.e. BTL or ETL.

Definition at line 56 of file MTDDetId.h.

References DetId::id_, kMTDsubdMask, and kMTDsubdOffset.

Referenced by MTDGeomBuilderFromGeometricTimingDet::build(), MTDThresholdClusterizer::clusterize(), MTDThresholdClusterizer::copy_to_buffer(), MTDDetLayerGeometry::idToLayer(), and MTDGeometry::MTDGeometry().

56 { return (id_ >> kMTDsubdOffset) & kMTDsubdMask; }
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

◆ subDetector()

SubDetector MTDDetId::subDetector ( ) const
inline

Returns enumerated type specifying MTD sub-detector.

Definition at line 53 of file MTDDetId.h.

References DetId::subdetId().

Referenced by MTDThresholdClusterizer::clusterize().

53 { return static_cast<MTDDetId::SubDetector>(subdetId()); }
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
SubDetector
Definition: MTDDetId.h:24

◆ zside()

int MTDDetId::zside ( ) const
inline

Return MTD side, i.e. Z-=-1 or Z+=1.

Definition at line 61 of file MTDDetId.h.

References mtdSide().

Referenced by EtlDigiHitsValidation::analyze(), MtdTracksValidation::analyze(), EtlLocalRecoValidation::analyze(), BTLDetId::BTLDetId(), ETLDetId::ETLDetId(), BTLDetId::getUnhashedIndex(), BTLDetId::hashedIndex(), BTLDetId::ieta(), and BTLDetId::ietaAbs().

61 { return (mtdSide() == 1 ? (1) : (-1)); }
int mtdSide() const
Definition: MTDDetId.h:59

Member Data Documentation

◆ kMTDsubdMask

const uint32_t MTDDetId::kMTDsubdMask = 0x3
static

Definition at line 30 of file MTDDetId.h.

Referenced by BTLDetId::BTLDetId(), ETLDetId::ETLDetId(), and mtdSubDetector().

◆ kMTDsubdOffset

const uint32_t MTDDetId::kMTDsubdOffset = 23
static

Definition at line 29 of file MTDDetId.h.

Referenced by BTLDetId::BTLDetId(), ETLDetId::ETLDetId(), and mtdSubDetector().

◆ kRodRingMask

const uint32_t MTDDetId::kRodRingMask = 0x3F
static

◆ kRodRingOffset

const uint32_t MTDDetId::kRodRingOffset = 16
static

◆ kZsideMask

const uint32_t MTDDetId::kZsideMask = 0x1
static

Definition at line 32 of file MTDDetId.h.

Referenced by BTLDetId::BTLDetId(), ETLDetId::ETLDetId(), and mtdSide().

◆ kZsideOffset

const uint32_t MTDDetId::kZsideOffset = 22
static

Definition at line 31 of file MTDDetId.h.

Referenced by BTLDetId::BTLDetId(), ETLDetId::ETLDetId(), and mtdSide().