CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
HGCalGeometry Class Referencefinal

#include <HGCalGeometry.h>

Inheritance diagram for HGCalGeometry:
CaloSubdetectorGeometry

Public Types

typedef HGCalGeometryRecord AlignedRecord
 
typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef std::vector< FlatHexagonCellVec
 
typedef std::vector< FlatTrdCellVec2
 
typedef std::vector< GlobalPointCornersVec
 
typedef std::set< DetIdDetIdSet
 
typedef PHGCalRcd PGeometryRecord
 
typedef CaloCellGeometry::Pt3D Pt3D
 
typedef CaloCellGeometry::Pt3DVec Pt3DVec
 
- 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

std::string cellElement () const
 
virtual void fillNamedParams (DDFilteredView fv)
 
CornersVec get8Corners (const DetId &id) const
 
double getArea (const DetId &detid) const
 Returns area of a cell. More...
 
DetIdSet getCells (const GlobalPoint &r, double dR) const override
 Get a list of all cells within a dR of the given cell. More...
 
DetId getClosestCell (const GlobalPoint &r) const override
 
CornersVec getCorners (const DetId &id) const
 Returns the corner points of this cell's volume. More...
 
std::shared_ptr< const CaloCellGeometrygetGeometry (const DetId &id) const override
 Get the cell geometry of a given detector id. Should return false if not found. More...
 
CornersVec getNewCorners (const DetId &id) const
 
GlobalPoint getPosition (const DetId &id) const
 
void getSummary (CaloSubdetectorGeometry::TrVec &trVector, CaloSubdetectorGeometry::IVec &iVector, CaloSubdetectorGeometry::DimVec &dimVector, CaloSubdetectorGeometry::IVec &dinsVector) const override
 
const std::vector< DetId > & getValidDetIds (DetId::Detector det=DetId::Detector(0), int subdet=0) const override
 Get a list of valid detector ids (for the given subdetector) More...
 
const std::vector< DetId > & getValidGeomDetIds (void) const
 
GlobalPoint getWaferPosition (const DetId &id) const
 
 HGCalGeometry (const HGCalTopology &topology)
 
void initializeParms () override
 
