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

Member Typedef Documentation

◆ AlignedRecord

Definition at line 40 of file HGCalGeometry.h.

◆ CCGFloat

Definition at line 33 of file HGCalGeometry.h.

◆ CellVec

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

Definition at line 31 of file HGCalGeometry.h.

◆ CellVec2

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

Definition at line 32 of file HGCalGeometry.h.

◆ CornersVec

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

Definition at line 38 of file HGCalGeometry.h.

◆ DetIdSet

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

Definition at line 37 of file HGCalGeometry.h.

◆ PGeometryRecord

Definition at line 41 of file HGCalGeometry.h.

◆ Pt3D

Definition at line 34 of file HGCalGeometry.h.

◆ Pt3DVec

Definition at line 35 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  m_det(topology_.detector()),
30  m_subdet(topology_.subDetector()),
31  twoBysqrt3_(2.0 / std::sqrt(3.0)) {
32  if (m_det == DetId::HGCalHSc) {
33  m_cellVec2 = CellVec2(topology_.totalGeomModules());
34  } else {
35  m_cellVec = CellVec(topology_.totalGeomModules());
36  }
38 #ifdef EDM_ML_DEBUG
39  edm::LogVerbatim("HGCalGeom") << "Expected total # of Geometry Modules " << m_topology.totalGeomModules();
40 #endif
41 }

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 43 of file HGCalGeometry.cc.

43 {}

Member Function Documentation

◆ addValidID()

void HGCalGeometry::addValidID ( const DetId id)
protected

Definition at line 613 of file HGCalGeometry.cc.

613  {
614  edm::LogError("HGCalGeom") << "HGCalGeometry::addValidID is not implemented";
615 }

◆ cellElement()

std::string HGCalGeometry::cellElement ( ) const

Definition at line 527 of file HGCalGeometry.cc.

527  {
528  if (m_subdet == HGCEE || m_det == DetId::HGCalEE)
529  return "HGCalEE";
530  else if (m_subdet == HGCHEF || m_det == DetId::HGCalHSi)
531  return "HGCalHEFront";
532  else if (m_subdet == HGCHEB || m_det == DetId::HGCalHSc)
533  return "HGCalHEBack";
534  else
535  return "Unknown";
536 }

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 568 of file HGCalGeometry.cc.

568  {
569  if ((index >= m_cellVec.size() && m_det != DetId::HGCalHSc) ||
570  (index >= m_cellVec2.size() && m_det == DetId::HGCalHSc) || (m_validGeomIds[index].rawId() == 0))
571  return nullptr;
572  static const auto do_not_delete = [](const void*) {};
573  if (m_det == DetId::HGCalHSc) {
574  auto cell = std::shared_ptr<const CaloCellGeometry>(&m_cellVec2[index], do_not_delete);
575  if (nullptr == cell->param())
576  return nullptr;
577  return cell;
578  } else {
579  auto cell = std::shared_ptr<const CaloCellGeometry>(&m_cellVec[index], do_not_delete);
580  if (nullptr == cell->param())
581  return nullptr;
582  return cell;
583  }
584 }

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 586 of file HGCalGeometry.cc.

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

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

◆ dbString()

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

Definition at line 49 of file HGCalGeometry.h.

49 { return "PHGCalRcd"; }

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

◆ fillNamedParams()

void HGCalGeometry::fillNamedParams ( DDFilteredView  fv)
virtual

Definition at line 45 of file HGCalGeometry.cc.

45 {}

◆ get8Corners()

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

Definition at line 320 of file HGCalGeometry.cc.

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

References HGCalDDDConstants::cellSizeTrap(), cms::cuda::co, funct::cos(), HGCalTopology::dddConstants(), HGCalTopology::decode(), flavorHistoryFilter_cfi::dr, PVValHelper::dx, PVValHelper::dz, getPosition(), 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, FlatTrd::ncorner_, alignCSCRings::r, findQualityFiles::rr, funct::sin(), findQualityFiles::v, HGCalTopology::waferHexagon6(), and geometryCSVtoXML::xy.

◆ getArea()

double HGCalGeometry::getArea ( const DetId detid) const

Returns area of a cell.

Definition at line 254 of file HGCalGeometry.cc.

