CMS 3D CMS Logo

ZdcGeometry.cc
Go to the documentation of this file.
6 #include <algorithm>
7 
11 
13  : theTopology(new ZdcTopology),
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 /*
31 DetId ZdcGeometry::getClosestCell(const GlobalPoint& r) const
32 {
33  DetId returnId ( 0 ) ;
34  const std::vector<DetId>& detIds ( getValidDetIds() ) ;
35  for( std::vector<DetId>::const_iterator it ( detIds.begin() ) ;
36  it != detIds.end(); ++it )
37  {
38  auto cell = ( getGeometry( *it ) ) ;
39  if( 0 != cell &&
40  cell->inside( r ) )
41  {
42  returnId = *it ;
43  break ;
44  }
45  }
46  return returnId ;
47 }
48 */
50  const CaloGenericDetId gid(id);
51 
52  assert(gid.isZDC());
53 
54  return (0 > HcalZDCDetId(id).zside() ? 0 : 1);
55 }
56 
57 unsigned int ZdcGeometry::alignmentTransformIndexGlobal(const DetId& /*id*/) { return (unsigned int)DetId::Calo - 1; }
58 
59 void ZdcGeometry::localCorners(Pt3DVec& lc, const CCGFloat* pv, unsigned int /*i*/, Pt3D& ref) {
61 }
62 
64  const GlobalPoint& /*f2*/,
65  const GlobalPoint& /*f3*/,
66  const CCGFloat* parm,
67  const DetId& detId) {
68  const CaloGenericDetId cgid(detId);
69 
70  assert(cgid.isZDC());
71 
72  const unsigned int di(cgid.denseIndex());
73 
74  m_cellVec[di] = IdealZDCTrapezoid(f1, cornersMgr(), parm);
75  addValidID(detId);
76 }
77 
79  // Modify the RawPtr class
80  const CaloCellGeometry* cell(&m_cellVec[index]);
81  return (m_cellVec.size() < index || nullptr == cell->param() ? nullptr : cell);
82 }
CaloCellGeometry::Pt3DVec
std::vector< Pt3D > Pt3DVec
Definition: CaloCellGeometry.h:55
CaloGenericDetId.h
ZdcGeometry::getGeometryRawPtr
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
Definition: ZdcGeometry.cc:78
CaloCellGeometry::CCGFloat
float CCGFloat
Definition: CaloCellGeometry.h:52
funct::false
false
Definition: Factorize.h:29
ZdcGeometry::Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: ZdcGeometry.h:17
ZdcGeometry::alignmentTransformIndexLocal
static unsigned int alignmentTransformIndexLocal(const DetId &id)
Definition: ZdcGeometry.cc:49
CaloGenericDetId
Definition: CaloGenericDetId.h:12
CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: ZdcGeometry.cc:8
ZdcGeometry::alignmentTransformIndexGlobal
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
Definition: ZdcGeometry.cc:57
ZdcGeometry::newCell
void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
Definition: ZdcGeometry.cc:63
cms::cuda::assert
assert(be >=bs)
ZdcHardcodeGeometryData.h
IdealZDCTrapezoid.h
DetId::Calo
Definition: DetId.h:29
ZdcGeometry.h
Pt3DVec
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: ZdcGeometry.cc:10
DetId
Definition: DetId.h:17
HcalZDCDetId
Definition: HcalZDCDetId.h:16
CaloSubdetectorGeometry::CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: CaloSubdetectorGeometry.h:25
ecaldqm::topology
const CaloTopology * topology(nullptr)
ZdcGeometry::Pt3DVec
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: ZdcGeometry.h:18
CaloGenericDetId::isZDC
bool isZDC() const
Definition: CaloGenericDetId.h:34
Point3DBase< float, GlobalTag >
CaloCellGeometry::Pt3D
HepGeom::Point3D< CCGFloat > Pt3D
Definition: CaloCellGeometry.h:54
HcalZDCDetId::zside
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalZDCDetId.h:39
funct::true
true
Definition: Factorize.h:173
ZdcGeometry::ZdcGeometry
ZdcGeometry()
Definition: ZdcGeometry.cc:12
CaloCellGeometry
Definition: CaloCellGeometry.h:50
CaloCellGeometry::param
const CCGFloat * param() const
Definition: CaloCellGeometry.h:99
ZdcGeometry::theTopology
const ZdcTopology * theTopology
Definition: ZdcGeometry.h:65
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
CaloSubdetectorGeometry::addValidID
void addValidID(const DetId &id)
Definition: CaloSubdetectorGeometry.cc:27
ZdcGeometry::~ZdcGeometry
~ZdcGeometry() override
Definition: ZdcGeometry.cc:26
IdealZDCTrapezoid::localCorners
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: IdealZDCTrapezoid.cc:39
ZdcGeometry::m_ownsTopology
bool m_ownsTopology
Definition: ZdcGeometry.h:68
align::Detector
Definition: StructureType.h:86
CaloCellGeometry.h
Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: ZdcGeometry.cc:9
CaloSubdetectorGeometry::cornersMgr
CaloCellGeometry::CornersMgr * cornersMgr()
Definition: CaloSubdetectorGeometry.h:82
CaloGenericDetId::denseIndex
uint32_t denseIndex() const
Definition: CaloGenericDetId.cc:24
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
ZdcGeometry::localCorners
static void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
Definition: ZdcGeometry.cc:59
ZdcTopology
Definition: ZdcTopology.h:14
ZdcGeometry::m_cellVec
CellVec m_cellVec
Definition: ZdcGeometry.h:70
DeadROC_duringRun.f1
f1
Definition: DeadROC_duringRun.py:219
IdealZDCTrapezoid
Definition: IdealZDCTrapezoid.h:22