Geometry
CaloGeometry
interface
CaloGenericDetId.h
Go to the documentation of this file.
1
#ifndef CALOGEOMETRY_CALOGENERICDETID_H
2
#define CALOGEOMETRY_CALOGENERICDETID_H
3
4
#include "
DataFormats/DetId/interface/DetId.h
"
5
#include "
DataFormats/EcalDetId/interface/EBDetId.h
"
6
#include "
DataFormats/EcalDetId/interface/EEDetId.h
"
7
#include "
DataFormats/EcalDetId/interface/ESDetId.h
"
8
#include "
DataFormats/HcalDetId/interface/HcalZDCDetId.h
"
9
#include "
DataFormats/HcalDetId/interface/HcalCastorDetId.h
"
10
#include "
DataFormats/CaloTowers/interface/CaloTowerDetId.h
"
11
12
class
CaloGenericDetId
:
public
DetId
{
13
public
:
14
// CaloGenericDetId() {}
15
CaloGenericDetId
(uint32_t rawid) :
DetId
(rawid) {}
16
17
CaloGenericDetId
(
const
DetId
&
id
) :
DetId
(
id
) {}
18
19
CaloGenericDetId
(
DetId::Detector
iDet,
int
iSub,
20
uint32_t iDenseIndex);
// to check valid iDenseIndex
21
22
bool
validDetId
()
const
;
23
24
uint32_t
denseIndex
()
const
;
25
26
uint32_t
sizeForDenseIndexing
()
const
;
27
28
bool
isEcal
()
const
{
return
det
() ==
DetId::Ecal
; }
29
bool
isEB
()
const
{
return
isEcal
() &&
subdetId
() ==
EBDetId::Subdet
; }
30
bool
isEE
()
const
{
return
isEcal
() &&
subdetId
() ==
EEDetId::Subdet
; }
31
bool
isES
()
const
{
return
isEcal
() &&
subdetId
() ==
ESDetId::Subdet
; }
32
bool
isCalo
()
const
{
return
det
() ==
DetId::Calo
; }
33
bool
isHcal
()
const
{
return
det
() ==
DetId::Hcal
; }
34
bool
isZDC
()
const
{
return
isCalo
() &&
subdetId
() ==
HcalZDCDetId::SubdetectorId
; }
35
bool
isCastor
()
const
{
return
isCalo
() &&
subdetId
() ==
HcalCastorDetId::SubdetectorId
; }
36
bool
isCaloTower
()
const
{
return
isCalo
() &&
subdetId
() ==
CaloTowerDetId::SubdetId
; }
37
};
38
39
std::ostream&
operator<<
(std::ostream&
s
,
const
CaloGenericDetId
&
id
);
40
41
#endif
EBDetId::Subdet
Definition:
EBDetId.h:19
CaloGenericDetId
Definition:
CaloGenericDetId.h:12
CaloGenericDetId::isCaloTower
bool isCaloTower() const
Definition:
CaloGenericDetId.h:36
CaloGenericDetId::isES
bool isES() const
Definition:
CaloGenericDetId.h:31
CaloGenericDetId::validDetId
bool validDetId() const
Definition:
CaloGenericDetId.cc:56
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition:
DetId.h:46
EBDetId.h
EEDetId.h
DetId::Hcal
Definition:
DetId.h:28
CaloGenericDetId::isEcal
bool isEcal() const
Definition:
CaloGenericDetId.h:28
CaloGenericDetId::CaloGenericDetId
CaloGenericDetId(uint32_t rawid)
Definition:
CaloGenericDetId.h:15
HcalCastorDetId::SubdetectorId
static const int SubdetectorId
Definition:
HcalCastorDetId.h:28
CaloTowerDetId::SubdetId
static const int SubdetId
Definition:
CaloTowerDetId.h:34
ESDetId.h
HcalZDCDetId.h
DetId::Calo
Definition:
DetId.h:29
CaloGenericDetId::isEB
bool isEB() const
Definition:
CaloGenericDetId.h:29
CaloGenericDetId::isEE
bool isEE() const
Definition:
CaloGenericDetId.h:30
DetId
Definition:
DetId.h:17
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
CaloGenericDetId::isZDC
bool isZDC() const
Definition:
CaloGenericDetId.h:34
HcalZDCDetId::SubdetectorId
static const int SubdetectorId
Definition:
HcalZDCDetId.h:25
CaloGenericDetId::sizeForDenseIndexing
uint32_t sizeForDenseIndexing() const
Definition:
CaloGenericDetId.cc:40
CaloGenericDetId::CaloGenericDetId
CaloGenericDetId(const DetId &id)
Definition:
CaloGenericDetId.h:17
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition:
DetId.h:48
ESDetId::Subdet
Definition:
ESDetId.h:17
CaloGenericDetId::isCalo
bool isCalo() const
Definition:
CaloGenericDetId.h:32
CaloGenericDetId::isCastor
bool isCastor() const
Definition:
CaloGenericDetId.h:35
DetId::Detector
Detector
Definition:
DetId.h:24
CaloTowerDetId.h
DetId::Ecal
Definition:
DetId.h:27
operator<<
std::ostream & operator<<(std::ostream &s, const CaloGenericDetId &id)
Definition:
CaloGenericDetId.cc:88
CaloGenericDetId::denseIndex
uint32_t denseIndex() const
Definition:
CaloGenericDetId.cc:24
DetId.h
triggerObjects_cff.id
id
Definition:
triggerObjects_cff.py:29
HcalCastorDetId.h
CaloGenericDetId::isHcal
bool isHcal() const
Definition:
CaloGenericDetId.h:33
EEDetId::Subdet
Definition:
EEDetId.h:19
Generated for CMSSW Reference Manual by
1.8.16