CMS 3D CMS Logo

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

#include <HGCalTriggerModuleDetId.h>

Inheritance diagram for HGCalTriggerModuleDetId:
DetId

Public Member Functions

int classId () const
 get the class More...
 
int eta () const
 get the scintillator panel eta More...
 
 HGCalTriggerModuleDetId ()
 
 HGCalTriggerModuleDetId (uint32_t rawid)
 
 HGCalTriggerModuleDetId (HGCalTriggerSubdetector subdet, int zp, int type, int layer, int sector, int moduleU, int moduleV)
 
 HGCalTriggerModuleDetId (const DetId &id)
 
bool isEE () const
 
bool isForward () const
 
bool isHFNose () const
 consistency check : no bits left => no overhead More...
 
bool isHGCalBackendDetId () const
 
bool isHGCalModuleDetId () const
 
bool isHGCTrigger () const
 
bool isHScintillator () const
 
bool isHSilicon () const
 
int layer () const
 get the layer # More...
 
int moduleU () const
 get the module U More...
 
int moduleV () const
 get the module V More...
 
HGCalTriggerModuleDetIdoperator= (const DetId &id)
 
int phi () const
 get the scintillator panel phi More...
 
int sector () const
 get the sector # More...
 
int triggerSubdetId () const
 get the trigger sub-detector More...
 
int type () const
 get the type More...
 
int zside () const
 get the z-side of the module (1/-1) More...
 
- 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 int kHGCalLayerMask = 0x1F
 
static const int kHGCalLayerOffset = 14
 
static const int kHGCalModuleUMask = 0xF
 
static const int kHGCalModuleUOffset = 0
 
static const int kHGCalModuleVMask = 0xF
 
static const int kHGCalModuleVOffset = 4
 
static const int kHGCalSectorMask = 0x3
 
static const int kHGCalSectorOffset = 8
 
static const int kHGCalTriggerClassIdentifierMask = 0x1
 
static const int kHGCalTriggerClassIdentifierOffset = 24
 
static const int kHGCalTriggerSubdetMask = 0x3
 
static const int kHGCalTriggerSubdetOffset = 22
 
static const int kHGCalTypeMask = 0x3
 
static const int kHGCalTypeOffset = 19
 
static const int kHGCalZsideMask = 0x1
 
static const int kHGCalZsideOffset = 21
 
static const HGCalTriggerModuleDetId Undefined
 
- 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

- 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

Definition at line 31 of file HGCalTriggerModuleDetId.h.

Constructor & Destructor Documentation

◆ HGCalTriggerModuleDetId() [1/4]

HGCalTriggerModuleDetId::HGCalTriggerModuleDetId ( )

Create a null module id

Definition at line 5 of file HGCalTriggerModuleDetId.cc.

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

◆ HGCalTriggerModuleDetId() [2/4]

HGCalTriggerModuleDetId::HGCalTriggerModuleDetId ( uint32_t  rawid)

Create module id from raw id (0=invalid id)

Definition at line 7 of file HGCalTriggerModuleDetId.cc.

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

◆ HGCalTriggerModuleDetId() [3/4]

HGCalTriggerModuleDetId::HGCalTriggerModuleDetId ( HGCalTriggerSubdetector  subdet,
int  zp,
int  type,
int  layer,
int  sector,
int  moduleU,
int  moduleV 
)

Constructor from subdetector, zplus, type, layer, sector, module numbers

Definition at line 9 of file HGCalTriggerModuleDetId.cc.

References Forward, DetId::id_, kHGCalLayerMask, kHGCalLayerOffset, kHGCalModuleUMask, kHGCalModuleUOffset, kHGCalModuleVMask, kHGCalModuleVOffset, kHGCalSectorMask, kHGCalSectorOffset, kHGCalTriggerClassIdentifierMask, kHGCalTriggerClassIdentifierOffset, kHGCalTriggerSubdetMask, kHGCalTriggerSubdetOffset, kHGCalTypeMask, kHGCalTypeOffset, kHGCalZsideMask, kHGCalZsideOffset, layer(), ModuleDetId, moduleU(), moduleV(), sector(), and zside().