void localCorners (Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
 
DetId neighborZ (const DetId &idin, const GlobalVector &p) const
 
DetId neighborZ (const DetId &idin, const MagneticField *bField, int charge, const GlobalVector &momentum) const
 
void newCell (const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
 
bool present (const DetId &id) const override
 is this detid present in the geometry? More...
 
void sortDetIds ()
 
const HGCalTopologytopology () const
 
 ~HGCalGeometry () 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 CellSet getCellSet (const GlobalPoint &r, double dR) const
 
virtual unsigned int numberOfParametersPerShape () const
 
virtual unsigned int numberOfShapes () const
 
virtual unsigned int numberOfTransformParms () const
 
CaloSubdetectorGeometryoperator= (const CaloSubdetectorGeometry &)=delete
 
ParMgrparMgr ()
 
const ParMgrparMgrConst () const
 
ParVecVecparVecVec ()
 
const ParVecVecparVecVec () const
 
virtual ~CaloSubdetectorGeometry ()
 The base class DOES assume that it owns the CaloCellGeometry objects. More...
 

Static Public Member Functions

static std::string dbString ()
 
static std::string producerTag ()
 

Static Public Attributes

static constexpr unsigned int k_NumberOfParametersPerHex = 3
 
static constexpr unsigned int k_NumberOfParametersPerShape = 3
 
static constexpr unsigned int k_NumberOfParametersPerTrd = 12
 
static constexpr unsigned int k_NumberOfShapes = 100
 
static constexpr unsigned int k_NumberOfShapesTrd = 1000
 

Protected Member Functions

void addValidID (const DetId &id)
 
std::shared_ptr< const CaloCellGeometrycellGeomPtr (uint32_t index) const override
 
unsigned int getClosestCellIndex (const GlobalPoint &r) const
 
const CaloCellGeometrygetGeometryRawPtr (uint32_t index) const override
 
unsigned int indexFor (const DetId &id) const override
 
unsigned int sizeForDenseIndex () const
 
virtual unsigned int sizeForDenseIndex (const DetId &id) const
 
- Protected Member Functions inherited from CaloSubdetectorGeometry
void addValidID (const DetId &id)
 
virtual unsigned int sizeForDenseIndex (const DetId &id) const
 

Private Member Functions

std::shared_ptr< const CaloCellGeometrycellGeomPtr (uint32_t index, const GlobalPoint &p) const
 
template<class T >
unsigned int getClosestCellIndex (const GlobalPoint &r, const std::vector< T > &vec) const
 
DetId getGeometryDetId (DetId detId) const
 

Private Attributes

CellVec m_cellVec
 
CellVec2 m_cellVec2
 
DetId::Detector m_det
 
ForwardSubdetector m_subdet
 
const HGCalTopologym_topology
 
std::vector< DetIdm_validGeomIds
 
HGCalGeometryMode::GeometryMode mode_
 
const double twoBysqrt3_
 

Static Private Attributes

static constexpr double k_fac1 = 0.5
 
static constexpr double k_fac2 = 1.0 / 3.0
 
static constexpr double k_half = 0.5
 

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 30 of file HGCalGeometry.h.

Member Typedef Documentation

◆ AlignedRecord

Definition at line 41 of file HGCalGeometry.h.

◆ CCGFloat

Definition at line 34 of file HGCalGeometry.h.

◆ CellVec

typedef std::vector<FlatHexagon> HGCalGeometry::CellVec

Definition at line 32 of file HGCalGeometry.h.

◆ CellVec2

typedef std::vector<FlatTrd> HGCalGeometry::CellVec2

Definition at line 33 of file HGCalGeometry.h.

◆ CornersVec

typedef std::vector<GlobalPoint> HGCalGeometry::CornersVec

Definition at line 39 of file HGCalGeometry.h.

◆ DetIdSet

typedef std::set<DetId> HGCalGeometry::DetIdSet

Definition at line 38 of file HGCalGeometry.h.

◆ PGeometryRecord

Definition at line 42 of file HGCalGeometry.h.

◆ Pt3D

Definition at line 35 of file HGCalGeometry.h.

◆ Pt3DVec

Definition at line 36 of file HGCalGeometry.h.

Constructor & Destructor Documentation

◆ HGCalGeometry()

HGCalGeometry::HGCalGeometry ( const HGCalTopology topology)

Definition at line 26 of file HGCalGeometry.cc.

27  : m_topology(topology_),
28  m_validGeomIds(topology_.totalGeomModules()),
29  mode_(topology_.geomMode()),
30  m_det(topology_.detector()),
31  m_subdet(topology_.subDetector()),
32  twoBysqrt3_(2.0 / std::sqrt(3.0)) {
33  if (m_det == DetId::HGCalHSc) {
34  m_cellVec2 = CellVec2(topology_.totalGeomModules());
35  } else {
36  m_cellVec = CellVec(topology_.totalGeomModules());
37  }
39 #ifdef EDM_ML_DEBUG
40  edm::LogVerbatim("HGCalGeom") << "Expected total # of Geometry Modules " << m_topology.totalGeomModules();
41 #endif
42 }

References DetId::HGCalHSc, m_cellVec, m_cellVec2, m_det, m_topology, CaloSubdetectorGeometry::m_validIds, HGCalTopology::totalGeomModules(), and HGCalTopology::totalModules().

◆ ~HGCalGeometry()

HGCalGeometry::~HGCalGeometry ( )
override

Definition at line 44 of file HGCalGeometry.cc.

44 {}

Member Function Documentation

◆ addValidID()

void HGCalGeometry::addValidID ( const DetId id)
protected

Definition at line 605 of file HGCalGeometry.cc.

605  {
606  edm::LogError("HGCalGeom") << "HGCalGeometry::addValidID is not implemented";
607 }

◆ cellElement()

std::string HGCalGeometry::cellElement ( ) const

Definition at line 519 of file HGCalGeometry.cc.

519  {
520  if (m_subdet == HGCEE || m_det == DetId::HGCalEE)
521  return "HGCalEE";
522  else if (m_subdet == HGCHEF || m_det == DetId::HGCalHSi)
523  return "HGCalHEFront";
524  else if (m_subdet == HGCHEB || m_det == DetId::HGCalHSc)
525  return "HGCalHEBack";
526  else
527  return "Unknown";
528 }

References DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, HGCEE, HGCHEB, HGCHEF, m_det, and m_subdet.

◆ cellGeomPtr() [1/2]

std::shared_ptr< const CaloCellGeometry > HGCalGeometry::cellGeomPtr ( uint32_t  index) const
overrideprotectedvirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 560 of file HGCalGeometry.cc.

560  {
561  if ((index >= m_cellVec.size() && m_det != DetId::HGCalHSc) ||
562  (index >= m_cellVec2.size() && m_det == DetId::HGCalHSc) || (m_validGeomIds[index].rawId() == 0))
563  return nullptr;
564  static const auto do_not_delete = [](const void*) {};
565  if (m_det == DetId::HGCalHSc) {
566  auto cell = std::shared_ptr<const CaloCellGeometry>(&m_cellVec2[index], do_not_delete);
567  if (nullptr == cell->param())
568  return nullptr;
569  return cell;
570  } else {
571  auto cell = std::shared_ptr<const CaloCellGeometry>(&m_cellVec[index], do_not_delete);
572  if (nullptr == cell->param())
573  return nullptr;
574  return cell;
575  }
576 }

References DetId::HGCalHSc, m_cellVec, m_cellVec2, m_det, and m_validGeomIds.

Referenced by cellGeomPtr(), getGeometry(), and getSummary().

◆ cellGeomPtr() [2/2]

std::shared_ptr< const CaloCellGeometry > HGCalGeometry::cellGeomPtr ( uint32_t  index,
const GlobalPoint p 
) const
private

Definition at line 578 of file HGCalGeometry.cc.

578  {
579  if ((index >= m_cellVec.size() && m_det != DetId::HGCalHSc) ||
580  (index >= m_cellVec2.size() && m_det == DetId::HGCalHSc) || (m_validGeomIds[index].rawId() == 0))
581  return nullptr;
582  if (pos == GlobalPoint())
583  return cellGeomPtr(index);
584  if (m_det == DetId::HGCalHSc) {
585  auto cell = std::make_shared<FlatTrd>(m_cellVec2[index]);
586  cell->setPosition(pos);
587 #ifdef EDM_ML_DEBUG
588  edm::LogVerbatim("HGCalGeom") << "cellGeomPtr " << index << ":" << cell;
589 #endif
590  if (nullptr == cell->param())
591  return nullptr;
592  return cell;
593  } else {
594  auto cell = std::make_shared<FlatHexagon>(m_cellVec[index]);
595  cell->setPosition(pos);
596 #ifdef EDM_ML_DEBUG
597  edm::LogVerbatim("HGCalGeom") << "cellGeomPtr " << index << ":" << cell;
598 #endif
599  if (nullptr == cell->param())
600  return nullptr;
601  return cell;
602  }
603 }

References cellGeomPtr(), DetId::HGCalHSc, m_cellVec, m_cellVec2, m_det, and m_validGeomIds.

◆ dbString()

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

Definition at line 50 of file HGCalGeometry.h.

50 { return "PHGCalRcd"; }

Referenced by CaloGeometryDBEP< T, U >::produceAligned().

◆ fillNamedParams()

void HGCalGeometry::fillNamedParams ( DDFilteredView  fv)
virtual

Definition at line 46 of file HGCalGeometry.cc.

46 {}

◆ get8Corners()

HGCalGeometry::CornersVec HGCalGeometry::get8Corners ( const DetId id) const

Definition at line 314 of file HGCalGeometry.cc.

314  {
315  unsigned int ncorner = FlatTrd::ncorner_;
316  HGCalGeometry::CornersVec co(ncorner, GlobalPoint(0, 0, 0));
317  unsigned int cellIndex = indexFor(detid);
319  if (cellIndex < m_cellVec2.size() && m_det == DetId::HGCalHSc) {
320  GlobalPoint v = getPosition(detid);
321  std::pair<double, double> rr = m_topology.dddConstants().cellSizeTrap(id.iType, id.iSec1);
322  float dr = k_half * (rr.second - rr.first);
323  float dfi = m_cellVec2[cellIndex].param()[FlatTrd::k_Cell];
324  float dz = id.zSide * m_cellVec2[cellIndex].param()[FlatTrd::k_dZ];
325  float r = v.perp();
326  float fi = v.phi();
327  static const int signr[] = {1, 1, -1, -1, 1, 1, -1, -1};
328  static const int signf[] = {-1, 1, 1, -1, -1, 1, 1, -1};
329  static const int signz[] = {-1, -1, -1, -1, 1, 1, 1, 1};
330  for (unsigned int i = 0; i < ncorner; ++i) {
331  co[i] = GlobalPoint((r + signr[i] * dr) * cos(fi + signf[i] * dfi),
332  (r + signr[i] * dr) * sin(fi + signf[i] * dfi),
333  (v.z() + signz[i] * dz));
334  }
335  } else if (cellIndex < m_cellVec.size() && m_det != DetId::HGCalHSc) {
336  std::pair<float, float> xy;
337  float dx(0);
339  xy = m_topology.dddConstants().locateCellHex(id.iCell1, id.iSec1, true);
340  dx = m_cellVec[cellIndex].param()[FlatHexagon::k_r];
341  } else {
342  xy = m_topology.dddConstants().locateCell(id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2, true, false);
343  dx = k_fac2 * m_cellVec[cellIndex].param()[FlatHexagon::k_r];
344  }
345  static const int signx[] = {-1, -1, 1, 1, -1, -1, 1, 1};
346  static const int signy[] = {-1, 1, 1, -1, -1, 1, 1, -1};
347  static const int signz[] = {-1, -1, -1, -1, 1, 1, 1, 1};
348  float dz = m_cellVec[cellIndex].param()[FlatHexagon::k_dZ];
349  for (unsigned int i = 0; i < ncorner; ++i) {
350  const HepGeom::Point3D<float> lcoord(xy.first + signx[i] * dx, xy.second + signy[i] * dx, signz[i] * dz);
351  co[i] = m_cellVec[cellIndex].getPosition(lcoord);
352  }
353  }
354  return co;
355 }

References HGCalDDDConstants::cellSizeTrap(), cms::cuda::co, funct::cos(), HGCalTopology::dddConstants(), HGCalTopology::decode(), flavorHistoryFilter_cfi::dr, PVValHelper::dx, PVValHelper::dz, getPosition(), HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, DetId::HGCalHSc, mps_fire::i, indexFor(), FlatTrd::k_Cell, FlatTrd::k_dZ, FlatHexagon::k_dZ, k_fac2, k_half, FlatHexagon::k_r, HGCalDDDConstants::locateCell(), HGCalDDDConstants::locateCellHex(), m_cellVec, m_cellVec2, m_det, m_topology, mode_, FlatTrd::ncorner_, alignCSCRings::r, findQualityFiles::rr, funct::sin(), findQualityFiles::v, and geometryCSVtoXML::xy.

◆ getArea()

double HGCalGeometry::getArea ( const DetId detid) const

Returns area of a cell.

Definition at line 248 of file HGCalGeometry.cc.

248  {
249  HGCalGeometry::CornersVec corners = getNewCorners(detid);
250  double area(0);
251  if (corners.size() > 1) {
252  int n = corners.size() - 1;
253  int j = n - 1;
254  for (int i = 0; i < n; ++i) {
255  area += ((corners[j].x() + corners[i].x()) * (corners[i].y() - corners[j].y()));
256  j = i;
257  }
258  }
259  return (0.5 * area);
260 }

References custom_jme_cff::area, getNewCorners(), mps_fire::i, dqmiolumiharvest::j, dqmiodumpmetadata::n, and y.

◆ getCells()

HGCalGeometry::DetIdSet HGCalGeometry::getCells ( const GlobalPoint r,
double  dR 
) const
overridevirtual

Get a list of all cells within a dR of the given cell.

The default implementation makes a loop over all cell geometries. Cleverer implementations are suggested to use rough conversions between eta/phi and ieta/iphi and test on the boundaries.

Reimplemented from CaloSubdetectorGeometry.

Definition at line 514 of file HGCalGeometry.cc.

514  {
516  return dss;
517 }

◆ getClosestCell()

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

Reimplemented from CaloSubdetectorGeometry.

Definition at line 464 of file HGCalGeometry.cc.

464  {
465  unsigned int cellIndex = getClosestCellIndex(r);
466  if ((cellIndex < m_cellVec.size() && m_det != DetId::HGCalHSc) ||
467  (cellIndex < m_cellVec2.size() && m_det == DetId::HGCalHSc)) {
469  HepGeom::Point3D<float> local;
470  if (r.z() > 0) {
471  local = HepGeom::Point3D<float>(r.x(), r.y(), 0);
472  id.zSide = 1;
473  } else {
474  local = HepGeom::Point3D<float>(-r.x(), r.y(), 0);
475  id.zSide = -1;
476  }
478  const auto& kxy = m_topology.dddConstants().assignCell(local.x(), local.y(), id.iLay, id.iType, true);
479  id.iCell1 = kxy.second;
480  id.iSec1 = kxy.first;
481  id.iType = m_topology.dddConstants().waferTypeT(kxy.first);
482  if (id.iType != 1)
483  id.iType = -1;
484  } else if (mode_ == HGCalGeometryMode::Trapezoid) {
485  id.iLay = m_topology.dddConstants().getLayer(r.z(), true);
486  const auto& kxy = m_topology.dddConstants().assignCellTrap(r.x(), r.y(), r.z(), id.iLay, true);
487  id.iSec1 = kxy[0];
488  id.iCell1 = kxy[1];
489  id.iType = kxy[2];
490  } else {
491  id.iLay = m_topology.dddConstants().getLayer(r.z(), true);
492  const auto& kxy = m_topology.dddConstants().assignCellHex(local.x(), local.y(), id.iLay, true);
493  id.iSec1 = kxy[0];
494  id.iSec2 = kxy[1];
495  id.iType = kxy[2];
496  id.iCell1 = kxy[3];
497  id.iCell2 = kxy[4];
498  }
499 #ifdef EDM_ML_DEBUG
500  edm::LogVerbatim("HGCalGeom") << "getClosestCell: local " << local << " Id " << id.zSide << ":" << id.iLay << ":"
501  << id.iSec1 << ":" << id.iSec2 << ":" << id.iType << ":" << id.iCell1 << ":"
502  << id.iCell2;
503 #endif
504 
505  //check if returned cell is valid
506  if (id.iCell1 >= 0)
507  return m_topology.encode(id);
508  }
509 
510  //if not valid or out of bounds return a null DetId
511  return DetId();
512 }

References HGCalDDDConstants::assignCell(), HGCalDDDConstants::assignCellHex(), HGCalDDDConstants::assignCellTrap(), HGCalTopology::dddConstants(), HGCalTopology::decode(), HGCalTopology::encode(), getClosestCellIndex(), HGCalDDDConstants::getLayer(), HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, DetId::HGCalHSc, DTRecHitClients_cfi::local, m_cellVec, m_cellVec2, m_det, m_topology, m_validGeomIds, mode_, alignCSCRings::r, HGCalGeometryMode::Trapezoid, and HGCalDDDConstants::waferTypeT().

Referenced by neighborZ().

◆ getClosestCellIndex() [1/2]

unsigned int HGCalGeometry::getClosestCellIndex ( const GlobalPoint r) const
protected