254  {
255  HGCalGeometry::CornersVec corners = getNewCorners(detid);
256  double area(0);
257  if (corners.size() > 1) {
258  int n = corners.size() - 1;
259  int j = n - 1;
260  for (int i = 0; i < n; ++i) {
261  area += ((corners[j].x() + corners[i].x()) * (corners[i].y() - corners[j].y()));
262  j = i;
263  }
264  }
265  return (0.5 * area);
266 }

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 522 of file HGCalGeometry.cc.

522  {
524  return dss;
525 }

◆ getClosestCell()

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

Reimplemented from CaloSubdetectorGeometry.

Definition at line 470 of file HGCalGeometry.cc.

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

References HGCalDDDConstants::assignCell(), HGCalDDDConstants::assignCellHex(), HGCalDDDConstants::assignCellTrap(), HGCalTopology::dddConstants(), HGCalTopology::decode(), HGCalTopology::DecodedDetId::det, HGCalTopology::detector(), HGCalTopology::encode(), getClosestCellIndex(), HGCalDDDConstants::getLayer(), DetId::HGCalHSc, DTRecHitClients_cfi::local, m_cellVec, m_cellVec2, m_det, m_topology, m_validGeomIds, alignCSCRings::r, HGCalTopology::tileTrapezoid(), HGCalTopology::waferHexagon6(), and HGCalDDDConstants::waferTypeT().

Referenced by neighborZ().

◆ getClosestCellIndex() [1/2]

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

Definition at line 617 of file HGCalGeometry.cc.

617  {
619 }

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 622 of file HGCalGeometry.cc.

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

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 268 of file HGCalGeometry.cc.

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

References HGCalDDDConstants::cellSizeTrap(), cms::cuda::co, funct::cos(), HGCalTopology::dddConstants(), HGCalTopology::decode(), flavorHistoryFilter_cfi::dr, PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, getPosition(), 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, FlatHexagon::ncorner_, FlatTrd::ncorner_, alignCSCRings::r, findQualityFiles::rr, funct::sin(), findQualityFiles::v, HGCalTopology::waferHexagon6(), 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 181 of file HGCalGeometry.cc.

181  {
182  if (detId == DetId())
183  return nullptr; // nothing to get
184  DetId geomId = getGeometryDetId(detId);
185  const uint32_t cellIndex(m_topology.detId2denseGeomId(geomId));
186  const GlobalPoint pos = (detId != geomId) ? getPosition(detId) : GlobalPoint();
187  return cellGeomPtr(cellIndex, pos);
188 }

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

◆ getGeometryDetId()

DetId HGCalGeometry::getGeometryDetId ( DetId  detId) const
private

Definition at line 770 of file HGCalGeometry.cc.

770  {
771  DetId geomId;
772  if (m_topology.waferHexagon6()) {
773  geomId = static_cast<DetId>(HGCalDetId(detId).geometryCell());
774  } else if (m_topology.tileTrapezoid()) {
775  geomId = static_cast<DetId>(HGCScintillatorDetId(detId).geometryCell());
776  } else if (m_topology.isHFNose()) {
777  geomId = static_cast<DetId>(HFNoseDetId(detId).geometryCell());
778  } else {
779  geomId = static_cast<DetId>(HGCSiliconDetId(detId).geometryCell());
780  }
781  return geomId;
782 }

References HGCalTopology::isHFNose(), m_topology, HGCalTopology::tileTrapezoid(), and HGCalTopology::waferHexagon6().

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

◆ getGeometryRawPtr()

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

Implements CaloSubdetectorGeometry.

Definition at line 553 of file HGCalGeometry.cc.

553  {
554  // Modify the RawPtr class
555  if (m_det == DetId::HGCalHSc) {
556  if (m_cellVec2.size() < index)
557  return nullptr;
558  const CaloCellGeometry* cell(&m_cellVec2[index]);
559  return (nullptr == cell->param() ? nullptr : cell);
560  } else {
561  if (m_cellVec2.size() < index)
562  return nullptr;
563  const CaloCellGeometry* cell(&m_cellVec[index]);
564  return (nullptr == cell->param() ? nullptr : cell);
565  }
566 }

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 363 of file HGCalGeometry.cc.

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

