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 loadSpecParsHexagon8 (HGCalParameters &php, const std::vector< int > &waferIndex, const std::vector< int > &waferTypes, const std::vector< int > &waferParts, const std::vector< int > &waferOrien)
 
void loadSpecParsTrapezoid (HGCalParameters &php)
 
void loadSpecParsTrapezoid (HGCalParameters &php, const std::vector< int > &tileIndx, const std::vector< int > &tileType, const std::vector< int > &tileSiPM, const std::vector< int > &tileHEX1, const std::vector< int > &tileHEX2, const std::vector< int > &tileHEX3, const std::vector< int > &tileHEX4, const std::vector< double > &tileRMin, const std::vector< double > &tileRMax, const std::vector< int > &tileRingMin, const std::vector< int > &tileRingMax)
 
void rescale (std::vector< double > &, const double s)
 
void resetZero (std::vector< double > &)
 

Private Attributes

HGCalGeomTools geomTools_
 
const double sqrt3_
 
double waferSize_
 

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 29 of file HGCalGeomParameters.cc.

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

◆ ~HGCalGeomParameters()

HGCalGeomParameters::~HGCalGeomParameters ( )

Definition at line 36 of file HGCalGeomParameters.cc.

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

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 1961 of file HGCalGeomParameters.cc.

1966  {
1967  if (itrf == wafers.end()) {
1968  for (std::vector<HGCalGeomParameters::cellParameters>::const_iterator itr = wafers.begin(); itr != wafers.end();
1969  ++itr) {
1970  if (itr->wafer == wafer) {
1971  itrf = itr;
1972  break;
1973  }
1974  }
1975  }
1976  double dx(0), dy(0);
1977  if (itrf != wafers.end()) {
1978  dx = (xx - itrf->xyz.x());
1979  if (std::abs(dx) < tolerance)
1980  dx = 0;
1981  dy = (yy - itrf->xyz.y());
1982  if (std::abs(dy) < tolerance)
1983  dy = 0;
1984  }
1985  return std::make_pair(dx, dy);
1986 }

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 1934 of file HGCalGeomParameters.cc.

1934  {
1935  DDValue value(str);
1936  if (DDfetch(&sv, value)) {
1937  const std::vector<double>& fvec = value.doubles();
1938  int nval = fvec.size();
1939  if (nmin > 0) {
1940  if (nval < nmin) {
1941  throw cms::Exception("DDException")
1942  << "HGCalGeomParameters: # of " << str << " bins " << nval << " < " << nmin << " ==> illegal";
1943  }
1944  } else {
1945  if (nval < 1 && nmin == 0) {
1946  throw cms::Exception("DDException")
1947  << "HGCalGeomParameters: # of " << str << " bins " << nval << " < 1 ==> illegal"
1948  << " (nmin=" << nmin << ")";
1949  }
1950  }
1951  return fvec;
1952  } else {
1953  if (nmin >= 0) {
1954  throw cms::Exception("DDException") << "HGCalGeomParameters: cannot get array " << str;
1955  }
1956  std::vector<double> fvec;
1957  return fvec;
1958  }
1959 }

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 1743 of file HGCalGeomParameters.cc.

1743  {
1744  for (auto const& it : vmap) {
1745  if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "waferFine")) {
1746  for (const auto& i : it.second)
1747  php.cellFine_.emplace_back(std::round(i));
1748  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "waferCoarse")) {
1749  for (const auto& i : it.second)
1750  php.cellCoarse_.emplace_back(std::round(i));
1751  }
1752  }
1753 
1754  loadCellParsHexagon(php);
1755 }

References HGCalParameters::cellCoarse_, HGCalParameters::cellFine_, mps_fire::i, and loadCellParsHexagon().

◆ loadCellParsHexagon() [2/3]

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

Definition at line 1728 of file HGCalGeomParameters.cc.

1728  {
1729  // Special parameters for cell parameters
1730  std::string attribute = "OnlyForHGCalNumbering";
1731  DDSpecificsHasNamedValueFilter filter1{attribute};
1732  DDFilteredView fv1(*cpv, filter1);
1733  bool ok = fv1.firstChild();
1734 
1735  if (ok) {
1736  php.cellFine_ = dbl_to_int(cpv->vector("waferFine"));
1737  php.cellCoarse_ = dbl_to_int(cpv->vector("waferCoarse"));
1738  }
1739 
1740  loadCellParsHexagon(php);
1741 }

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

Referenced by loadCellParsHexagon().

◆ loadCellParsHexagon() [3/3]

void HGCalGeomParameters::loadCellParsHexagon ( const HGCalParameters php)

Definition at line 1757 of file HGCalGeomParameters.cc.

1757  {
1758 #ifdef EDM_ML_DEBUG
1759  edm::LogVerbatim("HGCalGeom") << "HGCalLoadCellPars: " << php.cellFine_.size() << " rows for fine cells";
1760  for (unsigned int k = 0; k < php.cellFine_.size(); ++k)
1761  edm::LogVerbatim("HGCalGeom") << "[" << k << "]: " << php.cellFine_[k];
1762  edm::LogVerbatim("HGCalGeom") << "HGCalLoadCellPars: " << php.cellCoarse_.size() << " rows for coarse cells";
1763  for (unsigned int k = 0; k < php.cellCoarse_.size(); ++k)
1764  edm::LogVerbatim("HGCalGeom") << "[" << k << "]: " << php.cellCoarse_[k];
1765 #endif
1766 }

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

◆ loadCellTrapezoid()

void HGCalGeomParameters::loadCellTrapezoid ( HGCalParameters php)

Definition at line 1768 of file HGCalGeomParameters.cc.