Definition at line 609 of file HGCalGeometry.cc.

609  {
611 }

References DetId::HGCalHSc, m_cellVec, m_cellVec2, m_det, and alignCSCRings::r.

Referenced by getClosestCell().

◆ getClosestCellIndex() [2/2]

template<class T >
unsigned int HGCalGeometry::getClosestCellIndex ( const GlobalPoint r,
const std::vector< T > &  vec 
) const
private

Definition at line 614 of file HGCalGeometry.cc.

614  {
615  float phip = r.phi();
616  float zp = r.z();
617  float dzmin(9999), dphimin(9999), dphi10(0.175);
618  unsigned int cellIndex = vec.size();
619  for (unsigned int k = 0; k < vec.size(); ++k) {
620  float dphi = phip - vec[k].phiPos();
621  while (dphi > M_PI)
622  dphi -= 2 * M_PI;
623  while (dphi <= -M_PI)
624  dphi += 2 * M_PI;
625  if (std::abs(dphi) < dphi10) {
626  float dz = std::abs(zp - vec[k].getPosition().z());
627  if (dz < (dzmin + 0.001)) {
628  dzmin = dz;
629  if (std::abs(dphi) < (dphimin + 0.01)) {
630  cellIndex = k;
631  dphimin = std::abs(dphi);
632  } else {
633  if (cellIndex >= vec.size())
634  cellIndex = k;
635  }
636  }
637  }
638  }
639 #ifdef EDM_ML_DEBUG
640  edm::LogVerbatim("HGCalGeom") << "getClosestCellIndex::Input " << zp << ":" << phip << " Index " << cellIndex;
641  if (cellIndex < vec.size())
642  edm::LogVerbatim("HGCalGeom") << " Cell z " << vec[cellIndex].getPosition().z() << ":" << dzmin << " phi "
643  << vec[cellIndex].phiPos() << ":" << dphimin;
644 #endif
645  return cellIndex;
646 }

References funct::abs(), PVValHelper::dz, getPosition(), dqmdumpme::k, M_PI, alignCSCRings::r, and z.

◆ getCorners()

HGCalGeometry::CornersVec HGCalGeometry::getCorners ( const DetId id) const

Returns the corner points of this cell's volume.

Definition at line 262 of file HGCalGeometry.cc.

262  {
263  unsigned int ncorner = ((m_det == DetId::HGCalHSc) ? FlatTrd::ncorner_ : FlatHexagon::ncorner_);
264  HGCalGeometry::CornersVec co(ncorner, GlobalPoint(0, 0, 0));
265  unsigned int cellIndex = indexFor(detid);
267  if (cellIndex < m_cellVec2.size() && m_det == DetId::HGCalHSc) {
268  GlobalPoint v = getPosition(detid);
269  std::pair<double, double> rr = m_topology.dddConstants().cellSizeTrap(id.iType, id.iSec1);
270  float dr = k_half * (rr.second - rr.first);
271  float dfi = m_cellVec2[cellIndex].param()[FlatTrd::k_Cell];
272  float dz = id.zSide * m_cellVec2[cellIndex].param()[FlatTrd::k_dZ];
273  float r = v.perp();
274  float fi = v.phi();
275  static const int signr[] = {1, 1, -1, -1, 1, 1, -1, -1};
276  static const int signf[] = {-1, 1, 1, -1, -1, 1, 1, -1};
277  static const int signz[] = {-1, -1, -1, -1, 1, 1, 1, 1};
278  for (unsigned int i = 0; i < ncorner; ++i) {
279  co[i] = GlobalPoint((r + signr[i] * dr) * cos(fi + signf[i] * dfi),
280  (r + signr[i] * dr) * sin(fi + signf[i] * dfi),
281  (v.z() + signz[i] * dz));
282  }
283  } else if (cellIndex < m_cellVec.size() && m_det != DetId::HGCalHSc) {
284  std::pair<float, float> xy;
286  xy = m_topology.dddConstants().locateCellHex(id.iCell1, id.iSec1, true);
287  float dx = m_cellVec[cellIndex].param()[FlatHexagon::k_r];
288  float dy = k_half * m_cellVec[cellIndex].param()[FlatHexagon::k_R];
289  float dz = m_cellVec[cellIndex].param()[FlatHexagon::k_dZ];
290  static const int signx[] = {0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1};
291  static const int signy[] = {-2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1};
292  static const int signz[] = {-1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1};
293  for (unsigned int i = 0; i < ncorner; ++i) {
294  const HepGeom::Point3D<float> lcoord(xy.first + signx[i] * dx, xy.second + signy[i] * dy, signz[i] * dz);
295  co[i] = m_cellVec[cellIndex].getPosition(lcoord);
296  }
297  } else {
298  xy = m_topology.dddConstants().locateCell(id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2, true, false);
299  float dx = k_fac2 * m_cellVec[cellIndex].param()[FlatHexagon::k_r];
300  float dy = k_fac1 * m_cellVec[cellIndex].param()[FlatHexagon::k_R];
301  float dz = -id.zSide * m_cellVec[cellIndex].param()[FlatHexagon::k_dZ];
302  static const int signx[] = {1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2};
303  static const int signy[] = {1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0};
304  static const int signz[] = {-1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1};
305  for (unsigned int i = 0; i < ncorner; ++i) {
306  const HepGeom::Point3D<float> lcoord(xy.first + signx[i] * dx, xy.second + signy[i] * dy, signz[i] * dz);
307  co[i] = m_cellVec[cellIndex].getPosition(lcoord);
308  }
309  }
310  }
311  return co;
312 }

References HGCalDDDConstants::cellSizeTrap(), cms::cuda::co, funct::cos(), HGCalTopology::dddConstants(), HGCalTopology::decode(), flavorHistoryFilter_cfi::dr, PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, getPosition(), HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, DetId::HGCalHSc, mps_fire::i, indexFor(), FlatTrd::k_Cell, FlatTrd::k_dZ, FlatHexagon::k_dZ, k_fac1, k_fac2, k_half, FlatHexagon::k_r, FlatHexagon::k_R, HGCalDDDConstants::locateCell(), HGCalDDDConstants::locateCellHex(), m_cellVec, m_cellVec2, m_det, m_topology, mode_, FlatHexagon::ncorner_, FlatTrd::ncorner_, alignCSCRings::r, findQualityFiles::rr, funct::sin(), findQualityFiles::v, and geometryCSVtoXML::xy.

◆ getGeometry()

std::shared_ptr< const CaloCellGeometry > HGCalGeometry::getGeometry ( const DetId id) const
overridevirtual

Get the cell geometry of a given detector id. Should return false if not found.

Reimplemented from CaloSubdetectorGeometry.

Definition at line 175 of file HGCalGeometry.cc.

175  {
176  if (detId == DetId())
177  return nullptr; // nothing to get
178  DetId geomId = getGeometryDetId(detId);
179  const uint32_t cellIndex(m_topology.detId2denseGeomId(geomId));
180  const GlobalPoint pos = (detId != geomId) ? getPosition(detId) : GlobalPoint();
181  return cellGeomPtr(cellIndex, pos);
182 }

References cellGeomPtr(), HGCalTopology::detId2denseGeomId(), getGeometryDetId(), getPosition(), and m_topology.

◆ getGeometryDetId()

DetId HGCalGeometry::getGeometryDetId ( DetId  detId) const
private

Definition at line 762 of file HGCalGeometry.cc.

762  {
763  DetId geomId;
765  geomId = static_cast<DetId>(HGCalDetId(detId).geometryCell());
766  } else if (mode_ == HGCalGeometryMode::Trapezoid) {
767  geomId = static_cast<DetId>(HGCScintillatorDetId(detId).geometryCell());
768  } else if (m_topology.isHFNose()) {
769  geomId = static_cast<DetId>(HFNoseDetId(detId).geometryCell());
770  } else {
771  geomId = static_cast<DetId>(HGCSiliconDetId(detId).geometryCell());
772  }
773  return geomId;
774 }

References HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, HGCalTopology::isHFNose(), m_topology, mode_, and HGCalGeometryMode::Trapezoid.

Referenced by getGeometry(), indexFor(), newCell(), and present().

◆ getGeometryRawPtr()

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

Implements CaloSubdetectorGeometry.

Definition at line 545 of file HGCalGeometry.cc.

545  {
546  // Modify the RawPtr class
547  if (m_det == DetId::HGCalHSc) {
548  if (m_cellVec2.size() < index)
549  return nullptr;
550  const CaloCellGeometry* cell(&m_cellVec2[index]);
551  return (nullptr == cell->param() ? nullptr : cell);
552  } else {
553  if (m_cellVec2.size() < index)
554  return nullptr;
555  const CaloCellGeometry* cell(&m_cellVec[index]);
556  return (nullptr == cell->param() ? nullptr : cell);
557  }
558 }

References DetId::HGCalHSc, m_cellVec, m_cellVec2, m_det, and CaloCellGeometry::param().

Referenced by present().

◆ getNewCorners()

HGCalGeometry::CornersVec HGCalGeometry::getNewCorners ( const DetId id) const

Definition at line 357 of file HGCalGeometry.cc.