References HGCalDDDConstants::cellSizeTrap(), cms::cuda::co, funct::cos(), HGCalTopology::dddConstants(), HGCalTopology::decode(), flavorHistoryFilter_cfi::dr, PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, getPosition(), 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, alignCSCRings::r, findQualityFiles::rr, funct::sin(), findQualityFiles::v, HGCalTopology::waferHexagon6(), and geometryCSVtoXML::xy.

Referenced by getArea().

◆ getPosition()

GlobalPoint HGCalGeometry::getPosition ( const DetId id) const

Definition at line 198 of file HGCalGeometry.cc.

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

References HGCalTopology::dddConstants(), HGCalTopology::decode(), indexFor(), HGCalDDDConstants::locateCell(), HGCalDDDConstants::locateCellHex(), m_cellVec, m_cellVec2, m_topology, reco_skim_cfg_mod::maxSize, HGCalTopology::tileTrapezoid(), HGCalTopology::waferHexagon6(), and geometryCSVtoXML::xy.

Referenced by HGCalTBAnalyzer::analyzeDigi(), HGCalTBAnalyzer::analyzeRecHits(), HGCDigitizer::checkPosition(), HGCalRadiationMap::computeRadius(), HGCalTriggerNtupleHGCDigis::fill(), get8Corners(), getClosestCellIndex(), getCorners(), getGeometry(), HGCalTriggerGeometryHexLayerBasedImp1::getModulePosition(), HGCalTriggerGeometryV9Imp1::getModulePosition(), HGCalTriggerGeometryV9Imp2::getModulePosition(), getNewCorners(), hgcal::RecHitTools::getPosition(), 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 668 of file HGCalGeometry.cc.

671  {
672  unsigned int numberOfCells = m_topology.totalGeomModules(); // total Geom Modules both sides
673  unsigned int numberOfShapes = k_NumberOfShapes;
674  unsigned int numberOfParametersPerShape = ((m_det == DetId::HGCalHSc) ? (unsigned int)(k_NumberOfParametersPerTrd)
675  : (unsigned int)(k_NumberOfParametersPerHex));
676 
677  trVector.reserve(numberOfCells * numberOfTransformParms());
678  iVector.reserve(numberOfCells);
679  dimVector.reserve(numberOfShapes * numberOfParametersPerShape);
680  dinsVector.reserve(numberOfCells);
681 
682  for (unsigned itr = 0; itr < m_topology.dddConstants().getTrFormN(); ++itr) {
684  int layer = mytr.lay;
685 
686  if (m_topology.waferHexagon6()) {
687  for (int wafer = 0; wafer < m_topology.dddConstants().sectors(); ++wafer) {
688  if (m_topology.dddConstants().waferInLayer(wafer, layer, true)) {
689  HGCalParameters::hgtrap vol = m_topology.dddConstants().getModule(wafer, true, true);
691  params[FlatHexagon::k_dZ] = vol.dz;
694  dimVector.insert(dimVector.end(), params.begin(), params.end());
695  }
696  }
697  } else if (m_topology.tileTrapezoid()) {
698  int indx = m_topology.dddConstants().layerIndex(layer, true);
699  for (int md = m_topology.dddConstants().getParameter()->firstModule_[indx];
701  ++md) {
704  params[FlatTrd::k_dZ] = vol.dz;
711  dimVector.insert(dimVector.end(), params.begin(), params.end());
712  }
713  } else {
714  for (int wafer = 0; wafer < m_topology.dddConstants().sectors(); ++wafer) {
715  if (m_topology.dddConstants().waferInLayer(wafer, layer, true)) {
716  HGCalParameters::hgtrap vol = m_topology.dddConstants().getModule(wafer, true, true);
718  params[FlatHexagon::k_dZ] = vol.dz;
721  dimVector.insert(dimVector.end(), params.begin(), params.end());
722  }
723  }
724  }
725  }
726 
727  for (unsigned int i(0); i < numberOfCells; ++i) {
728  DetId detId = m_validGeomIds[i];
729  int layer(0);
730  if (m_topology.waferHexagon6()) {
731  layer = HGCalDetId(detId).layer();
732  } else if (m_topology.tileTrapezoid()) {
733  layer = HGCScintillatorDetId(detId).layer();
734  } else if (m_topology.isHFNose()) {
735  layer = HFNoseDetId(detId).layer();
736  } else {
737  layer = HGCSiliconDetId(detId).layer();
738  }
739  dinsVector.emplace_back(m_topology.detId2denseGeomId(detId));
740  iVector.emplace_back(layer);
741 
742  Tr3D tr;
743  auto ptr = cellGeomPtr(i);
744  if (nullptr != ptr) {
745  ptr->getTransform(tr, (Pt3DVec*)nullptr);
746 
747  if (Tr3D() == tr) { // there is no rotation
748  const GlobalPoint& gp(ptr->getPosition());
749  tr = HepGeom::Translate3D(gp.x(), gp.y(), gp.z());
750  }
751 
752  const CLHEP::Hep3Vector tt(tr.getTranslation());
753  trVector.emplace_back(tt.x());
754  trVector.emplace_back(tt.y());
755  trVector.emplace_back(tt.z());
756  if (6 == numberOfTransformParms()) {
757  const CLHEP::HepRotation rr(tr.getRotation());
758  const ROOT::Math::Transform3D rtr(
759  rr.xx(), rr.xy(), rr.xz(), tt.x(), rr.yx(), rr.yy(), rr.yz(), tt.y(), rr.zx(), rr.zy(), rr.zz(), tt.z());
761  rtr.GetRotation(ea);
762  trVector.emplace_back(ea.Phi());
763  trVector.emplace_back(ea.Theta());
764  trVector.emplace_back(ea.Psi());
765  }
766  }
767  }
768 }

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, 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(), phase1PixelTopology::layer, HGCalDDDConstants::layerIndex(), m_det, m_topology, m_validGeomIds, CaloSubdetectorGeometry::numberOfParametersPerShape(), CaloSubdetectorGeometry::numberOfShapes(), CaloSubdetectorGeometry::numberOfTransformParms(), CalibrationSummaryClient_cfi::params, findQualityFiles::rr, HGCalDDDConstants::sectors(), HGCalTopology::tileTrapezoid(), HGCalParameters::hgtrap::tl, HGCalTopology::totalGeomModules(), groupFilesInBlocks::tt, twoBysqrt3_, HGCalTopology::waferHexagon6(), 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 89 of file HGCalGeometry.h.