1768  {
1769  php.xLayerHex_.resize(php.zLayerHex_.size(), 0);
1770  php.yLayerHex_.resize(php.zLayerHex_.size(), 0);
1771 #ifdef EDM_ML_DEBUG
1772  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: x|y|zLayerHex in array of size " << php.zLayerHex_.size();
1773  for (unsigned int k = 0; k < php.zLayerHex_.size(); ++k)
1774  edm::LogVerbatim("HGCalGeom") << "Layer[" << k << "] Shift " << php.xLayerHex_[k] << ":" << php.yLayerHex_[k] << ":"
1775  << php.zLayerHex_[k];
1776 #endif
1777  // Find the radius of each eta-partitions
1778 
1780  //Ring radii for each partition
1781  for (unsigned int k = 0; k < 2; ++k) {
1782  for (unsigned int kk = 0; kk < php.tileRingR_.size(); ++kk) {
1783  php.radiusLayer_[k].emplace_back(php.tileRingR_[kk].first);
1784 #ifdef EDM_ML_DEBUG
1785  double zv = ((k == 0) ? (php.zLayerHex_[php.layerFrontBH_[1] - php.firstLayer_])
1786  : (php.zLayerHex_[php.zLayerHex_.size() - 1]));
1787  double rv = php.radiusLayer_[k].back();
1788  double eta = -(std::log(std::tan(0.5 * std::atan(rv / zv))));
1789  edm::LogVerbatim("HGCalGeom") << "New [" << kk << "] new R = " << rv << " Eta = " << eta;
1790 #endif
1791  }
1792  }
1793  // Minimum and maximum radius index for each layer
1794  for (unsigned int k = 0; k < php.zLayerHex_.size(); ++k) {
1795  php.iradMinBH_.emplace_back(1 + php.tileRingRange_[k].first);
1796  php.iradMaxBH_.emplace_back(php.tileRingRange_[k].second);
1797 #ifdef EDM_ML_DEBUG
1798  int kk = php.scintType(php.firstLayer_ + (int)(k));
1799  edm::LogVerbatim("HGCalGeom") << "New Layer " << k << " Type " << kk << " Low edge " << php.iradMinBH_.back()
1800  << " Top edge " << php.iradMaxBH_.back();
1801 #endif
1802  }
1803  } else {
1804  //Ring radii for each partition
1805  for (unsigned int k = 0; k < 2; ++k) {
1806  double rmax = ((k == 0) ? (php.rMaxLayHex_[php.layerFrontBH_[1] - php.firstLayer_] - 1)
1807  : (php.rMaxLayHex_[php.rMaxLayHex_.size() - 1]));
1808  double rv = php.rMinLayerBH_[k];
1809  double zv = ((k == 0) ? (php.zLayerHex_[php.layerFrontBH_[1] - php.firstLayer_])
1810  : (php.zLayerHex_[php.zLayerHex_.size() - 1]));
1811  php.radiusLayer_[k].emplace_back(rv);
1812 #ifdef EDM_ML_DEBUG
1813  double eta = -(std::log(std::tan(0.5 * std::atan(rv / zv))));
1814  edm::LogVerbatim("HGCalGeom") << "Old [" << k << "] rmax " << rmax << " Z = " << zv
1815  << " dEta = " << php.cellSize_[k] << "\nOld[0] new R = " << rv << " Eta = " << eta;
1816  int kount(1);
1817 #endif
1818  while (rv < rmax) {
1819  double eta = -(php.cellSize_[k] + std::log(std::tan(0.5 * std::atan(rv / zv))));
1820  rv = zv * std::tan(2.0 * std::atan(std::exp(-eta)));
1821  php.radiusLayer_[k].emplace_back(rv);
1822 #ifdef EDM_ML_DEBUG
1823  edm::LogVerbatim("HGCalGeom") << "Old [" << kount << "] new R = " << rv << " Eta = " << eta;
1824  ++kount;
1825 #endif
1826  }
1827  }
1828  // Find minimum and maximum radius index for each layer
1829  for (unsigned int k = 0; k < php.zLayerHex_.size(); ++k) {
1830  int kk = php.scintType(php.firstLayer_ + (int)(k));
1831  std::vector<double>::iterator low, high;
1832  low = std::lower_bound(php.radiusLayer_[kk].begin(), php.radiusLayer_[kk].end(), php.rMinLayHex_[k]);
1833 #ifdef EDM_ML_DEBUG
1834  edm::LogVerbatim("HGCalGeom") << "Old [" << k << "] RLow = " << php.rMinLayHex_[k] << " pos "
1835  << (int)(low - php.radiusLayer_[kk].begin());
1836 #endif
1837  if (low == php.radiusLayer_[kk].begin())
1838  ++low;
1839  int irlow = (int)(low - php.radiusLayer_[kk].begin());
1840  double drlow = php.radiusLayer_[kk][irlow] - php.rMinLayHex_[k];
1841 #ifdef EDM_ML_DEBUG
1842  edm::LogVerbatim("HGCalGeom") << "irlow " << irlow << " dr " << drlow << " min " << php.minTileSize_;
1843 #endif
1844  if (drlow < php.minTileSize_) {
1845  ++irlow;
1846 #ifdef EDM_ML_DEBUG
1847  drlow = php.radiusLayer_[kk][irlow] - php.rMinLayHex_[k];
1848  edm::LogVerbatim("HGCalGeom") << "Modified irlow " << irlow << " dr " << drlow;
1849 #endif
1850  }
1851  high = std::lower_bound(php.radiusLayer_[kk].begin(), php.radiusLayer_[kk].end(), php.rMaxLayHex_[k]);
1852 #ifdef EDM_ML_DEBUG
1853  edm::LogVerbatim("HGCalGeom") << "Old [" << k << "] RHigh = " << php.rMaxLayHex_[k] << " pos "
1854  << (int)(high - php.radiusLayer_[kk].begin());
1855 #endif
1856  if (high == php.radiusLayer_[kk].end())
1857  --high;
1858  int irhigh = (int)(high - php.radiusLayer_[kk].begin());
1859  double drhigh = php.rMaxLayHex_[k] - php.radiusLayer_[kk][irhigh - 1];
1860 #ifdef EDM_ML_DEBUG
1861  edm::LogVerbatim("HGCalGeom") << "irhigh " << irhigh << " dr " << drhigh << " min " << php.minTileSize_;
1862 #endif
1863  if (drhigh < php.minTileSize_) {
1864  --irhigh;
1865 #ifdef EDM_ML_DEBUG
1866  drhigh = php.rMaxLayHex_[k] - php.radiusLayer_[kk][irhigh - 1];
1867  edm::LogVerbatim("HGCalGeom") << "Modified irhigh " << irhigh << " dr " << drhigh;
1868 #endif
1869  }
1870  php.iradMinBH_.emplace_back(irlow);
1871  php.iradMaxBH_.emplace_back(irhigh);
1872 #ifdef EDM_ML_DEBUG
1873  edm::LogVerbatim("HGCalGeom") << "Old Layer " << k << " Type " << kk << " Low edge " << irlow << ":" << drlow
1874  << " Top edge " << irhigh << ":" << drhigh;
1875 #endif
1876  }
1877  }
1878 #ifdef EDM_ML_DEBUG
1879  for (unsigned int k = 0; k < 2; ++k) {
1880  edm::LogVerbatim("HGCalGeom") << "Type " << k << " with " << php.radiusLayer_[k].size() << " radii";
1881  for (unsigned int kk = 0; kk < php.radiusLayer_[k].size(); ++kk)
1882  edm::LogVerbatim("HGCalGeom") << "Ring[" << kk << "] " << php.radiusLayer_[k][kk];
1883  }
1884 #endif
1885 
1886  // Now define the volumes
1887  int im(0);
1888  php.waferUVMax_ = 0;
1890  mytr.alpha = 0.0;
1891  for (unsigned int k = 0; k < php.zLayerHex_.size(); ++k) {
1892  if (php.iradMaxBH_[k] > php.waferUVMax_)
1893  php.waferUVMax_ = php.iradMaxBH_[k];
1894  int kk = ((php.firstLayer_ + (int)(k)) < php.layerFrontBH_[1]) ? 0 : 1;
1895  int irm = php.radiusLayer_[kk].size() - 1;
1896 #ifdef EDM_ML_DEBUG
1897  double rmin = php.radiusLayer_[kk][std::max((php.iradMinBH_[k] - 1), 0)];
1898  double rmax = php.radiusLayer_[kk][std::min(php.iradMaxBH_[k], irm)];
1899  edm::LogVerbatim("HGCalGeom") << "Layer " << php.firstLayer_ + k << ":" << kk << " Radius range "
1900  << php.iradMinBH_[k] << ":" << php.iradMaxBH_[k] << ":" << rmin << ":" << rmax;
1901 #endif
1902  mytr.lay = php.firstLayer_ + k;
1903  for (int irad = php.iradMinBH_[k]; irad <= php.iradMaxBH_[k]; ++irad) {
1904  double rmin = php.radiusLayer_[kk][std::max((irad - 1), 0)];
1905  double rmax = php.radiusLayer_[kk][std::min(irad, irm)];
1906  mytr.bl = 0.5 * rmin * php.scintCellSize(mytr.lay);
1907  mytr.tl = 0.5 * rmax * php.scintCellSize(mytr.lay);
1908  mytr.h = 0.5 * (rmax - rmin);
1909  mytr.dz = 0.5 * php.waferThick_;
1910  mytr.cellSize = 0.5 * (rmax + rmin) * php.scintCellSize(mytr.lay);
1911  php.fillModule(mytr, true);
1917  php.fillModule(mytr, false);
1918  if (irad == php.iradMinBH_[k])
1919  php.firstModule_.emplace_back(im);
1920  ++im;
1921  if (irad == php.iradMaxBH_[k] - 1)
1922  php.lastModule_.emplace_back(im);
1923  }
1924  }
1925  php.nSectors_ = php.waferUVMax_;
1926 #ifdef EDM_ML_DEBUG
1927  edm::LogVerbatim("HGCalGeom") << "Maximum radius index " << php.waferUVMax_;
1928  for (unsigned int k = 0; k < php.firstModule_.size(); ++k)
1929  edm::LogVerbatim("HGCalGeom") << "Layer " << k + php.firstLayer_ << " Modules " << php.firstModule_[k] << ":"
1930  << php.lastModule_[k];
1931 #endif
1932 }

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, pfDeepBoostedJetPreprocessParams_cfi::lower_bound, SiStripPI::max, min(), HGCalParameters::minTileSize_, HGCalParameters::mode_, HGCalParameters::nSectors_, HGCalParameters::radiusLayer_, HGCalParameters::rMaxLayHex_, HGCalParameters::rMinLayerBH_, HGCalParameters::rMinLayHex_, HGCalParameters::scintCellSize(), HGCalParameters::scintType(), funct::tan(), HGCalParameters::tileRingR_, HGCalParameters::tileRingRange_, HGCalParameters::hgtrap::tl, HGCalGeometryMode::TrapezoidFile, 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 268 of file HGCalGeomParameters.cc.

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

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(), HGCalTypes::getUnpackedCell6(), HGCalTypes::getUnpackedCellType6(), HGCalParameters::hgtrap::h, HGCalParameters::hgtrform::h3v, HGCalParameters::hgtrform::hr, createfilelist::int, 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, idealTransformation::rotation, cms::DDFilteredView::rotation(), HGCalParameters::hgtrform::sec, cms::DDFilteredView::solid(), AlCaHLTBitMon_QueryRunRegistry::string, HGCalParameters::hgtrform::subsec, tan30deg_, HGCalParameters::hgtrap::tl, HGCalParameters::tol, tolerance, cms::DDFilteredView::translation(), HGCalParameters::waferR_, HGCalParameters::waferSize_, 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 42 of file HGCalGeomParameters.cc.

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

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(), HGCalTypes::getUnpackedCell6(), HGCalTypes::getUnpackedCellType6(), 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_, HGCalParameters::waferSize_, 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 490 of file HGCalGeomParameters.cc.

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

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 750 of file HGCalGeomParameters.cc.

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

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, cms::DDFilteredView::level(), 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 679 of file HGCalGeomParameters.cc.

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

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 824 of file HGCalGeomParameters.cc.

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

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 924 of file HGCalGeomParameters.cc.

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

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 885 of file HGCalGeomParameters.cc.

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

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 955 of file HGCalGeomParameters.cc.

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

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

