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 | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
CaloSubdetectorGeometry Class Referenceabstract

#include <CaloSubdetectorGeometry.h>

Inheritance diagram for CaloSubdetectorGeometry:
CaloTowerGeometry CastorGeometry EcalBarrelGeometry EcalEndcapGeometry EcalPreshowerGeometry EcalTBHodoscopeGeometry HcalDDDGeometry HcalGeometry HGCalGeometry ZdcGeometry

Public Types

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

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 void newCell (const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)=0
 
virtual unsigned int numberOfParametersPerShape () const
 
virtual unsigned int numberOfShapes () const
 
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...
 

Protected Member Functions

void addValidID (const DetId &id)
 
virtual const CaloCellGeometrycellGeomPtr (uint32_t index) const =0
 
virtual unsigned int indexFor (const DetId &id) const
 
virtual unsigned int sizeForDenseIndex (const DetId &id) const
 

Static Protected Member Functions

static CCGFloat deltaR (const GlobalPoint &p1, const GlobalPoint &p2)
 

Protected Attributes

ParVecVec m_parVecVec
 
std::vector< DetIdm_validIds
 

Private Member Functions

 CaloSubdetectorGeometry (const CaloSubdetectorGeometry &)
 avoid copies More...
 
CaloSubdetectorGeometryoperator= (const CaloSubdetectorGeometry &)
 

Private Attributes

CaloCellGeometry::CornersMgrm_cmgr
 
std::atomic< std::vector
< CCGFloat > * > 
m_deltaEta
 
std::atomic< std::vector
< CCGFloat > * > 
m_deltaPhi
 
ParMgrm_parMgr
 
bool m_sortedIds
 

Detailed Description

Base class for a geometry container for a specific calorimetry subdetector.

Author
J. Mans - Minnesota

Definition at line 24 of file CaloSubdetectorGeometry.h.

Member Typedef Documentation

Definition at line 28 of file CaloSubdetectorGeometry.h.

typedef std::vector<CaloCellGeometry const *> CaloSubdetectorGeometry::CellSet

Definition at line 27 of file CaloSubdetectorGeometry.h.

Definition at line 30 of file CaloSubdetectorGeometry.h.

Definition at line 39 of file CaloSubdetectorGeometry.h.

typedef std::vector<unsigned int> CaloSubdetectorGeometry::IVec

Definition at line 38 of file CaloSubdetectorGeometry.h.

Definition at line 33 of file CaloSubdetectorGeometry.h.

Definition at line 34 of file CaloSubdetectorGeometry.h.

Definition at line 35 of file CaloSubdetectorGeometry.h.

Definition at line 37 of file CaloSubdetectorGeometry.h.

Constructor & Destructor Documentation

CaloSubdetectorGeometry::CaloSubdetectorGeometry ( )

Definition at line 13 of file CaloSubdetectorGeometry.cc.

CaloSubdetectorGeometry::~CaloSubdetectorGeometry ( )
virtual

The base class DOES assume that it owns the CaloCellGeometry objects.

Definition at line 21 of file CaloSubdetectorGeometry.cc.

CaloSubdetectorGeometry::CaloSubdetectorGeometry ( const CaloSubdetectorGeometry )
private

avoid copies

Member Function Documentation

void CaloSubdetectorGeometry::addValidID ( const DetId id)
protected
void CaloSubdetectorGeometry::allocateCorners ( CaloCellGeometry::CornersVec::size_type  n)
void CaloSubdetectorGeometry::allocatePar ( ParVec::size_type  n,
unsigned int  m 
)
virtual const CaloCellGeometry* CaloSubdetectorGeometry::cellGeomPtr ( uint32_t  index) const
protectedpure virtual
CaloCellGeometry::CornersMgr* CaloSubdetectorGeometry::cornersMgr ( )
inline
CCGFloat CaloSubdetectorGeometry::deltaEta ( const DetId detId) const

Definition at line 274 of file CaloSubdetectorGeometry.cc.

CCGFloat CaloSubdetectorGeometry::deltaPhi ( const DetId detId) const

Definition at line 221 of file CaloSubdetectorGeometry.cc.

static CCGFloat CaloSubdetectorGeometry::deltaR ( const GlobalPoint p1,
const GlobalPoint p2 
)
inlinestaticprotected

Definition at line 114 of file CaloSubdetectorGeometry.h.

References reco::deltaR().

116  { return reco::deltaR( p1, p2 ) ; }
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:28
virtual void CaloSubdetectorGeometry::fillDefaultNamedParameters ( ) const
inlinevirtual

Definition at line 96 of file CaloSubdetectorGeometry.h.

References reco::return().

96 { return ; }
return(e1-e2)*(e1-e2)+dp *dp
CaloSubdetectorGeometry::DetIdSet CaloSubdetectorGeometry::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 in HGCalGeometry, EcalBarrelGeometry, EcalEndcapGeometry, and HcalGeometry.

Definition at line 85 of file CaloSubdetectorGeometry.cc.

Referenced by CaloDualConeSelector< HBHERecHit >::selectCallback(), and CaloConeSelector< T >::selectCallback().

