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 (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
constexpr DetId (uint32_t id)
 Create an id from a raw number. 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 (HcalOtherSubdetector subdet)
 Constructor from signed ieta, iphi plus composite type and composite data. More...
 
 HcalOtherDetId (uint32_t rawid)
 

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() [1/4]

HcalOtherDetId::HcalOtherDetId ( const DetId id)

Constructor from a generic cell id

Definition at line 12 of file HcalOtherDetId.cc.

12  {
13  if (gen.det() != Hcal || gen.subdetId() != HcalOther) {
14  throw cms::Exception("Invalid DetId")
15  << "Cannot initialize HcalOtherDetId from " << std::hex << gen.rawId() << std::dec;
16  }
17  id_ = gen.rawId();
18 }

References TauDecayModes::dec, Exception, DetId::Hcal, HcalOther, and DetId::id_.

◆ HcalOtherDetId() [2/4]

HcalOtherDetId::HcalOtherDetId ( )
protected

Constructor of a null id

Definition at line 4 of file HcalOtherDetId.cc.

4 {}

◆ HcalOtherDetId() [3/4]

HcalOtherDetId::HcalOtherDetId ( uint32_t  rawid)
explicitprotected

Constructor from a raw value

Definition at line 6 of file HcalOtherDetId.cc.

6 : DetId(rawid) {}

◆ HcalOtherDetId() [4/4]

HcalOtherDetId::HcalOtherDetId ( HcalOtherSubdetector  subdet)
protected

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

Definition at line 8 of file HcalOtherDetId.cc.

8  : DetId(Hcal, HcalOther) {
9  id_ |= (int(other_type & 0x1F) << 20);
10 }

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

Member Function Documentation

◆ operator=()

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

Assignment from a generic cell id

Definition at line 20 of file HcalOtherDetId.cc.

20  {
21  if (gen.det() != Hcal || gen.subdetId() != HcalOther) {
22  throw cms::Exception("Invalid DetId")
23  << "Cannot assign HcalOtherDetId from " << std::hex << gen.rawId() << std::dec;
24  }
25  id_ = gen.rawId();
26  return *this;
27 }

References TauDecayModes::dec, Exception, DetId::Hcal, HcalOther, and DetId::id_.

◆ subdet()

HcalOtherSubdetector HcalOtherDetId::subdet ( ) const
inline
HcalOther
Definition: HcalAssistant.h:38
DetId::Hcal
Definition: DetId.h:28
gen
Definition: PythiaDecays.h:13
HcalOtherSubdetector
HcalOtherSubdetector
Definition: HcalAssistant.h:40
DetId::id_
uint32_t id_
Definition: DetId.h:69
createfilelist.int
int
Definition: createfilelist.py:10
Exception
Definition: hltDiff.cc:245
DetId::DetId
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142