◆ loadSpecParsHexagon8() [1/4]

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

Definition at line 1031 of file HGCalGeomParameters.cc.

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

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

◆ loadSpecParsHexagon8() [2/4]

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

Definition at line 974 of file HGCalGeomParameters.cc.

974  {
976  php.cellThickness_ = getDDDArray("CellThickness", sv, 3);
978 
979  php.radius100to200_ = getDDDArray("Radius100to200", sv, 5);
980  php.radius200to300_ = getDDDArray("Radius200to300", sv, 5);
981 
982  const auto& dummy = getDDDArray("RadiusCuts", sv, 4);
983  php.choiceType_ = (int)(dummy[0]);
984  php.nCornerCut_ = (int)(dummy[1]);
985  php.fracAreaMin_ = dummy[2];
987 
988  php.radiusMixBoundary_ = fv.vector("RadiusMixBoundary");
990 
991  php.slopeMin_ = getDDDArray("SlopeBottom", sv, 0);
992  php.zFrontMin_ = getDDDArray("ZFrontBottom", sv, 0);
994  php.rMinFront_ = getDDDArray("RMinFront", sv, 0);
996 
997  php.slopeTop_ = getDDDArray("SlopeTop", sv, 0);
998  php.zFrontTop_ = getDDDArray("ZFrontTop", sv, 0);
1000  php.rMaxFront_ = getDDDArray("RMaxFront", sv, 0);
1002 
1003  php.zRanges_ = fv.vector("ZRanges");
1005 
1006  const auto& dummy2 = getDDDArray("LayerOffset", sv, 1);
1007  php.layerOffset_ = dummy2[0];
1008  php.layerCenter_ = dbl_to_int(fv.vector("LayerCenter"));
1009 
1010  loadSpecParsHexagon8(php);
1011 
1012  // Read in parameters from Philip's file
1013  if (php.waferMaskMode_ > 1) {
1014  std::vector<int> waferIndex, waferTypes, waferParts, waferOrien;
1015  if (php.waferMaskMode_ == siliconFileEE) {
1016  waferIndex = dbl_to_int(fv.vector("WaferIndexEE"));
1017  waferTypes = dbl_to_int(fv.vector("WaferTypesEE"));
1018  waferParts = dbl_to_int(fv.vector("WaferPartialEE"));
1019  waferOrien = dbl_to_int(fv.vector("WaferOrientEE"));
1020  } else if (php.waferMaskMode_ == siliconFileHE) {
1021  waferIndex = dbl_to_int(fv.vector("WaferIndexHE"));
1022  waferTypes = dbl_to_int(fv.vector("WaferTypesHE"));
1023  waferParts = dbl_to_int(fv.vector("WaferPartialHE"));
1024  waferOrien = dbl_to_int(fv.vector("WaferOrientHE"));
1025  }
1026 
1027  loadSpecParsHexagon8(php, waferIndex, waferTypes, waferParts, waferOrien);
1028  }
1029 }

References HGCalParameters::cellThickness_, HGCalParameters::choiceType_, dbl_to_int(), HGCalParameters::fracAreaMin_, 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, DDFilteredView::vector(), HGCalParameters::waferMaskMode_, HGCalParameters::zFrontMin_, HGCalParameters::zFrontTop_, HGCalParameters::zMinForRad_, and HGCalParameters::zRanges_.

Referenced by loadSpecParsHexagon8().

◆ loadSpecParsHexagon8() [3/4]

void HGCalGeomParameters::loadSpecParsHexagon8 ( HGCalParameters php)
private

Definition at line 1129 of file HGCalGeomParameters.cc.

1129  {
1130 #ifdef EDM_ML_DEBUG
1131  for (unsigned int k = 0; k < php.cellThickness_.size(); ++k)
1132  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: cell[" << k << "] Thickness " << php.cellThickness_[k];
1133  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Polynomial "
1134  << "parameters for 120 to 200 micron "
1135  << "transition with" << php.radius100to200_.size() << " elements";
1136  for (unsigned int k = 0; k < php.radius100to200_.size(); ++k)
1137  edm::LogVerbatim("HGCalGeom") << "Element [" << k << "] " << php.radius100to200_[k];
1138  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Polynomial "
1139  << "parameters for 200 to 300 micron "
1140  << "transition with " << php.radius200to300_.size() << " elements";
1141  for (unsigned int k = 0; k < php.radius200to300_.size(); ++k)
1142  edm::LogVerbatim("HGCalGeom") << "Element [" << k << "] " << php.radius200to300_[k];
1143  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Parameters for the"
1144  << " transition " << php.choiceType_ << ":" << php.nCornerCut_ << ":"
1145  << php.fracAreaMin_ << ":" << php.zMinForRad_;
1146  for (unsigned int k = 0; k < php.radiusMixBoundary_.size(); ++k)
1147  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Mix[" << k << "] R = " << php.radiusMixBoundary_[k];
1148  for (unsigned int k = 0; k < php.zFrontMin_.size(); ++k)
1149  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Boundary[" << k << "] Bottom Z = " << php.zFrontMin_[k]
1150  << " Slope = " << php.slopeMin_[k] << " rMax = " << php.rMinFront_[k];
1151  for (unsigned int k = 0; k < php.zFrontTop_.size(); ++k)
1152  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Boundary[" << k << "] Top Z = " << php.zFrontTop_[k]
1153  << " Slope = " << php.slopeTop_[k] << " rMax = " << php.rMaxFront_[k];
1154  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Z-Boundary " << php.zRanges_[0] << ":" << php.zRanges_[1] << ":"
1155  << php.zRanges_[2] << ":" << php.zRanges_[3];
1156  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: LayerOffset " << php.layerOffset_ << " in array of size "
1157  << php.layerCenter_.size();
1158  for (unsigned int k = 0; k < php.layerCenter_.size(); ++k)
1159  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << php.layerCenter_[k];
1160 #endif
1161 }

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_, HGCalParameters::zFrontMin_, HGCalParameters::zFrontTop_, HGCalParameters::zMinForRad_, and HGCalParameters::zRanges_.

◆ loadSpecParsHexagon8() [4/4]

void HGCalGeomParameters::loadSpecParsHexagon8 ( HGCalParameters php,
const std::vector< int > &  waferIndex,
const std::vector< int > &  waferTypes,
const std::vector< int > &  waferParts,
const std::vector< int > &  waferOrien 
)
private

Definition at line 1163 of file HGCalGeomParameters.cc.