357  {
358  unsigned int ncorner = (m_det == DetId::HGCalHSc) ? 5 : 7;
359  HGCalGeometry::CornersVec co(ncorner, GlobalPoint(0, 0, 0));
360  unsigned int cellIndex = indexFor(detid);
362  if (cellIndex < m_cellVec2.size() && m_det == DetId::HGCalHSc) {
363  GlobalPoint v = getPosition(detid);
364  std::pair<double, double> rr = m_topology.dddConstants().cellSizeTrap(id.iType, id.iSec1);
365  float dr = k_half * (rr.second - rr.first);
366  float dfi = m_cellVec2[cellIndex].param()[FlatTrd::k_Cell];
367  float dz = -id.zSide * m_cellVec2[cellIndex].param()[FlatTrd::k_dZ];
368  float r = v.perp();
369  float fi = v.phi();
370  static const int signr[] = {1, 1, -1, -1};
371  static const int signf[] = {-1, 1, 1, -1};
372  for (unsigned int i = 0; i < ncorner - 1; ++i) {
373  co[i] = GlobalPoint(
374  (r + signr[i] * dr) * cos(fi + signf[i] * dfi), (r + signr[i] * dr) * sin(fi + signf[i] * dfi), (v.z() + dz));
375  }
376  co[ncorner - 1] = GlobalPoint(0, 0, -2 * dz);
377  } else if (cellIndex < m_cellVec.size() && m_det != DetId::HGCalHSc) {
378  std::pair<float, float> xy;
380  xy = m_topology.dddConstants().locateCellHex(id.iCell1, id.iSec1, true);
381  } else {
382  xy = m_topology.dddConstants().locateCell(id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2, true, false);
383  }
384  float dx = k_fac2 * m_cellVec[cellIndex].param()[FlatHexagon::k_r];
385  float dy = k_fac1 * m_cellVec[cellIndex].param()[FlatHexagon::k_R];
386  float dz = -id.zSide * m_cellVec[cellIndex].param()[FlatHexagon::k_dZ];
387  static const int signx[] = {1, -1, -2, -1, 1, 2};
388  static const int signy[] = {1, 1, 0, -1, -1, 0};
389  for (unsigned int i = 0; i < ncorner - 1; ++i) {
390  const HepGeom::Point3D<float> lcoord(xy.first + signx[i] * dx, xy.second + signy[i] * dy, dz);
391  co[i] = m_cellVec[cellIndex].getPosition(lcoord);
392  }
393  co[ncorner - 1] = GlobalPoint(0, 0, -2 * dz);
394  }
395  return co;
396 }

References HGCalDDDConstants::cellSizeTrap(), cms::cuda::co, funct::cos(), HGCalTopology::dddConstants(), HGCalTopology::decode(), flavorHistoryFilter_cfi::dr, PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, getPosition(), HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, DetId::HGCalHSc, mps_fire::i, indexFor(), FlatTrd::k_Cell, FlatTrd::k_dZ, FlatHexagon::k_dZ, k_fac1, k_fac2, k_half, FlatHexagon::k_r, FlatHexagon::k_R, HGCalDDDConstants::locateCell(), HGCalDDDConstants::locateCellHex(), m_cellVec, m_cellVec2, m_det, m_topology, mode_, alignCSCRings::r, findQualityFiles::rr, funct::sin(), findQualityFiles::v, and geometryCSVtoXML::xy.

Referenced by getArea().

◆ getPosition()

GlobalPoint HGCalGeometry::getPosition ( const DetId id) const

Definition at line 192 of file HGCalGeometry.cc.

192  {
193  unsigned int cellIndex = indexFor(detid);
194  GlobalPoint glob;
195  unsigned int maxSize = ((mode_ == HGCalGeometryMode::Trapezoid) ? m_cellVec2.size() : m_cellVec.size());
196  if (cellIndex < maxSize) {
198  std::pair<float, float> xy;
200  xy = m_topology.dddConstants().locateCellHex(id.iCell1, id.iSec1, true);
201  const HepGeom::Point3D<float> lcoord(xy.first, xy.second, 0);
202  glob = m_cellVec[cellIndex].getPosition(lcoord);
203 #ifdef EDM_ML_DEBUG
204  edm::LogVerbatim("HGCalGeom") << "getPosition:: index " << cellIndex << " Local " << lcoord.x() << ":"
205  << lcoord.y() << " ID " << id.iCell1 << ":" << id.iSec1 << " Global " << glob;
206 #endif
207  } else if (mode_ == HGCalGeometryMode::Trapezoid) {
208  const HepGeom::Point3D<float> lcoord(0, 0, 0);
209  glob = m_cellVec2[cellIndex].getPosition(lcoord);
210 #ifdef EDM_ML_DEBUG
211  edm::LogVerbatim("HGCalGeom") << "getPositionTrap:: index " << cellIndex << " Local " << lcoord.x() << ":"
212  << lcoord.y() << " ID " << id.iLay << ":" << id.iSec1 << ":" << id.iCell1
213  << " Global " << glob;
214 #endif
215  } else {
216  xy = m_topology.dddConstants().locateCell(id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2, true, false, true);
217  const HepGeom::Point3D<float> lcoord(xy.first, xy.second, 0);
218  glob = m_cellVec[cellIndex].getPosition(lcoord);
219 #ifdef EDM_ML_DEBUG
220  edm::LogVerbatim("HGCalGeom") << "getPositionWafer:: index " << cellIndex << " Local " << lcoord.x() << ":"
221  << lcoord.y() << " ID " << id.iLay << ":" << id.iSec1 << ":" << id.iSec2 << ":"
222  << id.iCell1 << ":" << id.iCell2 << " Global " << glob;
223 #endif
224  }
225  }
226  return glob;
227 }

References HGCalTopology::dddConstants(), HGCalTopology::decode(), HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, indexFor(), HGCalDDDConstants::locateCell(), HGCalDDDConstants::locateCellHex(), m_cellVec, m_cellVec2, m_topology, reco_skim_cfg_mod::maxSize, mode_, HGCalGeometryMode::Trapezoid, and geometryCSVtoXML::xy.

Referenced by HGCalTBAnalyzer::analyzeDigi(), HGCalTBAnalyzer::analyzeRecHits(), HGCalTriggerGeometryImp1::buildMaps(), HGCalTriggerGeometryHexImp1::buildTriggerCellsAndModules(), HGCDigitizer::checkPosition(), HGCalSciNoiseMap::computeRadius(), HGCalTriggerNtupleHGCDigis::fill(), get8Corners(), getClosestCellIndex(), getCorners(), getGeometry(), HGCalTriggerGeometryHexImp2::getModulePosition(), HGCalTriggerGeometryHexLayerBasedImp1::getModulePosition(), HGCalTriggerGeometryV9Imp1::getModulePosition(), HGCalTriggerGeometryV9Imp2::getModulePosition(), getNewCorners(), hgcal::RecHitTools::getPosition(), HGCalTriggerGeometryHexImp2::getTriggerCellPosition(), HGCalTriggerGeometryHexLayerBasedImp1::getTriggerCellPosition(), HGCalTriggerGeometryV9Imp1::getTriggerCellPosition(), HGCalTriggerGeometryV9Imp2::getTriggerCellPosition(), and neighborZ().

◆ getSummary()

void HGCalGeometry::getSummary ( CaloSubdetectorGeometry::TrVec trVector,
CaloSubdetectorGeometry::IVec iVector,
CaloSubdetectorGeometry::DimVec dimVector,
CaloSubdetectorGeometry::IVec dinsVector 
) const
overridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 660 of file HGCalGeometry.cc.

663  {
664  unsigned int numberOfCells = m_topology.totalGeomModules(); // total Geom Modules both sides
665  unsigned int numberOfShapes = k_NumberOfShapes;
666  unsigned int numberOfParametersPerShape = ((m_det == DetId::HGCalHSc) ? (unsigned int)(k_NumberOfParametersPerTrd)
667  : (unsigned int)(k_NumberOfParametersPerHex));
668 
669  trVector.reserve(numberOfCells * numberOfTransformParms());
670  iVector.reserve(numberOfCells);
671  dimVector.reserve(numberOfShapes * numberOfParametersPerShape);
672  dinsVector.reserve(numberOfCells);
673 
674  for (unsigned itr = 0; itr < m_topology.dddConstants().getTrFormN(); ++itr) {
676  int layer = mytr.lay;
677 
679  for (int wafer = 0; wafer < m_topology.dddConstants().sectors(); ++wafer) {
680  if (m_topology.dddConstants().waferInLayer(wafer, layer, true)) {
681  HGCalParameters::hgtrap vol = m_topology.dddConstants().getModule(wafer, true, true);
683  params[FlatHexagon::k_dZ] = vol.dz;
686  dimVector.insert(dimVector.end(), params.begin(), params.end());
687  }
688  }
689  } else if (mode_ == HGCalGeometryMode::Trapezoid) {
690  int indx = m_topology.dddConstants().layerIndex(layer, true);
691  for (int md = m_topology.dddConstants().getParameter()->firstModule_[indx];
693  ++md) {
696  params[FlatTrd::k_dZ] = vol.dz;
703  dimVector.insert(dimVector.end(), params.begin(), params.end());
704  }
705  } else {
706  for (int wafer = 0; wafer < m_topology.dddConstants().sectors(); ++wafer) {
707  if (m_topology.dddConstants().waferInLayer(wafer, layer, true)) {
708  HGCalParameters::hgtrap vol = m_topology.dddConstants().getModule(wafer, true, true);
710  params[FlatHexagon::k_dZ] = vol.dz;
713  dimVector.insert(dimVector.end(), params.begin(), params.end());
714  }
715  }
716  }
717  }
718 
719  for (unsigned int i(0); i < numberOfCells; ++i) {
720  DetId detId = m_validGeomIds[i];
721  int layer(0);
723  layer = HGCalDetId(detId).layer();
724  } else if (mode_ == HGCalGeometryMode::Trapezoid) {
725  layer = HGCScintillatorDetId(detId).layer();
726  } else if (m_topology.isHFNose()) {
727  layer = HFNoseDetId(detId).layer();
728  } else {
729  layer = HGCSiliconDetId(detId).layer();
730  }
731  dinsVector.emplace_back(m_topology.detId2denseGeomId(detId));
732  iVector.emplace_back(layer);
733 
734  Tr3D tr;
735  auto ptr = cellGeomPtr(i);
736  if (nullptr != ptr) {
737  ptr->getTransform(tr, (Pt3DVec*)nullptr);
738 
739  if (Tr3D() == tr) { // there is no rotation
740  const GlobalPoint& gp(ptr->getPosition());
741  tr = HepGeom::Translate3D(gp.x(), gp.y(), gp.z());
742  }
743 
744  const CLHEP::Hep3Vector tt(tr.getTranslation());
745  trVector.emplace_back(tt.x());
746  trVector.emplace_back(tt.y());
747  trVector.emplace_back(tt.z());
748  if (6 == numberOfTransformParms()) {
749  const CLHEP::HepRotation rr(tr.getRotation());
750  const ROOT::Math::Transform3D rtr(
751  rr.xx(), rr.xy(), rr.xz(), tt.x(), rr.yx(), rr.yy(), rr.yz(), tt.y(), rr.zx(), rr.zy(), rr.zz(), tt.z());
753  rtr.GetRotation(ea);
754  trVector.emplace_back(ea.Phi());
755  trVector.emplace_back(ea.Theta());
756  trVector.emplace_back(ea.Psi());
757  }
758  }
759  }
760 }

