CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
HGCalGeomParameters Class Reference

#include <HGCalGeomParameters.h>

Classes

struct  cellParameters
 
struct  layerParameters
 

Public Member Functions

 HGCalGeomParameters ()
 
void loadCellParsHexagon (const cms::DDVectorsMap &vmap, HGCalParameters &php)
 
void loadCellParsHexagon (const DDCompactView *cpv, HGCalParameters &php)
 
void loadCellParsHexagon (const HGCalParameters &php)
 
void loadCellTrapezoid (HGCalParameters &php)
 
void loadGeometryHexagon (const cms::DDCompactView *cpv, HGCalParameters &php, const std::string &sdTag1, const std::string &sdTag2, const std::string &sdTag3, HGCalGeometryMode::WaferMode mode)
 
void loadGeometryHexagon (const DDFilteredView &_fv, HGCalParameters &php, const std::string &sdTag1, const DDCompactView *cpv, const std::string &sdTag2, const std::string &sdTag3, HGCalGeometryMode::WaferMode mode)
 
void loadGeometryHexagon8 (const cms::DDCompactView *cpv, HGCalParameters &php, const std::string &sdTag1, int firstLayer)
 
void loadGeometryHexagon8 (const DDFilteredView &_fv, HGCalParameters &php, int firstLayer)
 
void loadSpecParsHexagon (const cms::DDFilteredView &fv, HGCalParameters &php, const std::string &sdTag1, const std::string &sdTag2, const std::string &sdTag3, const std::string &sdTag4)
 
void loadSpecParsHexagon (const DDFilteredView &fv, HGCalParameters &php, const DDCompactView *cpv, const std::string &sdTag1, const std::string &sdTag2)
 
void loadSpecParsHexagon8 (const cms::DDFilteredView &fv, const cms::DDVectorsMap &vmap, HGCalParameters &php, const std::string &sdTag1)
 
void loadSpecParsHexagon8 (const DDFilteredView &fv, HGCalParameters &php)
 
void loadSpecParsTrapezoid (const cms::DDFilteredView &fv, const cms::DDVectorsMap &vmap, HGCalParameters &php, const std::string &sdTag1)
 
void loadSpecParsTrapezoid (const DDFilteredView &fv, HGCalParameters &php)
 
void loadWaferHexagon (HGCalParameters &php)
 
void loadWaferHexagon8 (HGCalParameters &php)
 
 ~HGCalGeomParameters ()
 

Private Member Functions

std::pair< double, double > cellPosition (const std::vector< cellParameters > &wafers, std::vector< cellParameters >::const_iterator &itrf, int wafer, double xx, double yy)
 
std::vector< double > getDDDArray (const std::string &str, const DDsvalues_type &sv, const int nmin)
 
void loadGeometryHexagon (const std::map< int, HGCalGeomParameters::layerParameters > &layers, std::vector< HGCalParameters::hgtrform > &trforms, std::vector< bool > &trformUse, const std::unordered_map< int32_t, int32_t > &copies, const HGCalParameters::layer_map &copiesInLayers, const std::vector< int32_t > &wafer2copy, const std::vector< HGCalGeomParameters::cellParameters > &wafers, const std::map< int, int > &wafertype, const std::map< int, HGCalGeomParameters::cellParameters > &cellsf, const std::map< int, HGCalGeomParameters::cellParameters > &cellsc, HGCalParameters &php)
 
void loadGeometryHexagon8 (const std::map< int, HGCalGeomParameters::layerParameters > &layers, std::map< std::pair< int, int >, HGCalParameters::hgtrform > &trforms, const int &firstLayer, HGCalParameters &php)
 
void loadSpecParsHexagon (const HGCalParameters &php)
 
void loadSpecParsHexagon8 (HGCalParameters &php)
 
void loadSpecParsTrapezoid (HGCalParameters &php)
 
void rescale (std::vector< double > &, const double s)
 
void resetZero (std::vector< double > &)
 

Private Attributes

HGCalGeomTools geomTools_
 
const double sqrt3_
 
std::vector< int > tileHEX1_
 
std::vector< int > tileHEX2_
 
std::vector< int > tileHEX3_
 
std::vector< int > tileHEX4_
 
std::vector< int > tileIndx_
 
std::vector< int > tileRingMax_
 
std::vector< int > tileRingMin_
 
std::vector< double > tileRMax_
 
std::vector< double > tileRMin_
 
std::vector< int > tileSiPM_
 
std::vector< int > tileType_
 
std::vector< int > waferIndex_
 
std::vector< int > waferOrien_
 
std::vector< int > waferParts_
 
double waferSize_
 
std::vector< int > waferTypes_
 

Static Private Attributes

constexpr static int scintillatorFile = 4
 
constexpr static int siliconFileEE = 2
 
constexpr static int siliconFileHE = 3
 
constexpr static double tan30deg_ = 0.5773502693
 

Detailed Description

this class extracts some geometry constants from CompactView to be used by Reco Geometry/Topology

Date
2015/06/25 00:06:50
Author
Sunanda Banerjee, Fermilab sunan.nosp@m.da.b.nosp@m.anerj.nosp@m.ee@c.nosp@m.ern.c.nosp@m.h
Lindsey Gray, Fermilab lagra.nosp@m.y@fn.nosp@m.al.go.nosp@m.v (for fixes)

Definition at line 29 of file HGCalGeomParameters.h.

Constructor & Destructor Documentation

◆ HGCalGeomParameters()

HGCalGeomParameters::HGCalGeomParameters ( )

Definition at line 30 of file HGCalGeomParameters.cc.

30  : sqrt3_(std::sqrt(3.0)) {
31 #ifdef EDM_ML_DEBUG
32  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters::HGCalGeomParameters "
33  << "constructor";
34 #endif
35 }

◆ ~HGCalGeomParameters()

HGCalGeomParameters::~HGCalGeomParameters ( )

Definition at line 37 of file HGCalGeomParameters.cc.

37  {
38 #ifdef EDM_ML_DEBUG
39  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters::destructed!!!";
40 #endif
41 }

Member Function Documentation

◆ cellPosition()

std::pair< double, double > HGCalGeomParameters::cellPosition ( const std::vector< cellParameters > &  wafers,
std::vector< cellParameters >::const_iterator &  itrf,
int  wafer,
double  xx,
double  yy 
)
private

Definition at line 1854 of file HGCalGeomParameters.cc.

1859  {
1860  if (itrf == wafers.end()) {
1861  for (std::vector<HGCalGeomParameters::cellParameters>::const_iterator itr = wafers.begin(); itr != wafers.end();
1862  ++itr) {
1863  if (itr->wafer == wafer) {
1864  itrf = itr;
1865  break;
1866  }
1867  }
1868  }
1869  double dx(0), dy(0);
1870  if (itrf != wafers.end()) {
1871  dx = (xx - itrf->xyz.x());
1872  if (std::abs(dx) < tolerance)
1873  dx = 0;
1874  dy = (yy - itrf->xyz.y());
1875  if (std::abs(dy) < tolerance)
1876  dy = 0;
1877  }
1878  return std::make_pair(dx, dy);
1879 }

References funct::abs(), PVValHelper::dx, PVValHelper::dy, tolerance, geometryCSVtoXML::xx, and geometryCSVtoXML::yy.

Referenced by loadGeometryHexagon().

◆ getDDDArray()

std::vector< double > HGCalGeomParameters::getDDDArray ( const std::string &  str,
const DDsvalues_type sv,
const int  nmin 
)
private

Definition at line 1827 of file HGCalGeomParameters.cc.

1827  {
1828  DDValue value(str);
1829  if (DDfetch(&sv, value)) {
1830  const std::vector<double>& fvec = value.doubles();
1831  int nval = fvec.size();
1832  if (nmin > 0) {
1833  if (nval < nmin) {
1834  throw cms::Exception("DDException")
1835  << "HGCalGeomParameters: # of " << str << " bins " << nval << " < " << nmin << " ==> illegal";
1836  }
1837  } else {
1838  if (nval < 1 && nmin == 0) {
1839  throw cms::Exception("DDException")
1840  << "HGCalGeomParameters: # of " << str << " bins " << nval << " < 1 ==> illegal"
1841  << " (nmin=" << nmin << ")";
1842  }
1843  }
1844  return fvec;
1845  } else {
1846  if (nmin >= 0) {
1847  throw cms::Exception("DDException") << "HGCalGeomParameters: cannot get array " << str;
1848  }
1849  std::vector<double> fvec;
1850  return fvec;
1851  }
1852 }

References DDfetch(), Exception, str, pfDeepBoostedJetPreprocessParams_cfi::sv, and relativeConstraints::value.

Referenced by loadSpecParsHexagon(), loadSpecParsHexagon8(), and loadSpecParsTrapezoid().

◆ loadCellParsHexagon() [1/3]

void HGCalGeomParameters::loadCellParsHexagon ( const cms::DDVectorsMap vmap,
HGCalParameters php 
)

Definition at line 1669 of file HGCalGeomParameters.cc.

1669  {
1670  for (auto const& it : vmap) {
1671  if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "waferFine")) {
1672  for (const auto& i : it.second)
1673  php.cellFine_.emplace_back(std::round(i));
1674  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "waferCoarse")) {
1675  for (const auto& i : it.second)
1676  php.cellCoarse_.emplace_back(std::round(i));
1677  }
1678  }
1679 
1680  loadCellParsHexagon(php);
1681 }

References HGCalParameters::cellCoarse_, HGCalParameters::cellFine_, cms::dd::compareEqual(), mps_fire::i, loadCellParsHexagon(), and cms::dd::noNamespace().

◆ loadCellParsHexagon() [2/3]

void HGCalGeomParameters::loadCellParsHexagon ( const DDCompactView cpv,
HGCalParameters php 
)

Definition at line 1654 of file HGCalGeomParameters.cc.

1654  {
1655  // Special parameters for cell parameters
1656  std::string attribute = "OnlyForHGCalNumbering";
1657  DDSpecificsHasNamedValueFilter filter1{attribute};
1658  DDFilteredView fv1(*cpv, filter1);
1659  bool ok = fv1.firstChild();
1660 
1661  if (ok) {
1662  php.cellFine_ = dbl_to_int(DDVectorGetter::get("waferFine"));
1663  php.cellCoarse_ = dbl_to_int(DDVectorGetter::get("waferCoarse"));
1664  }
1665 
1666  loadCellParsHexagon(php);
1667 }

References HGCalParameters::cellCoarse_, HGCalParameters::cellFine_, dbl_to_int(), DDFilteredView::firstChild(), DDVectorGetter::get(), convertSQLiteXML::ok, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by loadCellParsHexagon().

◆ loadCellParsHexagon() [3/3]

void HGCalGeomParameters::loadCellParsHexagon ( const HGCalParameters php)

Definition at line 1683 of file HGCalGeomParameters.cc.

1683  {
1684 #ifdef EDM_ML_DEBUG
1685  edm::LogVerbatim("HGCalGeom") << "HGCalLoadCellPars: " << php.cellFine_.size() << " rows for fine cells";
1686  for (unsigned int k = 0; k < php.cellFine_.size(); ++k)
1687  edm::LogVerbatim("HGCalGeom") << "[" << k << "]: " << php.cellFine_[k];
1688  edm::LogVerbatim("HGCalGeom") << "HGCalLoadCellPars: " << php.cellCoarse_.size() << " rows for coarse cells";
1689  for (unsigned int k = 0; k < php.cellCoarse_.size(); ++k)
1690  edm::LogVerbatim("HGCalGeom") << "[" << k << "]: " << php.cellCoarse_[k];
1691 #endif
1692 }

References HGCalParameters::cellCoarse_, HGCalParameters::cellFine_, and dqmdumpme::k.

◆ loadCellTrapezoid()

void HGCalGeomParameters::loadCellTrapezoid ( HGCalParameters php)

Definition at line 1694 of file HGCalGeomParameters.cc.

1694  {
1695  php.xLayerHex_.clear();
1696  php.yLayerHex_.clear();
1697  for (unsigned int k = 0; k < php.zLayerHex_.size(); ++k) {
1698  php.xLayerHex_.emplace_back(0);
1699  php.yLayerHex_.emplace_back(0);
1700  }
1701 #ifdef EDM_ML_DEBUG
1702  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: x|y|zLayerHex in array of size " << php.zLayerHex_.size();
1703  for (unsigned int k = 0; k < php.zLayerHex_.size(); ++k)
1704  edm::LogVerbatim("HGCalGeom") << "Layer[" << k << "] Shift " << php.xLayerHex_[k] << ":" << php.yLayerHex_[k] << ":"
1705  << php.zLayerHex_[k];
1706 #endif
1707  // Find the radius of each eta-partitions
1708  for (unsigned k = 0; k < 2; ++k) {
1709  double rmax = ((k == 0) ? (php.rMaxLayHex_[php.layerFrontBH_[1] - php.firstLayer_] - 1)
1710  : (php.rMaxLayHex_[php.rMaxLayHex_.size() - 1]));
1711  double rv = php.rMinLayerBH_[k];
1712  double zv = ((k == 0) ? (php.zLayerHex_[php.layerFrontBH_[1] - php.firstLayer_])
1713  : (php.zLayerHex_[php.zLayerHex_.size() - 1]));
1714  php.radiusLayer_[k].emplace_back(rv);
1715 #ifdef EDM_ML_DEBUG
1716  double eta = -(std::log(std::tan(0.5 * std::atan(rv / zv))));
1717  edm::LogVerbatim("HGCalGeom") << "[" << k << "] rmax " << rmax << " Z = " << zv << " dEta = " << php.cellSize_[k]
1718  << "\n[0] new R = " << rv << " Eta = " << eta;
1719  int kount(1);
1720 #endif
1721  while (rv < rmax) {
1722  double eta = -(php.cellSize_[k] + std::log(std::tan(0.5 * std::atan(rv / zv))));
1723  rv = zv * std::tan(2.0 * std::atan(std::exp(-eta)));
1724  php.radiusLayer_[k].emplace_back(rv);
1725 #ifdef EDM_ML_DEBUG
1726  edm::LogVerbatim("HGCalGeom") << "[" << kount << "] new R = " << rv << " Eta = " << eta;
1727  ++kount;
1728 #endif
1729  }
1730  }
1731 
1732  // Find minimum and maximum radius index for each layer
1733  for (unsigned k = 0; k < php.zLayerHex_.size(); ++k) {
1734  int kk = php.scintType(php.firstLayer_ + (int)(k));
1735  std::vector<double>::iterator low, high;
1736  low = std::lower_bound(php.radiusLayer_[kk].begin(), php.radiusLayer_[kk].end(), php.rMinLayHex_[k]);
1737 #ifdef EDM_ML_DEBUG
1738  edm::LogVerbatim("HGCalGeom") << "[" << k << "] RLow = " << php.rMinLayHex_[k] << " pos "
1739  << (int)(low - php.radiusLayer_[kk].begin());
1740 #endif
1741  if (low == php.radiusLayer_[kk].begin())
1742  ++low;
1743  int irlow = (int)(low - php.radiusLayer_[kk].begin());
1744  double drlow = php.radiusLayer_[kk][irlow] - php.rMinLayHex_[k];
1745 #ifdef EDM_ML_DEBUG
1746  edm::LogVerbatim("HGCalGeom") << "irlow " << irlow << " dr " << drlow << " min " << php.minTileSize_;
1747 #endif
1748  if (drlow < php.minTileSize_) {
1749  ++irlow;
1750 #ifdef EDM_ML_DEBUG
1751  drlow = php.radiusLayer_[kk][irlow] - php.rMinLayHex_[k];
1752  edm::LogVerbatim("HGCalGeom") << "Modified irlow " << irlow << " dr " << drlow;
1753 #endif
1754  }
1755  high = std::lower_bound(php.radiusLayer_[kk].begin(), php.radiusLayer_[kk].end(), php.rMaxLayHex_[k]);
1756 #ifdef EDM_ML_DEBUG
1757  edm::LogVerbatim("HGCalGeom") << "[" << k << "] RHigh = " << php.rMaxLayHex_[k] << " pos "
1758  << (int)(high - php.radiusLayer_[kk].begin());
1759 #endif
1760  if (high == php.radiusLayer_[kk].end())
1761  --high;
1762  int irhigh = (int)(high - php.radiusLayer_[kk].begin());
1763  double drhigh = php.rMaxLayHex_[k] - php.radiusLayer_[kk][irhigh - 1];
1764 #ifdef EDM_ML_DEBUG
1765  edm::LogVerbatim("HGCalGeom") << "irhigh " << irhigh << " dr " << drhigh << " min " << php.minTileSize_;
1766 #endif
1767  if (drhigh < php.minTileSize_) {
1768  --irhigh;
1769 #ifdef EDM_ML_DEBUG
1770  drhigh = php.rMaxLayHex_[k] - php.radiusLayer_[kk][irhigh - 1];
1771  edm::LogVerbatim("HGCalGeom") << "Modified irhigh " << irhigh << " dr " << drhigh;
1772 #endif
1773  }
1774  php.iradMinBH_.emplace_back(irlow);
1775  php.iradMaxBH_.emplace_back(irhigh);
1776 #ifdef EDM_ML_DEBUG
1777  edm::LogVerbatim("HGcalGeom") << "Layer " << k << " Type " << kk << " Low edge " << irlow << ":" << drlow
1778  << " Top edge " << irhigh << ":" << drhigh;
1779 #endif
1780  }
1781 
1782  // Now define the volumes
1783  int im(0);
1784  php.waferUVMax_ = 0;
1786  mytr.alpha = 0.0;
1787  for (unsigned int k = 0; k < php.zLayerHex_.size(); ++k) {
1788  if (php.iradMaxBH_[k] > php.waferUVMax_)
1789  php.waferUVMax_ = php.iradMaxBH_[k];
1790  int kk = ((php.firstLayer_ + (int)(k)) < php.layerFrontBH_[1]) ? 0 : 1;
1791 #ifdef EDM_ML_DEBUG
1792  edm::LogVerbatim("HGCalGeom") << "Layer " << php.firstLayer_ + k << ":" << kk << " Radius range "
1793  << php.iradMinBH_[k] << ":" << php.iradMaxBH_[k];
1794 #endif
1795  mytr.lay = php.firstLayer_ + k;
1796  for (int irad = php.iradMinBH_[k]; irad <= php.iradMaxBH_[k]; ++irad) {
1797  double rmin = php.radiusLayer_[kk][irad - 1];
1798  double rmax = php.radiusLayer_[kk][irad];
1799  mytr.bl = 0.5 * rmin * php.scintCellSize(mytr.lay);
1800  mytr.tl = 0.5 * rmax * php.scintCellSize(mytr.lay);
1801  mytr.h = 0.5 * (rmax - rmin);
1802  mytr.dz = 0.5 * php.waferThick_;
1803  mytr.cellSize = 0.5 * (rmax + rmin) * php.scintCellSize(mytr.lay);
1804  php.fillModule(mytr, true);
1810  php.fillModule(mytr, false);
1811  if (irad == php.iradMinBH_[k])
1812  php.firstModule_.emplace_back(im);
1813  ++im;
1814  if (irad == php.iradMaxBH_[k] - 1)
1815  php.lastModule_.emplace_back(im);
1816  }
1817  }
1818  php.nSectors_ = php.waferUVMax_;
1819 #ifdef EDM_ML_DEBUG
1820  edm::LogVerbatim("HGCalGeom") << "Maximum radius index " << php.waferUVMax_;
1821  for (unsigned int k = 0; k < php.firstModule_.size(); ++k)
1822  edm::LogVerbatim("HGCalGeom") << "Layer " << k + php.firstLayer_ << " Modules " << php.firstModule_[k] << ":"
1823  << php.lastModule_[k];
1824 #endif
1825 }