1167  {
1168  // Store parameters from Philip's file
1169  for (unsigned int k = 0; k < waferIndex.size(); ++k) {
1170  php.waferInfoMap_[waferIndex[k]] = HGCalParameters::waferInfo(
1171  waferTypes[k], waferParts[k], HGCalWaferMask::getRotation(php.waferZSide_, waferParts[k], waferOrien[k]));
1172 #ifdef EDM_ML_DEBUG
1173  edm::LogVerbatim("HGCalGeom") << "[" << k << ":" << waferIndex[k] << ":"
1174  << HGCalWaferIndex::waferLayer(waferIndex[k]) << ":"
1175  << HGCalWaferIndex::waferU(waferIndex[k]) << ":"
1176  << HGCalWaferIndex::waferV(waferIndex[k]) << "] "
1177  << " Type " << waferTypes[k] << " Partial type " << waferParts[k] << " Orientation "
1178  << waferOrien[k] << ":"
1179  << HGCalWaferMask::getRotation(php.waferZSide_, waferParts[k], waferOrien[k]);
1180 #endif
1181  }
1182 }

References HGCalWaferMask::getRotation(), dqmdumpme::k, HGCalParameters::waferInfoMap_, HGCalWaferIndex::waferLayer(), HGCalWaferIndex::waferU(), HGCalWaferIndex::waferV(), and HGCalParameters::waferZSide_.

◆ loadSpecParsTrapezoid() [1/4]

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

Definition at line 1255 of file HGCalGeomParameters.cc.

1258  {
1259  for (auto const& it : vmap) {
1260  if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "RadiusMixBoundary")) {
1261  for (const auto& i : it.second)
1263  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "ZRanges")) {
1264  for (const auto& i : it.second)
1265  php.zRanges_.emplace_back(HGCalParameters::k_ScaleFromDD4Hep * i);
1266  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "LayerCenter")) {
1267  for (const auto& i : it.second)
1268  php.layerCenter_.emplace_back(std::round(i));
1269  }
1270  }
1271 
1272  php.nPhiBinBH_ = dbl_to_int(fv.get<std::vector<double> >(sdTag1, "NPhiBinBH"));
1273  php.layerFrontBH_ = dbl_to_int(fv.get<std::vector<double> >(sdTag1, "LayerFrontBH"));
1274  php.rMinLayerBH_ = fv.get<std::vector<double> >(sdTag1, "RMinLayerBH");
1276  php.nCellsFine_ = php.nPhiBinBH_[0];
1277  php.nCellsCoarse_ = php.nPhiBinBH_[1];
1278  php.cellSize_.emplace_back(2.0 * M_PI / php.nCellsFine_);
1279  php.cellSize_.emplace_back(2.0 * M_PI / php.nCellsCoarse_);
1280 
1281  php.slopeMin_ = fv.get<std::vector<double> >(sdTag1, "SlopeBottom");
1282  php.zFrontMin_ = fv.get<std::vector<double> >(sdTag1, "ZFrontBottom");
1284  php.rMinFront_ = fv.get<std::vector<double> >(sdTag1, "RMinFront");
1286 
1287  php.slopeTop_ = fv.get<std::vector<double> >(sdTag1, "SlopeTop");
1288  php.zFrontTop_ = fv.get<std::vector<double> >(sdTag1, "ZFrontTop");
1290  php.rMaxFront_ = fv.get<std::vector<double> >(sdTag1, "RMaxFront");
1292  unsigned int kmax = (php.zFrontTop_.size() - php.slopeTop_.size());
1293  for (unsigned int k = 0; k < kmax; ++k)
1294  php.slopeTop_.emplace_back(0);
1295 
1296  const auto& dummy2 = fv.get<std::vector<double> >(sdTag1, "LayerOffset");
1297  php.layerOffset_ = dummy2[0];
1298 
1299  loadSpecParsTrapezoid(php);
1300 
1301  // tile parameters from Katja's file
1302  if (php.waferMaskMode_ == scintillatorFile) {
1303  std::vector<int> tileIndx, tileType, tileSiPM;
1304  std::vector<int> tileHEX1, tileHEX2, tileHEX3, tileHEX4;
1305  std::vector<double> tileRMin, tileRMax;
1306  std::vector<int> tileRingMin, tileRingMax;
1307  for (auto const& it : vmap) {
1308  if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileIndex")) {
1309  for (const auto& i : it.second)
1310  tileIndx.emplace_back(std::round(i));
1311  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileType")) {
1312  for (const auto& i : it.second)
1313  tileType.emplace_back(std::round(i));
1314  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileSiPM")) {
1315  for (const auto& i : it.second)
1316  tileSiPM.emplace_back(std::round(i));
1317  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileHEX1")) {
1318  for (const auto& i : it.second)
1319  tileHEX1.emplace_back(std::round(i));
1320  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileHEX2")) {
1321  for (const auto& i : it.second)
1322  tileHEX2.emplace_back(std::round(i));
1323  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileHEX3")) {
1324  for (const auto& i : it.second)
1325  tileHEX3.emplace_back(std::round(i));
1326  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileHEX4")) {
1327  for (const auto& i : it.second)
1328  tileHEX4.emplace_back(std::round(i));
1329  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileRMin")) {
1330  for (const auto& i : it.second)
1331  tileRMin.emplace_back(HGCalParameters::k_ScaleFromDD4Hep * i);
1332  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileRMax")) {
1333  for (const auto& i : it.second)
1334  tileRMax.emplace_back(HGCalParameters::k_ScaleFromDD4Hep * i);
1335  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileRingMin")) {
1336  for (const auto& i : it.second)
1337  tileRingMin.emplace_back(std::round(i));
1338  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileRingMax")) {
1339  for (const auto& i : it.second)
1340  tileRingMax.emplace_back(std::round(i));
1341  }
1342  }
1343 
1345  tileIndx,
1346  tileType,
1347  tileSiPM,
1348  tileHEX1,
1349  tileHEX2,
1350  tileHEX3,
1351  tileHEX4,
1352  tileRMin,
1353  tileRMax,
1354  tileRingMin,
1355  tileRingMax);
1356  }
1357 }

References HGCalParameters::cellSize_, 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_, HGCalParameters::nPhiBinBH_, HGCalParameters::radiusMixBoundary_, rescale(), HGCalParameters::rMaxFront_, HGCalParameters::rMinFront_, HGCalParameters::rMinLayerBH_, scintillatorFile, HGCalParameters::slopeMin_, HGCalParameters::slopeTop_, HGCalParameters::waferMaskMode_, HGCalParameters::zFrontMin_, HGCalParameters::zFrontTop_, and HGCalParameters::zRanges_.

◆ loadSpecParsTrapezoid() [2/4]

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

Definition at line 1184 of file HGCalGeomParameters.cc.

1184  {
1186  php.radiusMixBoundary_ = fv.vector("RadiusMixBoundary");
1188 
1189  php.nPhiBinBH_ = dbl_to_int(getDDDArray("NPhiBinBH", sv, 0));
1190  php.layerFrontBH_ = dbl_to_int(getDDDArray("LayerFrontBH", sv, 0));
1191  php.rMinLayerBH_ = getDDDArray("RMinLayerBH", sv, 0);
1193  php.nCellsFine_ = php.nPhiBinBH_[0];
1194  php.nCellsCoarse_ = php.nPhiBinBH_[1];
1195  php.cellSize_.emplace_back(2.0 * M_PI / php.nCellsFine_);
1196  php.cellSize_.emplace_back(2.0 * M_PI / php.nCellsCoarse_);
1197 
1198  php.slopeMin_ = getDDDArray("SlopeBottom", sv, 0);
1199  php.zFrontMin_ = getDDDArray("ZFrontBottom", sv, 0);
1201  php.rMinFront_ = getDDDArray("RMinFront", sv, 0);
1203 
1204  php.slopeTop_ = getDDDArray("SlopeTop", sv, 0);
1205  php.zFrontTop_ = getDDDArray("ZFrontTop", sv, 0);
1207  php.rMaxFront_ = getDDDArray("RMaxFront", sv, 0);
1209 
1210  php.zRanges_ = fv.vector("ZRanges");
1212 
1213  // Offsets
1214  const auto& dummy2 = getDDDArray("LayerOffset", sv, 1);
1215  php.layerOffset_ = dummy2[0];
1216  php.layerCenter_ = dbl_to_int(fv.vector("LayerCenter"));
1217 
1218  loadSpecParsTrapezoid(php);
1219 
1220  // tile parameters from Katja's file
1221  if (php.waferMaskMode_ == scintillatorFile) {
1222  std::vector<int> tileIndx, tileType, tileSiPM;
1223  std::vector<int> tileHEX1, tileHEX2, tileHEX3, tileHEX4;
1224  std::vector<double> tileRMin, tileRMax;
1225  std::vector<int> tileRingMin, tileRingMax;
1226  tileIndx = dbl_to_int(fv.vector("TileIndex"));
1227  tileType = dbl_to_int(fv.vector("TileType"));
1228  tileSiPM = dbl_to_int(fv.vector("TileSiPM"));
1229  tileHEX1 = dbl_to_int(fv.vector("TileHEX1"));
1230  tileHEX2 = dbl_to_int(fv.vector("TileHEX2"));
1231  tileHEX3 = dbl_to_int(fv.vector("TileHEX3"));
1232  tileHEX4 = dbl_to_int(fv.vector("TileHEX4"));
1233  tileRMin = fv.vector("TileRMin");
1234  tileRMax = fv.vector("TileRMax");
1237  tileRingMin = dbl_to_int(fv.vector("TileRingMin"));
1238  tileRingMax = dbl_to_int(fv.vector("TileRingMax"));
1239 
1241  tileIndx,
1242  tileType,
1243  tileSiPM,
1244  tileHEX1,
1245  tileHEX2,
1246  tileHEX3,
1247  tileHEX4,
1248  tileRMin,
1249  tileRMax,
1250  tileRingMin,
1251  tileRingMax);
1252  }
1253 }

