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
CaloTowerGeometry Class Reference

#include <CaloTowerGeometry.h>

Inheritance diagram for CaloTowerGeometry:
CaloSubdetectorGeometry

Public Types

enum  { k_NumberOfCellsForCorners = CaloTowerDetId::kSizeForDenseIndexing }
 
enum  { k_NumberOfShapes = 41 }
 
enum  { k_NumberOfParametersPerShape = 5 }
 
typedef CaloTowerGeometryRecord AlignedRecord
 
typedef CaloTowerAlignmentRcd AlignmentRecord
 
typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef std::vector
< IdealObliquePrism
CellVec
 
typedef CaloTowerDetId DetIdType
 
typedef PCaloTowerRcd PGeometryRecord
 
typedef CaloCellGeometry::Pt3D Pt3D
 
typedef CaloCellGeometry::Pt3DVec Pt3DVec
 
- 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

 CaloTowerGeometry ()
 
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
 
virtual ~CaloTowerGeometry ()
 
- 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
void addValidID (const DetId &id)
 
virtual unsigned int indexFor (const DetId &id) const
 
virtual unsigned int sizeForDenseIndex (const DetId &id) const
 

Private Attributes

CellVec m_cellVec
 

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
 

Detailed Description

Only DetId::Calo, subdet=1 DetIds are handled by this class.

Author
J. Mans - Minnesota

Definition at line 15 of file CaloTowerGeometry.h.

Member Typedef Documentation

Definition at line 26 of file CaloTowerGeometry.h.

Definition at line 25 of file CaloTowerGeometry.h.

Definition at line 21 of file CaloTowerGeometry.h.

Definition at line 19 of file CaloTowerGeometry.h.

Definition at line 28 of file CaloTowerGeometry.h.

Definition at line 27 of file CaloTowerGeometry.h.

Definition at line 22 of file CaloTowerGeometry.h.

Definition at line 23 of file CaloTowerGeometry.h.

Member Enumeration Documentation

anonymous enum
anonymous enum
Enumerator
k_NumberOfShapes 

Definition at line 32 of file CaloTowerGeometry.h.

anonymous enum
Enumerator
k_NumberOfParametersPerShape 

Definition at line 34 of file CaloTowerGeometry.h.

Constructor & Destructor Documentation

CaloTowerGeometry::CaloTowerGeometry ( )
CaloTowerGeometry::~CaloTowerGeometry ( )
virtual

Definition at line 14 of file CaloTowerGeometry.cc.

15 {
16 }

Member Function Documentation

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

Definition at line 41 of file CaloTowerGeometry.cc.

References DetId::Calo.

42 {
43  return (unsigned int) DetId::Calo - 1 ;
44 }
unsigned int CaloTowerGeometry::alignmentTransformIndexLocal ( const DetId id)
static

Definition at line 20 of file CaloTowerGeometry.cc.

References CaloGenericDetId::isCaloTower(), CaloTowerDetId::kBarIEta, CaloTowerDetId::kEndIEta, and evf::evtn::offset().

21 {
22  const CaloGenericDetId gid ( id ) ;
23 
24  assert( gid.isCaloTower() ) ;
25 
26  const CaloTowerDetId cid ( id ) ;
27 
28  const unsigned int iea ( cid.ietaAbs() ) ;
29 
30  const unsigned int ip ( ( cid.iphi() - 1 )/4 ) ;
31 
32  const int izoff ( ( cid.zside() + 1 )/2 ) ;
33 
34  const unsigned int offset ( izoff*3*18) ;
35 
36  return ( offset + ip + ( CaloTowerDetId::kEndIEta < iea ? 36 :
37  ( CaloTowerDetId::kBarIEta < iea ? 18 : 0 ) ) ) ;
38 }
unsigned int offset(bool)
const CaloCellGeometry * CaloTowerGeometry::cellGeomPtr ( uint32_t  index) const
protectedvirtual

Implements CaloSubdetectorGeometry.

Definition at line 73 of file CaloTowerGeometry.cc.

References m_cellVec, and CaloCellGeometry::param().

74 {
75  const CaloCellGeometry* cell ( &m_cellVec[ index ] ) ;
76  return ( m_cellVec.size() < index ||
77  0 == cell->param() ? 0 : cell ) ;
78 }
static std::string CaloTowerGeometry::dbString ( )
inlinestatic

Definition at line 36 of file CaloTowerGeometry.h.

36 { return "PCaloTowerRcd" ; }
void CaloTowerGeometry::localCorners ( Pt3DVec lc,
const CCGFloat pv,
unsigned int  i,
Pt3D ref 
)
static

Definition at line 47 of file CaloTowerGeometry.cc.

References IdealObliquePrism::localCorners().

51 {
52  IdealObliquePrism::localCorners( lc, pv, ref ) ;
53 }
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
void CaloTowerGeometry::newCell ( const GlobalPoint f1,
const GlobalPoint f2,
const GlobalPoint f3,
const CCGFloat parm,
const DetId detId 
)
virtual

Implements CaloSubdetectorGeometry.

Definition at line 56 of file CaloTowerGeometry.cc.

References CaloSubdetectorGeometry::addValidID(), CaloSubdetectorGeometry::cornersMgr(), CaloGenericDetId::denseIndex(), CaloGenericDetId::isCaloTower(), and m_cellVec.

61 {
62  const CaloGenericDetId cgid ( detId ) ;
63 
64  assert( cgid.isCaloTower() ) ;
65 
66  const unsigned int di ( cgid.denseIndex() ) ;
67 
68  m_cellVec[ di ] = IdealObliquePrism( f1, cornersMgr(), parm ) ;
69  addValidID( detId ) ;
70 }
void addValidID(const DetId &id)
CaloCellGeometry::CornersMgr * cornersMgr()
static unsigned int CaloTowerGeometry::numberOfAlignments ( )
inlinestatic

Definition at line 47 of file CaloTowerGeometry.h.

47 { return 0 ; }
virtual unsigned int CaloTowerGeometry::numberOfParametersPerShape ( ) const
inlinevirtual
virtual unsigned int CaloTowerGeometry::numberOfShapes ( ) const
inlinevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 38 of file CaloTowerGeometry.h.

References k_NumberOfShapes.

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

Definition at line 45 of file CaloTowerGeometry.h.

Referenced by PCaloGeometryBuilder::beginRun(), and CaloGeometryBuilder::produceAligned().

45 { return "TOWER" ; }

Member Data Documentation

CellVec CaloTowerGeometry::m_cellVec
private

Definition at line 69 of file CaloTowerGeometry.h.

Referenced by cellGeomPtr(), and newCell().