References HGCalParameters::hgtrap::alpha, HGCalParameters::hgtrap::bl, HGCalParameters::hgtrap::cellSize, HGCalParameters::cellSize_, HGCalParameters::hgtrap::dz, PVValHelper::eta, JetChargeProducer_cfi::exp, HGCalParameters::fillModule(), HGCalParameters::firstLayer_, HGCalParameters::firstModule_, HGCalParameters::hgtrap::h, LaserClient_cfi::high, createfilelist::int, HGCalParameters::iradMaxBH_, HGCalParameters::iradMinBH_, dqmdumpme::k, HGCalParameters::k_ScaleFromDDD, HGCalParameters::k_ScaleToDDD, GetRecoTauVFromDQM_MC_cff::kk, HGCalParameters::lastModule_, HGCalParameters::hgtrap::lay, HGCalParameters::layerFrontBH_, dqm-mbProfile::log, LaserClient_cfi::low, cuda_std::lower_bound(), HGCalParameters::minTileSize_, HGCalParameters::nSectors_, HGCalParameters::radiusLayer_, HGCalParameters::rMaxLayHex_, HGCalParameters::rMinLayerBH_, HGCalParameters::rMinLayHex_, HGCalParameters::scintCellSize(), HGCalParameters::scintType(), funct::tan(), HGCalParameters::hgtrap::tl, HGCalParameters::waferThick_, HGCalParameters::waferUVMax_, HGCalParameters::xLayerHex_, HGCalParameters::yLayerHex_, and HGCalParameters::zLayerHex_.

◆ loadGeometryHexagon() [1/3]

void HGCalGeomParameters::loadGeometryHexagon ( const cms::DDCompactView cpv,
HGCalParameters php,
const std::string &  sdTag1,
const std::string &  sdTag2,
const std::string &  sdTag3,
HGCalGeometryMode::WaferMode  mode 
)

Definition at line 269 of file HGCalGeomParameters.cc.

274  {
275  const cms::DDFilter filter("Volume", sdTag1);
276  cms::DDFilteredView fv((*cpv), filter);
277  std::map<int, HGCalGeomParameters::layerParameters> layers;
278  std::vector<HGCalParameters::hgtrform> trforms;
279  std::vector<bool> trformUse;
280  std::vector<std::pair<int, int> > trused;
281 
282  while (fv.firstChild()) {
283  const std::vector<double>& pars = fv.parameters();
284  // Layers first
285  std::vector<int> copy = fv.copyNos();
286  int nsiz = (int)(copy.size());
287  int lay = (nsiz > 0) ? copy[0] : 0;
288  int zp = (nsiz > 2) ? copy[2] : -1;
289  if (zp != 1)
290  zp = -1;
291  if (lay == 0) {
292  throw cms::Exception("DDException") << "Funny layer # " << lay << " zp " << zp << " in " << nsiz << " components";
293  } else {
294  if (std::find(php.layer_.begin(), php.layer_.end(), lay) == php.layer_.end())
295  php.layer_.emplace_back(lay);
296  auto itr = layers.find(lay);
297  double zz = HGCalParameters::k_ScaleFromDD4Hep * fv.translation().Z();
298  if (itr == layers.end()) {
299  double rin(0), rout(0);
300  if (fv.isA<dd4hep::Polyhedra>()) {
301  rin = 0.5 * HGCalParameters::k_ScaleFromDD4Hep * (pars[5] + pars[8]);
302  rout = 0.5 * HGCalParameters::k_ScaleFromDD4Hep * (pars[6] + pars[9]);
303  } else if (fv.isATubeSeg()) {
304  cms::dd::DDTubs tubeSeg(fv);
305  rin = HGCalParameters::k_ScaleFromDD4Hep * tubeSeg.rIn();
306  rout = HGCalParameters::k_ScaleFromDD4Hep * tubeSeg.rOut();
307  }
308  HGCalGeomParameters::layerParameters laypar(rin, rout, zz);
309  layers[lay] = laypar;
310  }
311  std::pair<int, int> layz(lay, zp);
312  if (std::find(trused.begin(), trused.end(), layz) == trused.end()) {
313  trused.emplace_back(layz);
314  DD3Vector x, y, z;
315  fv.rotation().GetComponents(x, y, z);
316  const CLHEP::HepRep3x3 rotation(x.X(), y.X(), z.X(), x.Y(), y.Y(), z.Y(), x.Z(), y.Z(), z.Z());
317  const CLHEP::HepRotation hr(rotation);
318  double xx = HGCalParameters::k_ScaleFromDD4Hep * fv.translation().X();
319  if (std::abs(xx) < tolerance)
320  xx = 0;
321  double yy = HGCalParameters::k_ScaleFromDD4Hep * fv.translation().Y();
322  if (std::abs(yy) < tolerance)
323  yy = 0;
324  double zz = HGCalParameters::k_ScaleFromDD4Hep * fv.translation().Z();
325  const CLHEP::Hep3Vector h3v(xx, yy, zz);
327  mytrf.zp = zp;
328  mytrf.lay = lay;
329  mytrf.sec = 0;
330  mytrf.subsec = 0;
331  mytrf.h3v = h3v;
332  mytrf.hr = hr;
333  trforms.emplace_back(mytrf);
334  trformUse.emplace_back(false);
335  }
336  }
337  }
338 
339  // Then wafers
340  // This assumes layers are build starting from 1 (which on 25 Jan 2016, they
341  // were) to ensure that new copy numbers are always added to the end of the
342  // list.
343  std::unordered_map<int32_t, int32_t> copies;
344  HGCalParameters::layer_map copiesInLayers(layers.size() + 1);
345  std::vector<int32_t> wafer2copy;
346  std::vector<HGCalGeomParameters::cellParameters> wafers;
347  const cms::DDFilter filter1("Volume", sdTag2);
348  cms::DDFilteredView fv1((*cpv), filter1);
349  bool ok = fv1.firstChild();
350  if (!ok) {
351  throw cms::Exception("DDException") << "Attribute " << sdTag2 << " not found but needed.";
352  } else {
353  bool dodet = true;
354  std::unordered_set<std::string> names;
355  while (dodet) {
356  const std::string name = static_cast<std::string>(fv1.name());
357  std::vector<int> copy = fv1.copyNos();
358  int nsiz = (int)(copy.size());
359  int wafer = (nsiz > 0) ? copy[0] : 0;
360  int layer = (nsiz > 1) ? copy[1] : 0;
361  if (nsiz < 2) {
362  throw cms::Exception("DDException") << "Funny wafer # " << wafer << " in " << nsiz << " components";
363  } else if (layer > (int)(layers.size())) {
364  edm::LogWarning("HGCalGeom") << "Funny wafer # " << wafer << " Layer " << layer << ":" << layers.size()
365  << " among " << nsiz << " components";
366  } else {
367  auto itr = copies.find(wafer);
368  auto cpy = copiesInLayers[layer].find(wafer);
369  if (itr != copies.end() && cpy == copiesInLayers[layer].end()) {
370  copiesInLayers[layer][wafer] = itr->second;
371  }
372  if (itr == copies.end()) {
373  copies[wafer] = wafer2copy.size();
374  copiesInLayers[layer][wafer] = wafer2copy.size();
375  double xx = HGCalParameters::k_ScaleFromDD4Hep * fv1.translation().X();
376  if (std::abs(xx) < tolerance)
377  xx = 0;
378  double yy = HGCalParameters::k_ScaleFromDD4Hep * fv1.translation().Y();
379  if (std::abs(yy) < tolerance)
380  yy = 0;
381  wafer2copy.emplace_back(wafer);
382  GlobalPoint p(xx, yy, HGCalParameters::k_ScaleFromDD4Hep * fv1.translation().Z());
383  HGCalGeomParameters::cellParameters cell(false, wafer, p);
384  wafers.emplace_back(cell);
385  if (names.count(name) == 0) {
386  double zv[2], rv;
387  const std::vector<double>& pars = fv1.parameters();
389  zv[0] = pars[4];
390  zv[1] = pars[7];
391  rv = pars[6];
392  } else {
393  zv[0] = pars[3];
394  zv[1] = pars[9];
395  rv = pars[4];
396  }
399  double dz = 0.5 * HGCalParameters::k_ScaleFromDD4HepToG4 * (zv[1] - zv[0]);
400 #ifdef EDM_ML_DEBUG
401  edm::LogVerbatim("HGCalGeom")
402  << "Mode " << mode << " R " << php.waferSize_ << ":" << php.waferR_ << " z " << dz;
403 #endif
405  mytr.lay = 1;
406  mytr.bl = php.waferR_;
407  mytr.tl = php.waferR_;
408  mytr.h = php.waferR_;
409  mytr.dz = dz;
410  mytr.alpha = 0.0;
411  mytr.cellSize = waferSize_;
412  php.fillModule(mytr, false);
413  names.insert(name);
414  }
415  }
416  }
417  dodet = fv1.firstChild();
418  }
419  }
420 
421  // Finally the cells
422  std::map<int, int> wafertype;
423  std::map<int, HGCalGeomParameters::cellParameters> cellsf, cellsc;
424  const cms::DDFilter filter2("Volume", sdTag3);
425  cms::DDFilteredView fv2((*cpv), filter2);
426  ok = fv2.firstChild();
427  if (!ok) {
428  throw cms::Exception("DDException") << "Attribute " << sdTag3 << " not found but needed.";
429  } else {
430  bool dodet = true;
431  while (dodet) {
432  const std::string name = static_cast<std::string>(fv2.name());
433  std::vector<int> copy = fv2.copyNos();
434  int nsiz = (int)(copy.size());
435  int cellx = (nsiz > 0) ? copy[0] : 0;
436  int wafer = (nsiz > 1) ? copy[1] : 0;
437  int cell = cellx % 1000;
438  int type = cellx / 1000;
439  if (type != 1 && type != 2) {
440  throw cms::Exception("DDException")
441  << "Funny cell # " << cell << " type " << type << " in " << nsiz << " components";
442  } else {
443  auto ktr = wafertype.find(wafer);
444  if (ktr == wafertype.end())
445  wafertype[wafer] = type;
446  bool newc(false);
447  std::map<int, HGCalGeomParameters::cellParameters>::iterator itr;
448  double cellsize = php.cellSize_[0];
449  if (type == 1) {
450  itr = cellsf.find(cell);
451  newc = (itr == cellsf.end());
452  } else {
453  itr = cellsc.find(cell);
454  newc = (itr == cellsc.end());
455  cellsize = php.cellSize_[1];
456  }
457  if (newc) {
458  bool half = (name.find("Half") != std::string::npos);
459  double xx = HGCalParameters::k_ScaleFromDD4Hep * fv2.translation().X();
460  double yy = HGCalParameters::k_ScaleFromDD4Hep * fv2.translation().Y();
461  if (half) {
462  math::XYZPointD p1(-2.0 * cellsize / 9.0, 0, 0);
463  math::XYZPointD p2 = fv2.rotation()(p1);
466 #ifdef EDM_ML_DEBUG
467  if (std::abs(p2.X()) < HGCalParameters::tol)
468  p2.SetX(0.0);
469  if (std::abs(p2.Z()) < HGCalParameters::tol)
470  p2.SetZ(0.0);
471  edm::LogVerbatim("HGCalGeom") << "Wafer " << wafer << " Type " << type << " Cell " << cellx << " local "
472  << xx << ":" << yy << " new " << p1 << ":" << p2;
473 #endif
474  }
476  if (type == 1) {
477  cellsf[cell] = cp;
478  } else {
479  cellsc[cell] = cp;
480  }
481  }
482  }
483  dodet = fv2.firstChild();
484  }
485  }
486 
488  layers, trforms, trformUse, copies, copiesInLayers, wafer2copy, wafers, wafertype, cellsf, cellsc, php);
489 }

References funct::abs(), HGCalParameters::hgtrap::alpha, HGCalParameters::hgtrap::bl, HGCalParameters::hgtrap::cellSize, HGCalParameters::cellSize_, filterCSVwithJSON::copy, cms::DDFilteredView::copyNos(), CommonMethods::cp(), HGCalParameters::hgtrap::dz, PVValHelper::dz, Exception, HGCalParameters::fillModule(), ALCARECOTkAlBeamHalo_cff::filter, spr::find(), cms::DDFilteredView::firstChild(), HGCalParameters::hgtrap::h, HGCalParameters::hgtrform::h3v, HGCalParameters::hgtrform::hr, createfilelist::int, cms::DDFilteredView::isA(), cms::DDFilteredView::isATubeSeg(), HGCalParameters::k_ScaleFromDD4Hep, HGCalParameters::k_ScaleFromDD4HepToG4, HGCalParameters::k_ScaleFromDDD, HGCalParameters::hgtrap::lay, HGCalParameters::hgtrform::lay, HGCalParameters::layer_, hgcalTopologyTester_cfi::layers, loadGeometryHexagon(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, Skims_PA_cff::name, cms::DDFilteredView::name(), names, convertSQLiteXML::ok, AlCaHLTBitMon_ParallelJobs::p, p1, p2, cms::DDFilteredView::parameters(), HGCalGeometryMode::Polyhedra, cms::dd::DDTubs::rIn(), idealTransformation::rotation, cms::DDFilteredView::rotation(), cms::dd::DDTubs::rOut(), HGCalParameters::hgtrform::sec, AlCaHLTBitMon_QueryRunRegistry::string, HGCalParameters::hgtrform::subsec, tan30deg_, HGCalParameters::hgtrap::tl, HGCalParameters::tol, tolerance, cms::DDFilteredView::translation(), HGCalParameters::waferR_, waferSize_, HGCalParameters::waferSize_, x, geometryCSVtoXML::xx, y, geometryCSVtoXML::yy, z, HGCalParameters::hgtrform::zp, and geometryCSVtoXML::zz.

◆ loadGeometryHexagon() [2/3]

void HGCalGeomParameters::loadGeometryHexagon ( const DDFilteredView _fv,
HGCalParameters php,
const std::string &  sdTag1,
const DDCompactView cpv,
const std::string &  sdTag2,
const std::string &  sdTag3,
HGCalGeometryMode::WaferMode  mode 
)

Definition at line 43 of file HGCalGeomParameters.cc.

49  {
50  DDFilteredView fv = _fv;
51  bool dodet(true);
52  std::map<int, HGCalGeomParameters::layerParameters> layers;
53  std::vector<HGCalParameters::hgtrform> trforms;
54  std::vector<bool> trformUse;
55 
56  while (dodet) {
57  const DDSolid& sol = fv.logicalPart().solid();
58  // Layers first
59  std::vector<int> copy = fv.copyNumbers();
60  int nsiz = (int)(copy.size());
61  int lay = (nsiz > 0) ? copy[nsiz - 1] : 0;
62  int zp = (nsiz > 2) ? copy[nsiz - 3] : -1;
63  if (zp != 1)
64  zp = -1;
65  if (lay == 0) {
66  throw cms::Exception("DDException") << "Funny layer # " << lay << " zp " << zp << " in " << nsiz << " components";
67  } else {
68  if (std::find(php.layer_.begin(), php.layer_.end(), lay) == php.layer_.end())
69  php.layer_.emplace_back(lay);
70  auto itr = layers.find(lay);
71  if (itr == layers.end()) {
72  double rin(0), rout(0);
75  const DDPolyhedra& polyhedra = static_cast<DDPolyhedra>(sol);
76  const std::vector<double>& rmin = polyhedra.rMinVec();
77  const std::vector<double>& rmax = polyhedra.rMaxVec();
78  rin = 0.5 * HGCalParameters::k_ScaleFromDDD * (rmin[0] + rmin[1]);
79  rout = 0.5 * HGCalParameters::k_ScaleFromDDD * (rmax[0] + rmax[1]);
80  } else if (sol.shape() == DDSolidShape::ddtubs) {
81  const DDTubs& tube = static_cast<DDTubs>(sol);
82  rin = HGCalParameters::k_ScaleFromDDD * tube.rIn();
83  rout = HGCalParameters::k_ScaleFromDDD * tube.rOut();
84  }
85  HGCalGeomParameters::layerParameters laypar(rin, rout, zz);
86  layers[lay] = laypar;
87  }
88  DD3Vector x, y, z;
89  fv.rotation().GetComponents(x, y, z);
90  const CLHEP::HepRep3x3 rotation(x.X(), y.X(), z.X(), x.Y(), y.Y(), z.Y(), x.Z(), y.Z(), z.Z());
91  const CLHEP::HepRotation hr(rotation);
93  if (std::abs(xx) < tolerance)
94  xx = 0;
96  if (std::abs(yy) < tolerance)
97  yy = 0;
99  const CLHEP::Hep3Vector h3v(xx, yy, zz);
101  mytrf.zp = zp;
102  mytrf.lay = lay;
103  mytrf.sec = 0;
104  mytrf.subsec = 0;
105  mytrf.h3v = h3v;
106  mytrf.hr = hr;
107  trforms.emplace_back(mytrf);
108  trformUse.emplace_back(false);
109  }
110  dodet = fv.next();
111  }
112 
113  // Then wafers
114  // This assumes layers are build starting from 1 (which on 25 Jan 2016, they
115  // were) to ensure that new copy numbers are always added to the end of the
116  // list.
117  std::unordered_map<int32_t, int32_t> copies;
118  HGCalParameters::layer_map copiesInLayers(layers.size() + 1);
119  std::vector<int32_t> wafer2copy;
120  std::vector<HGCalGeomParameters::cellParameters> wafers;
121  std::string attribute = "Volume";
122  DDValue val1(attribute, sdTag2, 0.0);
123  DDSpecificsMatchesValueFilter filter1{val1};
124  DDFilteredView fv1(*cpv, filter1);
125  bool ok = fv1.firstChild();
126  if (!ok) {
127  throw cms::Exception("DDException") << "Attribute " << val1 << " not found but needed.";
128  } else {
129  dodet = true;
130  std::unordered_set<std::string> names;
131  while (dodet) {
132  const DDSolid& sol = fv1.logicalPart().solid();
133  const std::string& name = fv1.logicalPart().name().name();
134  std::vector<int> copy = fv1.copyNumbers();
135  int nsiz = (int)(copy.size());
136  int wafer = (nsiz > 0) ? copy[nsiz - 1] : 0;
137  int layer = (nsiz > 1) ? copy[nsiz - 2] : 0;
138  if (nsiz < 2) {
139  throw cms::Exception("DDException") << "Funny wafer # " << wafer << " in " << nsiz << " components";
140  } else if (layer > (int)(layers.size())) {
141  edm::LogWarning("HGCalGeom") << "Funny wafer # " << wafer << " Layer " << layer << ":" << layers.size()
142  << " among " << nsiz << " components";
143  } else {
144  auto itr = copies.find(wafer);
145  auto cpy = copiesInLayers[layer].find(wafer);
146  if (itr != copies.end() && cpy == copiesInLayers[layer].end()) {
147  copiesInLayers[layer][wafer] = itr->second;
148  }
149  if (itr == copies.end()) {
150  copies[wafer] = wafer2copy.size();
151  copiesInLayers[layer][wafer] = wafer2copy.size();
152  double xx = HGCalParameters::k_ScaleFromDDD * fv1.translation().X();
153  if (std::abs(xx) < tolerance)
154  xx = 0;
155  double yy = HGCalParameters::k_ScaleFromDDD * fv1.translation().Y();
156  if (std::abs(yy) < tolerance)
157  yy = 0;
158  wafer2copy.emplace_back(wafer);
159  GlobalPoint p(xx, yy, HGCalParameters::k_ScaleFromDDD * fv1.translation().Z());
160  HGCalGeomParameters::cellParameters cell(false, wafer, p);
161  wafers.emplace_back(cell);
162  if (names.count(name) == 0) {
163  std::vector<double> zv, rv;
165  const DDPolyhedra& polyhedra = static_cast<DDPolyhedra>(sol);
166  zv = polyhedra.zVec();
167  rv = polyhedra.rMaxVec();
168  } else {
169  const DDExtrudedPolygon& polygon = static_cast<DDExtrudedPolygon>(sol);
170  zv = polygon.zVec();
171  rv = polygon.xVec();
172  }
175  double dz = 0.5 * HGCalParameters::k_ScaleFromDDDToG4 * (zv[1] - zv[0]);
176 #ifdef EDM_ML_DEBUG
177  edm::LogVerbatim("HGCalGeom")
178  << "Mode " << mode << " R " << php.waferSize_ << ":" << php.waferR_ << " z " << dz;
179 #endif
181  mytr.lay = 1;
182  mytr.bl = php.waferR_;
183  mytr.tl = php.waferR_;
184  mytr.h = php.waferR_;
185  mytr.dz = dz;
186  mytr.alpha = 0.0;
187  mytr.cellSize = waferSize_;
188  php.fillModule(mytr, false);
189  names.insert(name);
190  }
191  }
192  }
193  dodet = fv1.next();
194  }
195  }
196 
197  // Finally the cells
198  std::map<int, int> wafertype;
199  std::map<int, HGCalGeomParameters::cellParameters> cellsf, cellsc;
200  DDValue val2(attribute, sdTag3, 0.0);
201  DDSpecificsMatchesValueFilter filter2{val2};
202  DDFilteredView fv2(*cpv, filter2);
203  ok = fv2.firstChild();
204  if (!ok) {
205  throw cms::Exception("DDException") << "Attribute " << val2 << " not found but needed.";
206  } else {
207  dodet = true;
208  while (dodet) {
209  const DDSolid& sol = fv2.logicalPart().solid();
210  const std::string& name = sol.name().name();
211  std::vector<int> copy = fv2.copyNumbers();
212  int nsiz = (int)(copy.size());
213  int cellx = (nsiz > 0) ? copy[nsiz - 1] : 0;
214  int wafer = (nsiz > 1) ? copy[nsiz - 2] : 0;
215  int cell = cellx % 1000;
216  int type = cellx / 1000;
217  if (type != 1 && type != 2) {
218  throw cms::Exception("DDException")
219  << "Funny cell # " << cell << " type " << type << " in " << nsiz << " components";
220  } else {
221  auto ktr = wafertype.find(wafer);
222  if (ktr == wafertype.end())
223  wafertype[wafer] = type;
224  bool newc(false);
225  std::map<int, HGCalGeomParameters::cellParameters>::iterator itr;
226  double cellsize = php.cellSize_[0];
227  if (type == 1) {
228  itr = cellsf.find(cell);
229  newc = (itr == cellsf.end());
230  } else {
231  itr = cellsc.find(cell);
232  newc = (itr == cellsc.end());
233  cellsize = php.cellSize_[1];
234  }
235  if (newc) {
236  bool half = (name.find("Half") != std::string::npos);
237  double xx = HGCalParameters::k_ScaleFromDDD * fv2.translation().X();
238  double yy = HGCalParameters::k_ScaleFromDDD * fv2.translation().Y();
239  if (half) {
240  math::XYZPointD p1(-2.0 * cellsize / 9.0, 0, 0);
241  math::XYZPointD p2 = fv2.rotation()(p1);
244 #ifdef EDM_ML_DEBUG
245  if (std::abs(p2.X()) < HGCalParameters::tol)
246  p2.SetX(0.0);
247  if (std::abs(p2.Z()) < HGCalParameters::tol)
248  p2.SetZ(0.0);
249  edm::LogVerbatim("HGCalGeom") << "Wafer " << wafer << " Type " << type << " Cell " << cellx << " local "
250  << xx << ":" << yy << " new " << p1 << ":" << p2;
251 #endif
252  }
254  if (type == 1) {
255  cellsf[cell] = cp;
256  } else {
257  cellsc[cell] = cp;
258  }
259  }
260  }
261  dodet = fv2.next();
262  }
263  }
264 
266  layers, trforms, trformUse, copies, copiesInLayers, wafer2copy, wafers, wafertype, cellsf, cellsc, php);
267 }