89  {
90  return m_validIds;
91  }

References CaloSubdetectorGeometry::m_validIds.

◆ getValidGeomDetIds()

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

Definition at line 92 of file HGCalGeometry.h.

92 { return m_validGeomIds; }

References m_validGeomIds.

◆ getWaferPosition()

GlobalPoint HGCalGeometry::getWaferPosition ( const DetId id) const

Definition at line 235 of file HGCalGeometry.cc.

235  {
236  unsigned int cellIndex = indexFor(detid);
237  GlobalPoint glob;
238  unsigned int maxSize = (m_topology.tileTrapezoid() ? m_cellVec2.size() : m_cellVec.size());
239  if (cellIndex < maxSize) {
240  const HepGeom::Point3D<float> lcoord(0, 0, 0);
241  if (m_topology.tileTrapezoid()) {
242  glob = m_cellVec2[cellIndex].getPosition(lcoord);
243  } else {
244  glob = m_cellVec[cellIndex].getPosition(lcoord);
245  }
246 #ifdef EDM_ML_DEBUG
247  edm::LogVerbatim("HGCalGeom") << "getPositionTrap:: ID " << std::hex << detid.rawId() << std::dec << " index "
248  << cellIndex << " Global " << glob;
249 #endif
250  }
251  return glob;
252 }

References TauDecayModes::dec, indexFor(), m_cellVec, m_cellVec2, m_topology, reco_skim_cfg_mod::maxSize, DetId::rawId(), and HGCalTopology::tileTrapezoid().

◆ indexFor()

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

Reimplemented from CaloSubdetectorGeometry.

Definition at line 538 of file HGCalGeometry.cc.

