CMS 3D CMS Logo

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

#include <CastorGeometry.h>

Inheritance diagram for CastorGeometry:
CaloSubdetectorGeometry

Public Types

enum  { k_NumberOfCellsForCorners = HcalCastorDetId::kSizeForDenseIndexing }
 
enum  { k_NumberOfShapes = 4 }
 
enum  { k_NumberOfParametersPerShape = 6 }
 
typedef CastorGeometryRecord AlignedRecord
 
typedef CastorAlignmentRcd AlignmentRecord
 
typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef std::vector< IdealCastorTrapezoidCellVec
 
typedef HcalCastorDetId DetIdType
 
typedef PCastorRcd 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

 CastorGeometry ()
 
 CastorGeometry (const CastorTopology *topology)
 
DetId getClosestCell (const GlobalPoint &r) const override
 
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
 
unsigned int numberOfTransformParms () const override
 
 ~CastorGeometry () 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 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 ()
 
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
 
- Protected Member Functions inherited from CaloSubdetectorGeometry
void addValidID (const DetId &id)
 
virtual std::shared_ptr< const CaloCellGeometrycellGeomPtr (uint32_t index) const
 
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 CastorTopologytheTopology
 

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 CastorGeometry.h.

Member Typedef Documentation

Definition at line 25 of file CastorGeometry.h.

Definition at line 24 of file CastorGeometry.h.

Definition at line 19 of file CastorGeometry.h.

Definition at line 17 of file CastorGeometry.h.

Definition at line 27 of file CastorGeometry.h.

Definition at line 26 of file CastorGeometry.h.

Definition at line 20 of file CastorGeometry.h.

Definition at line 21 of file CastorGeometry.h.

Definition at line 22 of file CastorGeometry.h.

Member Enumeration Documentation

anonymous enum
anonymous enum
Enumerator
k_NumberOfShapes 

Definition at line 31 of file CastorGeometry.h.

anonymous enum
Enumerator
k_NumberOfParametersPerShape 

Definition at line 33 of file CastorGeometry.h.

Constructor & Destructor Documentation

CastorGeometry::CastorGeometry ( )

Definition at line 12 of file CastorGeometry.cc.

Referenced by numberOfParametersPerShape().

CastorGeometry::CastorGeometry ( const CastorTopology topology)
explicit

Definition at line 20 of file CastorGeometry.cc.

20  :
21  theTopology(topology),
23  lastReqSubdet_(0),
24  m_ownsTopology ( false ),
26 {}
DetId::Detector lastReqDet_
const CastorTopology * theTopology
Detector
Definition: DetId.h:26
CastorGeometry::~CastorGeometry ( )
override

Definition at line 29 of file CastorGeometry.cc.

References m_ownsTopology, and theTopology.

Referenced by numberOfParametersPerShape().

30 {
31  if( m_ownsTopology ) delete theTopology ;
32 }
const CastorTopology * theTopology

Member Function Documentation

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

Definition at line 62 of file CastorGeometry.cc.

References DetId::Calo.

Referenced by numberOfAlignments().

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

Definition at line 52 of file CastorGeometry.cc.

References CaloGenericDetId::isCastor().

Referenced by numberOfAlignments().

53 {
54  const CaloGenericDetId gid ( id ) ;
55 
56  assert( gid.isCastor() ) ;
57 
58  return 0 ;
59 }
static std::string CastorGeometry::dbString ( )
inlinestatic

Definition at line 35 of file CastorGeometry.h.

35 { return "PCastorRcd" ; }
DetId CastorGeometry::getClosestCell ( const GlobalPoint r) const
overridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 35 of file CastorGeometry.cc.

References CaloSubdetectorGeometry::getGeometry(), and CaloSubdetectorGeometry::getValidDetIds().

Referenced by numberOfParametersPerShape().

36 {
37  DetId returnId ( 0 ) ;
38  const std::vector<DetId>& detIds ( getValidDetIds() ) ;
39  for(auto detId : detIds) {
40  auto cell = getGeometry(detId);
41  if( nullptr != cell &&
42  cell->inside( r ) ) {
43  returnId = detId ;
44  break ;
45  }
46  }
47  return returnId ;
48 }
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)
Definition: DetId.h:18
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
const CaloCellGeometry * CastorGeometry::getGeometryRawPtr ( uint32_t  index) const
overrideprotectedvirtual

Implements CaloSubdetectorGeometry.

Definition at line 93 of file CastorGeometry.cc.

References m_cellVec, and CaloCellGeometry::param().

Referenced by numberOfAlignments().

93  {
94  // Modify the RawPtr class
95  const CaloCellGeometry* cell(&m_cellVec[index]);
96  return (m_cellVec.size() < index ||
97  nullptr == cell->param() ? nullptr : cell);
98 }
void CastorGeometry::localCorners ( Pt3DVec lc,
const CCGFloat pv,
unsigned int  i,
Pt3D ref 
)
static

Definition at line 68 of file CastorGeometry.cc.

References IdealCastorTrapezoid::localCorners().

Referenced by numberOfAlignments().

72 {
74 }
def pv(vc)
Definition: MetAnalyzer.py:7
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
void CastorGeometry::newCell ( const GlobalPoint f1,
const GlobalPoint f2,
const GlobalPoint f3,
const CCGFloat parm,
const DetId detId 
)
overridevirtual

Implements CaloSubdetectorGeometry.

Definition at line 77 of file CastorGeometry.cc.

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

Referenced by numberOfAlignments().

82 {
83  const CaloGenericDetId cgid ( detId ) ;
84 
85  assert( cgid.isCastor() ) ;
86 
87  const unsigned int di ( cgid.denseIndex() ) ;
88 
89  m_cellVec[ di ] = IdealCastorTrapezoid( f1, cornersMgr(), parm ) ;
90  addValidID( detId ) ;
91 }
void addValidID(const DetId &id)
CaloCellGeometry::CornersMgr * cornersMgr()
static unsigned int CastorGeometry::numberOfAlignments ( )
inlinestatic
unsigned int CastorGeometry::numberOfParametersPerShape ( ) const
inlineoverridevirtual
unsigned int CastorGeometry::numberOfShapes ( ) const
inlineoverridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 39 of file CastorGeometry.h.

References k_NumberOfShapes.

unsigned int CastorGeometry::numberOfTransformParms ( ) const
inlineoverridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 37 of file CastorGeometry.h.

37 { return 3 ; }
static std::string CastorGeometry::producerTag ( )
inlinestatic

Member Data Documentation

DetId::Detector CastorGeometry::lastReqDet_
mutableprivate

Definition at line 75 of file CastorGeometry.h.

int CastorGeometry::lastReqSubdet_
mutableprivate

Definition at line 76 of file CastorGeometry.h.

CellVec CastorGeometry::m_cellVec
private

Definition at line 79 of file CastorGeometry.h.

Referenced by getGeometryRawPtr(), and newCell().

bool CastorGeometry::m_ownsTopology
private

Definition at line 77 of file CastorGeometry.h.

Referenced by ~CastorGeometry().

const CastorTopology* CastorGeometry::theTopology
private

Definition at line 74 of file CastorGeometry.h.

Referenced by ~CastorGeometry().