References funct::abs(), HGCalParameters::hgtrap::alpha, HGCalParameters::hgtrap::bl, HGCalParameters::hgtrap::cellSize, HGCalParameters::cellSize_, filterCSVwithJSON::copy, DDFilteredView::copyNumbers(), CommonMethods::cp(), ddpolyhedra_rrz, ddpolyhedra_rz, ddtubs, HGCalParameters::hgtrap::dz, PVValHelper::dz, Exception, HGCalParameters::fillModule(), spr::find(), DDFilteredView::firstChild(), HGCalParameters::hgtrap::h, HGCalParameters::hgtrform::h3v, HGCalParameters::hgtrform::hr, createfilelist::int, HGCalParameters::k_ScaleFromDDD, HGCalParameters::k_ScaleFromDDDToG4, HGCalParameters::hgtrap::lay, HGCalParameters::hgtrform::lay, HGCalParameters::layer_, hgcalTopologyTester_cfi::layers, DDFilteredView::logicalPart(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, Skims_PA_cff::name, DDName::name(), DDBase< N, C >::name(), names, DDFilteredView::next(), convertSQLiteXML::ok, AlCaHLTBitMon_ParallelJobs::p, p1, p2, HGCalGeometryMode::Polyhedra, DDTubs::rIn(), DDPolyhedra::rMaxVec(), DDPolyhedra::rMinVec(), idealTransformation::rotation, DDFilteredView::rotation(), DDTubs::rOut(), HGCalParameters::hgtrform::sec, DDSolid::shape(), DDLogicalPart::solid(), AlCaHLTBitMon_QueryRunRegistry::string, HGCalParameters::hgtrform::subsec, tan30deg_, HGCalParameters::hgtrap::tl, HGCalParameters::tol, tolerance, DDFilteredView::translation(), HGCalParameters::waferR_, waferSize_, HGCalParameters::waferSize_, x, DDExtrudedPolygon::xVec(), geometryCSVtoXML::xx, y, geometryCSVtoXML::yy, z, HGCalParameters::hgtrform::zp, DDPolyhedra::zVec(), DDExtrudedPolygon::zVec(), and geometryCSVtoXML::zz.

Referenced by loadGeometryHexagon().

◆ loadGeometryHexagon() [3/3]

void HGCalGeomParameters::loadGeometryHexagon ( const std::map< int, HGCalGeomParameters::layerParameters > &  layers,
std::vector< HGCalParameters::hgtrform > &  trforms,
std::vector< bool > &  trformUse,
const std::unordered_map< int32_t, int32_t > &  copies,
const HGCalParameters::layer_map copiesInLayers,
const std::vector< int32_t > &  wafer2copy,
const std::vector< HGCalGeomParameters::cellParameters > &  wafers,
const std::map< int, int > &  wafertype,
const std::map< int, HGCalGeomParameters::cellParameters > &  cellsf,
const std::map< int, HGCalGeomParameters::cellParameters > &  cellsc,
HGCalParameters php 
)
private

Definition at line 491 of file HGCalGeomParameters.cc.

501  {
502  if (((cellsf.size() + cellsc.size()) == 0) || (wafers.empty()) || (layers.empty())) {
503  throw cms::Exception("DDException") << "HGCalGeomParameters: mismatch between geometry and specpar: cells "
504  << cellsf.size() << ":" << cellsc.size() << " wafers " << wafers.size()
505  << " layers " << layers.size();
506  }
507 
508  for (unsigned int i = 0; i < layers.size(); ++i) {
509  for (auto& layer : layers) {
510  if (layer.first == (int)(i + php.firstLayer_)) {
511  php.layerIndex_.emplace_back(i);
512  php.rMinLayHex_.emplace_back(layer.second.rmin);
513  php.rMaxLayHex_.emplace_back(layer.second.rmax);
514  php.zLayerHex_.emplace_back(layer.second.zpos);
515  break;
516  }
517  }
518  }
519 
520  for (unsigned int i = 0; i < php.layer_.size(); ++i) {
521  for (unsigned int i1 = 0; i1 < trforms.size(); ++i1) {
522  if (!trformUse[i1] && php.layerGroup_[trforms[i1].lay - 1] == (int)(i + 1)) {
523  trforms[i1].h3v *= static_cast<double>(HGCalParameters::k_ScaleFromDDD);
524  trforms[i1].lay = (i + 1);
525  trformUse[i1] = true;
526  php.fillTrForm(trforms[i1]);
527  int nz(1);
528  for (unsigned int i2 = i1 + 1; i2 < trforms.size(); ++i2) {
529  if (!trformUse[i2] && trforms[i2].zp == trforms[i1].zp &&
530  php.layerGroup_[trforms[i2].lay - 1] == (int)(i + 1)) {
531  php.addTrForm(trforms[i2].h3v);
532  nz++;
533  trformUse[i2] = true;
534  }
535  }
536  if (nz > 0) {
537  php.scaleTrForm(double(1.0 / nz));
538  }
539  }
540  }
541  }
542 
543  double rmin = HGCalParameters::k_ScaleFromDDD * php.waferR_;
544  for (unsigned i = 0; i < wafer2copy.size(); ++i) {
545  php.waferCopy_.emplace_back(wafer2copy[i]);
546  php.waferPosX_.emplace_back(wafers[i].xyz.x());
547  php.waferPosY_.emplace_back(wafers[i].xyz.y());
548  auto ktr = wafertype.find(wafer2copy[i]);
549  int typet = (ktr == wafertype.end()) ? 0 : (ktr->second);
550  php.waferTypeT_.emplace_back(typet);
551  double r = wafers[i].xyz.perp();
552  int type(3);
553  for (int k = 1; k < 4; ++k) {
554  if ((r + rmin) <= php.boundR_[k]) {
555  type = k;
556  break;
557  }
558  }
559  php.waferTypeL_.emplace_back(type);
560  }
561  php.copiesInLayers_ = copiesInLayers;
562  php.nSectors_ = (int)(php.waferCopy_.size());
563 
564  std::vector<HGCalGeomParameters::cellParameters>::const_iterator itrf = wafers.end();
565  for (unsigned int i = 0; i < cellsf.size(); ++i) {
566  auto itr = cellsf.find(i);
567  if (itr == cellsf.end()) {
568  throw cms::Exception("DDException") << "HGCalGeomParameters: missing info for fine cell number " << i;
569  } else {
570  double xx = (itr->second).xyz.x();
571  double yy = (itr->second).xyz.y();
572  int waf = (itr->second).wafer;
573  std::pair<double, double> xy = cellPosition(wafers, itrf, waf, xx, yy);
574  php.cellFineX_.emplace_back(xy.first);
575  php.cellFineY_.emplace_back(xy.second);
576  php.cellFineHalf_.emplace_back((itr->second).half);
577  }
578  }
579  itrf = wafers.end();
580  for (unsigned int i = 0; i < cellsc.size(); ++i) {
581  auto itr = cellsc.find(i);
582  if (itr == cellsc.end()) {
583  throw cms::Exception("DDException") << "HGCalGeomParameters: missing info for coarse cell number " << i;
584  } else {
585  double xx = (itr->second).xyz.x();
586  double yy = (itr->second).xyz.y();
587  int waf = (itr->second).wafer;
588  std::pair<double, double> xy = cellPosition(wafers, itrf, waf, xx, yy);
589  php.cellCoarseX_.emplace_back(xy.first);
590  php.cellCoarseY_.emplace_back(xy.second);
591  php.cellCoarseHalf_.emplace_back((itr->second).half);
592  }
593  }
594  int depth(0);
595  for (unsigned int i = 0; i < php.layerGroup_.size(); ++i) {
596  bool first(true);
597  for (unsigned int k = 0; k < php.layerGroup_.size(); ++k) {
598  if (php.layerGroup_[k] == (int)(i + 1)) {
599  if (first) {
600  php.depth_.emplace_back(i + 1);
601  php.depthIndex_.emplace_back(depth);
602  php.depthLayerF_.emplace_back(k);
603  ++depth;
604  first = false;
605  }
606  }
607  }
608  }
609  HGCalParameters::hgtrap mytr = php.getModule(0, false);
615  double dz = mytr.dz;
616  php.fillModule(mytr, true);
617  mytr.dz = 2 * dz;
618  php.fillModule(mytr, true);
619  mytr.dz = 3 * dz;
620  php.fillModule(mytr, true);
621 #ifdef EDM_ML_DEBUG
622  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters finds " << php.zLayerHex_.size() << " layers";
623  for (unsigned int i = 0; i < php.zLayerHex_.size(); ++i) {
624  int k = php.layerIndex_[i];
625  edm::LogVerbatim("HGCalGeom") << "Layer[" << i << ":" << k << ":" << php.layer_[k]
626  << "] with r = " << php.rMinLayHex_[i] << ":" << php.rMaxLayHex_[i]
627  << " at z = " << php.zLayerHex_[i];
628  }
629  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters has " << php.depthIndex_.size() << " depths";
630  for (unsigned int i = 0; i < php.depthIndex_.size(); ++i) {
631  int k = php.depthIndex_[i];
632  edm::LogVerbatim("HGCalGeom") << "Reco Layer[" << i << ":" << k << "] First Layer " << php.depthLayerF_[i]
633  << " Depth " << php.depth_[k];
634  }
635  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters finds " << php.nSectors_ << " wafers";
636  for (unsigned int i = 0; i < php.waferCopy_.size(); ++i)
637  edm::LogVerbatim("HGCalGeom") << "Wafer[" << i << ": " << php.waferCopy_[i] << "] type " << php.waferTypeL_[i]
638  << ":" << php.waferTypeT_[i] << " at (" << php.waferPosX_[i] << ","
639  << php.waferPosY_[i] << ",0)";
640  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: wafer radius " << php.waferR_ << " and dimensions of the "
641  << "wafers:";
642  edm::LogVerbatim("HGCalGeom") << "Sim[0] " << php.moduleLayS_[0] << " dx " << php.moduleBlS_[0] << ":"
643  << php.moduleTlS_[0] << " dy " << php.moduleHS_[0] << " dz " << php.moduleDzS_[0]
644  << " alpha " << php.moduleAlphaS_[0];
645  for (unsigned int k = 0; k < php.moduleLayR_.size(); ++k)
646  edm::LogVerbatim("HGCalGeom") << "Rec[" << k << "] " << php.moduleLayR_[k] << " dx " << php.moduleBlR_[k] << ":"
647  << php.moduleTlR_[k] << " dy " << php.moduleHR_[k] << " dz " << php.moduleDzR_[k]
648  << " alpha " << php.moduleAlphaR_[k];
649  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters finds " << php.cellFineX_.size() << " fine cells in a wafer";
650  for (unsigned int i = 0; i < php.cellFineX_.size(); ++i)
651  edm::LogVerbatim("HGCalGeom") << "Fine Cell[" << i << "] at (" << php.cellFineX_[i] << "," << php.cellFineY_[i]
652  << ",0)";
653  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters finds " << php.cellCoarseX_.size()
654  << " coarse cells in a wafer";
655  for (unsigned int i = 0; i < php.cellCoarseX_.size(); ++i)
656  edm::LogVerbatim("HGCalGeom") << "Coarse Cell[" << i << "] at (" << php.cellCoarseX_[i] << ","
657  << php.cellCoarseY_[i] << ",0)";
658  edm::LogVerbatim("HGCalGeom") << "Obtained " << php.trformIndex_.size() << " transformation matrices";
659  for (unsigned int k = 0; k < php.trformIndex_.size(); ++k) {
660  edm::LogVerbatim("HGCalGeom") << "Matrix[" << k << "] (" << std::hex << php.trformIndex_[k] << std::dec
661  << ") Translation (" << php.trformTranX_[k] << ", " << php.trformTranY_[k] << ", "
662  << php.trformTranZ_[k] << " Rotation (" << php.trformRotXX_[k] << ", "
663  << php.trformRotYX_[k] << ", " << php.trformRotZX_[k] << ", " << php.trformRotXY_[k]
664  << ", " << php.trformRotYY_[k] << ", " << php.trformRotZY_[k] << ", "
665  << php.trformRotXZ_[k] << ", " << php.trformRotYZ_[k] << ", " << php.trformRotZZ_[k]
666  << ")";
667  }
668  edm::LogVerbatim("HGCalGeom") << "Dump copiesInLayers for " << php.copiesInLayers_.size() << " layers";
669  for (unsigned int k = 0; k < php.copiesInLayers_.size(); ++k) {
670  const auto& theModules = php.copiesInLayers_[k];
671  edm::LogVerbatim("HGCalGeom") << "Layer " << k << ":" << theModules.size();
672  int k2(0);
673  for (std::unordered_map<int, int>::const_iterator itr = theModules.begin(); itr != theModules.end(); ++itr, ++k2) {
674  edm::LogVerbatim("HGCalGeom") << "[" << k2 << "] " << itr->first << ":" << itr->second;
675  }
676  }
677 #endif
678 }

References HGCalParameters::addTrForm(), HGCalParameters::hgtrap::bl, HGCalParameters::boundR_, HGCalParameters::cellCoarseHalf_, HGCalParameters::cellCoarseX_, HGCalParameters::cellCoarseY_, HGCalParameters::cellFineHalf_, HGCalParameters::cellFineX_, HGCalParameters::cellFineY_, cellPosition(), HGCalParameters::hgtrap::cellSize, HGCalParameters::copiesInLayers_, TauDecayModes::dec, LEDCalibrationChannels::depth, HGCalParameters::depth_, HGCalParameters::depthIndex_, HGCalParameters::depthLayerF_, HGCalParameters::hgtrap::dz, PVValHelper::dz, Exception, HGCalParameters::fillModule(), HGCalParameters::fillTrForm(), dqmdumpme::first, HGCalParameters::firstLayer_, HGCalParameters::getModule(), HGCalParameters::hgtrap::h, mps_fire::i, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, createfilelist::int, dqmdumpme::k, HGCalParameters::k_ScaleFromDDD, HGCalParameters::layer_, HGCalParameters::layerGroup_, HGCalParameters::layerIndex_, hgcalTopologyTester_cfi::layers, HGCalParameters::moduleAlphaR_, HGCalParameters::moduleAlphaS_, HGCalParameters::moduleBlR_, HGCalParameters::moduleBlS_, HGCalParameters::moduleDzR_, HGCalParameters::moduleDzS_, HGCalParameters::moduleHR_, HGCalParameters::moduleHS_, HGCalParameters::moduleLayR_, HGCalParameters::moduleLayS_, HGCalParameters::moduleTlR_, HGCalParameters::moduleTlS_, HGCalParameters::nSectors_, alignCSCRings::r, HGCalParameters::rMaxLayHex_, HGCalParameters::rMinLayHex_, HGCalParameters::scaleTrForm(), HGCalParameters::hgtrap::tl, HGCalParameters::trformIndex_, HGCalParameters::trformRotXX_, HGCalParameters::trformRotXY_, HGCalParameters::trformRotXZ_, HGCalParameters::trformRotYX_, HGCalParameters::trformRotYY_, HGCalParameters::trformRotYZ_, HGCalParameters::trformRotZX_, HGCalParameters::trformRotZY_, HGCalParameters::trformRotZZ_, HGCalParameters::trformTranX_, HGCalParameters::trformTranY_, HGCalParameters::trformTranZ_, HGCalParameters::waferCopy_, HGCalParameters::waferPosX_, HGCalParameters::waferPosY_, HGCalParameters::waferR_, HGCalParameters::waferTypeL_, HGCalParameters::waferTypeT_, geometryCSVtoXML::xx, geometryCSVtoXML::xy, geometryCSVtoXML::yy, and HGCalParameters::zLayerHex_.

◆ loadGeometryHexagon8() [1/3]

void HGCalGeomParameters::loadGeometryHexagon8 ( const cms::DDCompactView cpv,
HGCalParameters php,
const std::string &  sdTag1,
int  firstLayer 
)

Definition at line 751 of file HGCalGeomParameters.cc.

754  {
755  const cms::DDFilter filter("Volume", sdTag1);
756  cms::DDFilteredView fv((*cpv), filter);
757  std::map<int, HGCalGeomParameters::layerParameters> layers;
758  std::map<std::pair<int, int>, HGCalParameters::hgtrform> trforms;
759  int levelTop = 3 + std::max(php.levelT_[0], php.levelT_[1]);
760 #ifdef EDM_ML_DEBUG
761  int ntot(0);
762 #endif
763  while (fv.firstChild()) {
764 #ifdef EDM_ML_DEBUG
765  ++ntot;
766 #endif
767  // Layers first
768  std::vector<int> copy = fv.copyNos();
769  int nsiz = static_cast<int>(copy.size());
770  if (nsiz < levelTop) {
771  int lay = copy[0];
772  int zside = (nsiz > php.levelZSide_) ? copy[nsiz - php.levelZSide_ - 1] : -1;
773  if (zside != 1)
774  zside = -1;
775 #ifdef EDM_ML_DEBUG
776  edm::LogVerbatim("HGCalGeom") << fv.name() << " shape " << cms::dd::name(cms::DDSolidShapeMap, fv.shape())
777  << " size " << nsiz << ":" << levelTop << " lay " << lay << " z " << zside << ":"
778  << php.levelZSide_;
779 #endif
780  if (lay == 0) {
781  throw cms::Exception("DDException")
782  << "Funny layer # " << lay << " zp " << zside << " in " << nsiz << " components";
783  } else {
784  if (std::find(php.layer_.begin(), php.layer_.end(), lay) == php.layer_.end())
785  php.layer_.emplace_back(lay);
786  auto itr = layers.find(lay);
787  if (itr == layers.end()) {
788  const std::vector<double>& pars = fv.parameters();
789  double rin = HGCalParameters::k_ScaleFromDD4Hep * pars[0];
790  double rout = HGCalParameters::k_ScaleFromDD4Hep * pars[1];
791  double zp = HGCalParameters::k_ScaleFromDD4Hep * fv.translation().Z();
792  HGCalGeomParameters::layerParameters laypar(rin, rout, zp);
793  layers[lay] = laypar;
794  }
795  if (trforms.find(std::make_pair(lay, zside)) == trforms.end()) {
796  DD3Vector x, y, z;
797  fv.rotation().GetComponents(x, y, z);
798  const CLHEP::HepRep3x3 rotation(x.X(), y.X(), z.X(), x.Y(), y.Y(), z.Y(), x.Z(), y.Z(), z.Z());
799  const CLHEP::HepRotation hr(rotation);
800  double xx = ((std::abs(fv.translation().X()) < tolerance)
801  ? 0
802  : HGCalParameters::k_ScaleFromDD4Hep * fv.translation().X());
803  double yy = ((std::abs(fv.translation().Y()) < tolerance)
804  ? 0
805  : HGCalParameters::k_ScaleFromDD4Hep * fv.translation().Y());
806  const CLHEP::Hep3Vector h3v(xx, yy, HGCalParameters::k_ScaleFromDD4Hep * fv.translation().Z());
808  mytrf.zp = zside;
809  mytrf.lay = lay;
810  mytrf.sec = 0;
811  mytrf.subsec = 0;
812  mytrf.h3v = h3v;
813  mytrf.hr = hr;
814  trforms[std::make_pair(lay, zside)] = mytrf;
815  }
816  }
817  }
818  }
819 #ifdef EDM_ML_DEBUG
820  edm::LogVerbatim("HGCalGeom") << "Total # of views " << ntot;
821 #endif
822  loadGeometryHexagon8(layers, trforms, firstLayer, php);
823 }

References funct::abs(), filterCSVwithJSON::copy, cms::DDFilteredView::copyNos(), cms::DDSolidShapeMap, Exception, ALCARECOTkAlBeamHalo_cff::filter, spr::find(), cms::DDFilteredView::firstChild(), HGCalParameters::k_ScaleFromDD4Hep, HGCalParameters::layer_, hgcalTopologyTester_cfi::layers, HGCalParameters::levelT_, HGCalParameters::levelZSide_, loadGeometryHexagon8(), SiStripPI::max, cms::dd::name(), cms::DDFilteredView::name(), cms::DDFilteredView::parameters(), idealTransformation::rotation, cms::DDFilteredView::rotation(), cms::DDFilteredView::shape(), tolerance, cms::DDFilteredView::translation(), x, geometryCSVtoXML::xx, y, geometryCSVtoXML::yy, z, HGCalParameters::hgtrform::zp, and ecaldqm::zside().

◆ loadGeometryHexagon8() [2/3]

void HGCalGeomParameters::loadGeometryHexagon8 ( const DDFilteredView _fv,
HGCalParameters php,
int  firstLayer 
)

Definition at line 680 of file HGCalGeomParameters.cc.

680  {
681  DDFilteredView fv = _fv;
682  bool dodet(true);
683  std::map<int, HGCalGeomParameters::layerParameters> layers;
684  std::map<std::pair<int, int>, HGCalParameters::hgtrform> trforms;
685  int levelTop = 3 + std::max(php.levelT_[0], php.levelT_[1]);
686 #ifdef EDM_ML_DEBUG
687  int ntot(0);
688 #endif
689  while (dodet) {
690 #ifdef EDM_ML_DEBUG
691  ++ntot;
692 #endif
693  std::vector<int> copy = fv.copyNumbers();
694  int nsiz = (int)(copy.size());
695  if (nsiz < levelTop) {
696  int lay = copy[nsiz - 1];
697  int zside = (nsiz > php.levelZSide_) ? copy[php.levelZSide_] : -1;
698  if (zside != 1)
699  zside = -1;
700  const DDSolid& sol = fv.logicalPart().solid();
701 #ifdef EDM_ML_DEBUG
702  edm::LogVerbatim("HGCalGeom") << sol.name() << " shape " << sol.shape() << " size " << nsiz << ":" << levelTop
703  << " lay " << lay << " z " << zside;
704 #endif
705  if (lay == 0) {
706  throw cms::Exception("DDException")
707  << "Funny layer # " << lay << " zp " << zside << " in " << nsiz << " components";
708  } else {
709  if (std::find(php.layer_.begin(), php.layer_.end(), lay) == php.layer_.end())
710  php.layer_.emplace_back(lay);
711  auto itr = layers.find(lay);
712  if (itr == layers.end()) {
713  const DDTubs& tube = static_cast<DDTubs>(sol);
714  double rin = HGCalParameters::k_ScaleFromDDD * tube.rIn();
715  double rout = HGCalParameters::k_ScaleFromDDD * tube.rOut();
716  double zp = HGCalParameters::k_ScaleFromDDD * fv.translation().Z();
717  HGCalGeomParameters::layerParameters laypar(rin, rout, zp);
718  layers[lay] = laypar;
719  }
720  if (trforms.find(std::make_pair(lay, zside)) == trforms.end()) {
721  DD3Vector x, y, z;
722  fv.rotation().GetComponents(x, y, z);
723  const CLHEP::HepRep3x3 rotation(x.X(), y.X(), z.X(), x.Y(), y.Y(), z.Y(), x.Z(), y.Z(), z.Z());
724  const CLHEP::HepRotation hr(rotation);
725  double xx =
726  ((std::abs(fv.translation().X()) < tolerance) ? 0
728  double yy =
729  ((std::abs(fv.translation().Y()) < tolerance) ? 0
731  const CLHEP::Hep3Vector h3v(xx, yy, HGCalParameters::k_ScaleFromDDD * fv.translation().Z());
733  mytrf.zp = zside;
734  mytrf.lay = lay;
735  mytrf.sec = 0;
736  mytrf.subsec = 0;
737  mytrf.h3v = h3v;
738  mytrf.hr = hr;
739  trforms[std::make_pair(lay, zside)] = mytrf;
740  }
741  }
742  }
743  dodet = fv.next();
744  }
745 #ifdef EDM_ML_DEBUG
746  edm::LogVerbatim("HGCalGeom") << "Total # of views " << ntot;
747 #endif
748  loadGeometryHexagon8(layers, trforms, firstLayer, php);
749 }

References funct::abs(), filterCSVwithJSON::copy, DDFilteredView::copyNumbers(), Exception, spr::find(), createfilelist::int, HGCalParameters::k_ScaleFromDDD, HGCalParameters::layer_, hgcalTopologyTester_cfi::layers, HGCalParameters::levelT_, HGCalParameters::levelZSide_, DDFilteredView::logicalPart(), SiStripPI::max, DDBase< N, C >::name(), DDFilteredView::next(), DDTubs::rIn(), idealTransformation::rotation, DDFilteredView::rotation(), DDTubs::rOut(), DDSolid::shape(), DDLogicalPart::solid(), tolerance, DDFilteredView::translation(), x, geometryCSVtoXML::xx, y, geometryCSVtoXML::yy, z, HGCalParameters::hgtrform::zp, and ecaldqm::zside().

Referenced by loadGeometryHexagon8().

◆ loadGeometryHexagon8() [3/3]

void HGCalGeomParameters::loadGeometryHexagon8 ( const std::map< int, HGCalGeomParameters::layerParameters > &  layers,
std::map< std::pair< int, int >, HGCalParameters::hgtrform > &  trforms,
const int &  firstLayer,
HGCalParameters php 
)
private

Definition at line 825 of file HGCalGeomParameters.cc.

828  {
829  double rmin(0), rmax(0);
830  for (unsigned int i = 0; i < layers.size(); ++i) {
831  for (auto& layer : layers) {
832  if (layer.first == (int)(i + firstLayer)) {
833  php.layerIndex_.emplace_back(i);
834  php.rMinLayHex_.emplace_back(layer.second.rmin);
835  php.rMaxLayHex_.emplace_back(layer.second.rmax);
836  php.zLayerHex_.emplace_back(layer.second.zpos);
837  if (i == 0) {
838  rmin = layer.second.rmin;
839  rmax = layer.second.rmax;
840  } else {
841  if (rmin > layer.second.rmin)
842  rmin = layer.second.rmin;
843  if (rmax < layer.second.rmax)
844  rmax = layer.second.rmax;
845  }
846  break;
847  }
848  }
849  }
850  php.rLimit_.emplace_back(rmin);
851  php.rLimit_.emplace_back(rmax);
852  php.depth_ = php.layer_;
853  php.depthIndex_ = php.layerIndex_;
854  php.depthLayerF_ = php.layerIndex_;
855 
856  for (unsigned int i = 0; i < php.layer_.size(); ++i) {
857  for (auto& trform : trforms) {
858  if (trform.first.first == (int)(i + firstLayer)) {
859  php.fillTrForm(trform.second);
860  }
861  }
862  }
863 
864 #ifdef EDM_ML_DEBUG
865  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Minimum/maximum R " << php.rLimit_[0] << ":" << php.rLimit_[1];
866  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters finds " << php.zLayerHex_.size() << " layers";
867  for (unsigned int i = 0; i < php.zLayerHex_.size(); ++i) {
868  int k = php.layerIndex_[i];
869  edm::LogVerbatim("HGCalGeom") << "Layer[" << i << ":" << k << ":" << php.layer_[k]
870  << "] with r = " << php.rMinLayHex_[i] << ":" << php.rMaxLayHex_[i]
871  << " at z = " << php.zLayerHex_[i];
872  }
873  edm::LogVerbatim("HGCalGeom") << "Obtained " << php.trformIndex_.size() << " transformation matrices";
874  for (unsigned int k = 0; k < php.trformIndex_.size(); ++k) {
875  edm::LogVerbatim("HGCalGeom") << "Matrix[" << k << "] (" << std::hex << php.trformIndex_[k] << std::dec
876  << ") Translation (" << php.trformTranX_[k] << ", " << php.trformTranY_[k] << ", "
877  << php.trformTranZ_[k] << " Rotation (" << php.trformRotXX_[k] << ", "
878  << php.trformRotYX_[k] << ", " << php.trformRotZX_[k] << ", " << php.trformRotXY_[k]
879  << ", " << php.trformRotYY_[k] << ", " << php.trformRotZY_[k] << ", "
880  << php.trformRotXZ_[k] << ", " << php.trformRotYZ_[k] << ", " << php.trformRotZZ_[k]
881  << ")";
882  }
883 #endif
884 }

References TauDecayModes::dec, HGCalParameters::depth_, HGCalParameters::depthIndex_, HGCalParameters::depthLayerF_, HGCalParameters::fillTrForm(), mps_fire::i, dqmdumpme::k, HGCalParameters::layer_, HGCalParameters::layerIndex_, hgcalTopologyTester_cfi::layers, HGCalParameters::rLimit_, HGCalParameters::rMaxLayHex_, HGCalParameters::rMinLayHex_, HGCalParameters::trformIndex_, HGCalParameters::trformRotXX_, HGCalParameters::trformRotXY_, HGCalParameters::trformRotXZ_, HGCalParameters::trformRotYX_, HGCalParameters::trformRotYY_, HGCalParameters::trformRotYZ_, HGCalParameters::trformRotZX_, HGCalParameters::trformRotZY_, HGCalParameters::trformRotZZ_, HGCalParameters::trformTranX_, HGCalParameters::trformTranY_, HGCalParameters::trformTranZ_, and HGCalParameters::zLayerHex_.

◆ loadSpecParsHexagon() [1/3]

void HGCalGeomParameters::loadSpecParsHexagon ( const cms::DDFilteredView fv,
HGCalParameters php,
const std::string &  sdTag1,
const std::string &  sdTag2,
const std::string &  sdTag3,
const std::string &  sdTag4 
)

Definition at line 925 of file HGCalGeomParameters.cc.

930  {
931  php.boundR_ = fv.get<std::vector<double> >(sdTag4, "RadiusBound");
933  php.rLimit_ = fv.get<std::vector<double> >(sdTag4, "RadiusLimits");
935  php.levelT_ = dbl_to_int(fv.get<std::vector<double> >(sdTag4, "LevelTop"));
936 
937  // Grouping of layers
938  php.layerGroup_ = dbl_to_int(fv.get<std::vector<double> >(sdTag1, "GroupingZFine"));
939  php.layerGroupM_ = dbl_to_int(fv.get<std::vector<double> >(sdTag1, "GroupingZMid"));
940  php.layerGroupO_ = dbl_to_int(fv.get<std::vector<double> >(sdTag1, "GroupingZOut"));
941  php.slopeMin_ = fv.get<std::vector<double> >(sdTag4, "Slope");
942  if (php.slopeMin_.empty())
943  php.slopeMin_.emplace_back(0);
944 
945  // Wafer size
946  const auto& dummy = fv.get<std::vector<double> >(sdTag2, "WaferSize");
948 
949  // Cell size
950  php.cellSize_ = fv.get<std::vector<double> >(sdTag3, "CellSize");
952 
953  loadSpecParsHexagon(php);
954 }

References HGCalParameters::boundR_, HGCalParameters::cellSize_, dbl_to_int(), cms::DDFilteredView::get(), HGCalParameters::k_ScaleFromDD4Hep, HGCalParameters::k_ScaleFromDD4HepToG4, HGCalParameters::layerGroup_, HGCalParameters::layerGroupM_, HGCalParameters::layerGroupO_, HGCalParameters::levelT_, loadSpecParsHexagon(), rescale(), HGCalParameters::rLimit_, HGCalParameters::slopeMin_, and waferSize_.

◆ loadSpecParsHexagon() [2/3]

void HGCalGeomParameters::loadSpecParsHexagon ( const DDFilteredView fv,
HGCalParameters php,
const DDCompactView cpv,
const std::string &  sdTag1,
const std::string &  sdTag2 
)

Definition at line 886 of file HGCalGeomParameters.cc.

890  {
892  php.boundR_ = getDDDArray("RadiusBound", sv, 4);
894  php.rLimit_ = getDDDArray("RadiusLimits", sv, 2);
896  php.levelT_ = dbl_to_int(getDDDArray("LevelTop", sv, 0));
897 
898  // Grouping of layers
899  php.layerGroup_ = dbl_to_int(getDDDArray("GroupingZFine", sv, 0));
900  php.layerGroupM_ = dbl_to_int(getDDDArray("GroupingZMid", sv, 0));
901  php.layerGroupO_ = dbl_to_int(getDDDArray("GroupingZOut", sv, 0));
902  php.slopeMin_ = getDDDArray("Slope", sv, 1);
903 
904  // Wafer size
905  std::string attribute = "Volume";
906  DDSpecificsMatchesValueFilter filter1{DDValue(attribute, sdTag1, 0.0)};
907  DDFilteredView fv1(*cpv, filter1);
908  if (fv1.firstChild()) {
909  DDsvalues_type sv(fv1.mergedSpecifics());
910  const auto& dummy = getDDDArray("WaferSize", sv, 0);
911  waferSize_ = dummy[0];
912  }
913 
914  // Cell size
915  DDSpecificsMatchesValueFilter filter2{DDValue(attribute, sdTag2, 0.0)};
916  DDFilteredView fv2(*cpv, filter2);
917  if (fv2.firstChild()) {
918  DDsvalues_type sv(fv2.mergedSpecifics());
919  php.cellSize_ = getDDDArray("CellSize", sv, 0);
920  }
921 
922  loadSpecParsHexagon(php);
923 }

References HGCalParameters::boundR_, HGCalParameters::cellSize_, dbl_to_int(), DDFilteredView::firstChild(), getDDDArray(), HGCalParameters::k_ScaleFromDDD, HGCalParameters::layerGroup_, HGCalParameters::layerGroupM_, HGCalParameters::layerGroupO_, HGCalParameters::levelT_, DDFilteredView::mergedSpecifics(), rescale(), HGCalParameters::rLimit_, HGCalParameters::slopeMin_, AlCaHLTBitMon_QueryRunRegistry::string, pfDeepBoostedJetPreprocessParams_cfi::sv, and waferSize_.

Referenced by loadSpecParsHexagon().

◆ loadSpecParsHexagon() [3/3]

void HGCalGeomParameters::loadSpecParsHexagon ( const HGCalParameters php)
private

Definition at line 956 of file HGCalGeomParameters.cc.

956  {
957 #ifdef EDM_ML_DEBUG
958  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: wafer radius ranges"
959  << " for cell grouping " << php.boundR_[0] << ":" << php.boundR_[1] << ":"
960  << php.boundR_[2] << ":" << php.boundR_[3];
961  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Minimum/maximum R " << php.rLimit_[0] << ":" << php.rLimit_[1];
962  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: LevelTop " << php.levelT_[0];
963  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: minimum slope " << php.slopeMin_[0] << " and layer groupings "
964  << "for the 3 ranges:";
965  for (unsigned int k = 0; k < php.layerGroup_.size(); ++k)
966  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << php.layerGroup_[k] << ":" << php.layerGroupM_[k] << ":"
967  << php.layerGroupO_[k];
968  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Wafer Size: " << waferSize_;
969  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: " << php.cellSize_.size() << " cells of sizes:";
970  for (unsigned int k = 0; k < php.cellSize_.size(); ++k)
971  edm::LogVerbatim("HGCalGeom") << " [" << k << "] " << php.cellSize_[k];
972 #endif
973 }

References HGCalParameters::boundR_, HGCalParameters::cellSize_, dqmdumpme::k, HGCalParameters::layerGroup_, HGCalParameters::layerGroupM_, HGCalParameters::layerGroupO_, HGCalParameters::levelT_, HGCalParameters::rLimit_, HGCalParameters::slopeMin_, and waferSize_.

◆ loadSpecParsHexagon8() [1/3]

void HGCalGeomParameters::loadSpecParsHexagon8 ( const cms::DDFilteredView fv,
const cms::DDVectorsMap vmap,
HGCalParameters php,
const std::string &  sdTag1 
)

Definition at line 1027 of file HGCalGeomParameters.cc.

1030  {
1031  php.cellThickness_ = fv.get<std::vector<double> >(sdTag1, "CellThickness");
1033 
1034  php.radius100to200_ = fv.get<std::vector<double> >(sdTag1, "Radius100to200");
1035  php.radius200to300_ = fv.get<std::vector<double> >(sdTag1, "Radius200to300");
1036 
1037  const auto& dummy = fv.get<std::vector<double> >(sdTag1, "RadiusCuts");
1038  if (dummy.size() > 3) {
1039  php.choiceType_ = static_cast<int>(dummy[0]);
1040  php.nCornerCut_ = static_cast<int>(dummy[1]);
1041  php.fracAreaMin_ = dummy[2];
1043  } else {
1044  php.choiceType_ = php.nCornerCut_ = php.fracAreaMin_ = php.zMinForRad_ = 0;
1045  }
1046 
1047  php.slopeMin_ = fv.get<std::vector<double> >(sdTag1, "SlopeBottom");
1048  php.zFrontMin_ = fv.get<std::vector<double> >(sdTag1, "ZFrontBottom");
1050  php.rMinFront_ = fv.get<std::vector<double> >(sdTag1, "RMinFront");
1052 
1053  php.slopeTop_ = fv.get<std::vector<double> >(sdTag1, "SlopeTop");
1054  php.zFrontTop_ = fv.get<std::vector<double> >(sdTag1, "ZFrontTop");
1056  php.rMaxFront_ = fv.get<std::vector<double> >(sdTag1, "RMaxFront");
1058  unsigned int kmax = (php.zFrontTop_.size() - php.slopeTop_.size());
1059  for (unsigned int k = 0; k < kmax; ++k)
1060  php.slopeTop_.emplace_back(0);
1061 
1062  const auto& dummy2 = fv.get<std::vector<double> >(sdTag1, "LayerOffset");
1063  if (!dummy2.empty()) {
1064  php.layerOffset_ = dummy2[0];
1065  } else {
1066  php.layerOffset_ = 0;
1067  }
1068 
1069  for (auto const& it : vmap) {
1070  if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "RadiusMixBoundary")) {
1071  for (const auto& i : it.second)
1073  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "ZRanges")) {
1074  for (const auto& i : it.second)
1075  php.zRanges_.emplace_back(HGCalParameters::k_ScaleFromDD4Hep * i);
1076  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "LayerCenter")) {
1077  for (const auto& i : it.second)
1078  php.layerCenter_.emplace_back(std::round(i));
1079  }
1080  }
1081 
1082  // Read in parameters from Philip's file
1083  if (php.waferMaskMode_ == siliconFileEE) {
1084  for (auto const& it : vmap) {
1085  if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "WaferIndexEE")) {
1086  for (const auto& i : it.second)
1087  waferIndex_.emplace_back(std::round(i));
1088  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "WaferTypesEE")) {
1089  for (const auto& i : it.second)
1090  waferTypes_.emplace_back(std::round(i));
1091  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "WaferPartialEE")) {
1092  for (const auto& i : it.second)
1093  waferParts_.emplace_back(std::round(i));
1094  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "WaferOrientEE")) {
1095  for (const auto& i : it.second)
1096  waferOrien_.emplace_back(std::round(i));
1097  }
1098  }
1099  } else if (php.waferMaskMode_ == siliconFileHE) {
1100  for (auto const& it : vmap) {
1101  if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "WaferIndexHE")) {
1102  for (const auto& i : it.second)
1103  waferIndex_.emplace_back(std::round(i));
1104  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "WaferTypesHE")) {
1105  for (const auto& i : it.second)
1106  waferTypes_.emplace_back(std::round(i));
1107  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "WaferPartialHE")) {
1108  for (const auto& i : it.second)
1109  waferParts_.emplace_back(std::round(i));
1110  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "WaferOrientHE")) {
1111  for (const auto& i : it.second)
1112  waferOrien_.emplace_back(std::round(i));
1113  }
1114  }
1115  }
1116 
1117  loadSpecParsHexagon8(php);
1118 }