538  {
539  unsigned int cellIndex = ((m_det == DetId::HGCalHSc) ? m_cellVec2.size() : m_cellVec.size());
540  if (detId != DetId()) {
541  DetId geomId = getGeometryDetId(detId);
542  cellIndex = m_topology.detId2denseGeomId(geomId);
543 #ifdef EDM_ML_DEBUG
544  edm::LogVerbatim("HGCalGeom") << "indexFor " << std::hex << detId.rawId() << ":" << geomId.rawId() << std::dec
545  << " index " << cellIndex;
546 #endif
547  }
548  return cellIndex;
549 }

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 47 of file HGCalGeometry.cc.

47 {}

◆ localCorners()

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

Definition at line 49 of file HGCalGeometry.cc.

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

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 404 of file HGCalGeometry.cc.

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

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 432 of file HGCalGeometry.cc.

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

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 57 of file HGCalGeometry.cc.

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

References HGCalDDDConstants::cellInLayer(), cells, CaloSubdetectorGeometry::cornersMgr(), HGCalTopology::dddConstants(), TauDecayModes::dec, HGCalTopology::decode(), HGCalTopology::detId2denseGeomId(), HGCalTopology::encode(), DeadROC_duringRun::f1, DeadROC_duringRun::f2, getGeometryDetId(), DetId::HGCalHSc, HGCalTopology::isHFNose(), HGCScintillatorDetId::layer(), m_cellVec, m_cellVec2, m_det, m_topology, m_validGeomIds, CaloSubdetectorGeometry::m_validIds, HGCalDDDConstants::numberCellsHexagon(), DetId::rawId(), HGCScintillatorDetId::ring(), HGCScintillatorDetId::setSiPM(), HGCScintillatorDetId::setType(), HGCalTopology::tileTrapezoid(), HGCalDDDConstants::tileType(), findQualityFiles::v, HGCalTopology::valid(), and HGCalTopology::waferHexagon6().

◆ present()

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

is this detid present in the geometry?

Reimplemented from CaloSubdetectorGeometry.

Definition at line 190 of file HGCalGeometry.cc.

190  {
191  if (detId == DetId())
192  return false;
193  DetId geomId = getGeometryDetId(detId);
194  const uint32_t index(m_topology.detId2denseGeomId(geomId));
195  return (nullptr != getGeometryRawPtr(index));
196 }

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

◆ producerTag()

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

Definition at line 108 of file HGCalGeometry.h.

108 { return "HGCal"; }

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

◆ sizeForDenseIndex() [1/2]

unsigned int HGCalGeometry::sizeForDenseIndex ( ) const
protected

Definition at line 551 of file HGCalGeometry.cc.