References HGCalParameters::hgtrap::alpha, HGCalParameters::hgtrap::bl, cellGeomPtr(), HGCalParameters::hgtrap::cellSize, HGCalTopology::dddConstants(), HGCalTopology::detId2denseGeomId(), HGCalParameters::hgtrap::dz, HGCalParameters::firstModule_, HGCalDDDConstants::getModule(), HGCalDDDConstants::getParameter(), HGCalDDDConstants::getTrForm(), HGCalDDDConstants::getTrFormN(), runTauDisplay::gp, HGCalParameters::hgtrap::h, HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, DetId::HGCalHSc, mps_fire::i, HGCalTopology::isHFNose(), FlatTrd::k_Alp1, FlatTrd::k_Alp2, FlatTrd::k_Cell, FlatTrd::k_dX1, FlatTrd::k_dX2, FlatTrd::k_dX3, FlatTrd::k_dX4, FlatTrd::k_dY1, FlatTrd::k_dY2, FlatTrd::k_dZ, FlatHexagon::k_dZ, k_NumberOfParametersPerHex, k_NumberOfParametersPerTrd, k_NumberOfShapes, FlatTrd::k_Phi, FlatHexagon::k_r, FlatHexagon::k_R, FlatTrd::k_Theta, HGCalParameters::lastModule_, HGCalParameters::hgtrform::lay, HGCalDetId::layer(), HGCScintillatorDetId::layer(), HFNoseDetId::layer(), HGCSiliconDetId::layer(), HGCalDDDConstants::layerIndex(), m_det, m_topology, m_validGeomIds, mode_, CaloSubdetectorGeometry::numberOfParametersPerShape(), CaloSubdetectorGeometry::numberOfShapes(), CaloSubdetectorGeometry::numberOfTransformParms(), CalibrationSummaryClient_cfi::params, findQualityFiles::rr, HGCalDDDConstants::sectors(), HGCalParameters::hgtrap::tl, HGCalTopology::totalGeomModules(), HGCalGeometryMode::Trapezoid, groupFilesInBlocks::tt, twoBysqrt3_, and HGCalDDDConstants::waferInLayer().

◆ getValidDetIds()

const std::vector<DetId>& HGCalGeometry::getValidDetIds ( DetId::Detector  det = DetId::Detector(0),
int  subdet = 0 
) const
inlineoverridevirtual

Get a list of valid detector ids (for the given subdetector)

Note
The implementation in this class is relevant for SubdetectorGeometries which handle only a single subdetector at a time. It does not look at the det and subdet arguments.

Reimplemented from CaloSubdetectorGeometry.

Definition at line 90 of file HGCalGeometry.h.

90  {
91  return m_validIds;
92  }

References CaloSubdetectorGeometry::m_validIds.

◆ getValidGeomDetIds()

const std::vector<DetId>& HGCalGeometry::getValidGeomDetIds ( void  ) const
inline

Definition at line 93 of file HGCalGeometry.h.

93 { return m_validGeomIds; }

References m_validGeomIds.

◆ getWaferPosition()

GlobalPoint HGCalGeometry::getWaferPosition ( const DetId id) const

Definition at line 229 of file HGCalGeometry.cc.

229  {
230  unsigned int cellIndex = indexFor(detid);
231  GlobalPoint glob;
232  unsigned int maxSize = ((mode_ == HGCalGeometryMode::Trapezoid) ? m_cellVec2.size() : m_cellVec.size());
233  if (cellIndex < maxSize) {
234  const HepGeom::Point3D<float> lcoord(0, 0, 0);
236  glob = m_cellVec2[cellIndex].getPosition(lcoord);
237  } else {
238  glob = m_cellVec[cellIndex].getPosition(lcoord);
239  }
240 #ifdef EDM_ML_DEBUG
241  edm::LogVerbatim("HGCalGeom") << "getPositionTrap:: ID " << std::hex << detid.rawId() << std::dec << " index "
242  << cellIndex << " Global " << glob;
243 #endif
244  }
245  return glob;
246 }

References TauDecayModes::dec, indexFor(), m_cellVec, m_cellVec2, reco_skim_cfg_mod::maxSize, mode_, DetId::rawId(), and HGCalGeometryMode::Trapezoid.

◆ indexFor()

unsigned int HGCalGeometry::indexFor ( const DetId id) const
overrideprotectedvirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 530 of file HGCalGeometry.cc.

530  {
531  unsigned int cellIndex = ((m_det == DetId::HGCalHSc) ? m_cellVec2.size() : m_cellVec.size());
532  if (detId != DetId()) {
533  DetId geomId = getGeometryDetId(detId);
534  cellIndex = m_topology.detId2denseGeomId(geomId);
535 #ifdef EDM_ML_DEBUG
536  edm::LogVerbatim("HGCalGeom") << "indexFor " << std::hex << detId.rawId() << ":" << geomId.rawId() << std::dec
537  << " index " << cellIndex;
538 #endif
539  }
540  return cellIndex;
541 }

References TauDecayModes::dec, HGCalTopology::detId2denseGeomId(), getGeometryDetId(), DetId::HGCalHSc, m_cellVec, m_cellVec2, m_det, m_topology, and DetId::rawId().

Referenced by get8Corners(), getCorners(), getNewCorners(), getPosition(), and getWaferPosition().

◆ initializeParms()

void HGCalGeometry::initializeParms ( )
overridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 48 of file HGCalGeometry.cc.

48 {}

◆ localCorners()

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

Definition at line 50 of file HGCalGeometry.cc.

50  {
51  if (m_det == DetId::HGCalHSc) {
52  FlatTrd::localCorners(lc, pv, ref);
53  } else {
54  FlatHexagon::localCorners(lc, pv, ref);
55  }
56 }

References DetId::HGCalHSc, FlatHexagon::localCorners(), FlatTrd::localCorners(), m_det, and MetAnalyzer::pv().

◆ neighborZ() [1/2]

DetId HGCalGeometry::neighborZ ( const DetId idin,
const GlobalVector p 
) const

Definition at line 398 of file HGCalGeometry.cc.

398  {
399  DetId idnew;
401  int lay = ((momentum.z() * id.zSide > 0) ? (id.iLay + 1) : (id.iLay - 1));
402 #ifdef EDM_ML_DEBUG
403  edm::LogVerbatim("HGCalGeom") << "neighborz1:: ID " << id.iLay << ":" << id.iSec1 << ":" << id.iSec2 << ":"
404  << id.iCell1 << ":" << id.iCell2 << " New Layer " << lay << " Range "
405  << m_topology.dddConstants().firstLayer() << ":"
406  << m_topology.dddConstants().lastLayer(true) << " pz " << momentum.z();
407 #endif
408  if ((lay >= m_topology.dddConstants().firstLayer()) && (lay <= m_topology.dddConstants().lastLayer(true)) &&
409  (momentum.z() != 0.0)) {
410  GlobalPoint v = getPosition(idin);
411  double z = id.zSide * m_topology.dddConstants().waferZ(lay, true);
412  double grad = (z - v.z()) / momentum.z();
413  GlobalPoint p(v.x() + grad * momentum.x(), v.y() + grad * momentum.y(), z);
414  double r = p.perp();
415  auto rlimit = topology().dddConstants().rangeR(z, true);
416  if (r >= rlimit.first && r <= rlimit.second)
417  idnew = getClosestCell(p);
418 #ifdef EDM_ML_DEBUG
419  edm::LogVerbatim("HGCalGeom") << "neighborz1:: Position " << v << " New Z " << z << ":" << grad << " new position "
420  << p << " r-limit " << rlimit.first << ":" << rlimit.second;
421 #endif
422  }
423  return idnew;
424 }

References HGCalTopology::dddConstants(), HGCalTopology::decode(), HGCalDDDConstants::firstLayer(), getClosestCell(), getPosition(), HGCalDDDConstants::lastLayer(), m_topology, AlCaHLTBitMon_ParallelJobs::p, alignCSCRings::r, HGCalDDDConstants::rangeR(), topology(), findQualityFiles::v, HGCalDDDConstants::waferZ(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), z, and PV3DBase< T, PVType, FrameType >::z().

◆ neighborZ() [2/2]

DetId HGCalGeometry::neighborZ ( const DetId idin,
const MagneticField bField,
int  charge,
const GlobalVector momentum 
) const

Definition at line 426 of file HGCalGeometry.cc.