13  int zside = (zp < 0) ? 1 : 0;
14 
15  id_ |=
21 }
int moduleU() const
get the module U
static const int kHGCalTriggerSubdetMask
static const int kHGCalTriggerClassIdentifierOffset
static const int kHGCalModuleVOffset
static const int kHGCalModuleUOffset
static const int kHGCalTriggerClassIdentifierMask
uint32_t id_
Definition: DetId.h:69
int moduleV() const
get the module V
int zside() const
get the z-side of the module (1/-1)
int layer() const
get the layer #
int sector() const
get the sector #
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38
static const int kHGCalTriggerSubdetOffset

◆ HGCalTriggerModuleDetId() [4/4]

HGCalTriggerModuleDetId::HGCalTriggerModuleDetId ( const DetId id)

Constructor from a generic det id

Definition at line 23 of file HGCalTriggerModuleDetId.cc.

References TauDecayModes::dec, Exception, DetId::Forward, and DetId::id_.

23  {
24  if (!gen.null()) {
25  if (gen.det() != Forward) {
26  throw cms::Exception("Invalid DetId")
27  << "Cannot initialize HGCalTriggerModuleDetId from " << std::hex << gen.rawId() << std::dec;
28  }
29  }
30  id_ = gen.rawId();
31 }
uint32_t id_
Definition: DetId.h:69

Member Function Documentation

◆ classId()

int HGCalTriggerModuleDetId::classId ( ) const
inline

◆ eta()

int HGCalTriggerModuleDetId::eta ( ) const
inline

◆ isEE()

bool HGCalTriggerModuleDetId::isEE ( ) const
inline

Definition at line 77 of file HGCalTriggerModuleDetId.h.

References HGCalEETrigger, and triggerSubdetId().

Referenced by HGCalTriggerTools::isEm().

77 { return (triggerSubdetId() == HGCalEETrigger); }
int triggerSubdetId() const
get the trigger sub-detector

◆ isForward()

bool HGCalTriggerModuleDetId::isForward ( ) const
inline

Definition at line 80 of file HGCalTriggerModuleDetId.h.

80 { return true; }

◆ isHFNose()

bool HGCalTriggerModuleDetId::isHFNose ( ) const
inline

consistency check : no bits left => no overhead

Definition at line 76 of file HGCalTriggerModuleDetId.h.

References HFNoseTrigger, and triggerSubdetId().

76 { return (triggerSubdetId() == HFNoseTrigger); }
int triggerSubdetId() const
get the trigger sub-detector

◆ isHGCalBackendDetId()

bool HGCalTriggerModuleDetId::isHGCalBackendDetId ( ) const
inline

Definition at line 83 of file HGCalTriggerModuleDetId.h.

References BackendDetId, and classId().

◆ isHGCalModuleDetId()

bool HGCalTriggerModuleDetId::isHGCalModuleDetId ( ) const
inline

Definition at line 82 of file HGCalTriggerModuleDetId.h.

References classId(), and ModuleDetId.

◆ isHGCTrigger()

bool HGCalTriggerModuleDetId::isHGCTrigger ( ) const
inline

Definition at line 81 of file HGCalTriggerModuleDetId.h.

81 { return true; }

◆ isHScintillator()

bool HGCalTriggerModuleDetId::isHScintillator ( ) const
inline

Definition at line 79 of file HGCalTriggerModuleDetId.h.

References HGCalHScTrigger, and triggerSubdetId().

79 { return (triggerSubdetId() == HGCalHScTrigger); }
int triggerSubdetId() const
get the trigger sub-detector

◆ isHSilicon()

bool HGCalTriggerModuleDetId::isHSilicon ( ) const
inline

Definition at line 78 of file HGCalTriggerModuleDetId.h.

References HGCalHSiTrigger, and triggerSubdetId().

78 { return (triggerSubdetId() == HGCalHSiTrigger); }
int triggerSubdetId() const
get the trigger sub-detector

◆ layer()

int HGCalTriggerModuleDetId::layer ( ) const
inline

◆ moduleU()

int HGCalTriggerModuleDetId::moduleU ( ) const
inline

◆ moduleV()

int HGCalTriggerModuleDetId::moduleV ( ) const
inline

◆ operator=()

HGCalTriggerModuleDetId & HGCalTriggerModuleDetId::operator= ( const DetId id)

Assignment from a generic det id

Definition at line 33 of file HGCalTriggerModuleDetId.cc.

