CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 = 24
 
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::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::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::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 DetId::id_, kHGCalLayerMask, kHGCalLayerOffset, kHGCalModuleUMask, kHGCalModuleUOffset, kHGCalModuleVMask, kHGCalModuleVOffset, kHGCalSectorMask, kHGCalSectorOffset, kHGCalTriggerClassIdentifierMask, kHGCalTriggerClassIdentifierOffset, kHGCalTriggerSubdetMask, kHGCalTriggerSubdetOffset, kHGCalTypeMask, kHGCalTypeOffset, kHGCalZsideMask, kHGCalZsideOffset, ModuleDetId, and zside().

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

Constructor from a generic det id

Definition at line 23 of file HGCalTriggerModuleDetId.cc.

References TauDecayModes::dec, DetId::det(), Exception, DetId::Forward, DetId::id_, DetId::null(), and DetId::rawId().

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

int HGCalTriggerModuleDetId::classId ( ) const
inline
int HGCalTriggerModuleDetId::eta ( ) const
inline
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
bool HGCalTriggerModuleDetId::isForward ( ) const
inline

Definition at line 80 of file HGCalTriggerModuleDetId.h.

80 { return true; }
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
bool HGCalTriggerModuleDetId::isHGCalBackendDetId ( ) const
inline

Definition at line 83 of file HGCalTriggerModuleDetId.h.

References BackendDetId, and classId().

bool HGCalTriggerModuleDetId::isHGCalModuleDetId ( ) const
inline

Definition at line 82 of file HGCalTriggerModuleDetId.h.

References classId(), and ModuleDetId.

bool HGCalTriggerModuleDetId::isHGCTrigger ( ) const
inline

Definition at line 81 of file HGCalTriggerModuleDetId.h.

81 { return true; }
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
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
int HGCalTriggerModuleDetId::layer ( ) const
inline
int HGCalTriggerModuleDetId::moduleU ( ) const
inline
int HGCalTriggerModuleDetId::moduleV ( ) const
inline
HGCalTriggerModuleDetId & HGCalTriggerModuleDetId::operator= ( const DetId id)

Assignment from a generic det id

Definition at line 33 of file HGCalTriggerModuleDetId.cc.

References TauDecayModes::dec, DetId::det(), Exception, DetId::Forward, DetId::id_, DetId::null(), and DetId::rawId().

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
int HGCalTriggerModuleDetId::phi ( ) const
inline
int HGCalTriggerModuleDetId::sector ( ) const
inline
int HGCalTriggerModuleDetId::triggerSubdetId ( ) const
inline
int HGCalTriggerModuleDetId::type ( ) const
inline
int HGCalTriggerModuleDetId::zside ( ) const
inline

Member Data Documentation

const int HGCalTriggerModuleDetId::kHGCalLayerMask = 0x1F
static
const int HGCalTriggerModuleDetId::kHGCalLayerOffset = 14
static
const int HGCalTriggerModuleDetId::kHGCalModuleUMask = 0xF
static
const int HGCalTriggerModuleDetId::kHGCalModuleUOffset = 0
static
const int HGCalTriggerModuleDetId::kHGCalModuleVMask = 0xF
static
const int HGCalTriggerModuleDetId::kHGCalModuleVOffset = 4
static
const int HGCalTriggerModuleDetId::kHGCalSectorMask = 0x3
static

Definition at line 92 of file HGCalTriggerModuleDetId.h.

Referenced by HGCalTriggerModuleDetId(), and sector().

const int HGCalTriggerModuleDetId::kHGCalSectorOffset = 8
static

Definition at line 91 of file HGCalTriggerModuleDetId.h.

Referenced by HGCalTriggerModuleDetId(), and sector().

const int HGCalTriggerModuleDetId::kHGCalTriggerClassIdentifierMask = 0x1
static

Definition at line 102 of file HGCalTriggerModuleDetId.h.

Referenced by classId(), and HGCalTriggerModuleDetId().

const int HGCalTriggerModuleDetId::kHGCalTriggerClassIdentifierOffset = 24
static

Definition at line 101 of file HGCalTriggerModuleDetId.h.

Referenced by classId(), and HGCalTriggerModuleDetId().

const int HGCalTriggerModuleDetId::kHGCalTriggerSubdetMask = 0x3
static
const int HGCalTriggerModuleDetId::kHGCalTriggerSubdetOffset = 22
static
const int HGCalTriggerModuleDetId::kHGCalTypeMask = 0x3
static

Definition at line 96 of file HGCalTriggerModuleDetId.h.

Referenced by HGCalTriggerModuleDetId(), and type().

const int HGCalTriggerModuleDetId::kHGCalTypeOffset = 19
static

Definition at line 95 of file HGCalTriggerModuleDetId.h.

Referenced by HGCalTriggerModuleDetId(), and type().

const int HGCalTriggerModuleDetId::kHGCalZsideMask = 0x1
static

Definition at line 98 of file HGCalTriggerModuleDetId.h.

Referenced by HGCalTriggerModuleDetId(), and zside().

const int HGCalTriggerModuleDetId::kHGCalZsideOffset = 24
static

Definition at line 97 of file HGCalTriggerModuleDetId.h.

Referenced by HGCalTriggerModuleDetId(), and zside().

const HGCalTriggerModuleDetId HGCalTriggerModuleDetId::Undefined
static

Definition at line 85 of file HGCalTriggerModuleDetId.h.