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), m_ownsTopology(true), m_cellVec(k_NumberOfCellsForCorners) {}
14 
16  : theTopology(topology), m_ownsTopology(false), m_cellVec(k_NumberOfCellsForCorners) {}
17 
19  if (m_ownsTopology)
20  delete theTopology;
21 }
22 
24  DetId returnId(0);
25  const std::vector<DetId>& detIds(getValidDetIds());
26  for (auto detId : detIds) {
27  auto cell = getGeometry(detId);
28  if (nullptr != cell && cell->inside(r)) {
29  returnId = detId;
30  break;
31  }
32  }
33  return returnId;
34 }
35 
37  const CaloGenericDetId gid(id);
38 
39  assert(gid.isCastor());
40 
41  return 0;
42 }
43 
45  return (unsigned int)DetId::Calo - 1;
46 }
47 
48 void CastorGeometry::localCorners(Pt3DVec& lc, const CCGFloat* pv, unsigned int /*i*/, Pt3D& ref) {
50 }
51 
53  const GlobalPoint& /*f2*/,
54  const GlobalPoint& /*f3*/,
55  const CCGFloat* parm,
56  const DetId& detId) {
57  const CaloGenericDetId cgid(detId);
58 
59  assert(cgid.isCastor());
60 
61  const unsigned int di(cgid.denseIndex());
62 
65 }
66 
68  // Modify the RawPtr class
69  return CaloCellGeometryPtr(m_cellVec.size() <= index || nullptr == m_cellVec[index].param() ? nullptr
70  : &m_cellVec[index]);
71 }
virtual CellMayOwnPtr getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
CaloCellGeometryPtr getGeometryRawPtr(uint32_t index) const override
DetId getClosestCell(const GlobalPoint &r) const override
uint32_t denseIndex() const
static unsigned int alignmentTransformIndexLocal(const DetId &id)
std::vector< Pt3D > Pt3DVec
assert(be >=bs)
CaloCellGeometry::CCGFloat CCGFloat
const CastorTopology * theTopology
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)
~CastorGeometry() override
CaloCellGeometry::CCGFloat CCGFloat
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: DetId.h:17
void addValidID(const DetId &id)
CaloCellGeometry::CornersMgr * cornersMgr()
void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
CaloCellGeometry::Pt3D Pt3D
HepGeom::Point3D< CCGFloat > Pt3D
CaloCellGeometry::Pt3DVec Pt3DVec
CaloCellGeometry::Pt3D Pt3D
static void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
bool isCastor() const
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)