References HGCalParameters::cellSize_, dbl_to_int(), 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, DDFilteredView::vector(), HGCalParameters::waferMaskMode_, HGCalParameters::zFrontMin_, HGCalParameters::zFrontTop_, and HGCalParameters::zRanges_.

Referenced by loadSpecParsTrapezoid().

◆ loadSpecParsTrapezoid() [3/4]

void HGCalGeomParameters::loadSpecParsTrapezoid ( HGCalParameters php)
private

Definition at line 1359 of file HGCalGeomParameters.cc.

1359  {
1360 #ifdef EDM_ML_DEBUG
1361  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters:nCells " << php.nCellsFine_ << ":" << php.nCellsCoarse_
1362  << " cellSize: " << php.cellSize_[0] << ":" << php.cellSize_[1];
1363  for (unsigned int k = 0; k < php.layerFrontBH_.size(); ++k)
1364  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Type[" << k << "] Front Layer = " << php.layerFrontBH_[k]
1365  << " rMin = " << php.rMinLayerBH_[k];
1366  for (unsigned int k = 0; k < php.radiusMixBoundary_.size(); ++k) {
1367  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Mix[" << k << "] R = " << php.radiusMixBoundary_[k]
1368  << " Nphi = " << php.scintCells(k + php.firstLayer_)
1369  << " dPhi = " << php.scintCellSize(k + php.firstLayer_);
1370  }
1371 
1372  for (unsigned int k = 0; k < php.zFrontMin_.size(); ++k)
1373  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Boundary[" << k << "] Bottom Z = " << php.zFrontMin_[k]
1374  << " Slope = " << php.slopeMin_[k] << " rMax = " << php.rMinFront_[k];
1375 
1376  for (unsigned int k = 0; k < php.zFrontTop_.size(); ++k)
1377  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Boundary[" << k << "] Top Z = " << php.zFrontTop_[k]
1378  << " Slope = " << php.slopeTop_[k] << " rMax = " << php.rMaxFront_[k];
1379 
1380  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Z-Boundary " << php.zRanges_[0] << ":" << php.zRanges_[1] << ":"
1381  << php.zRanges_[2] << ":" << php.zRanges_[3];
1382 
1383  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: LayerOffset " << php.layerOffset_ << " in array of size "
1384  << php.layerCenter_.size();
1385  for (unsigned int k = 0; k < php.layerCenter_.size(); ++k)
1386  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << php.layerCenter_[k];
1387 #endif
1388 }

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(), HGCalParameters::slopeMin_, HGCalParameters::slopeTop_, HGCalParameters::zFrontMin_, HGCalParameters::zFrontTop_, and HGCalParameters::zRanges_.

◆ loadSpecParsTrapezoid() [4/4]

void HGCalGeomParameters::loadSpecParsTrapezoid ( HGCalParameters php,
const std::vector< int > &  tileIndx,
const std::vector< int > &  tileType,
const std::vector< int > &  tileSiPM,
const std::vector< int > &  tileHEX1,
const std::vector< int > &  tileHEX2,
const std::vector< int > &  tileHEX3,
const std::vector< int > &  tileHEX4,
const std::vector< double > &  tileRMin,
const std::vector< double > &  tileRMax,
const std::vector< int > &  tileRingMin,
const std::vector< int > &  tileRingMax 
)
private

Definition at line 1390 of file HGCalGeomParameters.cc.

1401  {
1402  // tile parameters from Katja's file
1403  for (unsigned int k = 0; k < tileIndx.size(); ++k) {
1404  php.tileInfoMap_[tileIndx[k]] =
1405  HGCalParameters::tileInfo(tileType[k], tileSiPM[k], tileHEX1[k], tileHEX2[k], tileHEX3[k], tileHEX4[k]);
1406 #ifdef EDM_ML_DEBUG
1407  edm::LogVerbatim("HGCalGeom") << "Tile[" << k << ":" << tileIndx[k] << "] "
1408  << " Type " << tileType[k] << " SiPM " << tileSiPM[k] << " HEX " << std::hex
1409  << tileHEX1[k] << ":" << tileHEX2[k] << ":" << tileHEX3[k] << ":" << tileHEX4[k]
1410  << std::dec;
1411 #endif
1412  }
1413 
1414  for (unsigned int k = 0; k < tileRMin.size(); ++k) {
1415  php.tileRingR_.emplace_back(tileRMin[k], tileRMax[k]);
1416 #ifdef EDM_ML_DEBUG
1417  edm::LogVerbatim("HGCalGeom") << "TileRingR[" << k << "] " << tileRMin[k] << ":" << tileRMax[k];
1418 #endif
1419  }
1420 
1421  for (unsigned k = 0; k < tileRingMin.size(); ++k) {
1422  php.tileRingRange_.emplace_back(tileRingMin[k], tileRingMax[k]);
1423 #ifdef EDM_ML_DEBUG
1424  edm::LogVerbatim("HGCalGeom") << "TileRingRange[" << k << "] " << tileRingMin[k] << ":" << tileRingMax[k];
1425 #endif
1426  }
1427 }

References TauDecayModes::dec, dqmdumpme::k, HGCalParameters::tileInfoMap_, HGCalParameters::tileRingR_, and HGCalParameters::tileRingRange_.

◆ loadWaferHexagon()

void HGCalGeomParameters::loadWaferHexagon ( HGCalParameters php)

Definition at line 1429 of file HGCalGeomParameters.cc.

