CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
ZdcGeometry Class Reference

#include <ZdcGeometry.h>

Inheritance diagram for ZdcGeometry:
CaloSubdetectorGeometry

Public Types

enum  { k_NumberOfCellsForCorners = HcalZDCDetId::kSizeForDenseIndexing }
 
enum  { k_NumberOfShapes = 3 }
 
enum  { k_NumberOfParametersPerShape = 4 }
 
typedef ZDCGeometryRecord AlignedRecord
 
typedef ZDCAlignmentRcd AlignmentRecord
 
typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef std::vector< IdealZDCTrapezoidCellVec
 
typedef HcalZDCDetId DetIdType
 
typedef PZdcRcd PGeometryRecord
 
typedef CaloCellGeometry::Pt3D Pt3D
 
typedef CaloCellGeometry::Pt3DVec Pt3DVec
 
typedef CaloCellGeometry::Tr3D Tr3D
 
- Public Types inherited from CaloSubdetectorGeometry
typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef std::vector< std::shared_ptr< const CaloCellGeometry > > CellSet
 
typedef std::set< DetIdDetIdSet
 
typedef std::vector< CCGFloatDimVec
 
typedef std::vector< unsigned int > IVec
 
typedef CaloCellGeometry::ParMgr ParMgr
 
typedef CaloCellGeometry::ParVec ParVec
 
typedef CaloCellGeometry::ParVecVec ParVecVec
 
typedef std::vector< CCGFloatTrVec
 

Public Member Functions