429  {
430  DetId idnew;
432  int lay = ((momentum.z() * id.zSide > 0) ? (id.iLay + 1) : (id.iLay - 1));
433 #ifdef EDM_ML_DEBUG
434  edm::LogVerbatim("HGCalGeom") << "neighborz2:: ID " << id.iLay << ":" << id.iSec1 << ":" << id.iSec2 << ":"
435  << id.iCell1 << ":" << id.iCell2 << " New Layer " << lay << " Range "
436  << m_topology.dddConstants().firstLayer() << ":"
437  << m_topology.dddConstants().lastLayer(true) << " pz " << momentum.z();
438 #endif
439  if ((lay >= m_topology.dddConstants().firstLayer()) && (lay <= m_topology.dddConstants().lastLayer(true)) &&
440  (momentum.z() != 0.0)) {
441  GlobalPoint v = getPosition(idin);
442  double z = id.zSide * m_topology.dddConstants().waferZ(lay, true);
443  FreeTrajectoryState fts(v, momentum, charge, bField);
446  TrajectoryStateOnSurface tsos = myAP.propagate(fts, *nPlane);
447  GlobalPoint p;
448  auto rlimit = topology().dddConstants().rangeR(z, true);
449  if (tsos.isValid()) {
450  p = tsos.globalPosition();
451  double r = p.perp();
452  if (r >= rlimit.first && r <= rlimit.second)
453  idnew = getClosestCell(p);
454  }
455 #ifdef EDM_ML_DEBUG
456  edm::LogVerbatim("HGCalGeom") << "neighborz2:: Position " << v << " New Z " << z << ":" << charge << ":"
457  << tsos.isValid() << " new position " << p << " r limits " << rlimit.first << ":"
458  << rlimit.second;
459 #endif
460  }
461  return idnew;
462 }

References alongMomentum, Calorimetry_cff::bField, Plane::build(), ALCARECOTkAlJpsiMuMu_cff::charge, HGCalTopology::dddConstants(), HGCalTopology::decode(), HGCalDDDConstants::firstLayer(), getClosestCell(), getPosition(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::isValid(), HGCalDDDConstants::lastLayer(), M_PI, m_topology, AlCaHLTBitMon_ParallelJobs::p, AnalyticalPropagator::propagate(), alignCSCRings::r, HGCalDDDConstants::rangeR(), topology(), findQualityFiles::v, HGCalDDDConstants::waferZ(), z, and PV3DBase< T, PVType, FrameType >::z().

◆ newCell()

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

Implements CaloSubdetectorGeometry.

Definition at line 58 of file HGCalGeometry.cc.

59  {
60  DetId geomId = getGeometryDetId(detId);
61  int cells(0);
65 #ifdef EDM_ML_DEBUG
66  edm::LogVerbatim("HGCalGeom") << "NewCell " << HGCalDetId(detId) << " GEOM " << HGCalDetId(geomId);
67 #endif
68  } else if (mode_ == HGCalGeometryMode::Trapezoid) {
69  cells = 1;
70 #ifdef EDM_ML_DEBUG
71  edm::LogVerbatim("HGCalGeom") << "NewCell " << HGCScintillatorDetId(detId) << " GEOM "
72  << HGCScintillatorDetId(geomId);
73 #endif
74  } else {
75  cells = m_topology.dddConstants().numberCellsHexagon(id.iLay, id.iSec1, id.iSec2, false);
76 #ifdef EDM_ML_DEBUG
77  edm::LogVerbatim("HGCalGeom") << "NewCell " << HGCSiliconDetId(detId) << " GEOM " << HGCSiliconDetId(geomId);
78 #endif
79  }
80  const uint32_t cellIndex(m_topology.detId2denseGeomId(geomId));
81 
82  if (m_det == DetId::HGCalHSc) {
83  m_cellVec2.at(cellIndex) = FlatTrd(cornersMgr(), f1, f2, f3, parm);
84  } else {
85  m_cellVec.at(cellIndex) = FlatHexagon(cornersMgr(), f1, f2, f3, parm);
86  }
87  m_validGeomIds.at(cellIndex) = geomId;
88 
89 #ifdef EDM_ML_DEBUG
90  edm::LogVerbatim("HGCalGeom") << "Store for DetId " << std::hex << detId.rawId() << " GeomId " << geomId.rawId()
91  << std::dec << " Index " << cellIndex << " cells " << cells;
92  unsigned int nOld = m_validIds.size();
93 #endif
95  for (int cell = 0; cell < cells; ++cell) {
96  id.iCell1 = cell;
97  DetId idc = m_topology.encode(id);
98  if (m_topology.valid(idc)) {
99  m_validIds.emplace_back(idc);
100 #ifdef EDM_ML_DEBUG
101  edm::LogVerbatim("HGCalGeom") << "Valid Id [" << cell << "] " << HGCalDetId(idc);
102 #endif
103  }
104  }
105  } else if (mode_ == HGCalGeometryMode::Trapezoid) {
106  DetId idc = m_topology.encode(id);
107  if (m_topology.valid(idc)) {
108  m_validIds.emplace_back(idc);
109 #ifdef EDM_ML_DEBUG
110  edm::LogVerbatim("HGCalGeom") << "Valid Id [0] " << HGCScintillatorDetId(idc);
111 #endif
112  } else {
113  edm::LogWarning("HGCalGeom") << "Check " << HGCScintillatorDetId(idc) << " from " << HGCScintillatorDetId(detId)
114  << " ERROR ???";
115  }
116  } else {
117 #ifdef EDM_ML_DEBUG
118  unsigned int cellAll(0), cellSelect(0);
119 #endif
120  for (int u = 0; u < 2 * cells; ++u) {
121  for (int v = 0; v < 2 * cells; ++v) {
122  if (((v - u) < cells) && (u - v) <= cells) {
123  id.iCell1 = u;
124  id.iCell2 = v;
125  DetId idc = m_topology.encode(id);
126 #ifdef EDM_ML_DEBUG
127  ++cellAll;
128 #endif
129  if (m_topology.dddConstants().cellInLayer(id.iSec1, id.iSec2, u, v, id.iLay, true)) {
130  m_validIds.emplace_back(idc);
131 #ifdef EDM_ML_DEBUG
132  ++cellSelect;
133  edm::LogVerbatim("HGCalGeom") << "Valid Id [" << u << ", " << v << "] " << HGCSiliconDetId(idc);
134 #endif
135  }
136  }
137  }
138  }
139 #ifdef EDM_ML_DEBUG
140  edm::LogVerbatim("HGCalGeom") << "HGCalGeometry keeps " << cellSelect << " out of " << cellAll << " for wafer "
141  << id.iSec1 << ":" << id.iSec2 << " in "
142  << " layer " << id.iLay;
143 #endif
144  }
145 #ifdef EDM_ML_DEBUG
146  if (m_det == DetId::HGCalHSc) {
147  edm::LogVerbatim("HGCalGeom") << "HGCalGeometry::newCell-> [" << cellIndex << "]"
148  << " front:" << f1.x() << '/' << f1.y() << '/' << f1.z() << " back:" << f2.x() << '/'
149  << f2.y() << '/' << f2.z() << " eta|phi " << m_cellVec2[cellIndex].etaPos() << ":"
150  << m_cellVec2[cellIndex].phiPos();
151  } else {
152  edm::LogVerbatim("HGCalGeom") << "HGCalGeometry::newCell-> [" << cellIndex << "]"
153  << " front:" << f1.x() << '/' << f1.y() << '/' << f1.z() << " back:" << f2.x() << '/'
154  << f2.y() << '/' << f2.z() << " eta|phi " << m_cellVec[cellIndex].etaPos() << ":"
155  << m_cellVec[cellIndex].phiPos();
156  }
157  unsigned int nNew = m_validIds.size();
159  edm::LogVerbatim("HGCalGeom") << "ID: " << HGCalDetId(detId) << " with valid DetId from " << nOld << " to " << nNew;
160  } else if (mode_ == HGCalGeometryMode::Trapezoid) {
161  edm::LogVerbatim("HGCalGeom") << "ID: " << HGCScintillatorDetId(detId) << " with valid DetId from " << nOld
162  << " to " << nNew;
163  } else if (m_topology.isHFNose()) {
164  edm::LogVerbatim("HGCalGeom") << "ID: " << HFNoseDetId(detId) << " with valid DetId from " << nOld << " to "
165  << nNew;
166  } else {
167  edm::LogVerbatim("HGCalGeom") << "ID: " << HGCSiliconDetId(detId) << " with valid DetId from " << nOld << " to "
168  << nNew;
169  }
170  edm::LogVerbatim("HGCalGeom") << "Cell[" << cellIndex << "] " << std::hex << geomId.rawId() << ":"
171  << m_validGeomIds[cellIndex].rawId() << std::dec;
172 #endif
173 }

References HGCalDDDConstants::cellInLayer(), postprocess-scan-build::cells, CaloSubdetectorGeometry::cornersMgr(), HGCalTopology::dddConstants(), TauDecayModes::dec, HGCalTopology::decode(), HGCalTopology::detId2denseGeomId(), HGCalTopology::encode(), DeadROC_duringRun::f1, DeadROC_duringRun::f2, getGeometryDetId(), HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, DetId::HGCalHSc, HGCalTopology::isHFNose(), m_cellVec, m_cellVec2, m_det, m_topology, m_validGeomIds, CaloSubdetectorGeometry::m_validIds, mode_, HGCalDDDConstants::numberCellsHexagon(), DetId::rawId(), HGCalGeometryMode::Trapezoid, findQualityFiles::v, and HGCalTopology::valid().

◆ present()

bool HGCalGeometry::present ( const DetId id) const
overridevirtual

is this detid present in the geometry?

Reimplemented from CaloSubdetectorGeometry.

Definition at line 184 of file HGCalGeometry.cc.

184  {
185  if (detId == DetId())
186  return false;
187  DetId geomId = getGeometryDetId(detId);
188  const uint32_t index(m_topology.detId2denseGeomId(geomId));
189  return (nullptr != getGeometryRawPtr(index));
190 }

References HGCalTopology::detId2denseGeomId(), getGeometryDetId(), getGeometryRawPtr(), and m_topology.

◆ producerTag()

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

Definition at line 109 of file HGCalGeometry.h.

109 { return "HGCal"; }

Referenced by PCaloGeometryBuilder::beginRun(), and CaloGeometryBuilder::CaloGeometryBuilder().

