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

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

◆ cellElement()

std::string HGCalGeometry::cellElement ( ) const

Definition at line 520 of file HGCalGeometry.cc.

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

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

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

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

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

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

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

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

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

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

515  {
517  return dss;
518 }

◆ getClosestCell()

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

Reimplemented from CaloSubdetectorGeometry.

Definition at line 463 of file HGCalGeometry.cc.

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

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

610  {
612 }

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

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

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

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

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

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

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

◆ getGeometryDetId()

DetId HGCalGeometry::getGeometryDetId ( DetId  detId) const
private

Definition at line 763 of file HGCalGeometry.cc.

763  {
764  DetId geomId;
765  if (m_topology.waferHexagon6()) {
766  geomId = static_cast<DetId>(HGCalDetId(detId).geometryCell());
767  } else if (m_topology.tileTrapezoid()) {
768  geomId = static_cast<DetId>(HGCScintillatorDetId(detId).geometryCell());
769  } else if (m_topology.isHFNose()) {
770  geomId = static_cast<DetId>(HFNoseDetId(detId).geometryCell());
771  } else {
772  geomId = static_cast<DetId>(HGCSiliconDetId(detId).geometryCell());
773  }
774  return geomId;
775 }

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

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

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

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

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

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

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

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

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(), 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 228 of file HGCalGeometry.cc.

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

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

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

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

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

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

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

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  m_validIds.emplace_back(idc);
108 #ifdef EDM_ML_DEBUG
109  edm::LogVerbatim("HGCalGeom") << "Valid Id [0] " << HGCScintillatorDetId(idc);
110 #endif
111  } else {
112  edm::LogWarning("HGCalGeom") << "Check " << HGCScintillatorDetId(idc) << " from " << HGCScintillatorDetId(detId)
113  << " ERROR ???";
114  }
115  } else {
116 #ifdef EDM_ML_DEBUG
117  unsigned int cellAll(0), cellSelect(0);
118 #endif
119  for (int u = 0; u < 2 * cells; ++u) {
120  for (int v = 0; v < 2 * cells; ++v) {
121  if (((v - u) < cells) && (u - v) <= cells) {
122  id.iCell1 = u;
123  id.iCell2 = v;
124  DetId idc = m_topology.encode(id);
125 #ifdef EDM_ML_DEBUG
126  ++cellAll;
127 #endif
128  if (m_topology.dddConstants().cellInLayer(id.iSec1, id.iSec2, u, v, id.iLay, true)) {
129  m_validIds.emplace_back(idc);
130 #ifdef EDM_ML_DEBUG
131  ++cellSelect;
132  edm::LogVerbatim("HGCalGeom") << "Valid Id [" << u << ", " << v << "] " << HGCSiliconDetId(idc);
133 #endif
134  }
135  }
136  }
137  }
138 #ifdef EDM_ML_DEBUG
139  edm::LogVerbatim("HGCalGeom") << "HGCalGeometry keeps " << cellSelect << " out of " << cellAll << " for wafer "
140  << id.iSec1 << ":" << id.iSec2 << " in "
141  << " layer " << id.iLay;
142 #endif
143  }
144 #ifdef EDM_ML_DEBUG
145  if (m_det == DetId::HGCalHSc) {
146  edm::LogVerbatim("HGCalGeom") << "HGCalGeometry::newCell-> [" << cellIndex << "]"
147  << " front:" << f1.x() << '/' << f1.y() << '/' << f1.z() << " back:" << f2.x() << '/'
148  << f2.y() << '/' << f2.z() << " eta|phi " << m_cellVec2[cellIndex].etaPos() << ":"
149  << m_cellVec2[cellIndex].phiPos();
150  } else {
151  edm::LogVerbatim("HGCalGeom") << "HGCalGeometry::newCell-> [" << cellIndex << "]"
152  << " front:" << f1.x() << '/' << f1.y() << '/' << f1.z() << " back:" << f2.x() << '/'
153  << f2.y() << '/' << f2.z() << " eta|phi " << m_cellVec[cellIndex].etaPos() << ":"
154  << m_cellVec[cellIndex].phiPos();
155  }
156  unsigned int nNew = m_validIds.size();
157  if (m_topology.waferHexagon6()) {
158  edm::LogVerbatim("HGCalGeom") << "ID: " << HGCalDetId(detId) << " with valid DetId from " << nOld << " to " << nNew;
159  } else if (m_topology.tileTrapezoid()) {
160  edm::LogVerbatim("HGCalGeom") << "ID: " << HGCScintillatorDetId(detId) << " with valid DetId from " << nOld
161  << " to " << nNew;
162  } else if (m_topology.isHFNose()) {
163  edm::LogVerbatim("HGCalGeom") << "ID: " << HFNoseDetId(detId) << " with valid DetId from " << nOld << " to "
164  << nNew;
165  } else {
166  edm::LogVerbatim("HGCalGeom") << "ID: " << HGCSiliconDetId(detId) << " with valid DetId from " << nOld << " to "
167  << nNew;
168  }
169  edm::LogVerbatim("HGCalGeom") << "Cell[" << cellIndex << "] " << std::hex << geomId.rawId() << ":"
170  << m_validGeomIds[cellIndex].rawId() << std::dec;
171 #endif
172 }

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(), DetId::HGCalHSc, HGCalTopology::isHFNose(), m_cellVec, m_cellVec2, m_det, m_topology, m_validGeomIds, CaloSubdetectorGeometry::m_validIds, HGCalDDDConstants::numberCellsHexagon(), DetId::rawId(), HGCalTopology::tileTrapezoid(), 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 183 of file HGCalGeometry.cc.

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

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