References HGCalParameters::cellThickness_, HGCalParameters::choiceType_, cms::dd::compareEqual(), HGCalParameters::fracAreaMin_, cms::DDFilteredView::get(), mps_fire::i, dqmdumpme::k, HGCalParameters::k_ScaleFromDD4Hep, HGCalParameters::layerCenter_, HGCalParameters::layerOffset_, loadSpecParsHexagon8(), HGCalParameters::nCornerCut_, cms::dd::noNamespace(), HGCalParameters::radius100to200_, HGCalParameters::radius200to300_, HGCalParameters::radiusMixBoundary_, rescale(), HGCalParameters::rMaxFront_, HGCalParameters::rMinFront_, siliconFileEE, siliconFileHE, HGCalParameters::slopeMin_, HGCalParameters::slopeTop_, waferIndex_, HGCalParameters::waferMaskMode_, waferOrien_, waferParts_, waferTypes_, HGCalParameters::zFrontMin_, HGCalParameters::zFrontTop_, HGCalParameters::zMinForRad_, and HGCalParameters::zRanges_.

◆ loadSpecParsHexagon8() [2/3]

void HGCalGeomParameters::loadSpecParsHexagon8 ( const DDFilteredView fv,
HGCalParameters php 
)

Definition at line 975 of file HGCalGeomParameters.cc.