void newCell (const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
 
unsigned int numberOfParametersPerShape () const override
 
unsigned int numberOfShapes () const override
 
 ZdcGeometry ()
 
 ZdcGeometry (const ZdcTopology *topology)
 
 ~ZdcGeometry () override
 
- Public Member Functions inherited from CaloSubdetectorGeometry
void allocateCorners (CaloCellGeometry::CornersVec::size_type n)
 
void allocatePar (ParVec::size_type n, unsigned int m)
 
 CaloSubdetectorGeometry ()
 
 CaloSubdetectorGeometry (const CaloSubdetectorGeometry &)=delete
 avoid copies More...
 
CaloCellGeometry::CornersMgrcornersMgr ()
 
CCGFloat deltaEta (const DetId &detId) const
 
CCGFloat deltaPhi (const DetId &detId) const
 
virtual void fillDefaultNamedParameters () const
 
virtual DetIdSet getCells (const GlobalPoint &r, double dR) const
 Get a list of all cells within a dR of the given cell. More...
 
virtual CellSet getCellSet (const GlobalPoint &r, double dR) const
 
virtual DetId getClosestCell (const GlobalPoint &r) const
 
virtual std::shared_ptr< const CaloCellGeometrygetGeometry (const DetId &id) const
 Get the cell geometry of a given detector id. Should return false if not found. More...
 
virtual void getSummary (TrVec &trVector, IVec &iVector, DimVec &dimVector, IVec &dinsVector) const
 
virtual const std::vector< DetId > & getValidDetIds (DetId::Detector det=DetId::Detector(0), int subdet=0) const
 Get a list of valid detector ids (for the given subdetector) More...
 
virtual void initializeParms ()
 
virtual unsigned int numberOfTransformParms () const
 
CaloSubdetectorGeometryoperator= (const CaloSubdetectorGeometry &)=delete
 
ParMgrparMgr ()
 
const ParMgrparMgrConst () const
 
ParVecVecparVecVec ()
 
const ParVecVecparVecVec () const
 
virtual bool present (const DetId &id) const
 is this detid present in the geometry? More...
 
virtual ~CaloSubdetectorGeometry ()
 The base class DOES assume that it owns the CaloCellGeometry objects. More...
 

Static Public Member Functions

static unsigned int alignmentTransformIndexGlobal (const DetId &id)
 
static unsigned int alignmentTransformIndexLocal (const DetId &id)
 
static std::string dbString ()
 
static void localCorners (Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
 
static unsigned int numberOfAlignments ()
 
static std::string producerTag ()
 

Protected Member Functions

const CaloCellGeometrygetGeometryRawPtr (uint32_t index) const override
 
unsigned int indexFor (const DetId &id) const override
 
- Protected Member Functions inherited from CaloSubdetectorGeometry
void addValidID (const DetId &id)
 
virtual std::shared_ptr< const CaloCellGeometrycellGeomPtr (uint32_t index) const
 
virtual unsigned int sizeForDenseIndex (const DetId &id) const
 

Private Attributes

DetId::Detector lastReqDet_
 
int lastReqSubdet_
 
CellVec m_cellVec
 
bool m_ownsTopology
 
const ZdcTopologytheTopology
 

Additional Inherited Members

- Static Protected Member Functions inherited from CaloSubdetectorGeometry
static CCGFloat deltaR (const GlobalPoint &p1, const GlobalPoint &p2)
 
- Protected Attributes inherited from CaloSubdetectorGeometry
ParVecVec m_parVecVec
 
std::vector< DetIdm_validIds
 

Detailed Description

Definition at line 12 of file ZdcGeometry.h.

Member Typedef Documentation

◆ AlignedRecord

Definition at line 22 of file ZdcGeometry.h.

◆ AlignmentRecord

Definition at line 21 of file ZdcGeometry.h.

◆ CCGFloat

Definition at line 16 of file ZdcGeometry.h.

◆ CellVec

Definition at line 14 of file ZdcGeometry.h.

◆ DetIdType

Definition at line 24 of file ZdcGeometry.h.

◆ PGeometryRecord

Definition at line 23 of file ZdcGeometry.h.

◆ Pt3D

Definition at line 17 of file ZdcGeometry.h.

◆ Pt3DVec

Definition at line 18 of file ZdcGeometry.h.

◆ Tr3D

Definition at line 19 of file ZdcGeometry.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

◆ anonymous enum

anonymous enum
Enumerator
k_NumberOfShapes 

Definition at line 28 of file ZdcGeometry.h.

◆ anonymous enum

anonymous enum
Enumerator
k_NumberOfParametersPerShape 

Definition at line 30 of file ZdcGeometry.h.

Constructor & Destructor Documentation

◆ ZdcGeometry() [1/2]

ZdcGeometry::ZdcGeometry ( )

Definition at line 13 of file ZdcGeometry.cc.

14  : theTopology(new ZdcTopology),
16  lastReqSubdet_(0),
17  m_ownsTopology(true),
CellVec m_cellVec
Definition: ZdcGeometry.h:72
bool m_ownsTopology
Definition: ZdcGeometry.h:70
DetId::Detector lastReqDet_
Definition: ZdcGeometry.h:68
const ZdcTopology * theTopology
Definition: ZdcGeometry.h:67
Detector
Definition: DetId.h:24
int lastReqSubdet_
Definition: ZdcGeometry.h:69

◆ ZdcGeometry() [2/2]

ZdcGeometry::ZdcGeometry ( const ZdcTopology topology)
explicit

Definition at line 20 of file ZdcGeometry.cc.

21  : theTopology(topology),
23  lastReqSubdet_(0),
24  m_ownsTopology(false),
CellVec m_cellVec
Definition: ZdcGeometry.h:72
bool m_ownsTopology
Definition: ZdcGeometry.h:70
DetId::Detector lastReqDet_
Definition: ZdcGeometry.h:68
const ZdcTopology * theTopology
Definition: ZdcGeometry.h:67
Detector
Definition: DetId.h:24
int lastReqSubdet_
Definition: ZdcGeometry.h:69

◆ ~ZdcGeometry()

ZdcGeometry::~ZdcGeometry ( )
override

Definition at line 27 of file ZdcGeometry.cc.

References m_ownsTopology, and theTopology.

27  {
28  if (m_ownsTopology)
29  delete theTopology;
30 }
bool m_ownsTopology
Definition: ZdcGeometry.h:70
const ZdcTopology * theTopology
Definition: ZdcGeometry.h:67

Member Function Documentation

◆ alignmentTransformIndexGlobal()

unsigned int ZdcGeometry::alignmentTransformIndexGlobal ( const DetId id)
static

Definition at line 57 of file ZdcGeometry.cc.

References DetId::Calo.

57 { return (unsigned int)DetId::Calo - 1; }

◆ alignmentTransformIndexLocal()

unsigned int ZdcGeometry::alignmentTransformIndexLocal ( const DetId id)
static

Definition at line 50 of file ZdcGeometry.cc.

References cms::cuda::assert(), CaloGenericDetId::isZDC(), and HcalZDCDetId::zside().

50  {
51  const CaloGenericDetId gid(id);
52  assert(gid.isZDC());
53 
54  return (0 > HcalZDCDetId(id).zside() ? 0 : 1);
55 }
assert(be >=bs)
constexpr int32_t zside() const
get the z-side of the cell (1/-1)
Definition: HcalZDCDetId.h:82

◆ dbString()

static std::string ZdcGeometry::dbString ( )
inlinestatic

Definition at line 32 of file ZdcGeometry.h.

32 { return "PZdcRcd"; }

◆ getGeometryRawPtr()

const CaloCellGeometry * ZdcGeometry::getGeometryRawPtr ( uint32_t  index) const
overrideprotectedvirtual

Implements CaloSubdetectorGeometry.

Definition at line 77 of file ZdcGeometry.cc.

References m_cellVec, and CaloCellGeometry::param().

77  {
78  // Modify the RawPtr class
79  if (m_cellVec.size() < index)
80  return nullptr;
81  const CaloCellGeometry* cell(&m_cellVec[index]);
82  return (((cell == nullptr) || (nullptr == cell->param())) ? nullptr : cell);
83 }
CellVec m_cellVec
Definition: ZdcGeometry.h:72

◆ indexFor()

unsigned int ZdcGeometry::indexFor ( const DetId id) const
inlineoverrideprotectedvirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 61 of file ZdcGeometry.h.

References HcalZDCDetId::denseIndex().

61 { return HcalZDCDetId(id).denseIndex(); }
constexpr uint32_t denseIndex() const
Definition: HcalZDCDetId.h:126

◆ localCorners()

void ZdcGeometry::localCorners ( Pt3DVec lc,
const CCGFloat pv,
unsigned int  i,
Pt3D ref 
)
static

Definition at line 59 of file ZdcGeometry.cc.

References IdealZDCTrapezoid::localCorners().

59  {
61 }
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)

◆ newCell()

void ZdcGeometry::newCell ( const GlobalPoint f1,
const GlobalPoint f2,
const GlobalPoint f3,
const CCGFloat parm,
const DetId detId 
)
overridevirtual

◆ numberOfAlignments()

static unsigned int ZdcGeometry::numberOfAlignments ( )
inlinestatic

Definition at line 46 of file ZdcGeometry.h.

Referenced by FakeCaloAlignmentEP::produceZdcAli(), and TestCaloAlignmentEP::produceZdcAli().

46 { return 2; }

◆ numberOfParametersPerShape()

unsigned int ZdcGeometry::numberOfParametersPerShape ( ) const
inlineoverridevirtual

◆ numberOfShapes()

unsigned int ZdcGeometry::numberOfShapes ( ) const
inlineoverridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 34 of file ZdcGeometry.h.

References k_NumberOfShapes.

◆ producerTag()

static std::string ZdcGeometry::producerTag ( )
inlinestatic

Member Data Documentation

◆ lastReqDet_

DetId::Detector ZdcGeometry::lastReqDet_
mutableprivate

Definition at line 68 of file ZdcGeometry.h.

◆ lastReqSubdet_

int ZdcGeometry::lastReqSubdet_
mutableprivate

Definition at line 69 of file ZdcGeometry.h.

◆ m_cellVec

CellVec ZdcGeometry::m_cellVec
private

Definition at line 72 of file ZdcGeometry.h.

Referenced by getGeometryRawPtr(), and newCell().

◆ m_ownsTopology

bool ZdcGeometry::m_ownsTopology
private

Definition at line 70 of file ZdcGeometry.h.

Referenced by ~ZdcGeometry().

◆ theTopology

const ZdcTopology* ZdcGeometry::theTopology
private

Definition at line 67 of file ZdcGeometry.h.

Referenced by ~ZdcGeometry().