544 { 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 656 of file HGCalGeometry.cc.

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

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 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:37
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: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:179
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:52
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:561
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: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:1388
HGCalTopology::detector
DetId::Detector detector() const
Definition: HGCalTopology.h:117
FlatTrd::k_Phi
static constexpr uint32_t k_Phi
Definition: FlatTrd.h:29
HGCalTopology::decode
DecodedDetId decode(const DetId &id) const
Definition: HGCalTopology.cc:588
HGCalParameters::hgtrap::alpha
float alpha
Definition: HGCalParameters.h:43
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:43
HGCalDDDConstants::assignCellHex
std::array< int, 5 > assignCellHex(float x, float y, int lay, bool reco) const
Definition: HGCalDDDConstants.cc:159
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:559
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: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:1184
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:563
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:127
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:763
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:947
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
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:203
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
FlatTrd::k_dX3
static constexpr uint32_t k_dX3
Definition: FlatTrd.h:39
HGCalGeometry::CellVec
std::vector< FlatHexagon > CellVec
Definition: HGCalGeometry.h:31
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:140
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
HGCalGeometry::getGeometryRawPtr
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
Definition: HGCalGeometry.cc:546
HGCalGeometry::k_fac1
static constexpr double k_fac1
Definition: HGCalGeometry.h:134
HGCalParameters::hgtrap::h
float h
Definition: HGCalParameters.h:43
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:433
PVValHelper::dy
Definition: PVValidationHelpers.h:49
HGCalGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Definition: HGCalGeometry.cc:191
HGCalGeometry::getClosestCell
DetId getClosestCell(const GlobalPoint &r) const override
Definition: HGCalGeometry.cc:463
HGCalDDDConstants::sectors
int sectors() const
Definition: HGCalDDDConstants.h:108
HGCalGeometry::twoBysqrt3_
const double twoBysqrt3_
Definition: HGCalGeometry.h:143
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:29
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:47
HGCalDDDConstants::getTrForm
HGCalParameters::hgtrform getTrForm(unsigned int k) const
Definition: HGCalDDDConstants.h:65
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:925
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:170
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:700
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:634
PVValHelper::dz
Definition: PVValidationHelpers.h:50
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
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:531
HGCalDDDConstants::getLayer
int getLayer(double z, bool reco) const
Definition: HGCalDDDConstants.cc:355
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:463
cms::cuda::co
VT * co
Definition: prefixScan.h:46
HGCHEF
Definition: ForwardSubdetector.h:9
HGCalGeometry::getClosestCellIndex
unsigned int getClosestCellIndex(const GlobalPoint &r) const
Definition: HGCalGeometry.cc:610
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:66
HGCalDDDConstants::locateCell
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
Definition: HGCalDDDConstants.cc:580
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
edm::Log
Definition: MessageLogger.h:70
custom_jme_cff.area
area
Definition: custom_jme_cff.py:140
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
HGCalDDDConstants::getParameter
const HGCalParameters * getParameter() const
Definition: HGCalDDDConstants.h:58
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: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:356
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:375