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 Member Functions | Private Attributes
HcalGeometry Class Reference

#include <HcalGeometry.h>

Inheritance diagram for HcalGeometry:
CaloSubdetectorGeometry

Public Types

enum  { k_NumberOfParametersPerShape = 5 }
 
typedef HcalGeometryRecord AlignedRecord
 
typedef HcalAlignmentRcd AlignmentRecord
 
typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef HcalDetId DetIdType
 
typedef std::vector
< IdealObliquePrism
HBCellVec
 
typedef std::vector
< IdealObliquePrism
HECellVec
 
typedef std::vector< IdealZPrismHFCellVec
 
typedef std::vector
< IdealObliquePrism
HOCellVec
 
typedef PHcalRcd 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

virtual
CaloSubdetectorGeometry::DetIdSet 
getCells (const GlobalPoint &r, double dR) const
 Get a list of all cells within a dR of the given cell. More...
 
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 (CaloSubdetectorGeometry::TrVec &trVector, CaloSubdetectorGeometry::IVec &iVector, CaloSubdetectorGeometry::DimVec &dimVector, CaloSubdetectorGeometry::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...
 
 HcalGeometry (const HcalTopology &topology)
 
void localCorners (Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
 
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 ~HcalGeometry ()
 The HcalGeometry will delete all its cell geometries at destruction time. More...
 
- 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 CellSet getCellSet (const GlobalPoint &r, double dR) const
 
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 alignmentBarEndForIndexLocal (const DetId &id, unsigned int nD)
 
static unsigned int alignmentBarrelIndexLocal (const DetId &id)
 
static unsigned int alignmentEndcapIndexLocal (const DetId &id)
 
static unsigned int alignmentForwardIndexLocal (const DetId &id)
 
static unsigned int alignmentOuterIndexLocal (const DetId &id)
 
static unsigned int alignmentTransformIndexGlobal (const DetId &id)
 
static unsigned int alignmentTransformIndexLocal (const DetId &id)
 
static std::string dbString ()
 
static DetId detIdFromBarrelAlignmentIndex (unsigned int i)
 
static DetId detIdFromEndcapAlignmentIndex (unsigned int i)
 
static DetId detIdFromForwardAlignmentIndex (unsigned int i)
 
static DetId detIdFromLocalAlignmentIndex (unsigned int i)
 
static DetId detIdFromOuterAlignmentIndex (unsigned int i)
 
static unsigned int numberOfAlignments ()
 
static unsigned int numberOfBarrelAlignments ()
 
static unsigned int numberOfEndcapAlignments ()
 
static unsigned int numberOfForwardAlignments ()
 
static unsigned int numberOfOuterAlignments ()
 
static std::string producerTag ()
 

Protected Member Functions

virtual const CaloCellGeometrycellGeomPtr (unsigned int index) const
 
virtual unsigned int indexFor (const DetId &id) const
 
virtual unsigned int sizeForDenseIndex (const DetId &id) const
 
- Protected Member Functions inherited from CaloSubdetectorGeometry
void addValidID (const DetId &id)
 
virtual const CaloCellGeometrycellGeomPtr (uint32_t index) const =0
 

Private Member Functions

int etaRing (HcalSubdetector bc, double abseta) const
 helper methods for getClosestCell More...
 
void fillDetIds () const
 
void init ()
 
int phiBin (HcalSubdetector bc, int etaring, double phi) const
 

Private Attributes

CaloSubdetectorGeometry::IVec m_dins
 
edm::AtomicPtrCache
< std::vector< DetId > > 
m_emptyIds
 
HBCellVec m_hbCellVec
 
edm::AtomicPtrCache
< std::vector< DetId > > 
m_hbIds
 
HECellVec m_heCellVec
 
edm::AtomicPtrCache
< std::vector< DetId > > 
m_heIds
 
HFCellVec m_hfCellVec
 
edm::AtomicPtrCache
< std::vector< DetId > > 
m_hfIds
 
HOCellVec m_hoCellVec
 
edm::AtomicPtrCache
< std::vector< DetId > > 
m_hoIds
 
const HcalTopologytheTopology
 

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 14 of file HcalGeometry.h.

Member Typedef Documentation

Definition at line 28 of file HcalGeometry.h.

Definition at line 27 of file HcalGeometry.h.

Definition at line 23 of file HcalGeometry.h.

Definition at line 30 of file HcalGeometry.h.

Definition at line 18 of file HcalGeometry.h.

Definition at line 19 of file HcalGeometry.h.

typedef std::vector<IdealZPrism> HcalGeometry::HFCellVec

Definition at line 21 of file HcalGeometry.h.

Definition at line 20 of file HcalGeometry.h.

Definition at line 29 of file HcalGeometry.h.

Definition at line 24 of file HcalGeometry.h.

Definition at line 25 of file HcalGeometry.h.

Member Enumeration Documentation

anonymous enum
Enumerator
k_NumberOfParametersPerShape 

Definition at line 33 of file HcalGeometry.h.

Constructor & Destructor Documentation

HcalGeometry::HcalGeometry ( const HcalTopology topology)
explicit

Definition at line 14 of file HcalGeometry.cc.

HcalGeometry::~HcalGeometry ( )
virtual

The HcalGeometry will delete all its cell geometries at destruction time.

Definition at line 19 of file HcalGeometry.cc.

Member Function Documentation

unsigned int HcalGeometry::alignmentBarEndForIndexLocal ( const DetId id,
unsigned int  nD 
)
static

Definition at line 261 of file HcalGeometry.cc.

unsigned int HcalGeometry::alignmentBarrelIndexLocal ( const DetId id)
static

Definition at line 271 of file HcalGeometry.cc.

unsigned int HcalGeometry::alignmentEndcapIndexLocal ( const DetId id)
static

Definition at line 275 of file HcalGeometry.cc.

unsigned int HcalGeometry::alignmentForwardIndexLocal ( const DetId id)
static

Definition at line 279 of file HcalGeometry.cc.

unsigned int HcalGeometry::alignmentOuterIndexLocal ( const DetId id)
static

Definition at line 283 of file HcalGeometry.cc.

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

Definition at line 321 of file HcalGeometry.cc.

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

Definition at line 297 of file HcalGeometry.cc.

const CaloCellGeometry * HcalGeometry::cellGeomPtr ( unsigned int  index) const
protectedvirtual

Definition at line 376 of file HcalGeometry.cc.

Referenced by getGeometry().

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

Definition at line 35 of file HcalGeometry.h.

35 { return "PHcalRcd" ; }
DetId HcalGeometry::detIdFromBarrelAlignmentIndex ( unsigned int  i)
static

Definition at line 215 of file HcalGeometry.cc.

DetId HcalGeometry::detIdFromEndcapAlignmentIndex ( unsigned int  i)
static

Definition at line 222 of file HcalGeometry.cc.

DetId HcalGeometry::detIdFromForwardAlignmentIndex ( unsigned int  i)
static

Definition at line 229 of file HcalGeometry.cc.

DetId HcalGeometry::detIdFromLocalAlignmentIndex ( unsigned int  i)
static

Definition at line 247 of file HcalGeometry.cc.

DetId HcalGeometry::detIdFromOuterAlignmentIndex ( unsigned int  i)
static

Definition at line 236 of file HcalGeometry.cc.

int HcalGeometry::etaRing ( HcalSubdetector  bc,
double  abseta 
) const
private

helper methods for getClosestCell

Definition at line 145 of file HcalGeometry.cc.

void HcalGeometry::fillDetIds ( ) const
private

Definition at line 34 of file HcalGeometry.cc.

CaloSubdetectorGeometry::DetIdSet HcalGeometry::getCells ( const GlobalPoint r,
double  dR 
) const
virtual

Get a list of all cells within a dR of the given cell.

The default implementation makes a loop over all cell geometries. Cleverer implementations are suggested to use rough conversions between eta/phi and ieta/iphi and test on the boundaries.

Reimplemented from CaloSubdetectorGeometry.

Definition at line 153 of file HcalGeometry.cc.

DetId HcalGeometry::getClosestCell ( const GlobalPoint r) const
virtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 80 of file HcalGeometry.cc.

virtual const CaloCellGeometry* HcalGeometry::getGeometry ( const DetId id) const
inlinevirtual

Get the cell geometry of a given detector id. Should return false if not found.

Reimplemented from CaloSubdetectorGeometry.

Definition at line 99 of file HcalGeometry.h.

References cellGeomPtr(), HcalTopology::detId2denseId(), and theTopology.

99  {
100  return cellGeomPtr( theTopology.detId2denseId( id ) ) ;
101  }
virtual unsigned int detId2denseId(const DetId &id) const
return a linear packed id
const HcalTopology & theTopology
Definition: HcalGeometry.h:124
virtual const CaloCellGeometry * cellGeomPtr(unsigned int index) const
void HcalGeometry::getSummary ( CaloSubdetectorGeometry::TrVec trVector,
CaloSubdetectorGeometry::IVec iVector,
CaloSubdetectorGeometry::DimVec dimVector,
CaloSubdetectorGeometry::IVec dinsVector 
) const
virtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 398 of file HcalGeometry.cc.

const std::vector< DetId > & HcalGeometry::getValidDetIds ( DetId::Detector  det = DetId::Detector ( 0 ),
int  subdet = 0 
) const
virtual

Get a list of valid detector ids (for the given subdetector)

Note
The implementation in this class is relevant for SubdetectorGeometries which handle only a single subdetector at a time. It does not look at the det and subdet arguments.

Reimplemented from CaloSubdetectorGeometry.

Definition at line 70 of file HcalGeometry.cc.

virtual unsigned int HcalGeometry::indexFor ( const DetId id) const
inlineprotectedvirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 111 of file HcalGeometry.h.

References HcalTopology::detId2denseId(), and theTopology.

111 { return theTopology.detId2denseId(id); }
virtual unsigned int detId2denseId(const DetId &id) const
return a linear packed id
const HcalTopology & theTopology
Definition: HcalGeometry.h:124
void HcalGeometry::init ( void  )
private

Definition at line 21 of file HcalGeometry.cc.

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

Definition at line 325 of file HcalGeometry.cc.

void HcalGeometry::newCell ( const GlobalPoint f1,
const GlobalPoint f2,
const GlobalPoint f3,
const CCGFloat parm,
const DetId detId 
)
virtual

Implements CaloSubdetectorGeometry.

Definition at line 338 of file HcalGeometry.cc.

static unsigned int HcalGeometry::numberOfAlignments ( )
inlinestatic

Definition at line 66 of file HcalGeometry.h.

References numberOfBarrelAlignments(), numberOfEndcapAlignments(), numberOfForwardAlignments(), and numberOfOuterAlignments().

Referenced by HcalAlignmentEP::produceHcalAli().

67  { return ( numberOfBarrelAlignments() +
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:56
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:62
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:58
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:60
static unsigned int HcalGeometry::numberOfBarrelAlignments ( )
inlinestatic

Definition at line 56 of file HcalGeometry.h.

Referenced by numberOfAlignments(), and HcalAlignmentEP::produceHcalAli().

56 { return 36 ; }
static unsigned int HcalGeometry::numberOfEndcapAlignments ( )
inlinestatic

Definition at line 58 of file HcalGeometry.h.

Referenced by numberOfAlignments(), and HcalAlignmentEP::produceHcalAli().

58 { return 36 ; }
static unsigned int HcalGeometry::numberOfForwardAlignments ( )
inlinestatic

Definition at line 60 of file HcalGeometry.h.

Referenced by numberOfAlignments(), and HcalAlignmentEP::produceHcalAli().

60 { return 36 ; }
static unsigned int HcalGeometry::numberOfOuterAlignments ( )
inlinestatic

Definition at line 62 of file HcalGeometry.h.

Referenced by numberOfAlignments(), and HcalAlignmentEP::produceHcalAli().

62 { return 60 ; }
virtual unsigned int HcalGeometry::numberOfParametersPerShape ( ) const
inlinevirtual
virtual unsigned int HcalGeometry::numberOfShapes ( ) const
inlinevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 37 of file HcalGeometry.h.

References HcalTopology::getNumberOfShapes(), and theTopology.

37 { return theTopology.getNumberOfShapes() ; }
const HcalTopology & theTopology
Definition: HcalGeometry.h:124
unsigned int getNumberOfShapes() const
Definition: HcalTopology.h:147
int HcalGeometry::phiBin ( HcalSubdetector  bc,
int  etaring,
double  phi 
) const
private

Definition at line 149 of file HcalGeometry.cc.

static std::string HcalGeometry::producerTag ( )
inlinestatic
virtual unsigned int HcalGeometry::sizeForDenseIndex ( const DetId id) const
inlineprotectedvirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 112 of file HcalGeometry.h.

References HcalTopology::ncells(), and theTopology.

112 { return theTopology.ncells(); }
const HcalTopology & theTopology
Definition: HcalGeometry.h:124
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)

Member Data Documentation

CaloSubdetectorGeometry::IVec HcalGeometry::m_dins
private

Definition at line 131 of file HcalGeometry.h.

edm::AtomicPtrCache<std::vector<DetId> > HcalGeometry::m_emptyIds
mutableprivate

Definition at line 130 of file HcalGeometry.h.

HBCellVec HcalGeometry::m_hbCellVec
private

Definition at line 133 of file HcalGeometry.h.

edm::AtomicPtrCache<std::vector<DetId> > HcalGeometry::m_hbIds
mutableprivate

Definition at line 126 of file HcalGeometry.h.

HECellVec HcalGeometry::m_heCellVec
private

Definition at line 134 of file HcalGeometry.h.

edm::AtomicPtrCache<std::vector<DetId> > HcalGeometry::m_heIds
mutableprivate

Definition at line 127 of file HcalGeometry.h.

HFCellVec HcalGeometry::m_hfCellVec
private

Definition at line 136 of file HcalGeometry.h.

edm::AtomicPtrCache<std::vector<DetId> > HcalGeometry::m_hfIds
mutableprivate

Definition at line 129 of file HcalGeometry.h.

HOCellVec HcalGeometry::m_hoCellVec
private

Definition at line 135 of file HcalGeometry.h.

edm::AtomicPtrCache<std::vector<DetId> > HcalGeometry::m_hoIds
mutableprivate

Definition at line 128 of file HcalGeometry.h.

const HcalTopology& HcalGeometry::theTopology
private

Definition at line 124 of file HcalGeometry.h.

Referenced by getGeometry(), indexFor(), numberOfShapes(), and sizeForDenseIndex().