975  {
977  php.cellThickness_ = getDDDArray("CellThickness", sv, 3);
979 
980  php.radius100to200_ = getDDDArray("Radius100to200", sv, 5);
981  php.radius200to300_ = getDDDArray("Radius200to300", sv, 5);
982 
983  const auto& dummy = getDDDArray("RadiusCuts", sv, 4);
984  php.choiceType_ = (int)(dummy[0]);
985  php.nCornerCut_ = (int)(dummy[1]);
986  php.fracAreaMin_ = dummy[2];
988 
989  php.radiusMixBoundary_ = DDVectorGetter::get("RadiusMixBoundary");
991 
992  php.slopeMin_ = getDDDArray("SlopeBottom", sv, 0);
993  php.zFrontMin_ = getDDDArray("ZFrontBottom", sv, 0);
995  php.rMinFront_ = getDDDArray("RMinFront", sv, 0);
997 
998  php.slopeTop_ = getDDDArray("SlopeTop", sv, 0);
999  php.zFrontTop_ = getDDDArray("ZFrontTop", sv, 0);
1001  php.rMaxFront_ = getDDDArray("RMaxFront", sv, 0);
1003 
1004  php.zRanges_ = DDVectorGetter::get("ZRanges");
1006 
1007  const auto& dummy2 = getDDDArray("LayerOffset", sv, 1);
1008  php.layerOffset_ = dummy2[0];
1009  php.layerCenter_ = dbl_to_int(DDVectorGetter::get("LayerCenter"));
1010 
1011  // Read in parameters from Philip's file
1012  if (php.waferMaskMode_ == siliconFileEE) {
1013  waferIndex_ = dbl_to_int(DDVectorGetter::get("WaferIndexEE"));
1014  waferTypes_ = dbl_to_int(DDVectorGetter::get("WaferTypesEE"));
1015  waferParts_ = dbl_to_int(DDVectorGetter::get("WaferPartialEE"));
1016  waferOrien_ = dbl_to_int(DDVectorGetter::get("WaferOrientEE"));
1017  } else if (php.waferMaskMode_ == siliconFileHE) {
1018  waferIndex_ = dbl_to_int(DDVectorGetter::get("WaferIndexHE"));
1019  waferTypes_ = dbl_to_int(DDVectorGetter::get("WaferTypesHE"));
1020  waferParts_ = dbl_to_int(DDVectorGetter::get("WaferPartialHE"));
1021  waferOrien_ = dbl_to_int(DDVectorGetter::get("WaferOrientHE"));
1022  }
1023 
1024  loadSpecParsHexagon8(php);
1025 }

References HGCalParameters::cellThickness_, HGCalParameters::choiceType_, dbl_to_int(), HGCalParameters::fracAreaMin_, DDVectorGetter::get(), getDDDArray(), createfilelist::int, HGCalParameters::k_ScaleFromDDD, HGCalParameters::layerCenter_, HGCalParameters::layerOffset_, DDFilteredView::mergedSpecifics(), HGCalParameters::nCornerCut_, HGCalParameters::radius100to200_, HGCalParameters::radius200to300_, HGCalParameters::radiusMixBoundary_, rescale(), HGCalParameters::rMaxFront_, HGCalParameters::rMinFront_, siliconFileEE, siliconFileHE, HGCalParameters::slopeMin_, HGCalParameters::slopeTop_, pfDeepBoostedJetPreprocessParams_cfi::sv, waferIndex_, HGCalParameters::waferMaskMode_, waferOrien_, waferParts_, waferTypes_, HGCalParameters::zFrontMin_, HGCalParameters::zFrontTop_, HGCalParameters::zMinForRad_, and HGCalParameters::zRanges_.

Referenced by loadSpecParsHexagon8().

◆ loadSpecParsHexagon8() [3/3]

void HGCalGeomParameters::loadSpecParsHexagon8 ( HGCalParameters php)
private

Definition at line 1120 of file HGCalGeomParameters.cc.

1120  {
1121 #ifdef EDM_ML_DEBUG
1122  for (unsigned int k = 0; k < php.cellThickness_.size(); ++k)
1123  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: cell[" << k << "] Thickness " << php.cellThickness_[k];
1124  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Polynomial "
1125  << "parameters for 120 to 200 micron "
1126  << "transition with" << php.radius100to200_.size() << " elements";
1127  for (unsigned int k = 0; k < php.radius100to200_.size(); ++k)
1128  edm::LogVerbatim("HGCalGeom") << "Element [" << k << "] " << php.radius100to200_[k];
1129  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Polynomial "
1130  << "parameters for 200 to 300 micron "
1131  << "transition with " << php.radius200to300_.size() << " elements";
1132  for (unsigned int k = 0; k < php.radius200to300_.size(); ++k)
1133  edm::LogVerbatim("HGCalGeom") << "Element [" << k << "] " << php.radius200to300_[k];
1134  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Parameters for the"
1135  << " transition " << php.choiceType_ << ":" << php.nCornerCut_ << ":"
1136  << php.fracAreaMin_ << ":" << php.zMinForRad_;
1137  for (unsigned int k = 0; k < php.radiusMixBoundary_.size(); ++k)
1138  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Mix[" << k << "] R = " << php.radiusMixBoundary_[k];
1139  for (unsigned int k = 0; k < php.zFrontMin_.size(); ++k)
1140  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Boundary[" << k << "] Bottom Z = " << php.zFrontMin_[k]
1141  << " Slope = " << php.slopeMin_[k] << " rMax = " << php.rMinFront_[k];
1142  for (unsigned int k = 0; k < php.zFrontTop_.size(); ++k)
1143  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Boundary[" << k << "] Top Z = " << php.zFrontTop_[k]
1144  << " Slope = " << php.slopeTop_[k] << " rMax = " << php.rMaxFront_[k];
1145  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Z-Boundary " << php.zRanges_[0] << ":" << php.zRanges_[1] << ":"
1146  << php.zRanges_[2] << ":" << php.zRanges_[3];
1147  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: LayerOffset " << php.layerOffset_ << " in array of size "
1148  << php.layerCenter_.size();
1149  for (unsigned int k = 0; k < php.layerCenter_.size(); ++k)
1150  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << php.layerCenter_[k];
1151 #endif
1152 
1153  // Store parameters from Philip's file
1154  if (php.waferMaskMode_ > 1) {
1155  for (unsigned int k = 0; k < waferIndex_.size(); ++k) {
1157 #ifdef EDM_ML_DEBUG
1158  edm::LogVerbatim("HGCalGeom") << "[" << k << ":" << waferIndex_[k] << "] "
1159  << " Type " << waferTypes_[k] << " Partial type " << waferParts_[k]
1160  << " Orientation " << waferOrien_[k];
1161 #endif
1162  }
1163  waferIndex_.clear();
1164  waferTypes_.clear();
1165  waferParts_.clear();
1166  waferOrien_.clear();
1167  }
1168 }

References HGCalParameters::cellThickness_, HGCalParameters::choiceType_, HGCalParameters::fracAreaMin_, dqmdumpme::k, HGCalParameters::layerCenter_, HGCalParameters::layerOffset_, HGCalParameters::nCornerCut_, HGCalParameters::radius100to200_, HGCalParameters::radius200to300_, HGCalParameters::radiusMixBoundary_, HGCalParameters::rMaxFront_, HGCalParameters::rMinFront_, HGCalParameters::slopeMin_, HGCalParameters::slopeTop_, waferIndex_, HGCalParameters::waferInfoMap_, HGCalParameters::waferMaskMode_, waferOrien_, waferParts_, waferTypes_, HGCalParameters::zFrontMin_, HGCalParameters::zFrontTop_, HGCalParameters::zMinForRad_, and HGCalParameters::zRanges_.

◆ loadSpecParsTrapezoid() [1/3]

void HGCalGeomParameters::loadSpecParsTrapezoid ( const cms::DDFilteredView fv,
const cms::DDVectorsMap vmap,
HGCalParameters php,
const std::string &  sdTag1 
)

Definition at line 1224 of file HGCalGeomParameters.cc.

1227  {
1228  for (auto const& it : vmap) {
1229  if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "RadiusMixBoundary")) {
1230  for (const auto& i : it.second)
1232  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "ZRanges")) {
1233  for (const auto& i : it.second)
1234  php.zRanges_.emplace_back(HGCalParameters::k_ScaleFromDD4Hep * i);
1235  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "LayerCenter")) {
1236  for (const auto& i : it.second)
1237  php.layerCenter_.emplace_back(std::round(i));
1238  }
1239  }
1240 
1241  php.nPhiBinBH_ = dbl_to_int(fv.get<std::vector<double> >(sdTag1, "NPhiBinBH"));
1242  php.layerFrontBH_ = dbl_to_int(fv.get<std::vector<double> >(sdTag1, "LayerFrontBH"));
1243  php.rMinLayerBH_ = fv.get<std::vector<double> >(sdTag1, "RMinLayerBH");
1245  php.nCellsFine_ = php.nPhiBinBH_[0];
1246  php.nCellsCoarse_ = php.nPhiBinBH_[1];
1247  php.cellSize_.emplace_back(2.0 * M_PI / php.nCellsFine_);
1248  php.cellSize_.emplace_back(2.0 * M_PI / php.nCellsCoarse_);
1249 
1250  php.slopeMin_ = fv.get<std::vector<double> >(sdTag1, "SlopeBottom");
1251  php.zFrontMin_ = fv.get<std::vector<double> >(sdTag1, "ZFrontBottom");
1253  php.rMinFront_ = fv.get<std::vector<double> >(sdTag1, "RMinFront");
1255 
1256  php.slopeTop_ = fv.get<std::vector<double> >(sdTag1, "SlopeTop");
1257  php.zFrontTop_ = fv.get<std::vector<double> >(sdTag1, "ZFrontTop");
1259  php.rMaxFront_ = fv.get<std::vector<double> >(sdTag1, "RMaxFront");
1261  unsigned int kmax = (php.zFrontTop_.size() - php.slopeTop_.size());
1262  for (unsigned int k = 0; k < kmax; ++k)
1263  php.slopeTop_.emplace_back(0);
1264 
1265  const auto& dummy2 = fv.get<std::vector<double> >(sdTag1, "LayerOffset");
1266  php.layerOffset_ = dummy2[0];
1267 
1268  // tile parameters from Katja's file
1269  if (php.waferMaskMode_ == scintillatorFile) {
1270  for (auto const& it : vmap) {
1271  if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "TileIndex")) {
1272  for (const auto& i : it.second)
1273  tileIndx_.emplace_back(std::round(i));
1274  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "TileType")) {
1275  for (const auto& i : it.second)
1276  tileType_.emplace_back(std::round(i));
1277  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "TileSiPM")) {
1278  for (const auto& i : it.second)
1279  tileSiPM_.emplace_back(std::round(i));
1280  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "TileHEX1")) {
1281  for (const auto& i : it.second)
1282  tileHEX1_.emplace_back(std::round(i));
1283  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "TileHEX2")) {
1284  for (const auto& i : it.second)
1285  tileHEX2_.emplace_back(std::round(i));
1286  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "TileHEX3")) {
1287  for (const auto& i : it.second)
1288  tileHEX3_.emplace_back(std::round(i));
1289  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "TileHEX4")) {
1290  for (const auto& i : it.second)
1291  tileHEX4_.emplace_back(std::round(i));
1292  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "TileRMin")) {
1293  for (const auto& i : it.second)
1295  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "TileRMax")) {
1296  for (const auto& i : it.second)
1298  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "TileRingMin")) {
1299  for (const auto& i : it.second)
1300  tileRingMin_.emplace_back(std::round(i));
1301  } else if (cms::dd::compareEqual(cms::dd::noNamespace(it.first), "TileRingMax")) {
1302  for (const auto& i : it.second)
1303  tileRingMax_.emplace_back(std::round(i));
1304  }
1305  }
1306  }
1307 
1308  loadSpecParsTrapezoid(php);
1309 }

References HGCalParameters::cellSize_, cms::dd::compareEqual(), dbl_to_int(), cms::DDFilteredView::get(), mps_fire::i, dqmdumpme::k, HGCalParameters::k_ScaleFromDD4Hep, HGCalParameters::layerCenter_, HGCalParameters::layerFrontBH_, HGCalParameters::layerOffset_, loadSpecParsTrapezoid(), M_PI, HGCalParameters::nCellsCoarse_, HGCalParameters::nCellsFine_, cms::dd::noNamespace(), HGCalParameters::nPhiBinBH_, HGCalParameters::radiusMixBoundary_, rescale(), HGCalParameters::rMaxFront_, HGCalParameters::rMinFront_, HGCalParameters::rMinLayerBH_, scintillatorFile, HGCalParameters::slopeMin_, HGCalParameters::slopeTop_, tileHEX1_, tileHEX2_, tileHEX3_, tileHEX4_, tileIndx_, tileRingMax_, tileRingMin_, tileRMax_, tileRMin_, tileSiPM_, tileType_, HGCalParameters::waferMaskMode_, HGCalParameters::zFrontMin_, HGCalParameters::zFrontTop_, and HGCalParameters::zRanges_.

◆ loadSpecParsTrapezoid() [2/3]

void HGCalGeomParameters::loadSpecParsTrapezoid ( const DDFilteredView fv,
HGCalParameters php 
)

Definition at line 1170 of file HGCalGeomParameters.cc.

1170  {
1172  php.radiusMixBoundary_ = DDVectorGetter::get("RadiusMixBoundary");
1174 
1175  php.nPhiBinBH_ = dbl_to_int(getDDDArray("NPhiBinBH", sv, 0));
1176  php.layerFrontBH_ = dbl_to_int(getDDDArray("LayerFrontBH", sv, 0));
1177  php.rMinLayerBH_ = getDDDArray("RMinLayerBH", sv, 0);
1179  php.nCellsFine_ = php.nPhiBinBH_[0];
1180  php.nCellsCoarse_ = php.nPhiBinBH_[1];
1181  php.cellSize_.emplace_back(2.0 * M_PI / php.nCellsFine_);
1182  php.cellSize_.emplace_back(2.0 * M_PI / php.nCellsCoarse_);
1183 
1184  php.slopeMin_ = getDDDArray("SlopeBottom", sv, 0);
1185  php.zFrontMin_ = getDDDArray("ZFrontBottom", sv, 0);
1187  php.rMinFront_ = getDDDArray("RMinFront", sv, 0);
1189 
1190  php.slopeTop_ = getDDDArray("SlopeTop", sv, 0);
1191  php.zFrontTop_ = getDDDArray("ZFrontTop", sv, 0);
1193  php.rMaxFront_ = getDDDArray("RMaxFront", sv, 0);
1195 
1196  php.zRanges_ = DDVectorGetter::get("ZRanges");
1198 
1199  // Offsets
1200  const auto& dummy2 = getDDDArray("LayerOffset", sv, 1);
1201  php.layerOffset_ = dummy2[0];
1202  php.layerCenter_ = dbl_to_int(DDVectorGetter::get("LayerCenter"));
1203 
1204  // tile parameters from Katja's file
1205  if (php.waferMaskMode_ == scintillatorFile) {
1206  tileIndx_ = dbl_to_int(DDVectorGetter::get("TileIndex"));
1207  tileType_ = dbl_to_int(DDVectorGetter::get("TileType"));
1208  tileSiPM_ = dbl_to_int(DDVectorGetter::get("TileSiPM"));
1209  tileHEX1_ = dbl_to_int(DDVectorGetter::get("TileHEX1"));
1210  tileHEX2_ = dbl_to_int(DDVectorGetter::get("TileHEX2"));
1211  tileHEX3_ = dbl_to_int(DDVectorGetter::get("TileHEX3"));
1212  tileHEX4_ = dbl_to_int(DDVectorGetter::get("TileHEX4"));
1213  tileRMin_ = DDVectorGetter::get("TileRMin");
1214  tileRMax_ = DDVectorGetter::get("TileRMax");
1217  tileRingMin_ = dbl_to_int(DDVectorGetter::get("TileRingMin"));
1218  tileRingMax_ = dbl_to_int(DDVectorGetter::get("TileRingMax"));
1219  }
1220 
1221  loadSpecParsTrapezoid(php);
1222 }

