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

◆ AlignedRecord

Definition at line 24 of file CastorGeometry.h.

◆ AlignmentRecord

Definition at line 23 of file CastorGeometry.h.

◆ CCGFloat

Definition at line 18 of file CastorGeometry.h.

◆ CellVec

Definition at line 16 of file CastorGeometry.h.

◆ DetIdType

Definition at line 26 of file CastorGeometry.h.

◆ PGeometryRecord

Definition at line 25 of file CastorGeometry.h.

◆ Pt3D

Definition at line 19 of file CastorGeometry.h.

◆ Pt3DVec

Definition at line 20 of file CastorGeometry.h.

◆ Tr3D

Definition at line 21 of file CastorGeometry.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
k_NumberOfCellsForCorners 

Definition at line 28 of file CastorGeometry.h.

◆ anonymous enum

anonymous enum
Enumerator
k_NumberOfShapes 

Definition at line 30 of file CastorGeometry.h.

30 { k_NumberOfShapes = 4 };

◆ anonymous enum

anonymous enum
Enumerator
k_NumberOfParametersPerShape 

Definition at line 32 of file CastorGeometry.h.

Constructor & Destructor Documentation

◆ CastorGeometry() [1/2]

CastorGeometry::CastorGeometry ( )

Definition at line 12 of file CastorGeometry.cc.

◆ CastorGeometry() [2/2]

CastorGeometry::CastorGeometry ( const CastorTopology topology)
explicit

Definition at line 19 of file CastorGeometry.cc.

◆ ~CastorGeometry()

CastorGeometry::~CastorGeometry ( )
override

Definition at line 26 of file CastorGeometry.cc.

26  {
27  if (m_ownsTopology)
28  delete theTopology;
29 }

References m_ownsTopology, and theTopology.

Member Function Documentation

◆ alignmentTransformIndexGlobal()

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

Definition at line 52 of file CastorGeometry.cc.

52  {
53  return (unsigned int)DetId::Calo - 1;
54 }

References DetId::Calo.

◆ alignmentTransformIndexLocal()

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

Definition at line 44 of file CastorGeometry.cc.

44  {
45  const CaloGenericDetId gid(id);
46 
47  assert(gid.isCastor());
48 
49  return 0;
50 }

References cms::cuda::assert(), and CaloGenericDetId::isCastor().

◆ dbString()

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

Definition at line 34 of file CastorGeometry.h.

34 { return "PCastorRcd"; }

◆ getClosestCell()

DetId CastorGeometry::getClosestCell ( const GlobalPoint r) const
overridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 31 of file CastorGeometry.cc.

31  {
32  DetId returnId(0);
33  const std::vector<DetId>& detIds(getValidDetIds());
34  for (auto detId : detIds) {
35  auto cell = getGeometry(detId);
36  if (nullptr != cell && cell->inside(r)) {
37  returnId = detId;
38  break;
39  }
40  }
41  return returnId;
42 }

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

◆ getGeometryRawPtr()

const CaloCellGeometry * CastorGeometry::getGeometryRawPtr ( uint32_t  index) const
overrideprotectedvirtual

Implements CaloSubdetectorGeometry.

Definition at line 75 of file CastorGeometry.cc.

75  {
76  // Modify the RawPtr class
77  const CaloCellGeometry* cell(&m_cellVec[index]);
78  return (m_cellVec.size() < index || nullptr == cell->param() ? nullptr : cell);
79 }

References m_cellVec, and CaloCellGeometry::param().

◆ localCorners()

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

Definition at line 56 of file CastorGeometry.cc.

56  {
58 }

References IdealCastorTrapezoid::localCorners(), and MetAnalyzer::pv().

◆ newCell()

void CastorGeometry::newCell ( const GlobalPoint f1,
const GlobalPoint f2,
const GlobalPoint f3,
const CCGFloat parm,
const DetId detId 
)
overridevirtual

Implements CaloSubdetectorGeometry.

Definition at line 60 of file CastorGeometry.cc.

64  {
65  const CaloGenericDetId cgid(detId);
66 
67  assert(cgid.isCastor());
68 
69  const unsigned int di(cgid.denseIndex());
70 
72  addValidID(detId);
73 }