References TauDecayModes::dec, Exception, DetId::Forward, and DetId::id_.

33  {
34  if (!gen.null()) {
35  if (gen.det() != Forward) {
36  throw cms::Exception("Invalid DetId")
37  << "Cannot assign HGCalTriggerModuleDetId from " << std::hex << gen.rawId() << std::dec;
38  }
39  }
40  id_ = gen.rawId();
41  return (*this);
42 }
uint32_t id_
Definition: DetId.h:69

◆ phi()

int HGCalTriggerModuleDetId::phi ( ) const
inline

◆ sector()

int HGCalTriggerModuleDetId::sector ( ) const
inline

◆ triggerSubdetId()

int HGCalTriggerModuleDetId::triggerSubdetId ( ) const
inline

◆ type()

int HGCalTriggerModuleDetId::type ( ) const
inline

◆ zside()

int HGCalTriggerModuleDetId::zside ( ) const
inline

Member Data Documentation

◆ kHGCalLayerMask

const int HGCalTriggerModuleDetId::kHGCalLayerMask = 0x1F
static

◆ kHGCalLayerOffset

const int HGCalTriggerModuleDetId::kHGCalLayerOffset = 14
static

◆ kHGCalModuleUMask

const int HGCalTriggerModuleDetId::kHGCalModuleUMask = 0xF
static

◆ kHGCalModuleUOffset

const int HGCalTriggerModuleDetId::kHGCalModuleUOffset = 0
static

◆ kHGCalModuleVMask

const int HGCalTriggerModuleDetId::kHGCalModuleVMask = 0xF
static

◆ kHGCalModuleVOffset

const int HGCalTriggerModuleDetId::kHGCalModuleVOffset = 4
static

◆ kHGCalSectorMask

const int HGCalTriggerModuleDetId::kHGCalSectorMask = 0x3
static

Definition at line 92 of file HGCalTriggerModuleDetId.h.

Referenced by HGCalTriggerModuleDetId(), and sector().

◆ kHGCalSectorOffset

const int HGCalTriggerModuleDetId::kHGCalSectorOffset = 8
static

Definition at line 91 of file HGCalTriggerModuleDetId.h.

Referenced by HGCalTriggerModuleDetId(), and sector().

◆ kHGCalTriggerClassIdentifierMask

const int HGCalTriggerModuleDetId::kHGCalTriggerClassIdentifierMask = 0x1
static

Definition at line 102 of file HGCalTriggerModuleDetId.h.

Referenced by classId(), and HGCalTriggerModuleDetId().

◆ kHGCalTriggerClassIdentifierOffset

const int HGCalTriggerModuleDetId::kHGCalTriggerClassIdentifierOffset = 24
static

Definition at line 101 of file HGCalTriggerModuleDetId.h.

Referenced by classId(), and HGCalTriggerModuleDetId().

◆ kHGCalTriggerSubdetMask

const int HGCalTriggerModuleDetId::kHGCalTriggerSubdetMask = 0x3
static

◆ kHGCalTriggerSubdetOffset

const int HGCalTriggerModuleDetId::kHGCalTriggerSubdetOffset = 22
static

◆ kHGCalTypeMask

const int HGCalTriggerModuleDetId::kHGCalTypeMask = 0x3
static

Definition at line 96 of file HGCalTriggerModuleDetId.h.

Referenced by HGCalTriggerModuleDetId(), and type().

◆ kHGCalTypeOffset

const int HGCalTriggerModuleDetId::kHGCalTypeOffset = 19
static

Definition at line 95 of file HGCalTriggerModuleDetId.h.

Referenced by HGCalTriggerModuleDetId(), and type().

◆ kHGCalZsideMask

const int HGCalTriggerModuleDetId::kHGCalZsideMask = 0x1
static

Definition at line 98 of file HGCalTriggerModuleDetId.h.

Referenced by HGCalTriggerModuleDetId(), and zside().

◆ kHGCalZsideOffset

const int HGCalTriggerModuleDetId::kHGCalZsideOffset = 21
static

Definition at line 97 of file HGCalTriggerModuleDetId.h.

Referenced by HGCalTriggerModuleDetId(), and zside().

◆ Undefined

const HGCalTriggerModuleDetId HGCalTriggerModuleDetId::Undefined
static

Definition at line 85 of file HGCalTriggerModuleDetId.h.