CMS 3D CMS Logo

CastorGeometry.cc
Go to the documentation of this file.
5 #include "CastorGeometryData.h"
6 #include <algorithm>
7 
11 
13  : theTopology(new CastorTopology),
14  lastReqDet_(DetId::Detector(0)),
15  lastReqSubdet_(0),
16  m_ownsTopology(true),
17  m_cellVec(k_NumberOfCellsForCorners) {}
18 
20  : theTopology(topology),
21  lastReqDet_(DetId::Detector(0)),
22  lastReqSubdet_(0),
23  m_ownsTopology(false),
24  m_cellVec(k_NumberOfCellsForCorners) {}
25 
27  if (m_ownsTopology)
28  delete theTopology;
29 }
30 
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 }
43 
45  const CaloGenericDetId gid(id);
46 
47  assert(gid.isCastor());
48 
49  return 0;
50 }
51 
53  return (unsigned int)DetId::Calo - 1;
54 }
55 
56 void CastorGeometry::localCorners(Pt3DVec& lc, const CCGFloat* pv, unsigned int /*i*/, Pt3D& ref) {
58 }
59 
61  const GlobalPoint& /*f2*/,
62  const GlobalPoint& /*f3*/,
63  const CCGFloat* parm,
64  const DetId& detId) {
65  const CaloGenericDetId cgid(detId);
66 
67  assert(cgid.isCastor());
68 
69  const unsigned int di(cgid.denseIndex());
70 
72  addValidID(detId);
73 }
74 
76  // Modify the RawPtr class
77  const CaloCellGeometry* cell(&m_cellVec[index]);
78  return (m_cellVec.size() < index || nullptr == cell->param() ? nullptr : cell);
79 }
CaloCellGeometry::Pt3DVec
std::vector< Pt3D > Pt3DVec
Definition: CaloCellGeometry.h:55
CaloGenericDetId.h
CaloCellGeometry::CCGFloat
float CCGFloat
Definition: CaloCellGeometry.h:52
funct::false
false
Definition: Factorize.h:34
CaloGenericDetId
Definition: CaloGenericDetId.h:12
IdealCastorTrapezoid
Definition: IdealCastorTrapezoid.h:32
CastorGeometryData.h
cms::cuda::assert
assert(be >=bs)
CastorGeometry::Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: CastorGeometry.h:19
CastorGeometry::alignmentTransformIndexLocal
static unsigned int alignmentTransformIndexLocal(const DetId &id)
Definition: CastorGeometry.cc:44
CastorGeometry::CastorGeometry
CastorGeometry()
Definition: CastorGeometry.cc:12
CastorGeometry::Pt3DVec
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: CastorGeometry.h:20
DetId::Calo
Definition: DetId.h:29
Pt3DVec
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: CastorGeometry.cc:10
DetId
Definition: DetId.h:17
CaloSubdetectorGeometry::CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: CaloSubdetectorGeometry.h:25
CastorGeometry::alignmentTransformIndexGlobal
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
Definition: CastorGeometry.cc:52
CastorGeometry::~CastorGeometry
~CastorGeometry() override
Definition: CastorGeometry.cc:26
ecaldqm::topology
const CaloTopology * topology(nullptr)
Point3DBase< float, GlobalTag >
CaloCellGeometry::Pt3D
HepGeom::Point3D< CCGFloat > Pt3D
Definition: CaloCellGeometry.h:54
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
CastorGeometry::getClosestCell
DetId getClosestCell(const GlobalPoint &r) const override
Definition: CastorGeometry.cc:31
funct::true
true
Definition: Factorize.h:173
CaloGenericDetId::isCastor
bool isCastor() const
Definition: CaloGenericDetId.h:35
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
CaloCellGeometry::param
const CCGFloat * param() const
Definition: CaloCellGeometry.h:99
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
CastorGeometry::getGeometryRawPtr
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
Definition: CastorGeometry.cc:75
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
align::Detector
Definition: StructureType.h:86
CaloCellGeometry.h
CaloSubdetectorGeometry::cornersMgr
CaloCellGeometry::CornersMgr * cornersMgr()
Definition: CaloSubdetectorGeometry.h:82
CaloGenericDetId::denseIndex
uint32_t denseIndex() const
Definition: CaloGenericDetId.cc:24
CastorGeometry::m_ownsTopology
bool m_ownsTopology
Definition: CastorGeometry.h:72
CastorGeometry::m_cellVec
CellVec m_cellVec
Definition: CastorGeometry.h:74
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
CastorGeometry::newCell
void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
Definition: CastorGeometry.cc:60
Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: CastorGeometry.cc:9
IdealCastorTrapezoid.h
CastorGeometry::localCorners
static void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
Definition: CastorGeometry.cc:56
CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: CastorGeometry.cc:8
DeadROC_duringRun.f1
f1
Definition: DeadROC_duringRun.py:219
CastorGeometry.h