References HGCalParameters::cellSize_, dbl_to_int(), DDVectorGetter::get(), getDDDArray(), HGCalParameters::k_ScaleFromDDD, HGCalParameters::layerCenter_, HGCalParameters::layerFrontBH_, HGCalParameters::layerOffset_, M_PI, DDFilteredView::mergedSpecifics(), HGCalParameters::nCellsCoarse_, HGCalParameters::nCellsFine_, HGCalParameters::nPhiBinBH_, HGCalParameters::radiusMixBoundary_, rescale(), HGCalParameters::rMaxFront_, HGCalParameters::rMinFront_, HGCalParameters::rMinLayerBH_, scintillatorFile, HGCalParameters::slopeMin_, HGCalParameters::slopeTop_, pfDeepBoostedJetPreprocessParams_cfi::sv, tileHEX1_, tileHEX2_, tileHEX3_, tileHEX4_, tileIndx_, tileRingMax_, tileRingMin_, tileRMax_, tileRMin_, tileSiPM_, tileType_, HGCalParameters::waferMaskMode_, HGCalParameters::zFrontMin_, HGCalParameters::zFrontTop_, and HGCalParameters::zRanges_.

Referenced by loadSpecParsTrapezoid().

◆ loadSpecParsTrapezoid() [3/3]

void HGCalGeomParameters::loadSpecParsTrapezoid ( HGCalParameters php)
private

Definition at line 1311 of file HGCalGeomParameters.cc.

1311  {
1312 #ifdef EDM_ML_DEBUG
1313  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters:nCells " << php.nCellsFine_ << ":" << php.nCellsCoarse_
1314  << " cellSize: " << php.cellSize_[0] << ":" << php.cellSize_[1];
1315  for (unsigned int k = 0; k < php.layerFrontBH_.size(); ++k)
1316  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Type[" << k << "] Front Layer = " << php.layerFrontBH_[k]
1317  << " rMin = " << php.rMinLayerBH_[k];
1318  for (unsigned int k = 0; k < php.radiusMixBoundary_.size(); ++k) {
1319  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Mix[" << k << "] R = " << php.radiusMixBoundary_[k]
1320  << " Nphi = " << php.scintCells(k + php.firstLayer_)
1321  << " dPhi = " << php.scintCellSize(k + php.firstLayer_);
1322  }
1323 
1324  for (unsigned int k = 0; k < php.zFrontMin_.size(); ++k)
1325  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Boundary[" << k << "] Bottom Z = " << php.zFrontMin_[k]
1326  << " Slope = " << php.slopeMin_[k] << " rMax = " << php.rMinFront_[k];
1327 
1328  for (unsigned int k = 0; k < php.zFrontTop_.size(); ++k)
1329  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Boundary[" << k << "] Top Z = " << php.zFrontTop_[k]
1330  << " Slope = " << php.slopeTop_[k] << " rMax = " << php.rMaxFront_[k];
1331 
1332  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Z-Boundary " << php.zRanges_[0] << ":" << php.zRanges_[1] << ":"
1333  << php.zRanges_[2] << ":" << php.zRanges_[3];
1334 
1335  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: LayerOffset " << php.layerOffset_ << " in array of size "
1336  << php.layerCenter_.size();
1337  for (unsigned int k = 0; k < php.layerCenter_.size(); ++k)
1338  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << php.layerCenter_[k];
1339 #endif
1340 
1341  // tile parameters from Katja's file
1342  if (php.waferMaskMode_ == scintillatorFile) {
1343  for (unsigned int k = 0; k < tileIndx_.size(); ++k) {
1344  php.tileInfoMap_[tileIndx_[k]] =
1346 #ifdef EDM_ML_DEBUG
1347  edm::LogVerbatim("HGCalGeom") << "Tile[" << k << ":" << tileIndx_[k] << "] "
1348  << " Type " << tileType_[k] << " SiPM " << tileSiPM_[k] << " HEX " << tileHEX1_[k]
1349  << ":" << tileHEX2_[k] << ":" << tileHEX3_[k] << ":" << tileHEX4_[k];
1350 #endif
1351  }
1352  tileIndx_.clear();
1353  tileType_.clear();
1354  tileSiPM_.clear();
1355  tileHEX1_.clear();
1356  tileHEX2_.clear();
1357  tileHEX3_.clear();
1358  tileHEX4_.clear();
1359  for (unsigned int k = 0; k < tileRMin_.size(); ++k) {
1360  php.tileRingR_.emplace_back(tileRMin_[k], tileRMax_[k]);
1361 #ifdef EDM_ML_DEBUG
1362  edm::LogVerbatim("HGCalGeom") << "TileRingR[" << k << "] " << tileRMin_[k] << ":" << tileRMax_[k];
1363  #endif
1364  }
1365  tileRMin_.clear();
1366  tileRMax_.clear();
1367  for (unsigned k = 0; k < tileRingMin_.size(); ++k) {
1368  php.tileRingRange_.emplace_back(tileRingMin_[k], tileRingMax_[k]);
1369 #ifdef EDM_ML_DEBUG
1370  edm::LogVerbatim("HGCalGeom") << "TileRingRange[" << k << "] " << tileRingMin_[k] << ":" << tileRingMax_[k];
1371 #endif
1372  }
1373  tileRingMin_.clear();
1374  tileRingMax_.clear();
1375  }
1376 }

References HGCalParameters::cellSize_, HGCalParameters::firstLayer_, dqmdumpme::k, HGCalParameters::layerCenter_, HGCalParameters::layerFrontBH_, HGCalParameters::layerOffset_, HGCalParameters::nCellsCoarse_, HGCalParameters::nCellsFine_, HGCalParameters::radiusMixBoundary_, HGCalParameters::rMaxFront_, HGCalParameters::rMinFront_, HGCalParameters::rMinLayerBH_, HGCalParameters::scintCells(), HGCalParameters::scintCellSize(), scintillatorFile, HGCalParameters::slopeMin_, HGCalParameters::slopeTop_, tileHEX1_, tileHEX2_, tileHEX3_, tileHEX4_, tileIndx_, HGCalParameters::tileInfoMap_, tileRingMax_, tileRingMin_, HGCalParameters::tileRingR_, HGCalParameters::tileRingRange_, tileRMax_, tileRMin_, tileSiPM_, tileType_, HGCalParameters::waferMaskMode_, HGCalParameters::zFrontMin_, HGCalParameters::zFrontTop_, and HGCalParameters::zRanges_.

◆ loadWaferHexagon()

void HGCalGeomParameters::loadWaferHexagon ( HGCalParameters php)

Definition at line 1378 of file HGCalGeomParameters.cc.

1378  {
1380  double rin(php.rLimit_[0]), rout(php.rLimit_[1]), rMaxFine(php.boundR_[1]);
1381 #ifdef EDM_ML_DEBUG
1382  edm::LogVerbatim("HGCalGeom") << "Input waferWidth " << waferW << ":" << rmin << " R Limits: " << rin << ":" << rout
1383  << " Fine " << rMaxFine;
1384 #endif
1385  // Clear the vectors
1386  php.waferCopy_.clear();
1387  php.waferTypeL_.clear();
1388  php.waferTypeT_.clear();
1389  php.waferPosX_.clear();
1390  php.waferPosY_.clear();
1391  double dx = 0.5 * waferW;
1392  double dy = 3.0 * dx * tan(30._deg);
1393  double rr = 2.0 * dx * tan(30._deg);
1394  int ncol = (int)(2.0 * rout / waferW) + 1;
1395  int nrow = (int)(rout / (waferW * tan(30._deg))) + 1;
1396  int ns2 = (2 * ncol + 1) * (2 * nrow + 1) * php.layer_.size();
1397  int incm(0), inrm(0), kount(0), ntot(0);
1398  HGCalParameters::layer_map copiesInLayers(php.layer_.size() + 1);
1399  HGCalParameters::waferT_map waferTypes(ns2 + 1);
1400 #ifdef EDM_ML_DEBUG
1401  edm::LogVerbatim("HGCalGeom") << "Row " << nrow << " Column " << ncol;
1402 #endif
1403  for (int nr = -nrow; nr <= nrow; ++nr) {
1404  int inr = (nr >= 0) ? nr : -nr;
1405  for (int nc = -ncol; nc <= ncol; ++nc) {
1406  int inc = (nc >= 0) ? nc : -nc;
1407  if (inr % 2 == inc % 2) {
1408  double xpos = nc * dx;
1409  double ypos = nr * dy;
1410  std::pair<int, int> corner = HGCalGeomTools::waferCorner(xpos, ypos, dx, rr, rin, rout, true);
1411  double rpos = std::sqrt(xpos * xpos + ypos * ypos);
1412  int typet = (rpos < rMaxFine) ? 1 : 2;
1413  int typel(3);
1414  for (int k = 1; k < 4; ++k) {
1415  if ((rpos + rmin) <= php.boundR_[k]) {
1416  typel = k;
1417  break;
1418  }
1419  }
1420  ++ntot;
1421  if (corner.first > 0) {
1422  int copy = inr * 100 + inc;
1423  if (nc < 0)
1424  copy += 10000;
1425  if (nr < 0)
1426  copy += 100000;
1427  if (inc > incm)
1428  incm = inc;
1429  if (inr > inrm)
1430  inrm = inr;
1431  kount++;
1432 #ifdef EDM_ML_DEBUG
1433  edm::LogVerbatim("HGCalGeom") << kount << ":" << ntot << " Copy " << copy << " Type " << typel << ":" << typet
1434  << " Location " << corner.first << " Position " << xpos << ":" << ypos
1435  << " Layers " << php.layer_.size();
1436 #endif
1437  php.waferCopy_.emplace_back(copy);
1438  php.waferTypeL_.emplace_back(typel);
1439  php.waferTypeT_.emplace_back(typet);
1440  php.waferPosX_.emplace_back(xpos);
1441  php.waferPosY_.emplace_back(ypos);
1442  for (unsigned int il = 0; il < php.layer_.size(); ++il) {
1443  std::pair<int, int> corner =
1444  HGCalGeomTools::waferCorner(xpos, ypos, dx, rr, php.rMinLayHex_[il], php.rMaxLayHex_[il], true);
1445  if (corner.first > 0) {
1446  auto cpy = copiesInLayers[php.layer_[il]].find(copy);
1447  if (cpy == copiesInLayers[php.layer_[il]].end())
1448  copiesInLayers[php.layer_[il]][copy] =
1449  ((corner.first == (int)(HGCalParameters::k_CornerSize)) ? php.waferCopy_.size() : -1);
1450  }
1451  if ((corner.first > 0) && (corner.first < (int)(HGCalParameters::k_CornerSize))) {
1452  int wl = HGCalWaferIndex::waferIndex(php.layer_[il], copy, 0, true);
1453  waferTypes[wl] = corner;
1454  }
1455  }
1456  }
1457  }
1458  }
1459  }
1460  php.copiesInLayers_ = copiesInLayers;
1461  php.waferTypes_ = waferTypes;
1462  php.nSectors_ = (int)(php.waferCopy_.size());
1463  php.waferUVMax_ = 0;
1464 #ifdef EDM_ML_DEBUG
1465  edm::LogVerbatim("HGCalGeom") << "HGCalWaferHexagon: # of columns " << incm << " # of rows " << inrm << " and "
1466  << kount << ":" << ntot << " wafers; R " << rin << ":" << rout;
1467  edm::LogVerbatim("HGCalGeom") << "Dump copiesInLayers for " << php.copiesInLayers_.size() << " layers";
1468  for (unsigned int k = 0; k < copiesInLayers.size(); ++k) {
1469  const auto& theModules = copiesInLayers[k];
1470  edm::LogVerbatim("HGCalGeom") << "Layer " << k << ":" << theModules.size();
1471  int k2(0);
1472  for (std::unordered_map<int, int>::const_iterator itr = theModules.begin(); itr != theModules.end(); ++itr, ++k2) {
1473  edm::LogVerbatim("HGCalGeom") << "[" << k2 << "] " << itr->first << ":" << itr->second;
1474  }
1475  }
1476 #endif
1477 }

References HGCalParameters::boundR_, HGCalParameters::copiesInLayers_, filterCSVwithJSON::copy, distTCMET_cfi::corner, PVValHelper::dx, PVValHelper::dy, createfilelist::int, dqmdumpme::k, HGCalParameters::k_CornerSize, HGCalParameters::k_ScaleFromDDD, HGCalParameters::layer_, EgHLTOffHistBins_cfi::nr, HGCalParameters::nSectors_, HGCalParameters::rLimit_, HGCalParameters::rMaxLayHex_, HGCalParameters::rMinLayHex_, findQualityFiles::rr, mathSSE::sqrt(), funct::tan(), HGCalParameters::waferCopy_, HGCalGeomTools::waferCorner(), HGCalWaferIndex::waferIndex(), HGCalParameters::waferPosX_, HGCalParameters::waferPosY_, HGCalParameters::waferR_, waferSize_, HGCalParameters::waferTypeL_, HGCalParameters::waferTypes_, HGCalParameters::waferTypeT_, HGCalParameters::waferUVMax_, and LaserClient_cfi::wl.

◆ loadWaferHexagon8()

void HGCalGeomParameters::loadWaferHexagon8 ( HGCalParameters php)

Definition at line 1479 of file HGCalGeomParameters.cc.

