CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
< IdealZDCTrapezoid
CellVec
 
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
< CaloCellGeometry const * > 
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

virtual void newCell (const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
 
virtual unsigned int numberOfParametersPerShape () const
 
virtual unsigned int numberOfShapes () const
 
 ZdcGeometry ()
 
 ZdcGeometry (const ZdcTopology *topology)
 
virtual ~ZdcGeometry ()
 
- Public Member Functions inherited from CaloSubdetectorGeometry
void allocateCorners (CaloCellGeometry::CornersVec::size_type n)
 
void allocatePar (ParVec::size_type n, unsigned int m)
 
 CaloSubdetectorGeometry ()
 
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 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
 
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

virtual const CaloCellGeometrycellGeomPtr (uint32_t index) const
 
- Protected Member Functions inherited from CaloSubdetectorGeometry
virtual unsigned int indexFor (const DetId &id) 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

Definition at line 24 of file ZdcGeometry.h.

Definition at line 23 of file ZdcGeometry.h.

Definition at line 18 of file ZdcGeometry.h.

Definition at line 16 of file ZdcGeometry.h.

Definition at line 26 of file ZdcGeometry.h.

Definition at line 25 of file ZdcGeometry.h.

Definition at line 19 of file ZdcGeometry.h.

Definition at line 20 of file ZdcGeometry.h.

Definition at line 21 of file ZdcGeometry.h.

Member Enumeration Documentation

anonymous enum
anonymous enum
Enumerator
k_NumberOfShapes 

Definition at line 30 of file ZdcGeometry.h.

anonymous enum
Enumerator
k_NumberOfParametersPerShape 

Definition at line 32 of file ZdcGeometry.h.

Constructor & Destructor Documentation

ZdcGeometry::ZdcGeometry ( )

Definition at line 12 of file ZdcGeometry.cc.

12  :
13  theTopology( new ZdcTopology ),
15  lastReqSubdet_(0),
16  m_ownsTopology ( true ),
18 {}
CellVec m_cellVec
Definition: ZdcGeometry.h:76
bool m_ownsTopology
Definition: ZdcGeometry.h:74
DetId::Detector lastReqDet_
Definition: ZdcGeometry.h:72
const ZdcTopology * theTopology
Definition: ZdcGeometry.h:71
Detector
Definition: DetId.h:26
int lastReqSubdet_
Definition: ZdcGeometry.h:73
ZdcGeometry::ZdcGeometry ( const ZdcTopology topology)
explicit

Definition at line 20 of file ZdcGeometry.cc.

20  :
21  theTopology(topology),
23  lastReqSubdet_(0),
24  m_ownsTopology ( false ),
26 {}
CellVec m_cellVec
Definition: ZdcGeometry.h:76
bool m_ownsTopology
Definition: ZdcGeometry.h:74
DetId::Detector lastReqDet_
Definition: ZdcGeometry.h:72
const ZdcTopology * theTopology
Definition: ZdcGeometry.h:71
Detector
Definition: DetId.h:26
int lastReqSubdet_
Definition: ZdcGeometry.h:73
ZdcGeometry::~ZdcGeometry ( )
virtual

Definition at line 28 of file ZdcGeometry.cc.

References m_ownsTopology, and theTopology.

29 {
30  if( m_ownsTopology ) delete theTopology ;
31 }
bool m_ownsTopology
Definition: ZdcGeometry.h:74
const ZdcTopology * theTopology
Definition: ZdcGeometry.h:71

Member Function Documentation

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

Definition at line 62 of file ZdcGeometry.cc.

References DetId::Calo.

63 {
64  return (unsigned int)DetId::Calo - 1 ;
65 }
unsigned int ZdcGeometry::alignmentTransformIndexLocal ( const DetId id)
static

Definition at line 52 of file ZdcGeometry.cc.

References CaloGenericDetId::isZDC(), and HcalZDCDetId::zside().

53 {
54  const CaloGenericDetId gid ( id ) ;
55 
56  assert( gid.isZDC() ) ;
57 
58  return ( 0 > HcalZDCDetId( id ).zside() ? 0 : 1 ) ;
59 }
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalZDCDetId.h:36
const CaloCellGeometry * ZdcGeometry::cellGeomPtr ( uint32_t  index) const
protectedvirtual

Implements CaloSubdetectorGeometry.

Definition at line 94 of file ZdcGeometry.cc.

References m_cellVec, and CaloCellGeometry::param().

95 {
96  const CaloCellGeometry* cell ( &m_cellVec[ index ] ) ;
97  return ( m_cellVec.size() < index ||
98  0 == cell->param() ? 0 : cell ) ;
99 }
CellVec m_cellVec
Definition: ZdcGeometry.h:76
static std::string ZdcGeometry::dbString ( )
inlinestatic

Definition at line 34 of file ZdcGeometry.h.

34 { return "PZdcRcd" ; }
void ZdcGeometry::localCorners ( Pt3DVec lc,
const CCGFloat pv,
unsigned int  i,
Pt3D ref 
)
static

Definition at line 68 of file ZdcGeometry.cc.

References IdealZDCTrapezoid::localCorners().

72 {
73  IdealZDCTrapezoid::localCorners( lc, pv, ref ) ;
74 }
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
void ZdcGeometry::newCell ( const GlobalPoint f1,
const GlobalPoint f2,
const GlobalPoint f3,
const CCGFloat parm,
const DetId detId 
)
virtual

Implements CaloSubdetectorGeometry.

Definition at line 77 of file ZdcGeometry.cc.

References CaloSubdetectorGeometry::cornersMgr(), CaloGenericDetId::denseIndex(), CaloGenericDetId::isZDC(), m_cellVec, and CaloSubdetectorGeometry::m_validIds.

82 {
83  const CaloGenericDetId cgid ( detId ) ;
84 
85  assert( cgid.isZDC() ) ;
86 
87  const unsigned int di ( cgid.denseIndex() ) ;
88 
89  m_cellVec[ di ] = IdealZDCTrapezoid( f1, cornersMgr(), parm ) ;
90  m_validIds.push_back( detId ) ;
91 }
CellVec m_cellVec
Definition: ZdcGeometry.h:76
std::vector< DetId > m_validIds
CaloCellGeometry::CornersMgr * cornersMgr()
static unsigned int ZdcGeometry::numberOfAlignments ( )
inlinestatic

Definition at line 48 of file ZdcGeometry.h.

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

48 { return 2 ; }
virtual unsigned int ZdcGeometry::numberOfParametersPerShape ( ) const
inlinevirtual
virtual unsigned int ZdcGeometry::numberOfShapes ( ) const
inlinevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 36 of file ZdcGeometry.h.

References k_NumberOfShapes.

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

Member Data Documentation

DetId::Detector ZdcGeometry::lastReqDet_
mutableprivate

Definition at line 72 of file ZdcGeometry.h.

int ZdcGeometry::lastReqSubdet_
mutableprivate

Definition at line 73 of file ZdcGeometry.h.

CellVec ZdcGeometry::m_cellVec
private

Definition at line 76 of file ZdcGeometry.h.

Referenced by cellGeomPtr(), and newCell().

bool ZdcGeometry::m_ownsTopology
private

Definition at line 74 of file ZdcGeometry.h.

Referenced by ~ZdcGeometry().

const ZdcTopology* ZdcGeometry::theTopology
private

Definition at line 71 of file ZdcGeometry.h.

Referenced by ~ZdcGeometry().