CMS 3D CMS Logo

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

#include <AHCalDetId.h>

Inheritance diagram for AHCalDetId:
DetId

Public Member Functions

 AHCalDetId ()
 
 AHCalDetId (const DetId &id)
 
 AHCalDetId (int row, int col, int depth)
 
 AHCalDetId (uint32_t rawid)
 
int depth () const
 get the layer number More...
 
int icol () const
 get the column number More...
 
int icolAbs () const
 
int irow () const
 get the row number More...
 
int irowAbs () const
 
AHCalDetIdoperator= (const DetId &id)
 
HcalSubdetector subdet () const
 get the subdetector More...
 
int zside () const
 get the z-side of the cell (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 (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...
 

Static Public Attributes

static const AHCalDetId 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
 

Static Private Attributes

static constexpr uint32_t kHcalDepthMask = 0x3F
 
static constexpr int kMaxRowCol = 16
 

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

Cell identifier class for the HCAL subdetectors, precision readout cells only

Definition at line 13 of file AHCalDetId.h.

Constructor & Destructor Documentation

◆ AHCalDetId() [1/4]

AHCalDetId::AHCalDetId ( )

Create a null cellid

Definition at line 7 of file AHCalDetId.cc.

7 : DetId() {}

◆ AHCalDetId() [2/4]

AHCalDetId::AHCalDetId ( uint32_t  rawid)

Create cellid from raw id (0=invalid tower id)

Definition at line 9 of file AHCalDetId.cc.

9 : DetId(rawid) {}

◆ AHCalDetId() [3/4]

AHCalDetId::AHCalDetId ( int  row,
int  col,
int  depth 
)

◆ AHCalDetId() [4/4]

AHCalDetId::AHCalDetId ( const DetId id)

Constructor from a generic cell id

Definition at line 18 of file AHCalDetId.cc.

18  {
19  if (!gen.null()) {
20  HcalSubdetector subdet = (HcalSubdetector(gen.subdetId()));
21  if (gen.det() != Hcal || subdet != HcalOther) {
22  throw cms::Exception("Invalid DetId")
23  << "Cannot initialize AHCalDetId from " << std::hex << gen.rawId() << std::dec;
24  }
25  }
26  id_ = gen.rawId();
27 }

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

Member Function Documentation

◆ depth()

int AHCalDetId::depth ( void  ) const

get the layer number

Definition at line 43 of file AHCalDetId.cc.

References DetId::id_, kHcalDepthMask, and HcalDetId::kHcalDepthOffset1.

Referenced by AHCalDetId(), HGCalTBAnalyzer::analyzeSimHits(), and AHCalSD::unpackIndex().

◆ icol()

int AHCalDetId::icol ( ) const

get the column number

Definition at line 36 of file AHCalDetId.cc.

36  {
38  if (value >= kMaxRowCol)
39  value = (kMaxRowCol - value);
40  return value;
41 }

References DetId::id_, HcalDetId::kHcalPhiMask1, kMaxRowCol, and relativeConstraints::value.

Referenced by AHCalDetId(), HGCalTBAnalyzer::analyzeSimHits(), and AHCalSD::unpackIndex().

◆ icolAbs()

int AHCalDetId::icolAbs ( ) const
inline

Definition at line 38 of file AHCalDetId.h.

38 { return (id_ & HcalDetId::kHcalPhiMask1); }

References DetId::id_, and HcalDetId::kHcalPhiMask1.

Referenced by HGCalTBAnalyzer::analyzeSimHits().

◆ irow()

int AHCalDetId::irow ( ) const

◆ irowAbs()

int AHCalDetId::irowAbs ( ) const
inline

◆ operator=()

AHCalDetId& AHCalDetId::operator= ( const DetId id)
inline

Assignment from a generic cell id

Definition at line 24 of file AHCalDetId.h.

24  {
25  id_ = id.rawId();
26  return *this;
27  }

References DetId::id_.

◆ subdet()

HcalSubdetector AHCalDetId::subdet ( ) const
inline

get the subdetector

Definition at line 30 of file AHCalDetId.h.

30 { return HcalOther; }

References HcalOther.

Referenced by AHCalDetId().

◆ zside()

int AHCalDetId::zside ( ) const
inline

get the z-side of the cell (1/-1)

Definition at line 32 of file AHCalDetId.h.

32 { return 1; }

Referenced by HGCalTBAnalyzer::analyzeSimHits().

Member Data Documentation

◆ kHcalDepthMask

constexpr uint32_t AHCalDetId::kHcalDepthMask = 0x3F
staticconstexprprivate

Definition at line 46 of file AHCalDetId.h.

Referenced by AHCalDetId(), and depth().

◆ kMaxRowCol

constexpr int AHCalDetId::kMaxRowCol = 16
staticconstexprprivate

Definition at line 45 of file AHCalDetId.h.

Referenced by AHCalDetId(), icol(), and irow().

◆ Undefined

const AHCalDetId AHCalDetId::Undefined
static

Definition at line 42 of file AHCalDetId.h.

HcalOther
Definition: HcalAssistant.h:38
HcalDetId::kHcalDepthOffset1
static constexpr uint32_t kHcalDepthOffset1
Definition: HcalDetId.h:22
AHCalDetId::irow
int irow() const
get the row number
Definition: AHCalDetId.cc:29
HcalDetId::kHcalEtaOffset1
static constexpr uint32_t kHcalEtaOffset1
Definition: HcalDetId.h:16
cuy.col
col
Definition: cuy.py:1010
DetId::Hcal
Definition: DetId.h:28
AHCalDetId::subdet
HcalSubdetector subdet() const
get the subdetector
Definition: AHCalDetId.h:30
AHCalDetId::kMaxRowCol
static constexpr int kMaxRowCol
Definition: AHCalDetId.h:45
AHCalDetId::depth
int depth() const
get the layer number
Definition: AHCalDetId.cc:43
AHCalDetId::icol
int icol() const
get the column number
Definition: AHCalDetId.cc:36
gen
Definition: PythiaDecays.h:13
DetId::id_
uint32_t id_
Definition: DetId.h:69
value
Definition: value.py:1
HcalDetId::kHcalZsideMask1
static constexpr uint32_t kHcalZsideMask1
Definition: HcalDetId.h:20
AHCalDetId::kHcalDepthMask
static constexpr uint32_t kHcalDepthMask
Definition: AHCalDetId.h:46
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
relativeConstraints.value
value
Definition: relativeConstraints.py:53
Exception
Definition: hltDiff.cc:245
DetId::DetId
constexpr DetId()
Create an empty or null id (also for persistence)
Definition: DetId.h:38
HcalDetId::kHcalEtaMask1
static constexpr uint32_t kHcalEtaMask1
Definition: HcalDetId.h:18
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
HcalDetId::kHcalPhiMask1
static constexpr uint32_t kHcalPhiMask1
Definition: HcalDetId.h:14