1429  {
1431  double rin(php.rLimit_[0]), rout(php.rLimit_[1]), rMaxFine(php.boundR_[1]);
1432 #ifdef EDM_ML_DEBUG
1433  edm::LogVerbatim("HGCalGeom") << "Input waferWidth " << waferW << ":" << rmin << " R Limits: " << rin << ":" << rout
1434  << " Fine " << rMaxFine;
1435 #endif
1436  // Clear the vectors
1437  php.waferCopy_.clear();
1438  php.waferTypeL_.clear();
1439  php.waferTypeT_.clear();
1440  php.waferPosX_.clear();
1441  php.waferPosY_.clear();
1442  double dx = 0.5 * waferW;
1443  double dy = 3.0 * dx * tan(30._deg);
1444  double rr = 2.0 * dx * tan(30._deg);
1445  int ncol = (int)(2.0 * rout / waferW) + 1;
1446  int nrow = (int)(rout / (waferW * tan(30._deg))) + 1;
1447  int ns2 = (2 * ncol + 1) * (2 * nrow + 1) * php.layer_.size();
1448  int incm(0), inrm(0), kount(0), ntot(0);
1449  HGCalParameters::layer_map copiesInLayers(php.layer_.size() + 1);
1450  HGCalParameters::waferT_map waferTypes(ns2 + 1);
1451 #ifdef EDM_ML_DEBUG
1452  edm::LogVerbatim("HGCalGeom") << "Row " << nrow << " Column " << ncol;
1453 #endif
1454  for (int nr = -nrow; nr <= nrow; ++nr) {
1455  int inr = (nr >= 0) ? nr : -nr;
1456  for (int nc = -ncol; nc <= ncol; ++nc) {
1457  int inc = (nc >= 0) ? nc : -nc;
1458  if (inr % 2 == inc % 2) {
1459  double xpos = nc * dx;
1460  double ypos = nr * dy;
1461  std::pair<int, int> corner = HGCalGeomTools::waferCorner(xpos, ypos, dx, rr, rin, rout, true);
1462  double rpos = std::sqrt(xpos * xpos + ypos * ypos);
1463  int typet = (rpos < rMaxFine) ? 1 : 2;
1464  int typel(3);
1465  for (int k = 1; k < 4; ++k) {
1466  if ((rpos + rmin) <= php.boundR_[k]) {
1467  typel = k;
1468  break;
1469  }
1470  }
1471  ++ntot;
1472  if (corner.first > 0) {
1473  int copy = HGCalTypes::packTypeUV(typel, nc, nr);
1474  if (inc > incm)
1475  incm = inc;
1476  if (inr > inrm)
1477  inrm = inr;
1478  kount++;
1479 #ifdef EDM_ML_DEBUG
1480  edm::LogVerbatim("HGCalGeom") << kount << ":" << ntot << " Copy " << copy << " Type " << typel << ":" << typet
1481  << " Location " << corner.first << " Position " << xpos << ":" << ypos
1482  << " Layers " << php.layer_.size();
1483 #endif
1484  php.waferCopy_.emplace_back(copy);
1485  php.waferTypeL_.emplace_back(typel);
1486  php.waferTypeT_.emplace_back(typet);
1487  php.waferPosX_.emplace_back(xpos);
1488  php.waferPosY_.emplace_back(ypos);
1489  for (unsigned int il = 0; il < php.layer_.size(); ++il) {
1490  std::pair<int, int> corner =
1491  HGCalGeomTools::waferCorner(xpos, ypos, dx, rr, php.rMinLayHex_[il], php.rMaxLayHex_[il], true);
1492  if (corner.first > 0) {
1493  auto cpy = copiesInLayers[php.layer_[il]].find(copy);
1494  if (cpy == copiesInLayers[php.layer_[il]].end())
1495  copiesInLayers[php.layer_[il]][copy] =
1496  ((corner.first == (int)(HGCalParameters::k_CornerSize)) ? php.waferCopy_.size() : -1);
1497  }
1498  if ((corner.first > 0) && (corner.first < (int)(HGCalParameters::k_CornerSize))) {
1499  int wl = HGCalWaferIndex::waferIndex(php.layer_[il], copy, 0, true);
1500  waferTypes[wl] = corner;
1501  }
1502  }
1503  }
1504  }
1505  }
1506  }
1507  php.copiesInLayers_ = copiesInLayers;
1508  php.waferTypes_ = waferTypes;
1509  php.nSectors_ = (int)(php.waferCopy_.size());
1510  php.waferUVMax_ = 0;
1511 #ifdef EDM_ML_DEBUG
1512  edm::LogVerbatim("HGCalGeom") << "HGCalWaferHexagon: # of columns " << incm << " # of rows " << inrm << " and "
1513  << kount << ":" << ntot << " wafers; R " << rin << ":" << rout;
1514  edm::LogVerbatim("HGCalGeom") << "Dump copiesInLayers for " << php.copiesInLayers_.size() << " layers";
1515  for (unsigned int k = 0; k < copiesInLayers.size(); ++k) {
1516  const auto& theModules = copiesInLayers[k];
1517  edm::LogVerbatim("HGCalGeom") << "Layer " << k << ":" << theModules.size();
1518  int k2(0);
1519  for (std::unordered_map<int, int>::const_iterator itr = theModules.begin(); itr != theModules.end(); ++itr, ++k2) {
1520  edm::LogVerbatim("HGCalGeom") << "[" << k2 << "] " << itr->first << ":" << itr->second;
1521  }
1522  }
1523 #endif
1524 }

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_, HGCalTypes::packTypeUV(), 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 1526 of file HGCalGeomParameters.cc.

