CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions
HcalOtherDetId Class Reference

#include <HcalOtherDetId.h>

Inheritance diagram for HcalOtherDetId:
DetId HcalCalibDetId HcalDcsDetId

Public Member Functions

 HcalOtherDetId (const DetId &id)
 
HcalOtherDetIdoperator= (const DetId &id)
 
HcalOtherSubdetector subdet () const
 get the category 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...
 

Protected Member Functions

 HcalOtherDetId ()
 
 HcalOtherDetId (uint32_t rawid)
 
 HcalOtherDetId (HcalOtherSubdetector subdet)
 Constructor from signed ieta, iphi plus composite type and composite data. More...
 

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 Attributes inherited from DetId
uint32_t id_
 

Detailed Description

Detector id class which serves as base class for other HCAL-related det ids (cascaded from top bit).

Packing:

[31:28] Global det == HCAL [27:25] HCAL subdet == Other [24:20] Other subdet id [19:0] Available for use

Author
J. Mans - Minnesota

Definition at line 22 of file HcalOtherDetId.h.

Constructor & Destructor Documentation

HcalOtherDetId::HcalOtherDetId ( const DetId id)

Constructor from a generic cell id

Definition at line 15 of file HcalOtherDetId.cc.

References TauDecayModes::dec, DetId::det(), Exception, DetId::Hcal, HcalOther, DetId::id_, DetId::rawId(), and DetId::subdetId().

15  {
16  if (gen.det()!=Hcal || gen.subdetId()!=HcalOther) {
17  throw cms::Exception("Invalid DetId") << "Cannot initialize HcalOtherDetId from " << std::hex << gen.rawId() << std::dec;
18  }
19  id_=gen.rawId();
20 }
uint32_t id_
Definition: DetId.h:59
HcalOtherDetId::HcalOtherDetId ( )
protected

Constructor of a null id

Definition at line 4 of file HcalOtherDetId.cc.

Referenced by subdet().

4  {
5 }
HcalOtherDetId::HcalOtherDetId ( uint32_t  rawid)
explicitprotected

Constructor from a raw value

Definition at line 7 of file HcalOtherDetId.cc.

7  : DetId(rawid) {
8 }
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
HcalOtherDetId::HcalOtherDetId ( HcalOtherSubdetector  subdet)
protected

Constructor from signed ieta, iphi plus composite type and composite data.

Definition at line 10 of file HcalOtherDetId.cc.

References DetId::id_, and createfilelist::int.

11  : DetId(Hcal,HcalOther) {
12  id_|= (int(other_type&0x1F)<<20);
13 }
uint32_t id_
Definition: DetId.h:59
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30

Member Function Documentation

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

Assignment from a generic cell id

Definition at line 22 of file HcalOtherDetId.cc.

References TauDecayModes::dec, DetId::det(), Exception, DetId::Hcal, HcalOther, DetId::id_, DetId::rawId(), and DetId::subdetId().

22  {
23  if (gen.det()!=Hcal || gen.subdetId()!=HcalOther) {
24  throw cms::Exception("Invalid DetId") << "Cannot assign HcalOtherDetId from " << std::hex << gen.rawId() << std::dec;
25  }
26  id_=gen.rawId();
27  return *this;
28 }
uint32_t id_
Definition: DetId.h:59
HcalOtherSubdetector HcalOtherDetId::subdet ( ) const
inline