CaloSubdetectorGeometry::CellSet CaloSubdetectorGeometry::getCellSet ( const GlobalPoint r,
double  dR 
) const
virtual

Definition at line 121 of file CaloSubdetectorGeometry.cc.

DetId CaloSubdetectorGeometry::getClosestCell ( const GlobalPoint r) const
virtual
const CaloCellGeometry * CaloSubdetectorGeometry::getGeometry ( const DetId id) const
virtual
void CaloSubdetectorGeometry::getSummary ( CaloSubdetectorGeometry::TrVec tVec,
CaloSubdetectorGeometry::IVec iVec,
CaloSubdetectorGeometry::DimVec dVec,
CaloSubdetectorGeometry::IVec dinsVector 
) const
virtual

Reimplemented in HcalGeometry, CaloTowerGeometry, and HGCalGeometry.

Definition at line 148 of file CaloSubdetectorGeometry.cc.

const std::vector< DetId > & CaloSubdetectorGeometry::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 in HGCalGeometry, HcalGeometry, and HcalDDDGeometry.

Definition at line 37 of file CaloSubdetectorGeometry.cc.

Referenced by testEcalTPGScale::analyze(), CaloCellCrossing::CaloCellCrossing(), and CastorGeometry::getClosestCell().

unsigned int CaloSubdetectorGeometry::indexFor ( const DetId id) const
protectedvirtual

Reimplemented in HcalGeometry, HGCalGeometry, and CaloTowerGeometry.

Definition at line 324 of file CaloSubdetectorGeometry.cc.

virtual void CaloSubdetectorGeometry::initializeParms ( )
inlinevirtual

Reimplemented in HGCalGeometry, EcalEndcapGeometry, and EcalPreshowerGeometry.

Definition at line 103 of file CaloSubdetectorGeometry.h.

References reco::return().

103 { return ; }
return(e1-e2)*(e1-e2)+dp *dp
virtual void CaloSubdetectorGeometry::newCell ( const GlobalPoint f1,
const GlobalPoint f2,
const GlobalPoint f3,
const CCGFloat parm,
const DetId detId 
)
pure virtual
virtual unsigned int CaloSubdetectorGeometry::numberOfParametersPerShape ( ) const
inlinevirtual
virtual unsigned int CaloSubdetectorGeometry::numberOfShapes ( ) const
inlinevirtual
virtual unsigned int CaloSubdetectorGeometry::numberOfTransformParms ( ) const
inlinevirtual

Reimplemented in EcalPreshowerGeometry, and CastorGeometry.

Definition at line 94 of file CaloSubdetectorGeometry.h.

Referenced by CaloTowerGeometry::getSummary().

94 { return 6 ; }
CaloSubdetectorGeometry& CaloSubdetectorGeometry::operator= ( const CaloSubdetectorGeometry )
private
ParMgr* CaloSubdetectorGeometry::parMgr ( )
inline
const ParMgr* CaloSubdetectorGeometry::parMgrConst ( ) const
inline

Definition at line 87 of file CaloSubdetectorGeometry.h.

References m_parMgr.

87 { return m_parMgr ; }
ParVecVec& CaloSubdetectorGeometry::parVecVec ( )
inline
const ParVecVec& CaloSubdetectorGeometry::parVecVec ( ) const
inline

Definition at line 90 of file CaloSubdetectorGeometry.h.

References m_parVecVec.

90 { return m_parVecVec ; }
bool CaloSubdetectorGeometry::present ( const DetId id) const
virtual

is this detid present in the geometry?

Reimplemented in EcalPreshowerGeometry.

Definition at line 50 of file CaloSubdetectorGeometry.cc.

Referenced by CaloGeometry::present().

unsigned int CaloSubdetectorGeometry::sizeForDenseIndex ( const DetId id) const
protectedvirtual

Reimplemented in HcalGeometry, and CaloTowerGeometry.

Definition at line 326 of file CaloSubdetectorGeometry.cc.

Member Data Documentation

CaloCellGeometry::CornersMgr* CaloSubdetectorGeometry::m_cmgr
private

Definition at line 126 of file CaloSubdetectorGeometry.h.

Referenced by cornersMgr().

std::atomic<std::vector<CCGFloat>*> CaloSubdetectorGeometry::m_deltaEta
mutableprivate

Definition at line 136 of file CaloSubdetectorGeometry.h.

std::atomic<std::vector<CCGFloat>*> CaloSubdetectorGeometry::m_deltaPhi
mutableprivate

Definition at line 135 of file CaloSubdetectorGeometry.h.

ParMgr* CaloSubdetectorGeometry::m_parMgr
private

Definition at line 124 of file CaloSubdetectorGeometry.h.

Referenced by parMgr(), and parMgrConst().

ParVecVec CaloSubdetectorGeometry::m_parVecVec
protected

Definition at line 112 of file CaloSubdetectorGeometry.h.

Referenced by parVecVec().

bool CaloSubdetectorGeometry::m_sortedIds
private

Definition at line 132 of file CaloSubdetectorGeometry.h.

std::vector<DetId> CaloSubdetectorGeometry::m_validIds
protected

Definition at line 120 of file CaloSubdetectorGeometry.h.

Referenced by HGCalGeometry::getValidDetIds().