551 { 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 663 of file HGCalGeometry.cc.

663  {
664  m_validIds.shrink_to_fit();
665  std::sort(m_validIds.begin(), m_validIds.end(), rawIdSort());
666 }

References CaloSubdetectorGeometry::m_validIds, and jetUpdater_cfi::sort.

◆ topology()

const HGCalTopology& HGCalGeometry::topology ( ) const
inline

Member Data Documentation

◆ k_fac1

constexpr double HGCalGeometry::k_fac1 = 0.5
staticconstexprprivate

Definition at line 134 of file HGCalGeometry.h.

Referenced by getCorners(), and getNewCorners().

◆ k_fac2

constexpr double HGCalGeometry::k_fac2 = 1.0 / 3.0
staticconstexprprivate

Definition at line 135 of file HGCalGeometry.h.

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

◆ k_half

constexpr double HGCalGeometry::k_half = 0.5
staticconstexprprivate

Definition at line 133 of file HGCalGeometry.h.

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

◆ k_NumberOfParametersPerHex

constexpr unsigned int HGCalGeometry::k_NumberOfParametersPerHex = 3
staticconstexpr

Definition at line 44 of file HGCalGeometry.h.

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

◆ k_NumberOfParametersPerShape

constexpr unsigned int HGCalGeometry::k_NumberOfParametersPerShape = 3
staticconstexpr

Definition at line 45 of file HGCalGeometry.h.

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

◆ k_NumberOfParametersPerTrd

constexpr unsigned int HGCalGeometry::k_NumberOfParametersPerTrd = 12
staticconstexpr

Definition at line 43 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 47 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 142 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 140 of file HGCalGeometry.h.

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

◆ twoBysqrt3_

const double HGCalGeometry::twoBysqrt3_
private

Definition at line 143 of file HGCalGeometry.h.

Referenced by getSummary().

TkRotation< float >
HGCalDDDConstants::cellSizeTrap
std::pair< double, double > cellSizeTrap(int type, int irad) const
Definition: HGCalDDDConstants.h:38
HGCalParameters::hgtrap::bl
float bl
Definition: HGCalParameters.h:49
DDAxes::y
CaloSubdetectorGeometry::numberOfParametersPerShape
virtual unsigned int numberOfParametersPerShape() const
Definition: CaloSubdetectorGeometry.h:93
HGCalGeometry::m_det
DetId::Detector m_det
Definition: HGCalGeometry.h:141
mps_fire.i
i
Definition: mps_fire.py:428
HGCalTopology::dddConstants
const HGCalDDDConstants & dddConstants() const
Definition: HGCalTopology.h:98
HGCalGeometry::m_cellVec
CellVec m_cellVec
Definition: HGCalGeometry.h:138
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
HGCalDDDConstants::waferTypeT
int waferTypeT(int wafer) const
Definition: HGCalDDDConstants.h:193
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:53
HGCalGeometry::CellVec2
std::vector< FlatTrd > CellVec2
Definition: HGCalGeometry.h:32
HGCalGeometry::cellGeomPtr
std::shared_ptr< const CaloCellGeometry > cellGeomPtr(uint32_t index) const override
Definition: HGCalGeometry.cc:568
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:49
HFNoseDetId::layer
int layer() const
get the layer #
Definition: HFNoseDetId.h:56
HGCalGeometry::k_half
static constexpr double k_half
Definition: HGCalGeometry.h:133
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:1412
HGCalTopology::detector
DetId::Detector detector() const
Definition: HGCalTopology.h:117
FlatTrd::k_Phi
static constexpr uint32_t k_Phi
Definition: FlatTrd.h:29
cells
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ cells
Definition: CAHitNtupletGeneratorKernelsImpl.h:43
HGCalTopology::decode
DecodedDetId decode(const DetId &id) const
Definition: HGCalTopology.cc:589
HGCalParameters::hgtrap::alpha
float alpha
Definition: HGCalParameters.h:49
HGCalGeometry::m_cellVec2
CellVec2 m_cellVec2
Definition: HGCalGeometry.h:139
CaloSubdetectorGeometry::numberOfTransformParms
virtual unsigned int numberOfTransformParms() const
Definition: CaloSubdetectorGeometry.h:94
HGCalGeometry::k_NumberOfShapes
static constexpr unsigned int k_NumberOfShapes
Definition: HGCalGeometry.h:46
HGCalTopology::DecodedDetId
Definition: HGCalTopology.h:108
ReferenceCountingPointer< Plane >
HGCalParameters::hgtrap::dz
float dz
Definition: HGCalParameters.h:49
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:142
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:43
HGCalTopology::tileTrapezoid
bool tileTrapezoid() const
Definition: HGCalTopology.h:124
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:575
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
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:50
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
HGCalParameters::hgtrap::tl
float tl
Definition: HGCalParameters.h:49
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
cms::cuda::co
__host__ __device__ VT * co
Definition: prefixScan.h:47
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::tileType
std::pair< int, int > tileType(int layer, int ring, int phi) const
Definition: HGCalDDDConstants.h:117
HGCalDDDConstants::waferInLayer
bool waferInLayer(int wafer, int lay, bool reco) const
Definition: HGCalDDDConstants.cc:1208
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:579
Tr3D
CaloCellGeometry::Tr3D Tr3D
Definition: CaloCellGeometry.cc:7
HGCalGeometry::k_NumberOfParametersPerHex
static constexpr unsigned int k_NumberOfParametersPerHex
Definition: HGCalGeometry.h:44
HGCalTopology::waferHexagon6
bool waferHexagon6() const
Definition: HGCalTopology.h:128
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:770
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:111
HGCalDDDConstants::rangeR
std::pair< double, double > rangeR(double z, bool reco) const
Definition: HGCalDDDConstants.cc:966
HGCalDDDConstants::assignCell
std::pair< int, int > assignCell(float x, float y, int lay, int subSec, bool reco) const
Definition: HGCalDDDConstants.cc:120
geometryCSVtoXML.xy
xy
Definition: geometryCSVtoXML.py:19
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
HGCEE
Definition: ForwardSubdetector.h:8
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:167
HGCalTopology::totalModules
unsigned int totalModules() const
Definition: HGCalTopology.h:92
FlatTrd::k_dX3
static constexpr uint32_t k_dX3
Definition: FlatTrd.h:39
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HGCalGeometry::CellVec
std::vector< FlatHexagon > CellVec
Definition: HGCalGeometry.h:31
CaloCellGeometry
Definition: CaloCellGeometry.h:50
DeadROC_duringRun.f2
f2
Definition: DeadROC_duringRun.py:220
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
HGCalGeometry::m_validGeomIds
std::vector< DetId > m_validGeomIds
Definition: HGCalGeometry.h:140
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
HGCalGeometry::getGeometryRawPtr
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
Definition: HGCalGeometry.cc:553
HGCalGeometry::k_fac1
static constexpr double k_fac1
Definition: HGCalGeometry.h:134
HGCalParameters::hgtrap::h
float h
Definition: HGCalParameters.h:49
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
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:50
HGCalGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Definition: HGCalGeometry.cc:198
HGCalGeometry::getClosestCell
DetId getClosestCell(const GlobalPoint &r) const override
Definition: HGCalGeometry.cc:470
HGCalDDDConstants::sectors
int sectors() const
Definition: HGCalDDDConstants.h:110
HGCalGeometry::twoBysqrt3_
const double twoBysqrt3_
Definition: HGCalGeometry.h:143
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
HGCalTopology::DecodedDetId::det
int det
Definition: HGCalTopology.h:110
align::EulerAngles
AlgebraicVector EulerAngles
Definition: Definitions.h:34
HGCalParameters::hgtrform::lay
int lay
Definition: HGCalParameters.h:53
HGCalDDDConstants::getTrForm
HGCalParameters::hgtrform getTrForm(unsigned int k) const
Definition: HGCalDDDConstants.h:66
HGCalGeometry::DetIdSet
std::set< DetId > DetIdSet
Definition: HGCalGeometry.h:37
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HGCalDDDConstants::numberCellsHexagon
int numberCellsHexagon(int wafer) const
Definition: HGCalDDDConstants.cc:944
HGCalGeometry::k_fac2
static constexpr double k_fac2
Definition: HGCalGeometry.h:135
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
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:718
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
Calorimetry_cff.bField
bField
Definition: Calorimetry_cff.py:284
HGCalTopology::encode
DetId encode(const DecodedDetId &id_) const
Definition: HGCalTopology.cc:635
PVValHelper::dz
Definition: PVValidationHelpers.h:51
HGCScintillatorDetId
Definition: HGCScintillatorDetId.h:23
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
DetId::HGCalHSc
Definition: DetId.h:34
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
HGCalParameters::lastModule_
std::vector< int > lastModule_
Definition: HGCalParameters.h:168
HGCalGeometry::indexFor
unsigned int indexFor(const DetId &id) const override
Definition: HGCalGeometry.cc:538
HGCalDDDConstants::getLayer
int getLayer(double z, bool reco) const
Definition: HGCalDDDConstants.cc:356
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
Pt3DVec
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: CaloCellGeometry.cc:6
HGCalParameters::hgtrform
Definition: HGCalParameters.h:52
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:617
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:67
HGCalDDDConstants::locateCell
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
Definition: HGCalDDDConstants.cc:596
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:47
edm::Log
Definition: MessageLogger.h:70
custom_jme_cff.area
area
Definition: custom_jme_cff.py:140
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
HGCalDDDConstants::getParameter
const HGCalParameters * getParameter() const
Definition: HGCalDDDConstants.h:59
PVValHelper::dx
Definition: PVValidationHelpers.h:49
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:38
FlatTrd::k_dZ
static constexpr uint32_t k_dZ
Definition: FlatTrd.h:26
HGCalGeometry::getNewCorners
CornersVec getNewCorners(const DetId &id) const
Definition: HGCalGeometry.cc:363
HGCalGeometry::m_topology
const HGCalTopology & m_topology
Definition: HGCalGeometry.h:137
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:376