1479  {
1480  double waferW(php.waferSize_);
1481  double waferS(php.sensorSeparation_);
1482  auto wType = std::make_unique<HGCalWaferType>(php.radius100to200_,
1483  php.radius200to300_,
1484  HGCalParameters::k_ScaleToDDD * (waferW + waferS),
1486  php.choiceType_,
1487  php.nCornerCut_,
1488  php.fracAreaMin_);
1489 
1490  double rout(php.rLimit_[1]);
1491 #ifdef EDM_ML_DEBUG
1492  edm::LogVerbatim("HGCalGeom") << "Input waferWidth " << waferW << ":" << waferS << " R Max: " << rout;
1493 #endif
1494  // Clear the vectors
1495  php.waferCopy_.clear();
1496  php.waferTypeL_.clear();
1497  php.waferTypeT_.clear();
1498  php.waferPosX_.clear();
1499  php.waferPosY_.clear();
1500  double r = 0.5 * (waferW + waferS);
1501  double R = 2.0 * r / sqrt3_;
1502  double dy = 0.75 * R;
1503  double r1 = 0.5 * waferW;
1504  double R1 = 2.0 * r1 / sqrt3_;
1505  int N = (r == 0) ? 3 : ((int)(0.5 * rout / r) + 3);
1506  int ns1 = (2 * N + 1) * (2 * N + 1);
1507  int ns2 = ns1 * php.zLayerHex_.size();
1508 #ifdef EDM_ML_DEBUG
1509  edm::LogVerbatim("HGCalGeom") << "wafer " << waferW << ":" << waferS << " r " << r << " dy " << dy << " N " << N
1510  << " sizes " << ns1 << ":" << ns2;
1511  std::vector<int> indtypes(ns1 + 1);
1512  indtypes.clear();
1513 #endif
1514  HGCalParameters::wafer_map wafersInLayers(ns1 + 1);
1515  HGCalParameters::wafer_map typesInLayers(ns2 + 1);
1516  HGCalParameters::waferT_map waferTypes(ns2 + 1);
1517  int ipos(0), lpos(0), uvmax(0);
1518  std::vector<int> uvmx(php.zLayerHex_.size(), 0);
1519  for (int v = -N; v <= N; ++v) {
1520  for (int u = -N; u <= N; ++u) {
1521  int nr = 2 * v;
1522  int nc = -2 * u + v;
1523  double xpos = nc * r;
1524  double ypos = nr * dy;
1525  int indx = HGCalWaferIndex::waferIndex(0, u, v);
1526  php.waferCopy_.emplace_back(indx);
1527  php.waferPosX_.emplace_back(xpos);
1528  php.waferPosY_.emplace_back(ypos);
1529  wafersInLayers[indx] = ipos;
1530  ++ipos;
1531  std::pair<int, int> corner = HGCalGeomTools::waferCorner(xpos, ypos, r1, R1, 0, rout, false);
1532  if ((corner.first == (int)(HGCalParameters::k_CornerSize)) || ((corner.first > 0) && php.defineFull_)) {
1533  uvmax = std::max(uvmax, std::max(std::abs(u), std::abs(v)));
1534  }
1535  for (unsigned int i = 0; i < php.zLayerHex_.size(); ++i) {
1536  int copy = i + php.layerOffset_;
1537  std::pair<double, double> xyoff = geomTools_.shiftXY(php.layerCenter_[copy], (waferW + waferS));
1538  int lay = php.layer_[php.layerIndex_[i]];
1539  double xpos0 = xpos + xyoff.first;
1540  double ypos0 = ypos + xyoff.second;
1541  double zpos = php.zLayerHex_[i];
1542  int type = wType->getType(HGCalParameters::k_ScaleToDDD * xpos0,
1545  php.waferTypeL_.emplace_back(type);
1546  int kndx = HGCalWaferIndex::waferIndex(lay, u, v);
1547  typesInLayers[kndx] = lpos;
1548  ++lpos;
1549 #ifdef EDM_ML_DEBUG
1550  indtypes.emplace_back(kndx);
1551 #endif
1552  std::pair<int, int> corner =
1553  HGCalGeomTools::waferCorner(xpos0, ypos0, r1, R1, php.rMinLayHex_[i], php.rMaxLayHex_[i], false);
1554 #ifdef EDM_ML_DEBUG
1555  if (((corner.first == 0) && std::abs(u) < 5 && std::abs(v) < 5) || (std::abs(u) < 2 && std::abs(v) < 2)) {
1556  edm::LogVerbatim("HGCalGeom") << "Layer " << lay << " R " << php.rMinLayHex_[i] << ":" << php.rMaxLayHex_[i]
1557  << " u " << u << " v " << v << " with " << corner.first << " corners";
1558  }
1559 #endif
1560  if ((corner.first == (int)(HGCalParameters::k_CornerSize)) || ((corner.first > 0) && php.defineFull_)) {
1561  uvmx[i] = std::max(uvmx[i], std::max(std::abs(u), std::abs(v)));
1562  }
1563  if ((corner.first < (int)(HGCalParameters::k_CornerSize)) && (corner.first > 0)) {
1564 #ifdef EDM_ML_DEBUG
1565  edm::LogVerbatim("HGCalGeom") << "Layer " << lay << " u|v " << u << ":" << v << " with corner "
1566  << corner.first << ":" << corner.second;
1567 #endif
1568  int wl = HGCalWaferIndex::waferIndex(lay, u, v);
1569  if (php.waferMaskMode_ > 0) {
1570  std::pair<int, int> corner0 = HGCalWaferMask::getTypeMode(
1571  xpos0, ypos0, r1, R1, php.rMinLayHex_[i], php.rMaxLayHex_[i], type, php.waferMaskMode_);
1572  waferTypes[wl] = corner0;
1573 #ifdef EDM_ML_DEBUG
1574  edm::LogVerbatim("HGCalGeom")
1575  << "Layer " << lay << " u|v " << u << ":" << v << " Index " << std::hex << wl << std::dec << " pos "
1576  << xpos0 << ":" << ypos0 << " R " << r1 << ":" << R1 << " Range " << php.rMinLayHex_[i] << ":"
1577  << php.rMaxLayHex_[i] << type << ":" << php.waferMaskMode_ << " corner " << corner.first << ":"
1578  << corner.second << " croner0 " << corner0.first << ":" << corner0.second;
1579 #endif
1580  } else {
1581  waferTypes[wl] = corner;
1582 #ifdef EDM_ML_DEBUG
1583  edm::LogVerbatim("HGCalGeom") << "Layer " << lay << " u|v " << u << ":" << v << " with corner "
1584  << corner.first << ":" << corner.second;
1585 #endif
1586  }
1587  }
1588  }
1589  }
1590  }
1591  php.waferUVMax_ = uvmax;
1592  php.waferUVMaxLayer_ = uvmx;
1593  php.wafersInLayers_ = wafersInLayers;
1594  php.typesInLayers_ = typesInLayers;
1595  php.waferTypes_ = waferTypes;
1596  php.nSectors_ = (int)(php.waferCopy_.size());
1598  mytr.lay = 1;
1599  mytr.bl = php.waferR_;
1600  mytr.tl = php.waferR_;
1601  mytr.h = php.waferR_;
1602  mytr.alpha = 0.0;
1604  for (auto const& dz : php.cellThickness_) {
1605  mytr.dz = 0.5 * HGCalParameters::k_ScaleToDDD * dz;
1606  php.fillModule(mytr, false);
1607  }
1608  for (unsigned k = 0; k < php.cellThickness_.size(); ++k) {
1609  HGCalParameters::hgtrap mytr = php.getModule(k, false);
1615  php.fillModule(mytr, true);
1616  }
1617 #ifdef EDM_ML_DEBUG
1618  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Total of " << php.waferCopy_.size() << " wafers";
1619  for (unsigned int k = 0; k < php.waferCopy_.size(); ++k) {
1620  int id = php.waferCopy_[k];
1621  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << std::hex << id << std::dec << ":"
1622  << HGCalWaferIndex::waferLayer(id) << ":" << HGCalWaferIndex::waferU(id) << ":"
1623  << HGCalWaferIndex::waferV(id) << " x " << php.waferPosX_[k] << " y "
1624  << php.waferPosY_[k] << " index " << php.wafersInLayers_[id];
1625  }
1626  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Total of " << php.waferTypeL_.size() << " wafer types";
1627  for (unsigned int k = 0; k < php.waferTypeL_.size(); ++k) {
1628  int id = indtypes[k];
1629  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << php.typesInLayers_[id] << ":" << php.waferTypeL_[k] << " ID "
1630  << std::hex << id << std::dec << ":" << HGCalWaferIndex::waferLayer(id) << ":"
1631  << HGCalWaferIndex::waferU(id) << ":" << HGCalWaferIndex::waferV(id);
1632  }
1633 #endif
1634 
1635  //Wafer offset
1636  php.xLayerHex_.clear();
1637  php.yLayerHex_.clear();
1638  double waferSize = php.waferSize_ + php.sensorSeparation_;
1639 #ifdef EDM_ML_DEBUG
1640  edm::LogVerbatim("HGCalGeom") << "WaferSize " << waferSize;
1641 #endif
1642  for (unsigned int k = 0; k < php.zLayerHex_.size(); ++k) {
1643  int copy = k + php.layerOffset_;
1644  std::pair<double, double> xyoff = geomTools_.shiftXY(php.layerCenter_[copy], waferSize);
1645  php.xLayerHex_.emplace_back(xyoff.first);
1646  php.yLayerHex_.emplace_back(xyoff.second);
1647 #ifdef EDM_ML_DEBUG
1648  edm::LogVerbatim("HGCalGeom") << "Layer[" << k << "] Off " << copy << ":" << php.layerCenter_[copy] << " Shift "
1649  << xyoff.first << ":" << xyoff.second;
1650 #endif
1651  }
1652 }

References funct::abs(), HGCalParameters::hgtrap::alpha, HGCalParameters::hgtrap::bl, HGCalParameters::hgtrap::cellSize, HGCalParameters::cellThickness_, HGCalParameters::choiceType_, filterCSVwithJSON::copy, distTCMET_cfi::corner, TauDecayModes::dec, HGCalParameters::defineFull_, PVValHelper::dy, HGCalParameters::hgtrap::dz, PVValHelper::dz, HGCalParameters::fillModule(), HGCalParameters::fracAreaMin_, geomTools_, HGCalParameters::getModule(), HGCalWaferMask::getTypeMode(), HGCalParameters::hgtrap::h, mps_fire::i, triggerObjects_cff::id, createfilelist::int, dqmdumpme::k, HGCalParameters::k_CornerSize, HGCalParameters::k_ScaleFromDDD, HGCalParameters::k_ScaleToDDD, HGCalParameters::hgtrap::lay, HGCalParameters::layer_, HGCalParameters::layerCenter_, HGCalParameters::layerIndex_, HGCalParameters::layerOffset_, SiStripPI::max, N, HGCalParameters::nCornerCut_, EgHLTOffHistBins_cfi::nr, HGCalParameters::nSectors_, dttmaxenums::R, alignCSCRings::r, diffTwoXMLs::r1, HGCalParameters::radius100to200_, HGCalParameters::radius200to300_, HGCalParameters::rLimit_, HGCalParameters::rMaxLayHex_, HGCalParameters::rMinLayHex_, HGCalParameters::sensorSeparation_, HGCalGeomTools::shiftXY(), sqrt3_, HGCalParameters::hgtrap::tl, HGCalParameters::typesInLayers_, findQualityFiles::v, HGCalParameters::waferCopy_, HGCalGeomTools::waferCorner(), HGCalWaferIndex::waferIndex(), HGCalWaferIndex::waferLayer(), HGCalParameters::waferMaskMode_, HGCalParameters::waferPosX_, HGCalParameters::waferPosY_, HGCalParameters::waferR_, HGCalParameters::wafersInLayers_, HGCalParameters::waferSize_, HGCalParameters::waferTypeL_, HGCalParameters::waferTypes_, HGCalParameters::waferTypeT_, HGCalWaferIndex::waferU(), HGCalParameters::waferUVMax_, HGCalParameters::waferUVMaxLayer_, HGCalWaferIndex::waferV(), LaserClient_cfi::wl, HGCalParameters::xLayerHex_, HGCalParameters::yLayerHex_, HGCalParameters::zLayerHex_, and HGCalParameters::zMinForRad_.

◆ rescale()

void HGCalGeomParameters::rescale ( std::vector< double > &  v,
const double  s 
)
private

Definition at line 1881 of file HGCalGeomParameters.cc.

1881  {
1882  std::for_each(v.begin(), v.end(), [s](double& n) { n *= s; });
1883 }

References dqmiodumpmetadata::n, alignCSCRings::s, and findQualityFiles::v.

Referenced by loadSpecParsHexagon(), loadSpecParsHexagon8(), and loadSpecParsTrapezoid().

◆ resetZero()

void HGCalGeomParameters::resetZero ( std::vector< double > &  v)
private

Definition at line 1885 of file HGCalGeomParameters.cc.

1885  {
1886  for (auto n : v)
1887  if (std::abs(n) < tolmin)
1888  n = 0;
1889 }

References funct::abs(), dqmiodumpmetadata::n, tolmin, and findQualityFiles::v.

Member Data Documentation

◆ geomTools_

HGCalGeomTools HGCalGeomParameters::geomTools_
private

Definition at line 124 of file HGCalGeomParameters.h.

Referenced by loadWaferHexagon8().

◆ scintillatorFile

constexpr static int HGCalGeomParameters::scintillatorFile = 4
staticconstexprprivate

Definition at line 123 of file HGCalGeomParameters.h.

Referenced by loadSpecParsTrapezoid().

◆ siliconFileEE

constexpr static int HGCalGeomParameters::siliconFileEE = 2
staticconstexprprivate

Definition at line 121 of file HGCalGeomParameters.h.

Referenced by loadSpecParsHexagon8().

◆ siliconFileHE

constexpr static int HGCalGeomParameters::siliconFileHE = 3
staticconstexprprivate

Definition at line 122 of file HGCalGeomParameters.h.

Referenced by loadSpecParsHexagon8().

◆ sqrt3_

const double HGCalGeomParameters::sqrt3_
private

Definition at line 125 of file HGCalGeomParameters.h.

Referenced by loadWaferHexagon8().

◆ tan30deg_

constexpr static double HGCalGeomParameters::tan30deg_ = 0.5773502693
staticconstexprprivate

Definition at line 120 of file HGCalGeomParameters.h.

Referenced by loadGeometryHexagon().

◆ tileHEX1_

std::vector<int> HGCalGeomParameters::tileHEX1_
private

Definition at line 129 of file HGCalGeomParameters.h.

Referenced by loadSpecParsTrapezoid().

◆ tileHEX2_

std::vector<int> HGCalGeomParameters::tileHEX2_
private

Definition at line 129 of file HGCalGeomParameters.h.

Referenced by loadSpecParsTrapezoid().

◆ tileHEX3_

std::vector<int> HGCalGeomParameters::tileHEX3_
private

Definition at line 129 of file HGCalGeomParameters.h.

Referenced by loadSpecParsTrapezoid().

◆ tileHEX4_

std::vector<int> HGCalGeomParameters::tileHEX4_
private

Definition at line 129 of file HGCalGeomParameters.h.

Referenced by loadSpecParsTrapezoid().

◆ tileIndx_

std::vector<int> HGCalGeomParameters::tileIndx_
private

Definition at line 128 of file HGCalGeomParameters.h.

Referenced by loadSpecParsTrapezoid().

◆ tileRingMax_

std::vector<int> HGCalGeomParameters::tileRingMax_
private

Definition at line 131 of file HGCalGeomParameters.h.

Referenced by loadSpecParsTrapezoid().

◆ tileRingMin_

std::vector<int> HGCalGeomParameters::tileRingMin_
private

Definition at line 131 of file HGCalGeomParameters.h.

Referenced by loadSpecParsTrapezoid().

◆ tileRMax_

std::vector<double> HGCalGeomParameters::tileRMax_
private

Definition at line 130 of file HGCalGeomParameters.h.

Referenced by loadSpecParsTrapezoid().

◆ tileRMin_

std::vector<double> HGCalGeomParameters::tileRMin_
private

Definition at line 130 of file HGCalGeomParameters.h.

Referenced by loadSpecParsTrapezoid().

◆ tileSiPM_

std::vector<int> HGCalGeomParameters::tileSiPM_
private

Definition at line 128 of file HGCalGeomParameters.h.

Referenced by loadSpecParsTrapezoid().

◆ tileType_

std::vector<int> HGCalGeomParameters::tileType_
private

Definition at line 128 of file HGCalGeomParameters.h.

Referenced by loadSpecParsTrapezoid().

◆ waferIndex_

std::vector<int> HGCalGeomParameters::waferIndex_
private

Definition at line 127 of file HGCalGeomParameters.h.

Referenced by loadSpecParsHexagon8().

◆ waferOrien_

std::vector<int> HGCalGeomParameters::waferOrien_
private

Definition at line 127 of file HGCalGeomParameters.h.

Referenced by loadSpecParsHexagon8().

◆ waferParts_

std::vector<int> HGCalGeomParameters::waferParts_
private

Definition at line 127 of file HGCalGeomParameters.h.

Referenced by loadSpecParsHexagon8().

◆ waferSize_

double HGCalGeomParameters::waferSize_
private

◆ waferTypes_

std::vector<int> HGCalGeomParameters::waferTypes_
private

Definition at line 127 of file HGCalGeomParameters.h.

Referenced by loadSpecParsHexagon8().

HGCalParameters::layerFrontBH_
std::vector< int > layerFrontBH_
Definition: HGCalParameters.h:154
HGCalParameters::k_ScaleFromDD4HepToG4
static constexpr double k_ScaleFromDD4HepToG4
Definition: HGCalParameters.h:36
HGCalParameters::trformRotXX_
std::vector< double > trformRotXX_
Definition: HGCalParameters.h:88
HGCalGeomParameters::layerParameters
Definition: HGCalGeomParameters.h:80
HGCalParameters::hgtrap::bl
float bl
Definition: HGCalParameters.h:43
DDAxes::y
HGCalParameters::tol
static constexpr double tol
Definition: HGCalParameters.h:39
testProducerWithPsetDescEmpty_cfi.i2
i2
Definition: testProducerWithPsetDescEmpty_cfi.py:46
HGCalWaferIndex::waferV
static int32_t waferV(const int32_t index)
Definition: HGCalWaferIndex.cc:42
HGCalParameters::cellCoarseHalf_
std::vector< bool > cellCoarseHalf_
Definition: HGCalParameters.h:121
HGCalGeomTools::waferCorner
static std::pair< int32_t, int32_t > waferCorner(double xpos, double ypos, double r, double R, double rMin, double rMax, bool oldBug=false)
Definition: HGCalGeomTools.cc:219
HGCalParameters::scaleTrForm
void scaleTrForm(double)
Definition: HGCalParameters.cc:150
HGCalParameters::nSectors_
int nSectors_
Definition: HGCalParameters.h:68
mps_fire.i
i
Definition: mps_fire.py:355
geometryCSVtoXML.zz
zz
Definition: geometryCSVtoXML.py:19
DDPolyhedra::rMaxVec
std::vector< double > rMaxVec(void) const
Definition: DDSolid.cc:338
HGCalParameters::trformRotYY_
std::vector< double > trformRotYY_
Definition: HGCalParameters.h:92
HGCalGeomParameters::loadGeometryHexagon8
void loadGeometryHexagon8(const DDFilteredView &_fv, HGCalParameters &php, int firstLayer)
Definition: HGCalGeomParameters.cc:680
HGCalParameters::firstLayer_
int firstLayer_
Definition: HGCalParameters.h:166
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
HGCalGeomParameters::siliconFileEE
constexpr static int siliconFileEE
Definition: HGCalGeomParameters.h:121
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
HGCalParameters::moduleTlR_
std::vector< double > moduleTlR_
Definition: HGCalParameters.h:79
HGCalParameters::moduleBlS_
std::vector< double > moduleBlS_
Definition: HGCalParameters.h:71
HGCalParameters::zLayerHex_
std::vector< double > zLayerHex_
Definition: HGCalParameters.h:106
HGCalParameters::moduleHS_
std::vector< double > moduleHS_
Definition: HGCalParameters.h:73
HGCalGeomParameters::waferSize_
double waferSize_
Definition: HGCalGeomParameters.h:126
HGCalParameters::choiceType_
int choiceType_
Definition: HGCalParameters.h:148
HGCalGeomParameters::scintillatorFile
constexpr static int scintillatorFile
Definition: HGCalGeomParameters.h:123
LaserClient_cfi.wl
wl
Definition: LaserClient_cfi.py:46
HGCalParameters::levelZSide_
int levelZSide_
Definition: HGCalParameters.h:130
HGCalParameters::zFrontMin_
std::vector< double > zFrontMin_
Definition: HGCalParameters.h:133
HGCalParameters::getModule
hgtrap getModule(unsigned int k, bool reco) const
Definition: HGCalParameters.cc:35
DDPolyhedra::zVec
std::vector< double > zVec(void) const
Definition: DDSolid.cc:324
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
findQualityFiles.rr
string rr
Definition: findQualityFiles.py:185
HGCalGeomParameters::cellParameters
Definition: HGCalGeomParameters.h:84
HGCalParameters::hgtrform::subsec
int subsec
Definition: HGCalParameters.h:47
HGCalParameters::rMaxLayHex_
std::vector< double > rMaxLayHex_
Definition: HGCalParameters.h:108
HGCalParameters::trformRotYX_
std::vector< double > trformRotYX_
Definition: HGCalParameters.h:89
HGCalParameters::hgtrap::cellSize
float cellSize
Definition: HGCalParameters.h:43
HGCalParameters::cellFineY_
std::vector< double > cellFineY_
Definition: HGCalParameters.h:115
DDFilteredView::mergedSpecifics
DDsvalues_type mergedSpecifics() const
Definition: DDFilteredView.cc:42
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
DDSolidShape::ddpolyhedra_rrz
DDFilteredView::logicalPart
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
Definition: DDFilteredView.cc:16
HGCalParameters::k_CornerSize
static constexpr uint32_t k_CornerSize
Definition: HGCalParameters.h:38
testProducerWithPsetDescEmpty_cfi.i1
i1
Definition: testProducerWithPsetDescEmpty_cfi.py:45
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
DDFilteredView::copyNumbers
nav_type copyNumbers() const
return the stack of copy numbers
Definition: DDFilteredView.cc:193
distTCMET_cfi.corner
corner
Definition: distTCMET_cfi.py:38
HGCalParameters::slopeTop_
std::vector< double > slopeTop_
Definition: HGCalParameters.h:162
HGCalParameters::layerIndex_
std::vector< int > layerIndex_
Definition: HGCalParameters.h:98
HGCalGeomParameters::tileRMax_
std::vector< double > tileRMax_
Definition: HGCalGeomParameters.h:130
HGCalParameters::yLayerHex_
std::vector< double > yLayerHex_
Definition: HGCalParameters.h:105
HGCalGeomParameters::cellPosition
std::pair< double, double > cellPosition(const std::vector< cellParameters > &wafers, std::vector< cellParameters >::const_iterator &itrf, int wafer, double xx, double yy)
Definition: HGCalGeomParameters.cc:1854
HGCalParameters::scintCellSize
double scintCellSize(const int layer) const
Definition: HGCalParameters.h:61
HGCalParameters::hgtrap::alpha
float alpha
Definition: HGCalParameters.h:43
DDPolyhedra::rMinVec
std::vector< double > rMinVec(void) const
Definition: DDSolid.cc:331
HGCalParameters::cellFine_
std::vector< int > cellFine_
Definition: HGCalParameters.h:126
HGCalParameters::nCellsCoarse_
int nCellsCoarse_
Definition: HGCalParameters.h:137
DDExtrudedPolygon::xVec
std::vector< double > xVec(void) const
Definition: DDSolid.cc:374
HGCalParameters::wafersInLayers_
wafer_map wafersInLayers_
Definition: HGCalParameters.h:170
HGCalParameters::waferSize_
double waferSize_
Definition: HGCalParameters.h:138
HGCalGeomParameters::loadGeometryHexagon
void loadGeometryHexagon(const DDFilteredView &_fv, HGCalParameters &php, const std::string &sdTag1, const DDCompactView *cpv, const std::string &sdTag2, const std::string &sdTag3, HGCalGeometryMode::WaferMode mode)
Definition: HGCalGeomParameters.cc:43
HGCalGeomTools::shiftXY
std::pair< double, double > shiftXY(int waferPosition, double waferSize) const
Definition: HGCalGeomTools.cc:166
HGCalParameters::hgtrap::dz
float dz
Definition: HGCalParameters.h:43
DDAxes::x
cms::dd::DDTubs
Definition: DDShapes.h:30
cms::DDFilteredView
Definition: DDFilteredView.h:65
findQualityFiles.v
v
Definition: findQualityFiles.py:179
dbl_to_int
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
Definition: DDutils.h:7
HGCalParameters::moduleLayR_
std::vector< int > moduleLayR_
Definition: HGCalParameters.h:77
HGCalParameters::hgtrform::zp
int zp
Definition: HGCalParameters.h:47
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
HGCalParameters::waferUVMaxLayer_
std::vector< int > waferUVMaxLayer_
Definition: HGCalParameters.h:143
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
HGCalParameters::iradMaxBH_
std::vector< int > iradMaxBH_
Definition: HGCalParameters.h:158
dqmdumpme.first
first
Definition: dqmdumpme.py:55
DDVectorGetter::get
std::vector< double > get(const std::string &)
Definition: DDVectorGetter.h:28
HGCalParameters::moduleBlR_
std::vector< double > moduleBlR_
Definition: HGCalParameters.h:78
DD3Vector
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
Definition: DDTranslation.h:6
HGCalParameters::boundR_
std::vector< double > boundR_
Definition: HGCalParameters.h:124
DDExtrudedPolygon::zVec
std::vector< double > zVec(void) const
Definition: DDSolid.cc:383
HGCalGeomParameters::geomTools_
HGCalGeomTools geomTools_
Definition: HGCalGeomParameters.h:124
HGCalGeomParameters::waferParts_
std::vector< int > waferParts_
Definition: HGCalGeomParameters.h:127
HGCalParameters::fillModule
void fillModule(const hgtrap &mytr, bool reco)
Definition: HGCalParameters.cc:15
HGCalParameters::waferPosY_
std::vector< double > waferPosY_
Definition: HGCalParameters.h:113
HGCalParameters::moduleTlS_
std::vector< double > moduleTlS_
Definition: HGCalParameters.h:72
HGCalParameters::sensorSeparation_
double sensorSeparation_
Definition: HGCalParameters.h:140
HGCalGeomParameters::rescale
void rescale(std::vector< double > &, const double s)
Definition: HGCalGeomParameters.cc:1881
HGCalParameters::trformRotZY_
std::vector< double > trformRotZY_
Definition: HGCalParameters.h:93
HGCalParameters::trformTranX_
std::vector< double > trformTranX_
Definition: HGCalParameters.h:85
HGCalGeomParameters::getDDDArray
std::vector< double > getDDDArray(const std::string &str, const DDsvalues_type &sv, const int nmin)
Definition: HGCalGeomParameters.cc:1827
HGCalParameters::moduleDzR_
std::vector< double > moduleDzR_
Definition: HGCalParameters.h:81
DDSolid::shape
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:119
alignCSCRings.s
s
Definition: alignCSCRings.py:92
HGCalGeomParameters::tan30deg_
constexpr static double tan30deg_
Definition: HGCalGeomParameters.h:120
HGCalParameters::hgtrform::h3v
CLHEP::Hep3Vector h3v
Definition: HGCalParameters.h:48
HGCalParameters::trformIndex_
std::vector< uint32_t > trformIndex_
Definition: HGCalParameters.h:84
HGCalParameters::hgtrap::tl
float tl
Definition: HGCalParameters.h:43
HGCalParameters::radiusLayer_
std::vector< double > radiusLayer_[2]
Definition: HGCalParameters.h:156
cms::DDFilter
Definition: DDFilteredView.h:54
HGCalParameters::cellFineHalf_
std::vector< bool > cellFineHalf_
Definition: HGCalParameters.h:117
HGCalParameters::radius100to200_
std::vector< double > radius100to200_
Definition: HGCalParameters.h:146
HGCalGeomParameters::tileType_
std::vector< int > tileType_
Definition: HGCalGeomParameters.h:128
DDSolidShape::ddtubs
cms::dd::name
std::string name(Mapping a, V value)
Definition: DDSolidShapes.h:31
HGCalParameters::layerGroup_
std::vector< int > layerGroup_
Definition: HGCalParameters.h:99
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:122
HGCalParameters::wafer_map
std::unordered_map< int32_t, int32_t > wafer_map
Definition: HGCalParameters.h:25
HGCalParameters::radiusMixBoundary_
std::vector< double > radiusMixBoundary_
Definition: HGCalParameters.h:152
HGCalParameters::k_ScaleFromDDDToG4
static constexpr double k_ScaleFromDDDToG4
Definition: HGCalParameters.h:32
PVValHelper::eta
Definition: PVValidationHelpers.h:69
cms::DDFilteredView::get
T get(const std::string &) const
extract attribute value
HGCalGeomParameters::waferOrien_
std::vector< int > waferOrien_
Definition: HGCalGeomParameters.h:127
DDFilteredView::next
bool next()
set current node to the next node in the filtered tree
Definition: DDFilteredView.cc:67
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
HGCalParameters::waferPosX_
std::vector< double > waferPosX_
Definition: HGCalParameters.h:112
HGCalParameters::waferUVMax_
int waferUVMax_
Definition: HGCalParameters.h:142
DDSolidShape::ddpolyhedra_rz
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:226
DDBase::name
const N & name() const
Definition: DDBase.h:59
DDAxes::z
HGCalGeomParameters::tileHEX4_
std::vector< int > tileHEX4_
Definition: HGCalGeomParameters.h:129
str
#define str(s)
Definition: TestProcessor.cc:48
p2
double p2[4]
Definition: TauolaWrapper.h:90
cms::dd::noNamespace
std::string_view noNamespace(std::string_view)
Definition: Filter.cc:63
N
#define N
Definition: blowfish.cc:9
HGCalParameters::rMinLayHex_
std::vector< double > rMinLayHex_
Definition: HGCalParameters.h:107
DDfetch
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:79
HGCalGeomParameters::tileHEX2_
std::vector< int > tileHEX2_
Definition: HGCalGeomParameters.h:129
GetRecoTauVFromDQM_MC_cff.kk
kk
Definition: GetRecoTauVFromDQM_MC_cff.py:84
HGCalParameters::typesInLayers_
wafer_map typesInLayers_
Definition: HGCalParameters.h:171
HGCalGeomParameters::loadSpecParsTrapezoid
void loadSpecParsTrapezoid(const DDFilteredView &fv, HGCalParameters &php)
Definition: HGCalGeomParameters.cc:1170
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
HGCalGeomParameters::waferIndex_
std::vector< int > waferIndex_
Definition: HGCalGeomParameters.h:127
dqmdumpme.k
k
Definition: dqmdumpme.py:60
HGCalParameters::waferCopy_
std::vector< int > waferCopy_
Definition: HGCalParameters.h:109
Point3DBase< float, GlobalTag >
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
cuda_std::lower_bound
__host__ constexpr __device__ RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
Definition: cudastdAlgorithm.h:27
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HGCalParameters::iradMinBH_
std::vector< int > iradMinBH_
Definition: HGCalParameters.h:157
HGCalWaferIndex::waferU
static int32_t waferU(const int32_t index)
Definition: HGCalWaferIndex.cc:37
geometryCSVtoXML.xy
xy
Definition: geometryCSVtoXML.py:19
HGCalParameters::trformRotZX_
std::vector< double > trformRotZX_
Definition: HGCalParameters.h:90
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HGCalGeomParameters::tileHEX1_
std::vector< int > tileHEX1_
Definition: HGCalGeomParameters.h:129
HGCalParameters::cellSize_
std::vector< double > cellSize_
Definition: HGCalParameters.h:69
edm::LogWarning
Definition: MessageLogger.h:141
HGCalParameters::trformRotXZ_
std::vector< double > trformRotXZ_
Definition: HGCalParameters.h:94
DDTubs::rIn
double rIn(void) const
Definition: DDSolid.cc:452
HGCalParameters::moduleAlphaS_
std::vector< double > moduleAlphaS_
Definition: HGCalParameters.h:75
HGCalParameters::nCellsFine_
int nCellsFine_
Definition: HGCalParameters.h:136
HGCalParameters::firstModule_
std::vector< int > firstModule_
Definition: HGCalParameters.h:160
idealTransformation.rotation
dictionary rotation
Definition: idealTransformation.py:1
HGCalWaferMask::getTypeMode
static std::pair< int, int > getTypeMode(const double &xpos, const double &ypos, const double &delX, const double &delY, const double &rin, const double &rout, const int &waferType, const int &mode, bool deug=false)
Definition: HGCalWaferMask.cc:336
HGCalParameters::depth_
std::vector< int > depth_
Definition: HGCalParameters.h:101
EgHLTOffHistBins_cfi.nr
nr
Definition: EgHLTOffHistBins_cfi.py:4
HGCalParameters::rMaxFront_
std::vector< double > rMaxFront_
Definition: HGCalParameters.h:164
geometryCSVtoXML.yy
yy
Definition: geometryCSVtoXML.py:19
math::XYZPointD
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double > > XYZPointD
point in space with cartesian internal representation
Definition: Point3D.h:8
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
cms::DDSolidShapeMap
const std::array< const cms::dd::NameValuePair< DDSolidShape >, 19 > DDSolidShapeMap
Definition: DDSolidShapes.h:84
HGCalParameters::hgtrform::sec
int sec
Definition: HGCalParameters.h:47
HGCalParameters::cellCoarseY_
std::vector< double > cellCoarseY_
Definition: HGCalParameters.h:119
DDTubs::rOut
double rOut(void) const
Definition: DDSolid.cc:454
HGCalParameters::rLimit_
std::vector< double > rLimit_
Definition: HGCalParameters.h:125
HGCalParameters::trformTranZ_
std::vector< double > trformTranZ_
Definition: HGCalParameters.h:87
HGCalParameters::fillTrForm
void fillTrForm(const hgtrform &mytr)
Definition: HGCalParameters.cc:67
HGCalParameters::scintType
int scintType(const int layer) const
Definition: HGCalParameters.h:62
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
createfilelist.int
int
Definition: createfilelist.py:10
HGCalParameters::scintCells
int scintCells(const int layer) const
Definition: HGCalParameters.h:60
HGCalParameters::hgtrap::h
float h
Definition: HGCalParameters.h:43
DDSpecificsHasNamedValueFilter
Definition: DDFilter.h:60
HGCalParameters::layerGroupO_
std::vector< int > layerGroupO_
Definition: HGCalParameters.h:123
value
Definition: value.py:1
DDName::name
const std::string & name() const
Returns the name.
Definition: DDName.cc:40
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:27
HGCalParameters::nPhiBinBH_
std::vector< int > nPhiBinBH_
Definition: HGCalParameters.h:153
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
edm::LogVerbatim
Definition: MessageLogger.h:297
p1
double p1[4]
Definition: TauolaWrapper.h:89
HGCalParameters::trformRotXY_
std::vector< double > trformRotXY_
Definition: HGCalParameters.h:91
PVValHelper::dy
Definition: PVValidationHelpers.h:49
HGCalParameters::layerGroupM_
std::vector< int > layerGroupM_
Definition: HGCalParameters.h:122
HGCalParameters::waferR_
double waferR_
Definition: HGCalParameters.h:128
HGCalParameters::nCornerCut_
int nCornerCut_
Definition: HGCalParameters.h:149
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:28
cms::dd::compareEqual
bool compareEqual(std::string_view, std::string_view)
DDExtrudedPolygon
Definition: DDSolid.h:238
HGCalGeomParameters::waferTypes_
std::vector< int > waferTypes_
Definition: HGCalGeomParameters.h:127
HGCalParameters::layerOffset_
int layerOffset_
Definition: HGCalParameters.h:168
HGCalParameters::waferThick_
double waferThick_
Definition: HGCalParameters.h:139
HGCalParameters::hgtrform::lay
int lay
Definition: HGCalParameters.h:47
HGCalParameters::trformTranY_
std::vector< double > trformTranY_
Definition: HGCalParameters.h:86
HGCalParameters::cellCoarse_
std::vector< int > cellCoarse_
Definition: HGCalParameters.h:127
HGCalParameters::k_ScaleFromDDD
static constexpr double k_ScaleFromDDD
Definition: HGCalParameters.h:30
HGCalParameters::waferTypeT_
std::vector< int > waferTypeT_
Definition: HGCalParameters.h:111
DDPolyhedra
Definition: DDSolid.h:224
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HGCalGeomParameters::loadCellParsHexagon
void loadCellParsHexagon(const DDCompactView *cpv, HGCalParameters &php)
Definition: HGCalGeomParameters.cc:1654
HGCalParameters::waferInfo
Definition: HGCalParameters.h:15
HGCalParameters::k_ScaleToDDD
static constexpr double k_ScaleToDDD
Definition: HGCalParameters.h:31
HGCalParameters::tileRingR_
std::vector< std::pair< double, double > > tileRingR_
Definition: HGCalParameters.h:176
HGCalParameters::moduleLayS_
std::vector< int > moduleLayS_
Definition: HGCalParameters.h:70
HGCalParameters::k_ScaleFromDD4Hep
static constexpr double k_ScaleFromDD4Hep
Definition: HGCalParameters.h:34
HGCalGeomParameters::siliconFileHE
constexpr static int siliconFileHE
Definition: HGCalGeomParameters.h:122
HGCalParameters::tileRingRange_
std::vector< std::pair< int, int > > tileRingRange_
Definition: HGCalParameters.h:177
LaserClient_cfi.high
high
Definition: LaserClient_cfi.py:50
type
type
Definition: HCALResponse.h:21
HGCalGeomParameters::loadSpecParsHexagon
void loadSpecParsHexagon(const DDFilteredView &fv, HGCalParameters &php, const DDCompactView *cpv, const std::string &sdTag1, const std::string &sdTag2)
Definition: HGCalGeomParameters.cc:886
HGCalParameters::waferMaskMode_
int waferMaskMode_
Definition: HGCalParameters.h:173
HGCalParameters::addTrForm
void addTrForm(const CLHEP::Hep3Vector &h3v)
Definition: HGCalParameters.cc:141
HGCalParameters::zMinForRad_
double zMinForRad_
Definition: HGCalParameters.h:151
HGCalParameters::waferInfoMap_
waferInfo_map waferInfoMap_
Definition: HGCalParameters.h:174
HGCalParameters::waferT_map
std::unordered_map< int32_t, std::pair< int32_t, int32_t > > waferT_map
Definition: HGCalParameters.h:26
HGCalParameters::slopeMin_
std::vector< double > slopeMin_
Definition: HGCalParameters.h:132
HGCalParameters::depthIndex_
std::vector< int > depthIndex_
Definition: HGCalParameters.h:102
HGCalParameters::defineFull_
bool defineFull_
Definition: HGCalParameters.h:144
HGCalParameters::xLayerHex_
std::vector< double > xLayerHex_
Definition: HGCalParameters.h:104
PVValHelper::dz
Definition: PVValidationHelpers.h:50
DDValue
Definition: DDValue.h:21
diffTwoXMLs.r1
r1
Definition: diffTwoXMLs.py:53
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
HGCalParameters::waferTypes_
waferT_map waferTypes_
Definition: HGCalParameters.h:172
DDFilteredView::translation
const DDTranslation & translation() const
The absolute translation of the current node.
Definition: DDFilteredView.cc:26
HGCalGeometryMode::Polyhedra
Definition: HGCalGeometryMode.h:26
relativeConstraints.value
value
Definition: relativeConstraints.py:53
Exception
Definition: hltDiff.cc:246
HGCalParameters::moduleDzS_
std::vector< double > moduleDzS_
Definition: HGCalParameters.h:74
HGCalParameters::layerCenter_
std::vector< int > layerCenter_
Definition: HGCalParameters.h:169
HGCalParameters::rMinFront_
std::vector< double > rMinFront_
Definition: HGCalParameters.h:134
HGCalParameters::lastModule_
std::vector< int > lastModule_
Definition: HGCalParameters.h:161
HGCalParameters::tileInfo
Definition: HGCalParameters.h:19
HGCalGeomParameters::tileRMin_
std::vector< double > tileRMin_
Definition: HGCalGeomParameters.h:130
HGCalParameters::cellFineX_
std::vector< double > cellFineX_
Definition: HGCalParameters.h:114
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HGCalWaferIndex::waferIndex
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
Definition: HGCalWaferIndex.cc:17
DDSolid
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
DDSpecificsMatchesValueFilter
Definition: DDFilter.h:70
HGCalParameters::cellThickness_
std::vector< double > cellThickness_
Definition: HGCalParameters.h:145
DDFilteredView::rotation
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
Definition: DDFilteredView.cc:28
HGCalParameters::fracAreaMin_
double fracAreaMin_
Definition: HGCalParameters.h:150
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
HGCalParameters::minTileSize_
double minTileSize_
Definition: HGCalParameters.h:159
HGCalGeomParameters::sqrt3_
const double sqrt3_
Definition: HGCalGeomParameters.h:125
HGCalParameters::rMinLayerBH_
std::vector< double > rMinLayerBH_
Definition: HGCalParameters.h:155
HGCalParameters::hgtrform
Definition: HGCalParameters.h:46
tolmin
const double tolmin
Definition: HGCalGeomParameters.cc:28
DDFilteredView
Definition: DDFilteredView.h:20
HGCalGeomParameters::loadSpecParsHexagon8
void loadSpecParsHexagon8(const DDFilteredView &fv, HGCalParameters &php)
Definition: HGCalGeomParameters.cc:975
HGCalParameters::waferTypeL_
std::vector< int > waferTypeL_
Definition: HGCalParameters.h:110
HGCalParameters::cellCoarseX_
std::vector< double > cellCoarseX_
Definition: HGCalParameters.h:118
HGCalGeomParameters::tileIndx_
std::vector< int > tileIndx_
Definition: HGCalGeomParameters.h:128
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HGCalParameters::moduleHR_
std::vector< double > moduleHR_
Definition: HGCalParameters.h:80
HGCalGeomParameters::tileRingMax_
std::vector< int > tileRingMax_
Definition: HGCalGeomParameters.h:131
HGCalParameters::layer_
std::vector< int > layer_
Definition: HGCalParameters.h:97
dummy
Definition: DummySelector.h:38
HGCalParameters::trformRotYZ_
std::vector< double > trformRotYZ_
Definition: HGCalParameters.h:95
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
HGCalParameters::depthLayerF_
std::vector< int > depthLayerF_
Definition: HGCalParameters.h:103
HGCalParameters::layer_map
std::vector< std::unordered_map< int32_t, int32_t > > layer_map
Definition: HGCalParameters.h:24
HGCalGeomParameters::tileSiPM_
std::vector< int > tileSiPM_
Definition: HGCalGeomParameters.h:128
CommonMethods.cp
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)
Definition: CommonMethods.py:192
HGCalParameters::zFrontTop_
std::vector< double > zFrontTop_
Definition: HGCalParameters.h:163
HGCalParameters::hgtrap
Definition: HGCalParameters.h:41
HGCalParameters::hgtrform::hr
CLHEP::HepRotation hr
Definition: HGCalParameters.h:49
DDsvalues_type
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
HGCalParameters::trformRotZZ_
std::vector< double > trformRotZZ_
Definition: HGCalParameters.h:96
dttmaxenums::R
Definition: DTTMax.h:29
DDLogicalPart::solid
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
Definition: DDLogicalPart.cc:120
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
HGCalParameters::levelT_
std::vector< int > levelT_
Definition: HGCalParameters.h:129
HGCalParameters::zRanges_
std::vector< double > zRanges_
Definition: HGCalParameters.h:165
LaserClient_cfi.low
low
Definition: LaserClient_cfi.py:52
PVValHelper::dx
Definition: PVValidationHelpers.h:48
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8
HGCalParameters::moduleAlphaR_
std::vector< double > moduleAlphaR_
Definition: HGCalParameters.h:82
HGCalParameters::hgtrap::lay
int lay
Definition: HGCalParameters.h:42
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19
HGCalWaferIndex::waferLayer
static int32_t waferLayer(const int32_t index)
Definition: HGCalWaferIndex.cc:35
HGCalParameters::radius200to300_
std::vector< double > radius200to300_
Definition: HGCalParameters.h:147
HGCalGeomParameters::tileHEX3_
std::vector< int > tileHEX3_
Definition: HGCalGeomParameters.h:129
HGCalParameters::tileInfoMap_
tileInfo_map tileInfoMap_
Definition: HGCalParameters.h:175
DDTubs
Definition: DDSolid.h:255
HGCalGeomParameters::tileRingMin_
std::vector< int > tileRingMin_
Definition: HGCalGeomParameters.h:131
HGCalParameters::copiesInLayers_
layer_map copiesInLayers_
Definition: HGCalParameters.h:135