◆ sizeForDenseIndex() [1/2]

unsigned int HGCalGeometry::sizeForDenseIndex ( ) const
protected

Definition at line 543 of file HGCalGeometry.cc.

543 { return m_topology.totalGeomModules(); }

References m_topology, and HGCalTopology::totalGeomModules().

◆ sizeForDenseIndex() [2/2]

unsigned int CaloSubdetectorGeometry::sizeForDenseIndex
protected

Definition at line 256 of file CaloSubdetectorGeometry.cc.

256  {
258 }

◆ sortDetIds()

void HGCalGeometry::sortDetIds ( void  )

Definition at line 655 of file HGCalGeometry.cc.

655  {
656  m_validIds.shrink_to_fit();
657  std::sort(m_validIds.begin(), m_validIds.end(), rawIdSort());
658 }

References CaloSubdetectorGeometry::m_validIds.

◆ topology()

const HGCalTopology& HGCalGeometry::topology ( ) const
inline

Member Data Documentation

◆ k_fac1

constexpr double HGCalGeometry::k_fac1 = 0.5
staticconstexprprivate

Definition at line 135 of file HGCalGeometry.h.

Referenced by getCorners(), and getNewCorners().

◆ k_fac2

constexpr double HGCalGeometry::k_fac2 = 1.0 / 3.0
staticconstexprprivate

Definition at line 136 of file HGCalGeometry.h.

Referenced by get8Corners(), getCorners(), and getNewCorners().

◆ k_half

constexpr double HGCalGeometry::k_half = 0.5
staticconstexprprivate

Definition at line 134 of file HGCalGeometry.h.

Referenced by get8Corners(), getCorners(), and getNewCorners().

◆ k_NumberOfParametersPerHex

constexpr unsigned int HGCalGeometry::k_NumberOfParametersPerHex = 3
staticconstexpr

Definition at line 45 of file HGCalGeometry.h.

Referenced by HGCalGeometryLoader::build(), and getSummary().

◆ k_NumberOfParametersPerShape

constexpr unsigned int HGCalGeometry::k_NumberOfParametersPerShape = 3
staticconstexpr

Definition at line 46 of file HGCalGeometry.h.

Referenced by CaloGeometryDBEP< T, U >::produceAligned().

◆ k_NumberOfParametersPerTrd

constexpr unsigned int HGCalGeometry::k_NumberOfParametersPerTrd = 12
staticconstexpr

Definition at line 44 of file HGCalGeometry.h.

Referenced by HGCalGeometryLoader::build(), and getSummary().

◆ k_NumberOfShapes

constexpr unsigned int HGCalGeometry::k_NumberOfShapes = 100
staticconstexpr

◆ k_NumberOfShapesTrd

constexpr unsigned int HGCalGeometry::k_NumberOfShapesTrd = 1000
staticconstexpr

Definition at line 48 of file HGCalGeometry.h.

Referenced by HGCalGeometryLoader::build().

◆ m_cellVec

CellVec HGCalGeometry::m_cellVec
private

◆ m_cellVec2

CellVec2 HGCalGeometry::m_cellVec2
private

◆ m_det

DetId::Detector HGCalGeometry::m_det
private

◆ m_subdet

ForwardSubdetector HGCalGeometry::m_subdet
private

Definition at line 144 of file HGCalGeometry.h.

Referenced by cellElement().

◆ m_topology

const HGCalTopology& HGCalGeometry::m_topology
private

◆ m_validGeomIds

std::vector<DetId> HGCalGeometry::m_validGeomIds
private

Definition at line 141 of file HGCalGeometry.h.

Referenced by cellGeomPtr(), getClosestCell(), getSummary(), getValidGeomDetIds(), and newCell().

◆ mode_

HGCalGeometryMode::GeometryMode HGCalGeometry::mode_
private

◆ twoBysqrt3_

const double HGCalGeometry::twoBysqrt3_
private

Definition at line 145 of file HGCalGeometry.h.

Referenced by getSummary().

