CMS 3D CMS Logo

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

#include <EcalPnDiodeDetId.h>

Inheritance diagram for EcalPnDiodeDetId:
DetId

Public Member Functions

 EcalPnDiodeDetId ()
 
 EcalPnDiodeDetId (uint32_t rawid)
 
 EcalPnDiodeDetId (int EcalSubDetectorId, int DCCId, int PnId)
 Constructor from signed EcalSubDetectorId, DCCId, PnId. More...
 
 EcalPnDiodeDetId (const DetId &id)
 
int hashedIndex () const
 get a compact index for arrays [TODO: NEEDS WORK] More...
 
int iDCCId () const
 get the DCCId More...
 
int iEcalSubDetectorId () const
 get EcalSubDetectorId More...
 
int iPnId () const
 get the PnId More...
 
EcalPnDiodeDetIdoperator= (const DetId &id)
 
- 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 MAX_DCCID = 54
 
static const int MAX_PNID = 15
 
static const int MIN_DCCID = 1
 
static const int MIN_PNID = 1
 
- 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

DetId for an Calo Trigger tower Packing:

[31:28] Global det == ECAL [27:25] ECAL det == EcalLaserPnDiode [24:12] Not Used [10] SubDetectorId: EB (1) ,EE (2) [9:4] DCCId (relative to SubDetector. In barrel it is the SupermoduleId from 1-36) [3:0] PnId (In barrel from 1-10 according CMS IN-2005/021)

Definition at line 22 of file EcalPnDiodeDetId.h.

Constructor & Destructor Documentation

EcalPnDiodeDetId::EcalPnDiodeDetId ( )

Constructor of a null id

Definition at line 4 of file EcalPnDiodeDetId.cc.

4 {}
EcalPnDiodeDetId::EcalPnDiodeDetId ( uint32_t  rawid)

Constructor from a raw value

Definition at line 6 of file EcalPnDiodeDetId.cc.

6 : DetId(rawid) {}
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
EcalPnDiodeDetId::EcalPnDiodeDetId ( int  EcalSubDetectorId,
int  DCCId,
int  PnId 
)

Constructor from signed EcalSubDetectorId, DCCId, PnId.

Definition at line 8 of file EcalPnDiodeDetId.cc.

References EcalBarrel, EcalEndcap, Exception, DetId::id_, MAX_DCCID, MAX_PNID, MIN_DCCID, and MIN_PNID.

9  if ((DCCId < MIN_DCCID) || (DCCId > MAX_DCCID) || (PnId < MIN_PNID) || (PnId > MAX_PNID) ||
10  (EcalSubDetectorId != EcalBarrel && EcalSubDetectorId != EcalEndcap))
11  throw cms::Exception("InvalidDetId") << "EcalPnDiodeDetId: Cannot create object. Indexes out of bounds.";
12  id_ |= ((((EcalSubDetectorId == EcalBarrel) ? (0) : (1)) << 11) | ((DCCId & 0x7F) << 4) | (PnId & 0xF));
13 }
static const int MIN_DCCID
static const int MAX_PNID
static const int MAX_DCCID
uint32_t id_
Definition: DetId.h:62
static const int MIN_PNID
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:30
EcalPnDiodeDetId::EcalPnDiodeDetId ( const DetId id)

Constructor from a generic cell id

Definition at line 15 of file EcalPnDiodeDetId.cc.

References DetId::det(), DetId::Ecal, EcalLaserPnDiode, Exception, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().

15  {
16  if (!gen.null() && (gen.det() != Ecal || gen.subdetId() != EcalLaserPnDiode)) {
17  throw cms::Exception("InvalidDetId");
18  }
19  id_ = gen.rawId();
20 }
uint32_t id_
Definition: DetId.h:62

Member Function Documentation

int EcalPnDiodeDetId::hashedIndex ( ) const

get a compact index for arrays [TODO: NEEDS WORK]

Definition at line 30 of file EcalPnDiodeDetId.cc.

References Exception.

Referenced by iPnId().

30 { throw cms::Exception("MethodNotImplemented"); }
int EcalPnDiodeDetId::iDCCId ( ) const
inline
int EcalPnDiodeDetId::iEcalSubDetectorId ( ) const
inline

get EcalSubDetectorId

Definition at line 42 of file EcalPnDiodeDetId.h.

References EcalBarrel, EcalEndcap, and DetId::id_.

42 { return (id_ & 0x800) ? (EcalEndcap) : (EcalBarrel); }
uint32_t id_
Definition: DetId.h:62
int EcalPnDiodeDetId::iPnId ( ) const
inline
EcalPnDiodeDetId & EcalPnDiodeDetId::operator= ( const DetId id)

Assignment from a generic cell id

Definition at line 22 of file EcalPnDiodeDetId.cc.

References DetId::det(), DetId::Ecal, EcalLaserPnDiode, Exception, DetId::id_, DetId::null(), DetId::rawId(), and DetId::subdetId().

22  {
23  if (!gen.null() && (gen.det() != Ecal || gen.subdetId() != EcalLaserPnDiode)) {
24  throw cms::Exception("InvalidDetId");
25  }
26  id_ = gen.rawId();
27  return *this;
28 }
uint32_t id_
Definition: DetId.h:62

Member Data Documentation

const int EcalPnDiodeDetId::MAX_DCCID = 54
static

Definition at line 36 of file EcalPnDiodeDetId.h.

Referenced by EcalPnDiodeDetId().

const int EcalPnDiodeDetId::MAX_PNID = 15
static

Definition at line 38 of file EcalPnDiodeDetId.h.

Referenced by EcalPnDiodeDetId().

const int EcalPnDiodeDetId::MIN_DCCID = 1
static

Definition at line 37 of file EcalPnDiodeDetId.h.

Referenced by EcalPnDiodeDetId().

const int EcalPnDiodeDetId::MIN_PNID = 1
static

Definition at line 39 of file EcalPnDiodeDetId.h.

Referenced by EcalPnDiodeDetId().