1526  {
1527  double waferW(php.waferSize_);
1528  double waferS(php.sensorSeparation_);
1529  auto wType = std::make_unique<HGCalWaferType>(php.radius100to200_,
1530  php.radius200to300_,
1531  HGCalParameters::k_ScaleToDDD * (waferW + waferS),
1533  php.choiceType_,
1534  php.nCornerCut_,
1535  php.fracAreaMin_);
1536 
1537  double rout(php.rLimit_[1]);
1538 #ifdef EDM_ML_DEBUG
1539  edm::LogVerbatim("HGCalGeom") << "Input waferWidth " << waferW << ":" << waferS << " R Max: " << rout;
1540 #endif
1541  // Clear the vectors
1542  php.waferCopy_.clear();
1543  php.waferTypeL_.clear();
1544  php.waferTypeT_.clear();
1545  php.waferPosX_.clear();
1546  php.waferPosY_.clear();
1547  double r = 0.5 * (waferW + waferS);
1548  double R = 2.0 * r / sqrt3_;
1549  double dy = 0.75 * R;
1550  double r1 = 0.5 * waferW;
1551  double R1 = 2.0 * r1 / sqrt3_;
1552  int N = (r == 0) ? 3 : ((int)(0.5 * rout / r) + 3);
1553  int ns1 = (2 * N + 1) * (2 * N + 1);
1554  int ns2 = ns1 * php.zLayerHex_.size();
1555 #ifdef EDM_ML_DEBUG
1556  edm::LogVerbatim("HGCalGeom") << "wafer " << waferW << ":" << waferS << " r " << r << " dy " << dy << " N " << N
1557  << " sizes " << ns1 << ":" << ns2;
1558  std::vector<int> indtypes(ns1 + 1);
1559  indtypes.clear();
1560 #endif
1561  HGCalParameters::wafer_map wafersInLayers(ns1 + 1);
1562  HGCalParameters::wafer_map typesInLayers(ns2 + 1);
1563  HGCalParameters::waferT_map waferTypes(ns2 + 1);
1564  int ipos(0), lpos(0), uvmax(0), nwarn(0);
1565  std::vector<int> uvmx(php.zLayerHex_.size(), 0);
1566  for (int v = -N; v <= N; ++v) {
1567  for (int u = -N; u <= N; ++u) {
1568  int nr = 2 * v;
1569  int nc = -2 * u + v;
1570  double xpos = nc * r;
1571  double ypos = nr * dy;
1572  int indx = HGCalWaferIndex::waferIndex(0, u, v);
1573  php.waferCopy_.emplace_back(indx);
1574  php.waferPosX_.emplace_back(xpos);
1575  php.waferPosY_.emplace_back(ypos);
1576  wafersInLayers[indx] = ipos;
1577  ++ipos;
1578  std::pair<int, int> corner = HGCalGeomTools::waferCorner(xpos, ypos, r1, R1, 0, rout, false);
1579  if ((corner.first == (int)(HGCalParameters::k_CornerSize)) || ((corner.first > 0) && php.defineFull_)) {
1580  uvmax = std::max(uvmax, std::max(std::abs(u), std::abs(v)));
1581  }
1582  for (unsigned int i = 0; i < php.zLayerHex_.size(); ++i) {
1583  int copy = i + php.layerOffset_;
1584  std::pair<double, double> xyoff = geomTools_.shiftXY(php.layerCenter_[copy], (waferW + waferS));
1585  int lay = php.layer_[php.layerIndex_[i]];
1586  double xpos0 = xpos + xyoff.first;
1587  double ypos0 = ypos + xyoff.second;
1588  double zpos = php.zLayerHex_[i];
1589  int kndx = HGCalWaferIndex::waferIndex(lay, u, v);
1590  int type(-1);
1592  type = wType->getType(kndx, php.waferInfoMap_);
1593  if (type < 0)
1594  type = wType->getType(HGCalParameters::k_ScaleToDDD * xpos0,
1597  php.waferTypeL_.emplace_back(type);
1598  typesInLayers[kndx] = lpos;
1599  ++lpos;
1600 #ifdef EDM_ML_DEBUG
1601  indtypes.emplace_back(kndx);
1602 #endif
1603  std::pair<int, int> corner =
1604  HGCalGeomTools::waferCorner(xpos0, ypos0, r1, R1, php.rMinLayHex_[i], php.rMaxLayHex_[i], false);
1605 #ifdef EDM_ML_DEBUG
1606  if (((corner.first == 0) && std::abs(u) < 5 && std::abs(v) < 5) || (std::abs(u) < 2 && std::abs(v) < 2)) {
1607  edm::LogVerbatim("HGCalGeom") << "Layer " << lay << " R " << php.rMinLayHex_[i] << ":" << php.rMaxLayHex_[i]
1608  << " u " << u << " v " << v << " with " << corner.first << " corners";
1609  }
1610 #endif
1611  if ((corner.first == (int)(HGCalParameters::k_CornerSize)) || ((corner.first > 0) && php.defineFull_)) {
1612  uvmx[i] = std::max(uvmx[i], std::max(std::abs(u), std::abs(v)));
1613  }
1614  if ((corner.first < (int)(HGCalParameters::k_CornerSize)) && (corner.first > 0)) {
1615 #ifdef EDM_ML_DEBUG
1616  edm::LogVerbatim("HGCalGeom") << "Layer " << lay << " u|v " << u << ":" << v << " with corner "
1617  << corner.first << ":" << corner.second;
1618 #endif
1619  int wl = HGCalWaferIndex::waferIndex(lay, u, v);
1620  if (php.waferMaskMode_ > 0) {
1621  std::pair<int, int> corner0 = HGCalWaferMask::getTypeMode(
1622  xpos0, ypos0, r1, R1, php.rMinLayHex_[i], php.rMaxLayHex_[i], type, php.waferMaskMode_);
1624  auto itr = php.waferInfoMap_.find(wl);
1625  if (itr != php.waferInfoMap_.end()) {
1626  int part = (itr->second).part;
1627  int orient = (itr->second).orient;
1629  xpos0, ypos0, r1, R1, php.rMinLayHex_[i], php.rMaxLayHex_[i], part, orient, false);
1630  if (ok)
1631  corner0 = std::make_pair(part, (HGCalWaferMask::k_OffsetRotation + orient));
1632 #ifdef EDM_ML_DEBUG
1633  edm::LogVerbatim("HGCalGeom")
1634  << "Layer:u:v " << i << ":" << lay << ":" << u << ":" << v << " Part " << corner0.first << ":"
1635  << part << " Orient " << corner0.second << ":" << orient << " Position " << xpos0 << ":" << ypos0
1636  << " delta " << r1 << ":" << R1 << " Limit " << php.rMinLayHex_[i] << ":" << php.rMaxLayHex_[i]
1637  << " Compatibiliety Flag " << ok;
1638 #endif
1639  if (!ok)
1640  ++nwarn;
1641  }
1642  }
1643  waferTypes[wl] = corner0;
1644 #ifdef EDM_ML_DEBUG
1645  edm::LogVerbatim("HGCalGeom")
1646  << "Layer " << lay << " u|v " << u << ":" << v << " Index " << std::hex << wl << std::dec << " pos "
1647  << xpos0 << ":" << ypos0 << " R " << r1 << ":" << R1 << " Range " << php.rMinLayHex_[i] << ":"
1648  << php.rMaxLayHex_[i] << type << ":" << php.waferMaskMode_ << " corner " << corner.first << ":"
1649  << corner.second << " croner0 " << corner0.first << ":" << corner0.second;
1650 #endif
1651  } else {
1652  waferTypes[wl] = corner;
1653 #ifdef EDM_ML_DEBUG
1654  edm::LogVerbatim("HGCalGeom") << "Layer " << lay << " u|v " << u << ":" << v << " with corner "
1655  << corner.first << ":" << corner.second;
1656 #endif
1657  }
1658  }
1659  }
1660  }
1661  }
1662  if (nwarn > 0)
1663  edm::LogWarning("HGCalGeom") << "HGCalGeomParameters::loadWafer8: there are " << nwarn
1664  << " wafers with non-matching partial- orientation types";
1665  php.waferUVMax_ = uvmax;
1666  php.waferUVMaxLayer_ = uvmx;
1667  php.wafersInLayers_ = wafersInLayers;
1668  php.typesInLayers_ = typesInLayers;
1669  php.waferTypes_ = waferTypes;
1670  php.nSectors_ = (int)(php.waferCopy_.size());
1672  mytr.lay = 1;
1673  mytr.bl = php.waferR_;
1674  mytr.tl = php.waferR_;
1675  mytr.h = php.waferR_;
1676  mytr.alpha = 0.0;
1678  for (auto const& dz : php.cellThickness_) {
1679  mytr.dz = 0.5 * HGCalParameters::k_ScaleToDDD * dz;
1680  php.fillModule(mytr, false);
1681  }
1682  for (unsigned k = 0; k < php.cellThickness_.size(); ++k) {
1683  HGCalParameters::hgtrap mytr = php.getModule(k, false);
1689  php.fillModule(mytr, true);
1690  }
1691 #ifdef EDM_ML_DEBUG
1692  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Total of " << php.waferCopy_.size() << " wafers";
1693  for (unsigned int k = 0; k < php.waferCopy_.size(); ++k) {
1694  int id = php.waferCopy_[k];
1695  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << std::hex << id << std::dec << ":"
1696  << HGCalWaferIndex::waferLayer(id) << ":" << HGCalWaferIndex::waferU(id) << ":"
1697  << HGCalWaferIndex::waferV(id) << " x " << php.waferPosX_[k] << " y "
1698  << php.waferPosY_[k] << " index " << php.wafersInLayers_[id];
1699  }
1700  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Total of " << php.waferTypeL_.size() << " wafer types";
1701  for (unsigned int k = 0; k < php.waferTypeL_.size(); ++k) {
1702  int id = indtypes[k];
1703  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << php.typesInLayers_[id] << ":" << php.waferTypeL_[k] << " ID "
1704  << std::hex << id << std::dec << ":" << HGCalWaferIndex::waferLayer(id) << ":"
1705  << HGCalWaferIndex::waferU(id) << ":" << HGCalWaferIndex::waferV(id);
1706  }
1707 #endif
1708 
1709  //Wafer offset
1710  php.xLayerHex_.clear();
1711  php.yLayerHex_.clear();
1712  double waferSize = php.waferSize_ + php.sensorSeparation_;
1713 #ifdef EDM_ML_DEBUG
1714  edm::LogVerbatim("HGCalGeom") << "WaferSize " << waferSize;
1715 #endif
1716  for (unsigned int k = 0; k < php.zLayerHex_.size(); ++k) {
1717  int copy = k + php.layerOffset_;
1718  std::pair<double, double> xyoff = geomTools_.shiftXY(php.layerCenter_[copy], waferSize);
1719  php.xLayerHex_.emplace_back(xyoff.first);
1720  php.yLayerHex_.emplace_back(xyoff.second);
1721 #ifdef EDM_ML_DEBUG
1722  edm::LogVerbatim("HGCalGeom") << "Layer[" << k << "] Off " << copy << ":" << php.layerCenter_[copy] << " Shift "
1723  << xyoff.first << ":" << xyoff.second;
1724 #endif
1725  }
1726 }

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(), HGCalWaferMask::goodTypeMode(), HGCalParameters::hgtrap::h, HGCalGeometryMode::Hexagon8File, mps_fire::i, triggerObjects_cff::id, createfilelist::int, dqmdumpme::k, HGCalParameters::k_CornerSize, HGCalWaferMask::k_OffsetRotation, HGCalParameters::k_ScaleFromDDD, HGCalParameters::k_ScaleToDDD, HGCalParameters::hgtrap::lay, HGCalParameters::layer_, HGCalParameters::layerCenter_, HGCalParameters::layerIndex_, HGCalParameters::layerOffset_, SiStripPI::max, HGCalParameters::mode_, N, HGCalParameters::nCornerCut_, EgHLTOffHistBins_cfi::nr, HGCalParameters::nSectors_, convertSQLiteXML::ok, hgcalPerformanceValidation::orient, 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(), HGCalParameters::waferInfoMap_, 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 1988 of file HGCalGeomParameters.cc.

1988  {
1989  std::for_each(v.begin(), v.end(), [s](double& n) { n *= s; });
1990 }

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 1992 of file HGCalGeomParameters.cc.

1992  {
1993  for (auto& n : v) {
1994  if (std::abs(n) < tolmin)
1995  n = 0;
1996  }
1997 }

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