References CaloSubdetectorGeometry::addValidID(), cms::cuda::assert(), CaloSubdetectorGeometry::cornersMgr(), CaloGenericDetId::denseIndex(), DeadROC_duringRun::f1, CaloGenericDetId::isCastor(), and m_cellVec.

◆ numberOfAlignments()

static unsigned int CastorGeometry::numberOfAlignments ( )
inlinestatic

Definition at line 50 of file CastorGeometry.h.

50 { return 1; }

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

◆ numberOfParametersPerShape()

unsigned int CastorGeometry::numberOfParametersPerShape ( ) const
inlineoverridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 39 of file CastorGeometry.h.

References k_NumberOfParametersPerShape.

◆ numberOfShapes()

unsigned int CastorGeometry::numberOfShapes ( ) const
inlineoverridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 38 of file CastorGeometry.h.

38 { return k_NumberOfShapes; }

References k_NumberOfShapes.

◆ numberOfTransformParms()

unsigned int CastorGeometry::numberOfTransformParms ( ) const
inlineoverridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 36 of file CastorGeometry.h.

36 { return 3; }

◆ producerTag()

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

Member Data Documentation

◆ lastReqDet_

DetId::Detector CastorGeometry::lastReqDet_
mutableprivate

Definition at line 70 of file CastorGeometry.h.

◆ lastReqSubdet_

int CastorGeometry::lastReqSubdet_
mutableprivate

Definition at line 71 of file CastorGeometry.h.

◆ m_cellVec

CellVec CastorGeometry::m_cellVec
private

Definition at line 74 of file CastorGeometry.h.

Referenced by getGeometryRawPtr(), and newCell().

◆ m_ownsTopology

bool CastorGeometry::m_ownsTopology
private

Definition at line 72 of file CastorGeometry.h.

Referenced by ~CastorGeometry().

◆ theTopology

const CastorTopology* CastorGeometry::theTopology
private

Definition at line 69 of file CastorGeometry.h.

Referenced by ~CastorGeometry().

CaloGenericDetId
Definition: CaloGenericDetId.h:12
IdealCastorTrapezoid
Definition: IdealCastorTrapezoid.h:32
cms::cuda::assert
assert(be >=bs)
CastorGeometry::lastReqDet_
DetId::Detector lastReqDet_
Definition: CastorGeometry.h:70
DetId::Calo
Definition: DetId.h:29
CastorGeometry::k_NumberOfCellsForCorners
Definition: CastorGeometry.h:28
DetId
Definition: DetId.h:17
ecaldqm::topology
const CaloTopology * topology(nullptr)
CastorGeometry::k_NumberOfShapes
Definition: CastorGeometry.h:30
CaloSubdetectorGeometry::getValidDetIds
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: CaloSubdetectorGeometry.cc:32
IdealCastorTrapezoid::localCorners
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: IdealCastorTrapezoid.cc:54
CaloCellGeometry
Definition: CaloCellGeometry.h:50
CastorTopology
Definition: CastorTopology.h:13
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
CaloSubdetectorGeometry::addValidID
void addValidID(const DetId &id)
Definition: CaloSubdetectorGeometry.cc:27
CastorGeometry::theTopology
const CastorTopology * theTopology
Definition: CastorGeometry.h:69
DetId::Detector
Detector
Definition: DetId.h:24
CaloSubdetectorGeometry::getGeometry
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.
Definition: CaloSubdetectorGeometry.cc:36
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HcalCastorDetId::kSizeForDenseIndexing
Definition: HcalCastorDetId.h:71
CaloSubdetectorGeometry::cornersMgr
CaloCellGeometry::CornersMgr * cornersMgr()
Definition: CaloSubdetectorGeometry.h:82
CastorGeometry::m_ownsTopology
bool m_ownsTopology
Definition: CastorGeometry.h:72
CastorGeometry::m_cellVec
CellVec m_cellVec
Definition: CastorGeometry.h:74
CastorGeometry::k_NumberOfParametersPerShape
Definition: CastorGeometry.h:32
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
CastorGeometry::lastReqSubdet_
int lastReqSubdet_
Definition: CastorGeometry.h:71
DeadROC_duringRun.f1
f1
Definition: DeadROC_duringRun.py:219