CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
Detector det () const
 get the detector field from this detid More...
 
 DetId ()
 Create an empty or null id (also for persistence) More...
 
 DetId (uint32_t id)
 Create an id from a raw number. More...
 
 DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
bool null () const
 is this a null id ? More...
 
 operator uint32_t () const
 
bool operator!= (DetId id) const
 inequality More...
 
uint32_t operator() () const
 
bool operator< (DetId id) const
 comparison More...
 
bool operator== (DetId id) const
 equality More...
 
uint32_t rawId () const
 get the raw id More...
 
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
}
 
- Static Public Attributes inherited from DetId
static const int kDetOffset = 28
 
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:55
HcalOtherDetId::HcalOtherDetId ( )
protected

Constructor of a null id

Definition at line 4 of file HcalOtherDetId.cc.

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 }
DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:26
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_.

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

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:55
HcalOtherSubdetector HcalOtherDetId::subdet ( ) const
inline