TkRotation< float >
HGCalDDDConstants::cellSizeTrap
std::pair< double, double > cellSizeTrap(int type, int irad) const
Definition: HGCalDDDConstants.h:36
HGCalParameters::hgtrap::bl
float bl
Definition: HGCalParameters.h:43
DDAxes::y
CaloSubdetectorGeometry::numberOfParametersPerShape
virtual unsigned int numberOfParametersPerShape() const
Definition: CaloSubdetectorGeometry.h:93
HGCalGeometry::m_det
DetId::Detector m_det
Definition: HGCalGeometry.h:143
mps_fire.i
i
Definition: mps_fire.py:355
HGCalTopology::dddConstants
const HGCalDDDConstants & dddConstants() const
Definition: HGCalTopology.h:98
HGCalGeometry::m_cellVec
CellVec m_cellVec
Definition: HGCalGeometry.h:139
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
HGCalDDDConstants::waferTypeT
int waferTypeT(int wafer) const
Definition: HGCalDDDConstants.h:169
FlatTrd::localCorners
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: FlatTrd.cc:153
CaloGenericDetId
Definition: CaloGenericDetId.h:12
groupFilesInBlocks.tt
int tt
Definition: groupFilesInBlocks.py:144
HGCalDDDConstants::firstLayer
int firstLayer() const
Definition: HGCalDDDConstants.h:51
HGCalGeometry::CellVec2
std::vector< FlatTrd > CellVec2
Definition: HGCalGeometry.h:33
HGCalGeometry::cellGeomPtr
std::shared_ptr< const CaloCellGeometry > cellGeomPtr(uint32_t index) const override
Definition: HGCalGeometry.cc:560
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
FlatTrd
A base class to handle the particular shape of HGCal volumes.
Definition: FlatTrd.h:19
findQualityFiles.rr
string rr
Definition: findQualityFiles.py:185
FlatTrd::k_Cell
static constexpr uint32_t k_Cell
Definition: FlatTrd.h:45
HGCalParameters::hgtrap::cellSize
float cellSize
Definition: HGCalParameters.h:43
HFNoseDetId::layer
int layer() const
get the layer #
Definition: HFNoseDetId.h:56
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HGCalGeometry::k_half
static constexpr double k_half
Definition: HGCalGeometry.h:134
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
FlatHexagon::localCorners
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: FlatHexagon.cc:154
pos
Definition: PixelAliasList.h:18
HGCalDDDConstants::waferZ
double waferZ(int layer, bool reco) const
Definition: HGCalDDDConstants.cc:1367
FlatTrd::k_Phi
static constexpr uint32_t k_Phi
Definition: FlatTrd.h:29
HGCalTopology::decode
DecodedDetId decode(const DetId &id) const
Definition: HGCalTopology.cc:589
HGCalParameters::hgtrap::alpha
float alpha
Definition: HGCalParameters.h:43
HGCalGeometry::m_cellVec2
CellVec2 m_cellVec2
Definition: HGCalGeometry.h:140
CaloSubdetectorGeometry::numberOfTransformParms
virtual unsigned int numberOfTransformParms() const
Definition: CaloSubdetectorGeometry.h:94
HGCalGeometry::k_NumberOfShapes
static constexpr unsigned int k_NumberOfShapes
Definition: HGCalGeometry.h:47
HGCalTopology::DecodedDetId
Definition: HGCalTopology.h:108
ReferenceCountingPointer< Plane >
HGCalParameters::hgtrap::dz
float dz
Definition: HGCalParameters.h:43
HGCalDDDConstants::assignCellHex
std::array< int, 5 > assignCellHex(float x, float y, int lay, bool reco) const
Definition: HGCalDDDConstants.cc:160
HGCalGeometry::m_subdet
ForwardSubdetector m_subdet
Definition: HGCalGeometry.h:144
HGCalTopology::totalGeomModules
unsigned int totalGeomModules() const
Definition: HGCalTopology.h:93
findQualityFiles.v
v
Definition: findQualityFiles.py:179
HGCalGeometry::k_NumberOfParametersPerTrd
static constexpr unsigned int k_NumberOfParametersPerTrd
Definition: HGCalGeometry.h:44
cms::cuda::co
T *__restrict__ co
Definition: prefixScan.h:46
HFNoseDetId
Definition: HFNoseDetId.h:22
FlatTrd::k_Theta
static constexpr uint32_t k_Theta
Definition: FlatTrd.h:27
HGCalDetId::layer
int layer() const
get the layer #
Definition: HGCalDetId.h:46
HGCalDDDConstants::lastLayer
int lastLayer(bool reco) const
Definition: HGCalDDDConstants.cc:556
HGCSiliconDetId
Definition: HGCSiliconDetId.h:22
FlatHexagon::k_r
static constexpr uint32_t k_r
Definition: FlatHexagon.h:28
ParmVec
std::vector< float > ParmVec
Definition: FastTimeGeometry.cc:13
CaloSubdetectorGeometry::numberOfShapes
virtual unsigned int numberOfShapes() const
Definition: CaloSubdetectorGeometry.h:92
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
HGCScintillatorDetId::layer
int layer() const
get the layer #
Definition: HGCScintillatorDetId.h:47
DetId
Definition: DetId.h:17
FlatTrd::k_dX1
static constexpr uint32_t k_dX1
Definition: FlatTrd.h:32
DetId::HGCalHSi
Definition: DetId.h:33
DetId::HGCalEE
Definition: DetId.h:32
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
HGCalGeometryMode::Trapezoid
Definition: HGCalGeometryMode.h:25
HGCalParameters::hgtrap::tl
float tl
Definition: HGCalParameters.h:43
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
FlatTrd::k_Alp1
static constexpr uint32_t k_Alp1
Definition: FlatTrd.h:36
FlatHexagon::ncorner_
static constexpr unsigned int ncorner_
Definition: FlatHexagon.h:81
FlatTrd::k_dY2
static constexpr uint32_t k_dY2
Definition: FlatTrd.h:38
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
HGCalDDDConstants::waferInLayer
bool waferInLayer(int wafer, int lay, bool reco) const
Definition: HGCalDDDConstants.cc:1169
CaloSubdetectorGeometry::m_validIds
std::vector< DetId > m_validIds
Definition: CaloSubdetectorGeometry.h:115
DDAxes::z
FlatTrd::k_dX4
static constexpr uint32_t k_dX4
Definition: FlatTrd.h:41
HGCalDDDConstants::layerIndex
int layerIndex(int lay, bool reco) const
Definition: HGCalDDDConstants.cc:560
Tr3D
CaloCellGeometry::Tr3D Tr3D
Definition: CaloCellGeometry.cc:7
HGCalGeometry::k_NumberOfParametersPerHex
static constexpr unsigned int k_NumberOfParametersPerHex
Definition: HGCalGeometry.h:45
FlatHexagon
A base class to handle the hexagonal shape of HGCal silicon volumes.
Definition: FlatHexagon.h:20
HGCalGeometry::getGeometryDetId
DetId getGeometryDetId(DetId detId) const
Definition: HGCalGeometry.cc:762
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
dqmdumpme.k
k
Definition: dqmdumpme.py:60
Point3DBase< float, GlobalTag >
FlatHexagon::k_R
static constexpr uint32_t k_R
Definition: FlatHexagon.h:29
Tr3D
CaloCellGeometry::Tr3D Tr3D
Definition: HGCalGeometry.cc:21
CaloGenericDetId::sizeForDenseIndexing
uint32_t sizeForDenseIndexing() const
Definition: CaloGenericDetId.cc:40
HGCalGeometry::topology
const HGCalTopology & topology() const
Definition: HGCalGeometry.h:112
HGCalDDDConstants::rangeR
std::pair< double, double > rangeR(double z, bool reco) const
Definition: HGCalDDDConstants.cc:934
HGCalDDDConstants::assignCell
std::pair< int, int > assignCell(float x, float y, int lay, int subSec, bool reco) const
Definition: HGCalDDDConstants.cc:121
geometryCSVtoXML.xy
xy
Definition: geometryCSVtoXML.py:19
HGCEE
Definition: ForwardSubdetector.h:8
edm::LogWarning
Definition: MessageLogger.h:141
HGCalGeometry::mode_
HGCalGeometryMode::GeometryMode mode_
Definition: HGCalGeometry.h:142
Plane::build
static PlanePointer build(Args &&... args)
Definition: Plane.h:33
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
HGCalDDDConstants::cellInLayer
bool cellInLayer(int waferU, int waferV, int cellU, int cellV, int lay, bool reco) const
Definition: HGCalDDDConstants.cc:204
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
HGCalParameters::firstModule_
std::vector< int > firstModule_
Definition: HGCalParameters.h:160
HGCalTopology::totalModules
unsigned int totalModules() const
Definition: HGCalTopology.h:92
edm::LogError
Definition: MessageLogger.h:183
FlatTrd::k_dX3
static constexpr uint32_t k_dX3
Definition: FlatTrd.h:39
HGCalGeometry::CellVec
std::vector< FlatHexagon > CellVec
Definition: HGCalGeometry.h:32
CaloCellGeometry
Definition: CaloCellGeometry.h:50
DeadROC_duringRun.f2
f2
Definition: DeadROC_duringRun.py:220
HGCalGeometry::m_validGeomIds
std::vector< DetId > m_validGeomIds
Definition: HGCalGeometry.h:141
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
HGCalGeometry::getGeometryRawPtr
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
Definition: HGCalGeometry.cc:545
HGCalGeometry::k_fac1
static constexpr double k_fac1
Definition: HGCalGeometry.h:135
HGCalParameters::hgtrap::h
float h
Definition: HGCalParameters.h:43
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
edm::LogVerbatim
Definition: MessageLogger.h:297
FlatTrd::k_dX2
static constexpr uint32_t k_dX2
Definition: FlatTrd.h:34
HGCalTopology::detId2denseGeomId
virtual uint32_t detId2denseGeomId(const DetId &id) const
Definition: HGCalTopology.cc:434
PVValHelper::dy
Definition: PVValidationHelpers.h:49
HGCalGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Definition: HGCalGeometry.cc:192
HGCalGeometry::getClosestCell
DetId getClosestCell(const GlobalPoint &r) const override
Definition: HGCalGeometry.cc:464
HGCalDDDConstants::sectors
int sectors() const
Definition: HGCalDDDConstants.h:108
HGCalGeometry::twoBysqrt3_
const double twoBysqrt3_
Definition: HGCalGeometry.h:145
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:28
align::EulerAngles
AlgebraicVector EulerAngles
Definition: Definitions.h:34
HGCalParameters::hgtrform::lay
int lay
Definition: HGCalParameters.h:47
HGCalDDDConstants::getTrForm
HGCalParameters::hgtrform getTrForm(unsigned int k) const
Definition: HGCalDDDConstants.h:64
HGCalGeometryMode::Hexagon
Definition: HGCalGeometryMode.h:25
HGCalGeometry::DetIdSet
std::set< DetId > DetIdSet
Definition: HGCalGeometry.h:38
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HGCalDDDConstants::numberCellsHexagon
int numberCellsHexagon(int wafer) const
Definition: HGCalDDDConstants.cc:912
HGCalGeometry::k_fac2
static constexpr double k_fac2
Definition: HGCalGeometry.h:136
HGCalDDDConstants::assignCellTrap
std::array< int, 3 > assignCellTrap(float x, float y, float z, int lay, bool reco) const
Definition: HGCalDDDConstants.cc:171
AnalyticalPropagator
Definition: AnalyticalPropagator.h:22
reco_skim_cfg_mod.maxSize
maxSize
Definition: reco_skim_cfg_mod.py:154
HGCalDetId
Definition: HGCalDetId.h:8
FlatHexagon::k_dZ
static constexpr uint32_t k_dZ
Definition: FlatHexagon.h:27
HGCalGeometryMode::HexagonFull
Definition: HGCalGeometryMode.h:25
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
CaloSubdetectorGeometry::cornersMgr
CaloCellGeometry::CornersMgr * cornersMgr()
Definition: CaloSubdetectorGeometry.h:82
HGCalDDDConstants::locateCellHex
std::pair< float, float > locateCellHex(int cell, int wafer, bool reco) const
Definition: HGCalDDDConstants.cc:687
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
Calorimetry_cff.bField
bField
Definition: Calorimetry_cff.py:292
HGCalTopology::encode
DetId encode(const DecodedDetId &id_) const
Definition: HGCalTopology.cc:635
PVValHelper::dz
Definition: PVValidationHelpers.h:50
HGCScintillatorDetId
Definition: HGCScintillatorDetId.h:21
DetId::HGCalHSc
Definition: DetId.h:34
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
postprocess-scan-build.cells
cells
Definition: postprocess-scan-build.py:13
HGCalParameters::lastModule_
std::vector< int > lastModule_
Definition: HGCalParameters.h:161
HGCalGeometry::indexFor
unsigned int indexFor(const DetId &id) const override
Definition: HGCalGeometry.cc:530
HGCalDDDConstants::getLayer
int getLayer(double z, bool reco) const
Definition: HGCalDDDConstants.cc:361
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
Pt3DVec
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: CaloCellGeometry.cc:6
HGCalParameters::hgtrform
Definition: HGCalParameters.h:46
FlatTrd::k_Alp2
static constexpr uint32_t k_Alp2
Definition: FlatTrd.h:43
HGCalTopology::valid
bool valid(const DetId &id) const override
Is this a valid cell id.
Definition: HGCalTopology.cc:464
HGCHEF
Definition: ForwardSubdetector.h:9
HGCalGeometry::getClosestCellIndex
unsigned int getClosestCellIndex(const GlobalPoint &r) const
Definition: HGCalGeometry.cc:609
DTRecHitClients_cfi.local
local
Definition: DTRecHitClients_cfi.py:10
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HGCalDDDConstants::getTrFormN
unsigned int getTrFormN() const
Definition: HGCalDDDConstants.h:65
HGCalDDDConstants::locateCell
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
Definition: HGCalDDDConstants.cc:577
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
FlatTrd::ncorner_
static constexpr unsigned int ncorner_
Definition: FlatTrd.h:97
DeadROC_duringRun.f1
f1
Definition: DeadROC_duringRun.py:219
HGCalTopology::isHFNose
bool isHFNose() const
Definition: HGCalTopology.h:120
HGCalParameters::hgtrap
Definition: HGCalParameters.h:41
custom_jme_cff.area
area
Definition: custom_jme_cff.py:169
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
HGCalDDDConstants::getParameter
const HGCalParameters * getParameter() const
Definition: HGCalDDDConstants.h:57
PVValHelper::dx
Definition: PVValidationHelpers.h:48
FlatTrd::k_dY1
static constexpr uint32_t k_dY1
Definition: FlatTrd.h:31
alongMomentum
Definition: PropagationDirection.h:4
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
HGCalGeometry::CornersVec
std::vector< GlobalPoint > CornersVec
Definition: HGCalGeometry.h:39
FlatTrd::k_dZ
static constexpr uint32_t k_dZ
Definition: FlatTrd.h:26
HGCalGeometry::getNewCorners
CornersVec getNewCorners(const DetId &id) const
Definition: HGCalGeometry.cc:357
HGCalGeometry::m_topology
const HGCalTopology & m_topology
Definition: HGCalGeometry.h:138
HGCHEB
Definition: ForwardSubdetector.h:10
HGCSiliconDetId::layer
int layer() const
get the layer #
Definition: HGCSiliconDetId.h:57
HGCalDDDConstants::getModule
HGCalParameters::hgtrap getModule(unsigned int k, bool hexType, bool reco) const
Definition: HGCalDDDConstants.cc:381