Member Data Documentation

◆ geomTools_

HGCalGeomTools HGCalGeomParameters::geomTools_
private

Definition at line 141 of file HGCalGeomParameters.h.

Referenced by loadWaferHexagon8().

◆ scintillatorFile

constexpr static int HGCalGeomParameters::scintillatorFile = 4
staticconstexprprivate

Definition at line 140 of file HGCalGeomParameters.h.

Referenced by loadSpecParsTrapezoid().

◆ siliconFileEE

constexpr static int HGCalGeomParameters::siliconFileEE = 2
staticconstexprprivate

Definition at line 138 of file HGCalGeomParameters.h.

Referenced by loadSpecParsHexagon8().

◆ siliconFileHE

constexpr static int HGCalGeomParameters::siliconFileHE = 3
staticconstexprprivate

Definition at line 139 of file HGCalGeomParameters.h.

Referenced by loadSpecParsHexagon8().

◆ sqrt3_

const double HGCalGeomParameters::sqrt3_
private

Definition at line 142 of file HGCalGeomParameters.h.

Referenced by loadWaferHexagon8().

◆ tan30deg_

constexpr static double HGCalGeomParameters::tan30deg_ = 0.5773502693
staticconstexprprivate

Definition at line 137 of file HGCalGeomParameters.h.

Referenced by loadGeometryHexagon().

◆ waferSize_

double HGCalGeomParameters::waferSize_
private
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:223
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:428
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
HGCalGeometryMode::TrapezoidFile
Definition: HGCalGeometryMode.h:33
HGCalGeomParameters::loadGeometryHexagon8
void loadGeometryHexagon8(const DDFilteredView &_fv, HGCalParameters &php, int firstLayer)
Definition: HGCalGeomParameters.cc:679
HGCalParameters::firstLayer_
int firstLayer_
Definition: HGCalParameters.h:166
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
HGCalGeomParameters::siliconFileEE
constexpr static int siliconFileEE
Definition: HGCalGeomParameters.h:138
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:143
HGCalParameters::choiceType_
int choiceType_
Definition: HGCalParameters.h:148
HGCalGeomParameters::scintillatorFile
constexpr static int scintillatorFile
Definition: HGCalGeomParameters.h:140
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
min
T min(T a, T b)
Definition: MathUtil.h:58
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
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:1961
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::waferZSide_
int waferZSide_
Definition: HGCalParameters.h:174
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:42
HGCalGeomTools::shiftXY
std::pair< double, double > shiftXY(int waferPosition, double waferSize) const
Definition: HGCalGeomTools.cc:170
HGCalParameters::hgtrap::dz
float dz
Definition: HGCalParameters.h:43
DDAxes::x
DDCompactView::vector
std::vector< double > const & vector(std::string_view iKey) const
returns an empty container if not found
Definition: DDCompactView.cc:67
DDFilteredView::vector
const std::vector< double > & vector(std::string_view iKey) const
The DDVector information.
Definition: DDFilteredView.h:61
cms::DDFilteredView
Definition: DDFilteredView.h:70
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
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
HGCalParameters::moduleBlR_
std::vector< double > moduleBlR_
Definition: HGCalParameters.h:78
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:141
HGCalWaferMask::getRotation
static int getRotation(int zside, int type, int rotn)
Definition: HGCalWaferMask.cc:337
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:1988
cms::DDFilteredView::get
T get(const std::string &)
extract attribute value
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:1934
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
part
part
Definition: HCALResponse.h:20
HGCalGeomParameters::tan30deg_
constexpr static double tan30deg_
Definition: HGCalGeomParameters.h:137
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:59
HGCalParameters::cellFineHalf_
std::vector< bool > cellFineHalf_
Definition: HGCalParameters.h:117
HGCalParameters::radius100to200_
std::vector< double > radius100to200_
Definition: HGCalParameters.h:146
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:124
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
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:352
DDBase::name
const N & name() const
Definition: DDBase.h:59
DDAxes::z
str
#define str(s)
Definition: TestProcessor.cc:51
p2
double p2[4]
Definition: TauolaWrapper.h:90
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
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:1184
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
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
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
HGCalTypes::packTypeUV
static int32_t packTypeUV(int type, int u, int v)
Definition: HGCalTypes.cc:3
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
HGCalParameters::cellSize_
std::vector< double > cellSize_
Definition: HGCalParameters.h:69
DD3Vector
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
Definition: PGeometricDetBuilder.cc:19
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
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:15
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:375
HGCalParameters::depth_
std::vector< int > depth_
Definition: HGCalParameters.h:101
EgHLTOffHistBins_cfi.nr
nr
Definition: EgHLTOffHistBins_cfi.py:4
HGCalWaferMask::goodTypeMode
static bool goodTypeMode(double xpos, double ypos, double delX, double delY, double rin, double rout, int part, int rotn, bool debug)
Definition: HGCalWaferMask.cc:538
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
HGCalParameters::mode_
HGCalGeometryMode::GeometryMode mode_
Definition: HGCalParameters.h:131
cms::DDSolidShapeMap
const std::array< const cms::dd::NameValuePair< DDSolidShape >, 19 > DDSolidShapeMap
Definition: DDSolidShapes.h:97
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
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
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:39
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
HGCalTypes::getUnpackedCell6
static int32_t getUnpackedCell6(int id)
Definition: HGCalTypes.cc:40
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:41
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:26
HGCalParameters::nPhiBinBH_
std::vector< int > nPhiBinBH_
Definition: HGCalParameters.h:153
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
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:29
DDExtrudedPolygon
Definition: DDSolid.h:238
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:1728
HGCalParameters::waferInfo
Definition: HGCalParameters.h:15
HGCalWaferMask::k_OffsetRotation
static const int k_OffsetRotation
Definition: HGCalWaferMask.h:35
HGCalParameters::k_ScaleToDDD
static constexpr double k_ScaleToDDD
Definition: HGCalParameters.h:31
HGCalParameters::tileRingR_
std::vector< std::pair< double, double > > tileRingR_
Definition: HGCalParameters.h:177
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:139
HGCalParameters::tileRingRange_
std::vector< std::pair< int, int > > tileRingRange_
Definition: HGCalParameters.h:178
LaserClient_cfi.high
high
Definition: LaserClient_cfi.py:50
HGCalGeomParameters::loadSpecParsHexagon
void loadSpecParsHexagon(const DDFilteredView &fv, HGCalParameters &php, const DDCompactView *cpv, const std::string &sdTag1, const std::string &sdTag2)
Definition: HGCalGeomParameters.cc:885
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:175
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
hgcalPerformanceValidation.orient
orient
Definition: hgcalPerformanceValidation.py:640
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
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
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:35
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
HGCalGeometryMode::Hexagon8File
Definition: HGCalGeometryMode.h:32
HGCalParameters::lastModule_
std::vector< int > lastModule_
Definition: HGCalParameters.h:161
HGCalParameters::tileInfo
Definition: HGCalParameters.h:19
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:142
HGCalParameters::rMinLayerBH_
std::vector< double > rMinLayerBH_
Definition: HGCalParameters.h:155
HGCalParameters::hgtrform
Definition: HGCalParameters.h:46
tolmin
const double tolmin
Definition: HGCalGeomParameters.cc:27
DDFilteredView
Definition: DDFilteredView.h:20
HGCalGeomParameters::loadSpecParsHexagon8
void loadSpecParsHexagon8(const DDFilteredView &fv, HGCalParameters &php)
Definition: HGCalGeomParameters.cc:974
HGCalParameters::waferTypeL_
std::vector< int > waferTypeL_
Definition: HGCalParameters.h:110
HGCalParameters::cellCoarseX_
std::vector< double > cellCoarseX_
Definition: HGCalParameters.h:118
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HGCalParameters::moduleHR_
std::vector< double > moduleHR_
Definition: HGCalParameters.h:80
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
HGCalTypes::getUnpackedCellType6
static int32_t getUnpackedCellType6(int id)
Definition: HGCalTypes.cc:38
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
edm::Log
Definition: MessageLogger.h:70
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
HGCalParameters::tileInfoMap_
tileInfo_map tileInfoMap_
Definition: HGCalParameters.h:176
DDTubs
Definition: DDSolid.h:255
HGCalParameters::copiesInLayers_
layer_map copiesInLayers_
Definition: HGCalParameters.h:135