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 loadGeometryHexagonModule (const cms::DDCompactView *cpv, HGCalParameters &php, const std::string &sdTag1, const std::string &sdTag2, int firstLayer)
 
void loadGeometryHexagonModule (const DDCompactView *cpv, HGCalParameters &php, const std::string &sdTag1, const std::string &sdTag2, 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 > &layerType, const std::vector< int > &waferIndex, const std::vector< int > &waferProperties)
 
void loadSpecParsTrapezoid (HGCalParameters &php)
 
void loadSpecParsTrapezoid (HGCalParameters &php, const std::vector< int > &tileIndex, const std::vector< int > &tileProperty, 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 32 of file HGCalGeomParameters.cc.

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

◆ ~HGCalGeomParameters()

HGCalGeomParameters::~HGCalGeomParameters ( )

Definition at line 39 of file HGCalGeomParameters.cc.

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

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

2282  {
2283  if (itrf == wafers.end()) {
2284  for (std::vector<HGCalGeomParameters::cellParameters>::const_iterator itr = wafers.begin(); itr != wafers.end();
2285  ++itr) {
2286  if (itr->wafer == wafer) {
2287  itrf = itr;
2288  break;
2289  }
2290  }
2291  }
2292  double dx(0), dy(0);
2293  if (itrf != wafers.end()) {
2294  dx = (xx - itrf->xyz.x());
2295  if (std::abs(dx) < tolerance)
2296  dx = 0;
2297  dy = (yy - itrf->xyz.y());
2298  if (std::abs(dy) < tolerance)
2299  dy = 0;
2300  }
2301  return std::make_pair(dx, dy);
2302 }

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

2250  {
2251  DDValue value(str);
2252  if (DDfetch(&sv, value)) {
2253  const std::vector<double>& fvec = value.doubles();
2254  int nval = fvec.size();
2255  if (nmin > 0) {
2256  if (nval < nmin) {
2257  throw cms::Exception("DDException")
2258  << "HGCalGeomParameters: # of " << str << " bins " << nval << " < " << nmin << " ==> illegal";
2259  }
2260  } else {
2261  if (nval < 1 && nmin == 0) {
2262  throw cms::Exception("DDException")
2263  << "HGCalGeomParameters: # of " << str << " bins " << nval << " < 1 ==> illegal"
2264  << " (nmin=" << nmin << ")";
2265  }
2266  }
2267  return fvec;
2268  } else {
2269  if (nmin >= 0) {
2270  throw cms::Exception("DDException") << "HGCalGeomParameters: cannot get array " << str;
2271  }
2272  std::vector<double> fvec;
2273  return fvec;
2274  }
2275 }

References DDfetch(), Exception, nmin, 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 2058 of file HGCalGeomParameters.cc.

2058  {
2059  for (auto const& it : vmap) {
2060  if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "waferFine")) {
2061  for (const auto& i : it.second)
2062  php.cellFine_.emplace_back(std::round(i));
2063  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "waferCoarse")) {
2064  for (const auto& i : it.second)
2065  php.cellCoarse_.emplace_back(std::round(i));
2066  }
2067  }
2068 
2069  loadCellParsHexagon(php);
2070 }

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

◆ loadCellParsHexagon() [2/3]

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

Definition at line 2043 of file HGCalGeomParameters.cc.

2043  {
2044  // Special parameters for cell parameters
2045  std::string attribute = "OnlyForHGCalNumbering";
2046  DDSpecificsHasNamedValueFilter filter1{attribute};
2047  DDFilteredView fv1(*cpv, filter1);
2048  bool ok = fv1.firstChild();
2049 
2050  if (ok) {
2051  php.cellFine_ = dbl_to_int(cpv->vector("waferFine"));
2052  php.cellCoarse_ = dbl_to_int(cpv->vector("waferCoarse"));
2053  }
2054 
2055  loadCellParsHexagon(php);
2056 }

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

2072  {
2073 #ifdef EDM_ML_DEBUG
2074  edm::LogVerbatim("HGCalGeom") << "HGCalLoadCellPars: " << php.cellFine_.size() << " rows for fine cells";
2075  for (unsigned int k = 0; k < php.cellFine_.size(); ++k)
2076  edm::LogVerbatim("HGCalGeom") << "[" << k << "]: " << php.cellFine_[k];
2077  edm::LogVerbatim("HGCalGeom") << "HGCalLoadCellPars: " << php.cellCoarse_.size() << " rows for coarse cells";
2078  for (unsigned int k = 0; k < php.cellCoarse_.size(); ++k)
2079  edm::LogVerbatim("HGCalGeom") << "[" << k << "]: " << php.cellCoarse_[k];
2080 #endif
2081 }

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

◆ loadCellTrapezoid()

void HGCalGeomParameters::loadCellTrapezoid ( HGCalParameters php)

Definition at line 2083 of file HGCalGeomParameters.cc.

2083  {
2084  php.xLayerHex_.resize(php.zLayerHex_.size(), 0);
2085  php.yLayerHex_.resize(php.zLayerHex_.size(), 0);
2086 #ifdef EDM_ML_DEBUG
2087  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: x|y|zLayerHex in array of size " << php.zLayerHex_.size();
2088  for (unsigned int k = 0; k < php.zLayerHex_.size(); ++k)
2089  edm::LogVerbatim("HGCalGeom") << "Layer[" << k << "] Shift " << php.xLayerHex_[k] << ":" << php.yLayerHex_[k] << ":"
2090  << php.zLayerHex_[k];
2091 #endif
2092  // Find the radius of each eta-partitions
2093 
2095  //Ring radii for each partition
2096  for (unsigned int k = 0; k < 2; ++k) {
2097  for (unsigned int kk = 0; kk < php.tileRingR_.size(); ++kk) {
2098  php.radiusLayer_[k].emplace_back(php.tileRingR_[kk].first);
2099 #ifdef EDM_ML_DEBUG
2100  double zv = ((k == 0) ? (php.zLayerHex_[php.layerFrontBH_[1] - php.firstLayer_])
2101  : (php.zLayerHex_[php.zLayerHex_.size() - 1]));
2102  double rv = php.radiusLayer_[k].back();
2103  double eta = -(std::log(std::tan(0.5 * std::atan(rv / zv))));
2104  edm::LogVerbatim("HGCalGeom") << "New [" << kk << "] new R = " << rv << " Eta = " << eta;
2105 #endif
2106  }
2107  php.radiusLayer_[k].emplace_back(php.tileRingR_[php.tileRingR_.size() - 1].second);
2108  }
2109  // Minimum and maximum radius index for each layer
2110  for (unsigned int k = 0; k < php.zLayerHex_.size(); ++k) {
2111  php.iradMinBH_.emplace_back(1 + php.tileRingRange_[k].first);
2112  php.iradMaxBH_.emplace_back(php.tileRingRange_[k].second);
2113 #ifdef EDM_ML_DEBUG
2114  int kk = php.scintType(php.firstLayer_ + (int)(k));
2115  edm::LogVerbatim("HGCalGeom") << "New Layer " << k << " Type " << kk << " Low edge " << php.iradMinBH_.back()
2116  << " Top edge " << php.iradMaxBH_.back();
2117 #endif
2118  }
2119  } else {
2120  //Ring radii for each partition
2121  for (unsigned int k = 0; k < 2; ++k) {
2122  double rmax = ((k == 0) ? (php.rMaxLayHex_[php.layerFrontBH_[1] - php.firstLayer_] - 1)
2123  : (php.rMaxLayHex_[php.rMaxLayHex_.size() - 1]));
2124  double rv = php.rMinLayerBH_[k];
2125  double zv = ((k == 0) ? (php.zLayerHex_[php.layerFrontBH_[1] - php.firstLayer_])
2126  : (php.zLayerHex_[php.zLayerHex_.size() - 1]));
2127  php.radiusLayer_[k].emplace_back(rv);
2128 #ifdef EDM_ML_DEBUG
2129  double eta = -(std::log(std::tan(0.5 * std::atan(rv / zv))));
2130  edm::LogVerbatim("HGCalGeom") << "Old [" << k << "] rmax " << rmax << " Z = " << zv
2131  << " dEta = " << php.cellSize_[k] << "\nOld[0] new R = " << rv << " Eta = " << eta;
2132  int kount(1);
2133 #endif
2134  while (rv < rmax) {
2135  double eta = -(php.cellSize_[k] + std::log(std::tan(0.5 * std::atan(rv / zv))));
2136  rv = zv * std::tan(2.0 * std::atan(std::exp(-eta)));
2137  php.radiusLayer_[k].emplace_back(rv);
2138 #ifdef EDM_ML_DEBUG
2139  edm::LogVerbatim("HGCalGeom") << "Old [" << kount << "] new R = " << rv << " Eta = " << eta;
2140  ++kount;
2141 #endif
2142  }
2143  }
2144  // Find minimum and maximum radius index for each layer
2145  for (unsigned int k = 0; k < php.zLayerHex_.size(); ++k) {
2146  int kk = php.scintType(php.firstLayer_ + (int)(k));
2147  std::vector<double>::iterator low, high;
2148  low = std::lower_bound(php.radiusLayer_[kk].begin(), php.radiusLayer_[kk].end(), php.rMinLayHex_[k]);
2149 #ifdef EDM_ML_DEBUG
2150  edm::LogVerbatim("HGCalGeom") << "Old [" << k << "] RLow = " << php.rMinLayHex_[k] << " pos "
2151  << (int)(low - php.radiusLayer_[kk].begin());
2152 #endif
2153  if (low == php.radiusLayer_[kk].begin())
2154  ++low;
2155  int irlow = (int)(low - php.radiusLayer_[kk].begin());
2156  double drlow = php.radiusLayer_[kk][irlow] - php.rMinLayHex_[k];
2157 #ifdef EDM_ML_DEBUG
2158  edm::LogVerbatim("HGCalGeom") << "irlow " << irlow << " dr " << drlow << " min " << php.minTileSize_;
2159 #endif
2160  if (drlow < php.minTileSize_) {
2161  ++irlow;
2162 #ifdef EDM_ML_DEBUG
2163  drlow = php.radiusLayer_[kk][irlow] - php.rMinLayHex_[k];
2164  edm::LogVerbatim("HGCalGeom") << "Modified irlow " << irlow << " dr " << drlow;
2165 #endif
2166  }
2167  high = std::lower_bound(php.radiusLayer_[kk].begin(), php.radiusLayer_[kk].end(), php.rMaxLayHex_[k]);
2168 #ifdef EDM_ML_DEBUG
2169  edm::LogVerbatim("HGCalGeom") << "Old [" << k << "] RHigh = " << php.rMaxLayHex_[k] << " pos "
2170  << (int)(high - php.radiusLayer_[kk].begin());
2171 #endif
2172  if (high == php.radiusLayer_[kk].end())
2173  --high;
2174  int irhigh = (int)(high - php.radiusLayer_[kk].begin());
2175  double drhigh = php.rMaxLayHex_[k] - php.radiusLayer_[kk][irhigh - 1];
2176 #ifdef EDM_ML_DEBUG
2177  edm::LogVerbatim("HGCalGeom") << "irhigh " << irhigh << " dr " << drhigh << " min " << php.minTileSize_;
2178 #endif
2179  if (drhigh < php.minTileSize_) {
2180  --irhigh;
2181 #ifdef EDM_ML_DEBUG
2182  drhigh = php.rMaxLayHex_[k] - php.radiusLayer_[kk][irhigh - 1];
2183  edm::LogVerbatim("HGCalGeom") << "Modified irhigh " << irhigh << " dr " << drhigh;
2184 #endif
2185  }
2186  php.iradMinBH_.emplace_back(irlow);
2187  php.iradMaxBH_.emplace_back(irhigh);
2188 #ifdef EDM_ML_DEBUG
2189  edm::LogVerbatim("HGCalGeom") << "Old Layer " << k << " Type " << kk << " Low edge " << irlow << ":" << drlow
2190  << " Top edge " << irhigh << ":" << drhigh;
2191 #endif
2192  }
2193  }
2194 #ifdef EDM_ML_DEBUG
2195  for (unsigned int k = 0; k < 2; ++k) {
2196  edm::LogVerbatim("HGCalGeom") << "Type " << k << " with " << php.radiusLayer_[k].size() << " radii";
2197  for (unsigned int kk = 0; kk < php.radiusLayer_[k].size(); ++kk)
2198  edm::LogVerbatim("HGCalGeom") << "Ring[" << kk << "] " << php.radiusLayer_[k][kk];
2199  }
2200 #endif
2201 
2202  // Now define the volumes
2203  int im(0);
2204  php.waferUVMax_ = 0;
2206  mytr.alpha = 0.0;
2207  for (unsigned int k = 0; k < php.zLayerHex_.size(); ++k) {
2208  if (php.iradMaxBH_[k] > php.waferUVMax_)
2209  php.waferUVMax_ = php.iradMaxBH_[k];
2210  int kk = ((php.firstLayer_ + (int)(k)) < php.layerFrontBH_[1]) ? 0 : 1;
2211  int irm = php.radiusLayer_[kk].size() - 1;
2212 #ifdef EDM_ML_DEBUG
2213  double rmin = php.radiusLayer_[kk][std::max((php.iradMinBH_[k] - 1), 0)];
2214  double rmax = php.radiusLayer_[kk][std::min(php.iradMaxBH_[k], irm)];
2215  edm::LogVerbatim("HGCalGeom") << "Layer " << php.firstLayer_ + k << ":" << kk << " Radius range "
2216  << php.iradMinBH_[k] << ":" << php.iradMaxBH_[k] << ":" << rmin << ":" << rmax;
2217 #endif
2218  mytr.lay = php.firstLayer_ + k;
2219  for (int irad = php.iradMinBH_[k]; irad <= php.iradMaxBH_[k]; ++irad) {
2220  double rmin = php.radiusLayer_[kk][std::max((irad - 1), 0)];
2221  double rmax = php.radiusLayer_[kk][std::min(irad, irm)];
2222  mytr.bl = 0.5 * rmin * php.scintCellSize(mytr.lay);
2223  mytr.tl = 0.5 * rmax * php.scintCellSize(mytr.lay);
2224  mytr.h = 0.5 * (rmax - rmin);
2225  mytr.dz = 0.5 * php.waferThick_;
2226  mytr.cellSize = 0.5 * (rmax + rmin) * php.scintCellSize(mytr.lay);
2227  php.fillModule(mytr, true);
2233  php.fillModule(mytr, false);
2234  if (irad == php.iradMinBH_[k])
2235  php.firstModule_.emplace_back(im);
2236  ++im;
2237  if (irad == php.iradMaxBH_[k] - 1)
2238  php.lastModule_.emplace_back(im);
2239  }
2240  }
2241  php.nSectors_ = php.waferUVMax_;
2242 #ifdef EDM_ML_DEBUG
2243  edm::LogVerbatim("HGCalGeom") << "Maximum radius index " << php.waferUVMax_;
2244  for (unsigned int k = 0; k < php.firstModule_.size(); ++k)
2245  edm::LogVerbatim("HGCalGeom") << "Layer " << k + php.firstLayer_ << " Modules " << php.firstModule_[k] << ":"
2246  << php.lastModule_[k];
2247 #endif
2248 }

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, HGCalGeometryMode::TrapezoidModule, HGCalParameters::waferThick_, HGCalParameters::waferUVMax_, HGCalParameters::xLayerHex_, HGCalParameters::yLayerHex_, HGCalParameters::zLayerHex_, and gpuVertexFinder::zv.

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

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

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, phase1PixelTopology::layer, 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, gpuVertexFinder::zv, 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 45 of file HGCalGeomParameters.cc.

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

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, phase1PixelTopology::layer, 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, gpuVertexFinder::zv, 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 493 of file HGCalGeomParameters.cc.

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

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(), first, HGCalParameters::firstLayer_, HGCalParameters::getModule(), HGCalParameters::hgtrap::h, mps_fire::i, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, createfilelist::int, dqmdumpme::k, HGCalParameters::k_ScaleFromDDD, phase1PixelTopology::layer, 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 756 of file HGCalGeomParameters.cc.

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

References funct::abs(), filterCSVwithJSON::copy, cms::DDFilteredView::copyNos(), cms::DDSolidShapeMap, cms::ddtubs, Exception, ALCARECOTkAlBeamHalo_cff::filter, spr::find(), cms::DDFilteredView::firstChild(), if(), HGCalParameters::k_ScaleFromDD4Hep, HGCalParameters::layer_, hgcalTopologyTester_cfi::layers, cms::DDFilteredView::level(), HGCalParameters::levelT_, HGCalParameters::levelZSide_, loadGeometryHexagon8(), SiStripPI::max, min(), cms::dd::name(), cms::DDFilteredView::name(), gpuPixelDoublets::ntot, 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 682 of file HGCalGeomParameters.cc.

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

References funct::abs(), filterCSVwithJSON::copy, DDFilteredView::copyNumbers(), ddtubs, Exception, spr::find(), if(), createfilelist::int, HGCalParameters::k_ScaleFromDDD, HGCalParameters::layer_, hgcalTopologyTester_cfi::layers, HGCalParameters::levelT_, HGCalParameters::levelZSide_, DDFilteredView::logicalPart(), SiStripPI::max, min(), DDBase< N, C >::name(), DDFilteredView::next(), gpuPixelDoublets::ntot, 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(), and loadGeometryHexagonModule().

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

1101  {
1102  double rmin(0), rmax(0);
1103  for (unsigned int i = 0; i < layers.size(); ++i) {
1104  for (auto& layer : layers) {
1105  if (layer.first == (int)(i + firstLayer)) {
1106  php.layerIndex_.emplace_back(i);
1107  php.rMinLayHex_.emplace_back(layer.second.rmin);
1108  php.rMaxLayHex_.emplace_back(layer.second.rmax);
1109  php.zLayerHex_.emplace_back(layer.second.zpos);
1110  if (i == 0) {
1111  rmin = layer.second.rmin;
1112  rmax = layer.second.rmax;
1113  } else {
1114  if (rmin > layer.second.rmin)
1115  rmin = layer.second.rmin;
1116  if (rmax < layer.second.rmax)
1117  rmax = layer.second.rmax;
1118  }
1119  break;
1120  }
1121  }
1122  }
1123  php.rLimit_.emplace_back(rmin);
1124  php.rLimit_.emplace_back(rmax);
1125  php.depth_ = php.layer_;
1126  php.depthIndex_ = php.layerIndex_;
1127  php.depthLayerF_ = php.layerIndex_;
1128 
1129  for (unsigned int i = 0; i < php.layer_.size(); ++i) {
1130  for (auto& trform : trforms) {
1131  if (trform.first.first == (int)(i + firstLayer)) {
1132  php.fillTrForm(trform.second);
1133  }
1134  }
1135  }
1136 
1137 #ifdef EDM_ML_DEBUG
1138  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Minimum/maximum R " << php.rLimit_[0] << ":" << php.rLimit_[1];
1139  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters finds " << php.zLayerHex_.size() << " layers";
1140  for (unsigned int i = 0; i < php.zLayerHex_.size(); ++i) {
1141  int k = php.layerIndex_[i];
1142  edm::LogVerbatim("HGCalGeom") << "Layer[" << i << ":" << k << ":" << php.layer_[k]
1143  << "] with r = " << php.rMinLayHex_[i] << ":" << php.rMaxLayHex_[i]
1144  << " at z = " << php.zLayerHex_[i];
1145  }
1146  edm::LogVerbatim("HGCalGeom") << "Obtained " << php.trformIndex_.size() << " transformation matrices";
1147  for (unsigned int k = 0; k < php.trformIndex_.size(); ++k) {
1148  edm::LogVerbatim("HGCalGeom") << "Matrix[" << k << "] (" << std::hex << php.trformIndex_[k] << std::dec
1149  << ") Translation (" << php.trformTranX_[k] << ", " << php.trformTranY_[k] << ", "
1150  << php.trformTranZ_[k] << " Rotation (" << php.trformRotXX_[k] << ", "
1151  << php.trformRotYX_[k] << ", " << php.trformRotZX_[k] << ", " << php.trformRotXY_[k]
1152  << ", " << php.trformRotYY_[k] << ", " << php.trformRotZY_[k] << ", "
1153  << php.trformRotXZ_[k] << ", " << php.trformRotYZ_[k] << ", " << php.trformRotZZ_[k]
1154  << ")";
1155  }
1156 #endif
1157 }

References TauDecayModes::dec, HGCalParameters::depth_, HGCalParameters::depthIndex_, HGCalParameters::depthLayerF_, HGCalParameters::fillTrForm(), mps_fire::i, dqmdumpme::k, phase1PixelTopology::layer, 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_.

◆ loadGeometryHexagonModule() [1/2]

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

Definition at line 969 of file HGCalGeomParameters.cc.

973  {
974 #ifdef EDM_ML_DEBUG
975  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters (DD4Hep)::loadGeometryHexagonModule called with tags " << sdTag1
976  << ":" << sdTag2 << " firstLayer " << firstLayer;
977  int ntot1(0), ntot2(0);
978 #endif
979  std::map<int, HGCalGeomParameters::layerParameters> layers;
980  std::map<std::pair<int, int>, HGCalParameters::hgtrform> trforms;
981  std::map<std::pair<int, int>, double> zvals;
982  int levelTop = php.levelT_[0];
983 
984  const cms::DDFilter filter1("Volume", sdTag2);
985  cms::DDFilteredView fv1((*cpv), filter1);
986  while (fv1.firstChild()) {
987 #ifdef EDM_ML_DEBUG
988  ++ntot1;
989 #endif
990  int nsiz = static_cast<int>(fv1.level());
991  if (nsiz > levelTop) {
992  std::vector<int> copy = fv1.copyNos();
993  int lay = copy[nsiz - levelTop - 1];
994  int zside = (nsiz > php.levelZSide_) ? copy[nsiz - php.levelZSide_ - 1] : -1;
995  if (zside != 1)
996  zside = -1;
997  if (lay == 0) {
998  throw cms::Exception("DDException")
999  << "Funny layer # " << lay << " zp " << zside << " in " << nsiz << " components";
1000  } else {
1001  if (zvals.find(std::make_pair(lay, zside)) == zvals.end()) {
1002  zvals[std::make_pair(lay, zside)] = HGCalParameters::k_ScaleFromDD4Hep * fv1.translation().Z();
1003 #ifdef EDM_ML_DEBUG
1004  std::ostringstream st1;
1005  st1 << "Name0 " << fv1.name() << " LTop " << levelTop << ":" << lay << " ZSide " << zside << " # of levels "
1006  << nsiz;
1007  for (const auto& c : copy)
1008  st1 << ":" << c;
1009  st1 << " Z " << zvals[std::make_pair(lay, zside)];
1010  edm::LogVerbatim("HGCalGeom") << st1.str();
1011 #endif
1012  }
1013  }
1014  }
1015  }
1016 
1017  const cms::DDFilter filter2("Volume", sdTag1);
1018  cms::DDFilteredView fv2((*cpv), filter2);
1019  while (fv2.firstChild()) {
1020  // Layers first
1021  int nsiz = static_cast<int>(fv2.level());
1022 #ifdef EDM_ML_DEBUG
1023  ++ntot2;
1024 #endif
1025  if (nsiz > levelTop) {
1026  std::vector<int> copy = fv2.copyNos();
1027  int lay = copy[nsiz - levelTop - 1];
1028  int zside = (nsiz > php.levelZSide_) ? copy[nsiz - php.levelZSide_ - 1] : -1;
1029  if (zside != 1)
1030  zside = -1;
1031 #ifdef EDM_ML_DEBUG
1032  std::ostringstream st2;
1033  st2 << "Name1 " << fv2.name() << "Shape " << cms::dd::name(cms::DDSolidShapeMap, fv2.shape()) << " LTop "
1034  << levelTop << ":" << lay << " ZSide " << zside << ":" << php.levelZSide_ << " # of levels " << nsiz;
1035  for (const auto& c : copy)
1036  st2 << ":" << c;
1037  edm::LogVerbatim("HGCalGeom") << st2.str();
1038 #endif
1039  if (lay == 0) {
1040  throw cms::Exception("DDException")
1041  << "Funny layer # " << lay << " zp " << zside << " in " << nsiz << " components";
1042  } else {
1043  if (zvals.find(std::make_pair(lay, zside)) != zvals.end()) {
1044  if (std::find(php.layer_.begin(), php.layer_.end(), lay) == php.layer_.end())
1045  php.layer_.emplace_back(lay);
1046  auto itr = layers.find(lay);
1047  if (itr == layers.end()) {
1048  const std::vector<double>& pars = fv2.parameters();
1049  double rin = HGCalParameters::k_ScaleFromDD4Hep * pars[0];
1050  double rout = (php.firstMixedLayer_ > 0 && lay >= php.firstMixedLayer_)
1051  ? php.radiusMixBoundary_[lay - php.firstMixedLayer_]
1053  double zp = zvals[std::make_pair(lay, 1)];
1054  HGCalGeomParameters::layerParameters laypar(rin, rout, zp);
1055  layers[lay] = laypar;
1056 #ifdef EDM_ML_DEBUG
1057  std::ostringstream st3;
1058  st3 << "Name2 " << fv2.name() << " LTop " << levelTop << ":" << lay << " ZSide " << zside << " # of levels "
1059  << nsiz;
1060  for (const auto& c : copy)
1061  st3 << ":" << c;
1062  st3 << " R " << rin << ":" << rout;
1063  edm::LogVerbatim("HGCalGeom") << st3.str();
1064 #endif
1065  }
1066 
1067  if (trforms.find(std::make_pair(lay, zside)) == trforms.end()) {
1068  DD3Vector x, y, z;
1069  fv2.rotation().GetComponents(x, y, z);
1070  const CLHEP::HepRep3x3 rotation(x.X(), y.X(), z.X(), x.Y(), y.Y(), z.Y(), x.Z(), y.Z(), z.Z());
1071  const CLHEP::HepRotation hr(rotation);
1072  double xx = ((std::abs(fv2.translation().X()) < tolerance)
1073  ? 0
1074  : HGCalParameters::k_ScaleFromDD4Hep * fv2.translation().X());
1075  double yy = ((std::abs(fv2.translation().Y()) < tolerance)
1076  ? 0
1077  : HGCalParameters::k_ScaleFromDD4Hep * fv2.translation().Y());
1078  const CLHEP::Hep3Vector h3v(xx, yy, zvals[std::make_pair(lay, zside)]);
1080  mytrf.zp = zside;
1081  mytrf.lay = lay;
1082  mytrf.sec = 0;
1083  mytrf.subsec = 0;
1084  mytrf.h3v = h3v;
1085  mytrf.hr = hr;
1086  trforms[std::make_pair(lay, zside)] = mytrf;
1087  }
1088  }
1089  }
1090  }
1091  }
1092 #ifdef EDM_ML_DEBUG
1093  edm::LogVerbatim("HGCalGeom") << "Total # of views " << ntot1 << ":" << ntot2;
1094 #endif
1095  loadGeometryHexagon8(layers, trforms, firstLayer, php);
1096 }

References funct::abs(), c, filterCSVwithJSON::copy, cms::DDFilteredView::copyNos(), cms::DDSolidShapeMap, Exception, spr::find(), cms::DDFilteredView::firstChild(), HGCalParameters::firstMixedLayer_, cms::cuda::for(), HGCalParameters::hgtrform::h3v, HGCalParameters::hgtrform::hr, if(), HGCalParameters::k_ScaleFromDD4Hep, HGCalParameters::hgtrform::lay, HGCalParameters::layer_, hgcalTopologyTester_cfi::layers, cms::DDFilteredView::level(), HGCalParameters::levelT_, HGCalParameters::levelZSide_, loadGeometryHexagon8(), cms::dd::name(), cms::DDFilteredView::name(), cms::DDFilteredView::parameters(), HGCalParameters::radiusMixBoundary_, idealTransformation::rotation, cms::DDFilteredView::rotation(), HGCalParameters::hgtrform::sec, cms::DDFilteredView::shape(), HGCalParameters::hgtrform::subsec, tolerance, cms::DDFilteredView::translation(), x, geometryCSVtoXML::xx, y, geometryCSVtoXML::yy, z, HGCalParameters::hgtrform::zp, and ecaldqm::zside().

◆ loadGeometryHexagonModule() [2/2]

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

Definition at line 833 of file HGCalGeomParameters.cc.

837  {
838 #ifdef EDM_ML_DEBUG
839  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters (DDD)::loadGeometryHexagonModule called with tags " << sdTag1
840  << ":" << sdTag2 << " firstLayer " << firstLayer << ":" << php.firstMixedLayer_;
841  int ntot1(0), ntot2(0);
842 #endif
843  std::map<int, HGCalGeomParameters::layerParameters> layers;
844  std::map<std::pair<int, int>, double> zvals;
845  std::map<std::pair<int, int>, HGCalParameters::hgtrform> trforms;
846  int levelTop = php.levelT_[0];
847 
848  std::string attribute = "Volume";
849  DDValue val1(attribute, sdTag2, 0.0);
850  DDSpecificsMatchesValueFilter filter1{val1};
851  DDFilteredView fv1(*cpv, filter1);
852  bool dodet = fv1.firstChild();
853  while (dodet) {
854 #ifdef EDM_ML_DEBUG
855  ++ntot1;
856 #endif
857  std::vector<int> copy = fv1.copyNumbers();
858  int nsiz = static_cast<int>(copy.size());
859  if (levelTop < nsiz) {
860  int lay = copy[levelTop];
861  int zside = (nsiz > php.levelZSide_) ? copy[php.levelZSide_] : -1;
862  if (zside != 1)
863  zside = -1;
864  if (lay == 0) {
865  throw cms::Exception("DDException")
866  << "Funny layer # " << lay << " zp " << zside << " in " << nsiz << " components";
867  } else {
868  if (zvals.find(std::make_pair(lay, zside)) == zvals.end()) {
869  zvals[std::make_pair(lay, zside)] = HGCalParameters::k_ScaleFromDDD * fv1.translation().Z();
870 #ifdef EDM_ML_DEBUG
871  std::ostringstream st1;
872  st1 << "Name0 " << fv1.name() << " LTop " << levelTop << ":" << lay << " ZSide " << zside << " # of levels "
873  << nsiz;
874  for (const auto& c : copy)
875  st1 << ":" << c;
876  st1 << " Z " << zvals[std::make_pair(lay, zside)];
877  edm::LogVerbatim("HGCalGeom") << st1.str();
878 #endif
879  }
880  }
881  }
882  dodet = fv1.next();
883  }
884 
885  DDValue val2(attribute, sdTag1, 0.0);
886  DDSpecificsMatchesValueFilter filter2{val2};
887  DDFilteredView fv2(*cpv, filter2);
888  dodet = fv2.firstChild();
889  while (dodet) {
890 #ifdef EDM_ML_DEBUG
891  ++ntot2;
892 #endif
893  std::vector<int> copy = fv2.copyNumbers();
894  int nsiz = static_cast<int>(copy.size());
895  if (levelTop < nsiz) {
896  int lay = copy[levelTop];
897  int zside = (nsiz > php.levelZSide_) ? copy[php.levelZSide_] : -1;
898  if (zside != 1)
899  zside = -1;
900  const DDSolid& sol = fv2.logicalPart().solid();
901 #ifdef EDM_ML_DEBUG
902  std::ostringstream st2;
903  st2 << "Name1 " << sol.name() << " shape " << sol.shape() << " LTop " << levelTop << ":" << lay << " ZSide "
904  << zside << ":" << php.levelZSide_ << " # of levels " << nsiz;
905  for (const auto& c : copy)
906  st2 << ":" << c;
907  edm::LogVerbatim("HGCalGeom") << st2.str();
908 #endif
909  if (lay == 0) {
910  throw cms::Exception("DDException")
911  << "Funny layer # " << lay << " zp " << zside << " in " << nsiz << " components";
912  } else if (sol.shape() == DDSolidShape::ddtubs) {
913  if (zvals.find(std::make_pair(lay, zside)) != zvals.end()) {
914  if (std::find(php.layer_.begin(), php.layer_.end(), lay) == php.layer_.end())
915  php.layer_.emplace_back(lay);
916  auto itr = layers.find(lay);
917  if (itr == layers.end()) {
918  const DDTubs& tube = static_cast<DDTubs>(sol);
919  double rin = HGCalParameters::k_ScaleFromDDD * tube.rIn();
920  double rout = (php.firstMixedLayer_ > 0 && lay >= php.firstMixedLayer_)
921  ? php.radiusMixBoundary_[lay - php.firstMixedLayer_]
923  double zp = zvals[std::make_pair(lay, 1)];
924  HGCalGeomParameters::layerParameters laypar(rin, rout, zp);
925  layers[lay] = laypar;
926 #ifdef EDM_ML_DEBUG
927  std::ostringstream st3;
928  st3 << "Name1 " << fv2.name() << " LTop " << levelTop << ":" << lay << " ZSide " << zside << " # of levels "
929  << nsiz;
930  for (const auto& c : copy)
931  st3 << ":" << c;
932  st3 << " R " << rin << ":" << rout;
933  edm::LogVerbatim("HGCalGeom") << st3.str();
934 #endif
935  }
936 
937  if (trforms.find(std::make_pair(lay, zside)) == trforms.end()) {
938  DD3Vector x, y, z;
939  fv2.rotation().GetComponents(x, y, z);
940  const CLHEP::HepRep3x3 rotation(x.X(), y.X(), z.X(), x.Y(), y.Y(), z.Y(), x.Z(), y.Z(), z.Z());
941  const CLHEP::HepRotation hr(rotation);
942  double xx = ((std::abs(fv2.translation().X()) < tolerance)
943  ? 0
944  : HGCalParameters::k_ScaleFromDDD * fv2.translation().X());
945  double yy = ((std::abs(fv2.translation().Y()) < tolerance)
946  ? 0
947  : HGCalParameters::k_ScaleFromDDD * fv2.translation().Y());
948  const CLHEP::Hep3Vector h3v(xx, yy, zvals[std::make_pair(lay, zside)]);
950  mytrf.zp = zside;
951  mytrf.lay = lay;
952  mytrf.sec = 0;
953  mytrf.subsec = 0;
954  mytrf.h3v = h3v;
955  mytrf.hr = hr;
956  trforms[std::make_pair(lay, zside)] = mytrf;
957  }
958  }
959  }
960  }
961  dodet = fv2.next();
962  }
963 #ifdef EDM_ML_DEBUG
964  edm::LogVerbatim("HGCalGeom") << "Total # of views " << ntot1 << ":" << ntot2;
965 #endif
966  loadGeometryHexagon8(layers, trforms, firstLayer, php);
967 }

References funct::abs(), c, filterCSVwithJSON::copy, DDFilteredView::copyNumbers(), ddtubs, Exception, spr::find(), DDFilteredView::firstChild(), HGCalParameters::firstMixedLayer_, HGCalParameters::hgtrform::h3v, HGCalParameters::hgtrform::hr, if(), HGCalParameters::k_ScaleFromDDD, HGCalParameters::hgtrform::lay, HGCalParameters::layer_, hgcalTopologyTester_cfi::layers, HGCalParameters::levelT_, HGCalParameters::levelZSide_, loadGeometryHexagon8(), DDFilteredView::logicalPart(), DDFilteredView::name(), DDBase< N, C >::name(), DDFilteredView::next(), HGCalParameters::radiusMixBoundary_, DDTubs::rIn(), idealTransformation::rotation, DDFilteredView::rotation(), DDTubs::rOut(), HGCalParameters::hgtrform::sec, DDSolid::shape(), DDLogicalPart::solid(), AlCaHLTBitMon_QueryRunRegistry::string, HGCalParameters::hgtrform::subsec, tolerance, DDFilteredView::translation(), x, geometryCSVtoXML::xx, y, geometryCSVtoXML::yy, z, HGCalParameters::hgtrform::zp, and ecaldqm::zside().

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

1203  {
1204  php.boundR_ = fv.get<std::vector<double> >(sdTag4, "RadiusBound");
1206  php.rLimit_ = fv.get<std::vector<double> >(sdTag4, "RadiusLimits");
1208  php.levelT_ = dbl_to_int(fv.get<std::vector<double> >(sdTag4, "LevelTop"));
1209 
1210  // Grouping of layers
1211  php.layerGroup_ = dbl_to_int(fv.get<std::vector<double> >(sdTag1, "GroupingZFine"));
1212  php.layerGroupM_ = dbl_to_int(fv.get<std::vector<double> >(sdTag1, "GroupingZMid"));
1213  php.layerGroupO_ = dbl_to_int(fv.get<std::vector<double> >(sdTag1, "GroupingZOut"));
1214  php.slopeMin_ = fv.get<std::vector<double> >(sdTag4, "Slope");
1215  if (php.slopeMin_.empty())
1216  php.slopeMin_.emplace_back(0);
1217 
1218  // Wafer size
1219  const auto& dummy = fv.get<std::vector<double> >(sdTag2, "WaferSize");
1221 
1222  // Cell size
1223  php.cellSize_ = fv.get<std::vector<double> >(sdTag3, "CellSize");
1225 
1226  loadSpecParsHexagon(php);
1227 }

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

1163  {
1165  php.boundR_ = getDDDArray("RadiusBound", sv, 4);
1167  php.rLimit_ = getDDDArray("RadiusLimits", sv, 2);
1169  php.levelT_ = dbl_to_int(getDDDArray("LevelTop", sv, 0));
1170 
1171  // Grouping of layers
1172  php.layerGroup_ = dbl_to_int(getDDDArray("GroupingZFine", sv, 0));
1173  php.layerGroupM_ = dbl_to_int(getDDDArray("GroupingZMid", sv, 0));
1174  php.layerGroupO_ = dbl_to_int(getDDDArray("GroupingZOut", sv, 0));
1175  php.slopeMin_ = getDDDArray("Slope", sv, 1);
1176 
1177  // Wafer size
1178  std::string attribute = "Volume";
1179  DDSpecificsMatchesValueFilter filter1{DDValue(attribute, sdTag1, 0.0)};
1180  DDFilteredView fv1(*cpv, filter1);
1181  if (fv1.firstChild()) {
1182  DDsvalues_type sv(fv1.mergedSpecifics());
1183  const auto& dummy = getDDDArray("WaferSize", sv, 0);
1184  waferSize_ = dummy[0];
1185  }
1186 
1187  // Cell size
1188  DDSpecificsMatchesValueFilter filter2{DDValue(attribute, sdTag2, 0.0)};
1189  DDFilteredView fv2(*cpv, filter2);
1190  if (fv2.firstChild()) {
1191  DDsvalues_type sv(fv2.mergedSpecifics());
1192  php.cellSize_ = getDDDArray("CellSize", sv, 0);
1193  }
1194 
1195  loadSpecParsHexagon(php);
1196 }

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

1229  {
1230 #ifdef EDM_ML_DEBUG
1231  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: wafer radius ranges"
1232  << " for cell grouping " << php.boundR_[0] << ":" << php.boundR_[1] << ":"
1233  << php.boundR_[2] << ":" << php.boundR_[3];
1234  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Minimum/maximum R " << php.rLimit_[0] << ":" << php.rLimit_[1];
1235  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: LevelTop " << php.levelT_[0];
1236  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: minimum slope " << php.slopeMin_[0] << " and layer groupings "
1237  << "for the 3 ranges:";
1238  for (unsigned int k = 0; k < php.layerGroup_.size(); ++k)
1239  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << php.layerGroup_[k] << ":" << php.layerGroupM_[k] << ":"
1240  << php.layerGroupO_[k];
1241  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Wafer Size: " << waferSize_;
1242  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: " << php.cellSize_.size() << " cells of sizes:";
1243  for (unsigned int k = 0; k < php.cellSize_.size(); ++k)
1244  edm::LogVerbatim("HGCalGeom") << " [" << k << "] " << php.cellSize_[k];
1245 #endif
1246 }

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

1318  {
1319  php.cellThickness_ = fv.get<std::vector<double> >(sdTag1, "CellThickness");
1322  php.waferThickness_ = fv.get<std::vector<double> >(sdTag1, "WaferThickness");
1324  } else {
1325  for (unsigned int k = 0; k < php.cellThickness_.size(); ++k)
1326  php.waferThickness_.emplace_back(php.waferThick_);
1327  }
1328 
1329  php.radius100to200_ = fv.get<std::vector<double> >(sdTag1, "Radius100to200");
1330  php.radius200to300_ = fv.get<std::vector<double> >(sdTag1, "Radius200to300");
1331 
1332  const auto& dummy = fv.get<std::vector<double> >(sdTag1, "RadiusCuts");
1333  if (dummy.size() > 3) {
1334  php.choiceType_ = static_cast<int>(dummy[0]);
1335  php.nCornerCut_ = static_cast<int>(dummy[1]);
1336  php.fracAreaMin_ = dummy[2];
1338  } else {
1339  php.choiceType_ = php.nCornerCut_ = php.fracAreaMin_ = php.zMinForRad_ = 0;
1340  }
1341 
1342  php.slopeMin_ = fv.get<std::vector<double> >(sdTag1, "SlopeBottom");
1343  php.zFrontMin_ = fv.get<std::vector<double> >(sdTag1, "ZFrontBottom");
1345  php.rMinFront_ = fv.get<std::vector<double> >(sdTag1, "RMinFront");
1347 
1348  php.slopeTop_ = fv.get<std::vector<double> >(sdTag1, "SlopeTop");
1349  php.zFrontTop_ = fv.get<std::vector<double> >(sdTag1, "ZFrontTop");
1351  php.rMaxFront_ = fv.get<std::vector<double> >(sdTag1, "RMaxFront");
1353  unsigned int kmax = (php.zFrontTop_.size() - php.slopeTop_.size());
1354  for (unsigned int k = 0; k < kmax; ++k)
1355  php.slopeTop_.emplace_back(0);
1356 
1357  const auto& dummy2 = fv.get<std::vector<double> >(sdTag1, "LayerOffset");
1358  if (!dummy2.empty()) {
1359  php.layerOffset_ = dummy2[0];
1360  } else {
1361  php.layerOffset_ = 0;
1362  }
1363 
1364  for (auto const& it : vmap) {
1365  if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "RadiusMixBoundary")) {
1366  for (const auto& i : it.second)
1368  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "ZRanges")) {
1369  for (const auto& i : it.second)
1370  php.zRanges_.emplace_back(HGCalParameters::k_ScaleFromDD4Hep * i);
1371  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "LayerCenter")) {
1372  for (const auto& i : it.second)
1373  php.layerCenter_.emplace_back(std::round(i));
1374  }
1375  }
1376 
1377  loadSpecParsHexagon8(php);
1378 
1379  // Read in parameters from Philip's file
1380  if (php.waferMaskMode_ > 1) {
1381  std::vector<int> layerType, waferIndex, waferProperties;
1382  if (php.waferMaskMode_ == siliconFileEE) {
1383  for (auto const& it : vmap) {
1384  if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "WaferIndexEE")) {
1385  for (const auto& i : it.second)
1386  waferIndex.emplace_back(std::round(i));
1387  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "WaferPropertiesEE")) {
1388  for (const auto& i : it.second)
1389  waferProperties.emplace_back(std::round(i));
1390  }
1391  }
1392  } else if (php.waferMaskMode_ == siliconFileHE) {
1393  for (auto const& it : vmap) {
1394  if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "WaferIndexHE")) {
1395  for (const auto& i : it.second)
1396  waferIndex.emplace_back(std::round(i));
1397  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "WaferPropertiesHE")) {
1398  for (const auto& i : it.second)
1399  waferProperties.emplace_back(std::round(i));
1400  }
1401  }
1402  }
1404  if (php.waferMaskMode_ == siliconFileEE) {
1405  for (auto const& it : vmap) {
1406  if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "LayerTypesEE")) {
1407  for (const auto& i : it.second)
1408  layerType.emplace_back(std::round(i));
1409  }
1410  }
1411  } else if (php.waferMaskMode_ == siliconFileHE) {
1412  for (auto const& it : vmap) {
1413  if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "LayerTypesHE")) {
1414  for (const auto& i : it.second)
1415  layerType.emplace_back(std::round(i));
1416  }
1417  }
1418  }
1419  }
1420 
1421  loadSpecParsHexagon8(php, layerType, waferIndex, waferProperties);
1422  }
1423 }

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

◆ loadSpecParsHexagon8() [2/4]

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

Definition at line 1248 of file HGCalGeomParameters.cc.

1248  {
1250  php.cellThickness_ = getDDDArray("CellThickness", sv, 3);
1253  php.waferThickness_ = getDDDArray("WaferThickness", sv, 3);
1255  } else {
1256  for (unsigned int k = 0; k < php.cellThickness_.size(); ++k)
1257  php.waferThickness_.emplace_back(php.waferThick_);
1258  }
1259 
1260  php.radius100to200_ = getDDDArray("Radius100to200", sv, 5);
1261  php.radius200to300_ = getDDDArray("Radius200to300", sv, 5);
1262 
1263  const auto& dummy = getDDDArray("RadiusCuts", sv, 4);
1264  php.choiceType_ = (int)(dummy[0]);
1265  php.nCornerCut_ = (int)(dummy[1]);
1266  php.fracAreaMin_ = dummy[2];
1268 
1269  php.radiusMixBoundary_ = fv.vector("RadiusMixBoundary");
1271 
1272  php.slopeMin_ = getDDDArray("SlopeBottom", sv, 0);
1273  php.zFrontMin_ = getDDDArray("ZFrontBottom", sv, 0);
1275  php.rMinFront_ = getDDDArray("RMinFront", sv, 0);
1277 
1278  php.slopeTop_ = getDDDArray("SlopeTop", sv, 0);
1279  php.zFrontTop_ = getDDDArray("ZFrontTop", sv, 0);
1281  php.rMaxFront_ = getDDDArray("RMaxFront", sv, 0);
1283 
1284  php.zRanges_ = fv.vector("ZRanges");
1286 
1287  const auto& dummy2 = getDDDArray("LayerOffset", sv, 1);
1288  php.layerOffset_ = dummy2[0];
1289  php.layerCenter_ = dbl_to_int(fv.vector("LayerCenter"));
1290 
1291  loadSpecParsHexagon8(php);
1292 
1293  // Read in parameters from Philip's file
1294  if (php.waferMaskMode_ > 1) {
1295  std::vector<int> layerType, waferIndex, waferProperties;
1296  if (php.waferMaskMode_ == siliconFileEE) {
1297  waferIndex = dbl_to_int(fv.vector("WaferIndexEE"));
1298  waferProperties = dbl_to_int(fv.vector("WaferPropertiesEE"));
1299  } else if (php.waferMaskMode_ == siliconFileHE) {
1300  waferIndex = dbl_to_int(fv.vector("WaferIndexHE"));
1301  waferProperties = dbl_to_int(fv.vector("WaferPropertiesHE"));
1302  }
1304  if (php.waferMaskMode_ == siliconFileEE) {
1305  layerType = dbl_to_int(fv.vector("LayerTypesEE"));
1306  } else if (php.waferMaskMode_ == siliconFileHE) {
1307  layerType = dbl_to_int(fv.vector("LayerTypesHE"));
1308  }
1309  }
1310 
1311  loadSpecParsHexagon8(php, layerType, waferIndex, waferProperties);
1312  }
1313 }

References HGCalParameters::cellThickness_, HGCalParameters::choiceType_, dbl_to_int(), HGCalParameters::fracAreaMin_, getDDDArray(), HGCalGeometryMode::Hexagon8Module, createfilelist::int, dqmdumpme::k, HGCalParameters::k_ScaleFromDDD, HGCalParameters::layerCenter_, HGCalParameters::layerOffset_, DDFilteredView::mergedSpecifics(), HGCalParameters::mode_, HGCalParameters::nCornerCut_, HGCalParameters::radius100to200_, HGCalParameters::radius200to300_, HGCalParameters::radiusMixBoundary_, rescale(), HGCalParameters::rMaxFront_, HGCalParameters::rMinFront_, siliconFileEE, siliconFileHE, HGCalParameters::slopeMin_, HGCalParameters::slopeTop_, pfDeepBoostedJetPreprocessParams_cfi::sv, DDFilteredView::vector(), HGCalWaferIndex::waferIndex(), HGCalParameters::waferMaskMode_, HGCalParameters::waferThick_, HGCalParameters::waferThickness_, HGCalParameters::zFrontMin_, HGCalParameters::zFrontTop_, HGCalParameters::zMinForRad_, and HGCalParameters::zRanges_.

Referenced by loadSpecParsHexagon8().

◆ loadSpecParsHexagon8() [3/4]

void HGCalGeomParameters::loadSpecParsHexagon8 ( HGCalParameters php)
private

Definition at line 1425 of file HGCalGeomParameters.cc.

1425  {
1426 #ifdef EDM_ML_DEBUG
1427  for (unsigned int k = 0; k < php.waferThickness_.size(); ++k)
1428  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: wafer[" << k << "] Thickness " << php.waferThickness_[k];
1429  for (unsigned int k = 0; k < php.cellThickness_.size(); ++k)
1430  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: cell[" << k << "] Thickness " << php.cellThickness_[k];
1431  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Polynomial "
1432  << "parameters for 120 to 200 micron "
1433  << "transition with" << php.radius100to200_.size() << " elements";
1434  for (unsigned int k = 0; k < php.radius100to200_.size(); ++k)
1435  edm::LogVerbatim("HGCalGeom") << "Element [" << k << "] " << php.radius100to200_[k];
1436  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Polynomial "
1437  << "parameters for 200 to 300 micron "
1438  << "transition with " << php.radius200to300_.size() << " elements";
1439  for (unsigned int k = 0; k < php.radius200to300_.size(); ++k)
1440  edm::LogVerbatim("HGCalGeom") << "Element [" << k << "] " << php.radius200to300_[k];
1441  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Parameters for the"
1442  << " transition " << php.choiceType_ << ":" << php.nCornerCut_ << ":"
1443  << php.fracAreaMin_ << ":" << php.zMinForRad_;
1444  for (unsigned int k = 0; k < php.radiusMixBoundary_.size(); ++k)
1445  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Mix[" << k << "] R = " << php.radiusMixBoundary_[k];
1446  for (unsigned int k = 0; k < php.zFrontMin_.size(); ++k)
1447  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Boundary[" << k << "] Bottom Z = " << php.zFrontMin_[k]
1448  << " Slope = " << php.slopeMin_[k] << " rMax = " << php.rMinFront_[k];
1449  for (unsigned int k = 0; k < php.zFrontTop_.size(); ++k)
1450  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Boundary[" << k << "] Top Z = " << php.zFrontTop_[k]
1451  << " Slope = " << php.slopeTop_[k] << " rMax = " << php.rMaxFront_[k];
1452  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Z-Boundary " << php.zRanges_[0] << ":" << php.zRanges_[1] << ":"
1453  << php.zRanges_[2] << ":" << php.zRanges_[3];
1454  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: LayerOffset " << php.layerOffset_ << " in array of size "
1455  << php.layerCenter_.size();
1456  for (unsigned int k = 0; k < php.layerCenter_.size(); ++k)
1457  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << php.layerCenter_[k];
1458 #endif
1459 }

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

◆ loadSpecParsHexagon8() [4/4]

void HGCalGeomParameters::loadSpecParsHexagon8 ( HGCalParameters php,
const std::vector< int > &  layerType,
const std::vector< int > &  waferIndex,
const std::vector< int > &  waferProperties 
)
private

Definition at line 1461 of file HGCalGeomParameters.cc.

1464  {
1465  // Store parameters from Philip's file
1466  int types[5] = {HGCalTypes::WaferCenter,
1471  for (unsigned int k = 0; k < layerType.size(); ++k) {
1472  php.layerType_.emplace_back(types[layerType[k]]);
1473 #ifdef EDM_ML_DEBUG
1474  edm::LogVerbatim("HGCalGeom") << "Layer[" << k << "] Type " << layerType[k] << ":" << php.layerType_[k];
1475 #endif
1476  }
1477  for (unsigned int k = 0; k < php.layerType_.size(); ++k) {
1478  double cth = (php.layerType_[k] == HGCalTypes::WaferCenterR) ? cos(php.layerRotation_) : 1.0;
1479  double sth = (php.layerType_[k] == HGCalTypes::WaferCenterR) ? sin(php.layerRotation_) : 0.0;
1480  php.layerRotV_.emplace_back(std::make_pair(cth, sth));
1481 #ifdef EDM_ML_DEBUG
1482  edm::LogVerbatim("HGCalGeom") << "Layer[" << k << "] Type " << php.layerType_[k] << " cos|sin(Theta) "
1483  << php.layerRotV_[k].first << ":" << php.layerRotV_[k].second;
1484 #endif
1485  }
1486  for (unsigned int k = 0; k < waferIndex.size(); ++k) {
1487  int partial = HGCalProperty::waferPartial(waferProperties[k]);
1488  int orient = HGCalWaferMask::getRotation(php.waferZSide_, partial, HGCalProperty::waferOrient(waferProperties[k]));
1489  php.waferInfoMap_[waferIndex[k]] =
1490  HGCalParameters::waferInfo(HGCalProperty::waferThick(waferProperties[k]), partial, orient);
1491 #ifdef EDM_ML_DEBUG
1492  edm::LogVerbatim("HGCalGeom") << "[" << k << ":" << waferIndex[k] << ":"
1495  << HGCalWaferIndex::waferV(waferIndex[k]) << "] Thickness type "
1496  << HGCalProperty::waferThick(waferProperties[k]) << " Partial type " << partial
1497  << " Orientation " << HGCalProperty::waferOrient(waferProperties[k]) << ":" << orient;
1498 #endif
1499  }
1500 }

References HGCalTypes::CornerCenterYm, HGCalTypes::CornerCenterYp, funct::cos(), HGCalWaferMask::getRotation(), dqmdumpme::k, HGCalParameters::layerRotation_, HGCalParameters::layerRotV_, HGCalParameters::layerType_, hgcalPerformanceValidation::orient, funct::sin(), HGCalTypes::WaferCenter, HGCalTypes::WaferCenterB, HGCalTypes::WaferCenterR, HGCalWaferIndex::waferIndex(), HGCalParameters::waferInfoMap_, HGCalWaferIndex::waferLayer(), HGCalProperty::waferOrient(), HGCalProperty::waferPartial(), HGCalProperty::waferThick(), 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 1571 of file HGCalGeomParameters.cc.

1574  {
1575  for (auto const& it : vmap) {
1576  if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "RadiusMixBoundary")) {
1577  for (const auto& i : it.second)
1579  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "ZRanges")) {
1580  for (const auto& i : it.second)
1581  php.zRanges_.emplace_back(HGCalParameters::k_ScaleFromDD4Hep * i);
1582  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "LayerCenter")) {
1583  for (const auto& i : it.second)
1584  php.layerCenter_.emplace_back(std::round(i));
1585  }
1586  }
1587 
1588  php.nPhiBinBH_ = dbl_to_int(fv.get<std::vector<double> >(sdTag1, "NPhiBinBH"));
1589  php.layerFrontBH_ = dbl_to_int(fv.get<std::vector<double> >(sdTag1, "LayerFrontBH"));
1590  php.rMinLayerBH_ = fv.get<std::vector<double> >(sdTag1, "RMinLayerBH");
1592  php.nCellsFine_ = php.nPhiBinBH_[0];
1593  php.nCellsCoarse_ = php.nPhiBinBH_[1];
1594  php.cellSize_.emplace_back(2.0 * M_PI / php.nCellsFine_);
1595  php.cellSize_.emplace_back(2.0 * M_PI / php.nCellsCoarse_);
1596 
1597  php.slopeMin_ = fv.get<std::vector<double> >(sdTag1, "SlopeBottom");
1598  php.zFrontMin_ = fv.get<std::vector<double> >(sdTag1, "ZFrontBottom");
1600  php.rMinFront_ = fv.get<std::vector<double> >(sdTag1, "RMinFront");
1602 
1603  php.slopeTop_ = fv.get<std::vector<double> >(sdTag1, "SlopeTop");
1604  php.zFrontTop_ = fv.get<std::vector<double> >(sdTag1, "ZFrontTop");
1606  php.rMaxFront_ = fv.get<std::vector<double> >(sdTag1, "RMaxFront");
1608  unsigned int kmax = (php.zFrontTop_.size() - php.slopeTop_.size());
1609  for (unsigned int k = 0; k < kmax; ++k)
1610  php.slopeTop_.emplace_back(0);
1611 
1612  const auto& dummy2 = fv.get<std::vector<double> >(sdTag1, "LayerOffset");
1613  php.layerOffset_ = dummy2[0];
1614 
1615  loadSpecParsTrapezoid(php);
1616 
1617  // tile parameters from Katja's file
1618  if (php.waferMaskMode_ == scintillatorFile) {
1619  std::vector<int> tileIndx, tileProperty;
1620  std::vector<int> tileHEX1, tileHEX2, tileHEX3, tileHEX4;
1621  std::vector<double> tileRMin, tileRMax;
1622  std::vector<int> tileRingMin, tileRingMax;
1623  for (auto const& it : vmap) {
1624  if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileIndex")) {
1625  for (const auto& i : it.second)
1626  tileIndx.emplace_back(std::round(i));
1627  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileProperty")) {
1628  for (const auto& i : it.second)
1629  tileProperty.emplace_back(std::round(i));
1630  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileHEX1")) {
1631  for (const auto& i : it.second)
1632  tileHEX1.emplace_back(std::round(i));
1633  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileHEX2")) {
1634  for (const auto& i : it.second)
1635  tileHEX2.emplace_back(std::round(i));
1636  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileHEX3")) {
1637  for (const auto& i : it.second)
1638  tileHEX3.emplace_back(std::round(i));
1639  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileHEX4")) {
1640  for (const auto& i : it.second)
1641  tileHEX4.emplace_back(std::round(i));
1642  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileRMin")) {
1643  for (const auto& i : it.second)
1644  tileRMin.emplace_back(HGCalParameters::k_ScaleFromDD4Hep * i);
1645  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileRMax")) {
1646  for (const auto& i : it.second)
1647  tileRMax.emplace_back(HGCalParameters::k_ScaleFromDD4Hep * i);
1648  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileRingMin")) {
1649  for (const auto& i : it.second)
1650  tileRingMin.emplace_back(std::round(i));
1651  } else if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), "TileRingMax")) {
1652  for (const auto& i : it.second)
1653  tileRingMax.emplace_back(std::round(i));
1654  }
1655  }
1656 
1658  tileIndx,
1659  tileProperty,
1660  tileHEX1,
1661  tileHEX2,
1662  tileHEX3,
1663  tileHEX4,
1664  tileRMin,
1665  tileRMax,
1666  tileRingMin,
1667  tileRingMax);
1668  }
1669 }

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_, HGCalProperty::tileProperty(), HGCalParameters::waferMaskMode_, HGCalParameters::zFrontMin_, HGCalParameters::zFrontTop_, and HGCalParameters::zRanges_.

◆ loadSpecParsTrapezoid() [2/4]

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

Definition at line 1502 of file HGCalGeomParameters.cc.

1502  {
1504  php.radiusMixBoundary_ = fv.vector("RadiusMixBoundary");
1506 
1507  php.nPhiBinBH_ = dbl_to_int(getDDDArray("NPhiBinBH", sv, 0));
1508  php.layerFrontBH_ = dbl_to_int(getDDDArray("LayerFrontBH", sv, 0));
1509  php.rMinLayerBH_ = getDDDArray("RMinLayerBH", sv, 0);
1511  php.nCellsFine_ = php.nPhiBinBH_[0];
1512  php.nCellsCoarse_ = php.nPhiBinBH_[1];
1513  php.cellSize_.emplace_back(2.0 * M_PI / php.nCellsFine_);
1514  php.cellSize_.emplace_back(2.0 * M_PI / php.nCellsCoarse_);
1515 
1516  php.slopeMin_ = getDDDArray("SlopeBottom", sv, 0);
1517  php.zFrontMin_ = getDDDArray("ZFrontBottom", sv, 0);
1519  php.rMinFront_ = getDDDArray("RMinFront", sv, 0);
1521 
1522  php.slopeTop_ = getDDDArray("SlopeTop", sv, 0);
1523  php.zFrontTop_ = getDDDArray("ZFrontTop", sv, 0);
1525  php.rMaxFront_ = getDDDArray("RMaxFront", sv, 0);
1527 
1528  php.zRanges_ = fv.vector("ZRanges");
1530 
1531  // Offsets
1532  const auto& dummy2 = getDDDArray("LayerOffset", sv, 1);
1533  php.layerOffset_ = dummy2[0];
1534  php.layerCenter_ = dbl_to_int(fv.vector("LayerCenter"));
1535 
1536  loadSpecParsTrapezoid(php);
1537 
1538  // tile parameters from Katja's file
1539  if (php.waferMaskMode_ == scintillatorFile) {
1540  std::vector<int> tileIndx, tileProperty;
1541  std::vector<int> tileHEX1, tileHEX2, tileHEX3, tileHEX4;
1542  std::vector<double> tileRMin, tileRMax;
1543  std::vector<int> tileRingMin, tileRingMax;
1544  tileIndx = dbl_to_int(fv.vector("TileIndex"));
1545  tileProperty = dbl_to_int(fv.vector("TileProperty"));
1546  tileHEX1 = dbl_to_int(fv.vector("TileHEX1"));
1547  tileHEX2 = dbl_to_int(fv.vector("TileHEX2"));
1548  tileHEX3 = dbl_to_int(fv.vector("TileHEX3"));
1549  tileHEX4 = dbl_to_int(fv.vector("TileHEX4"));
1550  tileRMin = fv.vector("TileRMin");
1551  tileRMax = fv.vector("TileRMax");
1554  tileRingMin = dbl_to_int(fv.vector("TileRingMin"));
1555  tileRingMax = dbl_to_int(fv.vector("TileRingMax"));
1556 
1558  tileIndx,
1559  tileProperty,
1560  tileHEX1,
1561  tileHEX2,
1562  tileHEX3,
1563  tileHEX4,
1564  tileRMin,
1565  tileRMax,
1566  tileRingMin,
1567  tileRingMax);
1568  }
1569 }

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, HGCalProperty::tileProperty(), 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 1671 of file HGCalGeomParameters.cc.

1671  {
1672 #ifdef EDM_ML_DEBUG
1673  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters:nCells " << php.nCellsFine_ << ":" << php.nCellsCoarse_
1674  << " cellSize: " << php.cellSize_[0] << ":" << php.cellSize_[1];
1675  for (unsigned int k = 0; k < php.layerFrontBH_.size(); ++k)
1676  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Type[" << k << "] Front Layer = " << php.layerFrontBH_[k]
1677  << " rMin = " << php.rMinLayerBH_[k];
1678  for (unsigned int k = 0; k < php.radiusMixBoundary_.size(); ++k) {
1679  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Mix[" << k << "] R = " << php.radiusMixBoundary_[k]
1680  << " Nphi = " << php.scintCells(k + php.firstLayer_)
1681  << " dPhi = " << php.scintCellSize(k + php.firstLayer_);
1682  }
1683 
1684  for (unsigned int k = 0; k < php.zFrontMin_.size(); ++k)
1685  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Boundary[" << k << "] Bottom Z = " << php.zFrontMin_[k]
1686  << " Slope = " << php.slopeMin_[k] << " rMax = " << php.rMinFront_[k];
1687 
1688  for (unsigned int k = 0; k < php.zFrontTop_.size(); ++k)
1689  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Boundary[" << k << "] Top Z = " << php.zFrontTop_[k]
1690  << " Slope = " << php.slopeTop_[k] << " rMax = " << php.rMaxFront_[k];
1691 
1692  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Z-Boundary " << php.zRanges_[0] << ":" << php.zRanges_[1] << ":"
1693  << php.zRanges_[2] << ":" << php.zRanges_[3];
1694 
1695  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: LayerOffset " << php.layerOffset_ << " in array of size "
1696  << php.layerCenter_.size();
1697  for (unsigned int k = 0; k < php.layerCenter_.size(); ++k)
1698  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << php.layerCenter_[k];
1699 #endif
1700 }

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 > &  tileIndex,
const std::vector< int > &  tileProperty,
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 1702 of file HGCalGeomParameters.cc.

1712  {
1713  // tile parameters from Katja's file
1714  for (unsigned int k = 0; k < tileIndx.size(); ++k) {
1717  tileHEX1[k],
1718  tileHEX2[k],
1719  tileHEX3[k],
1720  tileHEX4[k]);
1721 #ifdef EDM_ML_DEBUG
1722  edm::LogVerbatim("HGCalGeom") << "Tile[" << k << ":" << tileIndx[k] << "] "
1723  << " Type " << HGCalProperty::tileType(tileProperty[k]) << " SiPM "
1724  << HGCalProperty::tileSiPM(tileProperty[k]) << " HEX " << std::hex << tileHEX1[k]
1725  << ":" << tileHEX2[k] << ":" << tileHEX3[k] << ":" << tileHEX4[k] << std::dec;
1726 #endif
1727  }
1728 
1729  for (unsigned int k = 0; k < tileRMin.size(); ++k) {
1730  php.tileRingR_.emplace_back(tileRMin[k], tileRMax[k]);
1731 #ifdef EDM_ML_DEBUG
1732  edm::LogVerbatim("HGCalGeom") << "TileRingR[" << k << "] " << tileRMin[k] << ":" << tileRMax[k];
1733 #endif
1734  }
1735 
1736  for (unsigned k = 0; k < tileRingMin.size(); ++k) {
1737  php.tileRingRange_.emplace_back(tileRingMin[k], tileRingMax[k]);
1738 #ifdef EDM_ML_DEBUG
1739  edm::LogVerbatim("HGCalGeom") << "TileRingRange[" << k << "] " << tileRingMin[k] << ":" << tileRingMax[k];
1740 #endif
1741  }
1742 }

References TauDecayModes::dec, dqmdumpme::k, HGCalParameters::tileInfoMap_, HGCalProperty::tileProperty(), HGCalParameters::tileRingR_, HGCalParameters::tileRingRange_, HGCalProperty::tileSiPM(), and HGCalProperty::tileType().

◆ loadWaferHexagon()

void HGCalGeomParameters::loadWaferHexagon ( HGCalParameters php)

Definition at line 1744 of file HGCalGeomParameters.cc.

1744  {
1746  double rin(php.rLimit_[0]), rout(php.rLimit_[1]), rMaxFine(php.boundR_[1]);
1747 #ifdef EDM_ML_DEBUG
1748  edm::LogVerbatim("HGCalGeom") << "Input waferWidth " << waferW << ":" << rmin << " R Limits: " << rin << ":" << rout
1749  << " Fine " << rMaxFine;
1750 #endif
1751  // Clear the vectors
1752  php.waferCopy_.clear();
1753  php.waferTypeL_.clear();
1754  php.waferTypeT_.clear();
1755  php.waferPosX_.clear();
1756  php.waferPosY_.clear();
1757  double dx = 0.5 * waferW;
1758  double dy = 3.0 * dx * tan(30._deg);
1759  double rr = 2.0 * dx * tan(30._deg);
1760  int ncol = (int)(2.0 * rout / waferW) + 1;
1761  int nrow = (int)(rout / (waferW * tan(30._deg))) + 1;
1762  int ns2 = (2 * ncol + 1) * (2 * nrow + 1) * php.layer_.size();
1763  int incm(0), inrm(0), kount(0), ntot(0);
1764  HGCalParameters::layer_map copiesInLayers(php.layer_.size() + 1);
1765  HGCalParameters::waferT_map waferTypes(ns2 + 1);
1766 #ifdef EDM_ML_DEBUG
1767  edm::LogVerbatim("HGCalGeom") << "Row " << nrow << " Column " << ncol;
1768 #endif
1769  for (int nr = -nrow; nr <= nrow; ++nr) {
1770  int inr = (nr >= 0) ? nr : -nr;
1771  for (int nc = -ncol; nc <= ncol; ++nc) {
1772  int inc = (nc >= 0) ? nc : -nc;
1773  if (inr % 2 == inc % 2) {
1774  double xpos = nc * dx;
1775  double ypos = nr * dy;
1776  std::pair<int, int> corner = HGCalGeomTools::waferCorner(xpos, ypos, dx, rr, rin, rout, true);
1777  double rpos = std::sqrt(xpos * xpos + ypos * ypos);
1778  int typet = (rpos < rMaxFine) ? 1 : 2;
1779  int typel(3);
1780  for (int k = 1; k < 4; ++k) {
1781  if ((rpos + rmin) <= php.boundR_[k]) {
1782  typel = k;
1783  break;
1784  }
1785  }
1786  ++ntot;
1787  if (corner.first > 0) {
1788  int copy = HGCalTypes::packTypeUV(typel, nc, nr);
1789  if (inc > incm)
1790  incm = inc;
1791  if (inr > inrm)
1792  inrm = inr;
1793  kount++;
1794 #ifdef EDM_ML_DEBUG
1795  edm::LogVerbatim("HGCalGeom") << kount << ":" << ntot << " Copy " << copy << " Type " << typel << ":" << typet
1796  << " Location " << corner.first << " Position " << xpos << ":" << ypos
1797  << " Layers " << php.layer_.size();
1798 #endif
1799  php.waferCopy_.emplace_back(copy);
1800  php.waferTypeL_.emplace_back(typel);
1801  php.waferTypeT_.emplace_back(typet);
1802  php.waferPosX_.emplace_back(xpos);
1803  php.waferPosY_.emplace_back(ypos);
1804  for (unsigned int il = 0; il < php.layer_.size(); ++il) {
1805  std::pair<int, int> corner =
1806  HGCalGeomTools::waferCorner(xpos, ypos, dx, rr, php.rMinLayHex_[il], php.rMaxLayHex_[il], true);
1807  if (corner.first > 0) {
1808  auto cpy = copiesInLayers[php.layer_[il]].find(copy);
1809  if (cpy == copiesInLayers[php.layer_[il]].end())
1810  copiesInLayers[php.layer_[il]][copy] =
1811  ((corner.first == (int)(HGCalParameters::k_CornerSize)) ? php.waferCopy_.size() : -1);
1812  }
1813  if ((corner.first > 0) && (corner.first < (int)(HGCalParameters::k_CornerSize))) {
1814  int wl = HGCalWaferIndex::waferIndex(php.layer_[il], copy, 0, true);
1815  waferTypes[wl] = corner;
1816  }
1817  }
1818  }
1819  }
1820  }
1821  }
1822  php.copiesInLayers_ = copiesInLayers;
1823  php.waferTypes_ = waferTypes;
1824  php.nSectors_ = (int)(php.waferCopy_.size());
1825  php.waferUVMax_ = 0;
1826 #ifdef EDM_ML_DEBUG
1827  edm::LogVerbatim("HGCalGeom") << "HGCalWaferHexagon: # of columns " << incm << " # of rows " << inrm << " and "
1828  << kount << ":" << ntot << " wafers; R " << rin << ":" << rout;
1829  edm::LogVerbatim("HGCalGeom") << "Dump copiesInLayers for " << php.copiesInLayers_.size() << " layers";
1830  for (unsigned int k = 0; k < copiesInLayers.size(); ++k) {
1831  const auto& theModules = copiesInLayers[k];
1832  edm::LogVerbatim("HGCalGeom") << "Layer " << k << ":" << theModules.size();
1833  int k2(0);
1834  for (std::unordered_map<int, int>::const_iterator itr = theModules.begin(); itr != theModules.end(); ++itr, ++k2) {
1835  edm::LogVerbatim("HGCalGeom") << "[" << k2 << "] " << itr->first << ":" << itr->second;
1836  }
1837  }
1838 #endif
1839 }

References HGCalParameters::boundR_, HGCalParameters::copiesInLayers_, filterCSVwithJSON::copy, TCMET_cfi::corner, PVValHelper::dx, PVValHelper::dy, createfilelist::int, dqmdumpme::k, HGCalParameters::k_CornerSize, HGCalParameters::k_ScaleFromDDD, HGCalParameters::layer_, EgHLTOffHistBins_cfi::nr, HGCalParameters::nSectors_, gpuPixelDoublets::ntot, 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 1841 of file HGCalGeomParameters.cc.

1841  {
1842  double waferW(php.waferSize_);
1843  double waferS(php.sensorSeparation_);
1844  auto wType = std::make_unique<HGCalWaferType>(php.radius100to200_,
1845  php.radius200to300_,
1846  HGCalParameters::k_ScaleToDDD * (waferW + waferS),
1848  php.choiceType_,
1849  php.nCornerCut_,
1850  php.fracAreaMin_);
1851 
1852  double rout(php.rLimit_[1]);
1853 #ifdef EDM_ML_DEBUG
1854  edm::LogVerbatim("HGCalGeom") << "Input waferWidth " << waferW << ":" << waferS << " R Max: " << rout;
1855 #endif
1856  // Clear the vectors
1857  php.waferCopy_.clear();
1858  php.waferTypeL_.clear();
1859  php.waferTypeT_.clear();
1860  php.waferPosX_.clear();
1861  php.waferPosY_.clear();
1862  double r = 0.5 * (waferW + waferS);
1863  double R = 2.0 * r / sqrt3_;
1864  double dy = 0.75 * R;
1865  double r1 = 0.5 * waferW;
1866  double R1 = 2.0 * r1 / sqrt3_;
1867  int N = (r == 0) ? 3 : ((int)(0.5 * rout / r) + 3);
1868  int ns1 = (2 * N + 1) * (2 * N + 1);
1869  int ns2 = ns1 * php.zLayerHex_.size();
1870 #ifdef EDM_ML_DEBUG
1871  edm::LogVerbatim("HGCalGeom") << "wafer " << waferW << ":" << waferS << " r " << r << " dy " << dy << " N " << N
1872  << " sizes " << ns1 << ":" << ns2;
1873  std::vector<int> indtypes(ns1 + 1);
1874  indtypes.clear();
1875 #endif
1876  HGCalParameters::wafer_map wafersInLayers(ns1 + 1);
1877  HGCalParameters::wafer_map typesInLayers(ns2 + 1);
1878  HGCalParameters::waferT_map waferTypes(ns2 + 1);
1879  int ipos(0), lpos(0), uvmax(0), nwarn(0);
1880  std::vector<int> uvmx(php.zLayerHex_.size(), 0);
1881  for (int v = -N; v <= N; ++v) {
1882  for (int u = -N; u <= N; ++u) {
1883  int nr = 2 * v;
1884  int nc = -2 * u + v;
1885  double xpos = nc * r;
1886  double ypos = nr * dy;
1887  int indx = HGCalWaferIndex::waferIndex(0, u, v);
1888  php.waferCopy_.emplace_back(indx);
1889  php.waferPosX_.emplace_back(xpos);
1890  php.waferPosY_.emplace_back(ypos);
1891  wafersInLayers[indx] = ipos;
1892  ++ipos;
1893  std::pair<int, int> corner = HGCalGeomTools::waferCorner(xpos, ypos, r1, R1, 0, rout, false);
1894  if ((corner.first == (int)(HGCalParameters::k_CornerSize)) || ((corner.first > 0) && php.defineFull_)) {
1895  uvmax = std::max(uvmax, std::max(std::abs(u), std::abs(v)));
1896  }
1897  for (unsigned int i = 0; i < php.zLayerHex_.size(); ++i) {
1898  int copy = i + php.layerOffset_;
1899  std::pair<double, double> xyoff = geomTools_.shiftXY(php.layerCenter_[copy], (waferW + waferS));
1900  int lay = php.layer_[php.layerIndex_[i]];
1901  double xpos0 = xpos + xyoff.first;
1902  double ypos0 = ypos + xyoff.second;
1903  double zpos = php.zLayerHex_[i];
1904  int kndx = HGCalWaferIndex::waferIndex(lay, u, v);
1905  int type(-1);
1907  type = wType->getType(kndx, php.waferInfoMap_);
1908  if (type < 0)
1909  type = wType->getType(HGCalParameters::k_ScaleToDDD * xpos0,
1912  php.waferTypeL_.emplace_back(type);
1913  typesInLayers[kndx] = lpos;
1914  ++lpos;
1915 #ifdef EDM_ML_DEBUG
1916  indtypes.emplace_back(kndx);
1917 #endif
1918  std::pair<int, int> corner =
1919  HGCalGeomTools::waferCorner(xpos0, ypos0, r1, R1, php.rMinLayHex_[i], php.rMaxLayHex_[i], false);
1920 #ifdef EDM_ML_DEBUG
1921  if (((corner.first == 0) && std::abs(u) < 5 && std::abs(v) < 5) || (std::abs(u) < 2 && std::abs(v) < 2)) {
1922  edm::LogVerbatim("HGCalGeom") << "Layer " << lay << " R " << php.rMinLayHex_[i] << ":" << php.rMaxLayHex_[i]
1923  << " u " << u << " v " << v << " with " << corner.first << " corners";
1924  }
1925 #endif
1926  if ((corner.first == (int)(HGCalParameters::k_CornerSize)) || ((corner.first > 0) && php.defineFull_)) {
1927  uvmx[i] = std::max(uvmx[i], std::max(std::abs(u), std::abs(v)));
1928  }
1929  if ((corner.first < (int)(HGCalParameters::k_CornerSize)) && (corner.first > 0)) {
1930 #ifdef EDM_ML_DEBUG
1931  edm::LogVerbatim("HGCalGeom") << "Layer " << lay << " u|v " << u << ":" << v << " with corner "
1932  << corner.first << ":" << corner.second;
1933 #endif
1934  int wl = HGCalWaferIndex::waferIndex(lay, u, v);
1935  if (php.waferMaskMode_ > 0) {
1936  std::pair<int, int> corner0 = HGCalWaferMask::getTypeMode(
1937  xpos0, ypos0, r1, R1, php.rMinLayHex_[i], php.rMaxLayHex_[i], type, php.waferMaskMode_);
1939  auto itr = php.waferInfoMap_.find(wl);
1940  if (itr != php.waferInfoMap_.end()) {
1941  int part = (itr->second).part;
1942  int orient = (itr->second).orient;
1944  xpos0, ypos0, r1, R1, php.rMinLayHex_[i], php.rMaxLayHex_[i], part, orient, false);
1945  if (ok)
1946  corner0 = std::make_pair(part, (HGCalWaferMask::k_OffsetRotation + orient));
1947 #ifdef EDM_ML_DEBUG
1948  edm::LogVerbatim("HGCalGeom")
1949  << "Layer:u:v " << i << ":" << lay << ":" << u << ":" << v << " Part " << corner0.first << ":"
1950  << part << " Orient " << corner0.second << ":" << orient << " Position " << xpos0 << ":" << ypos0
1951  << " delta " << r1 << ":" << R1 << " Limit " << php.rMinLayHex_[i] << ":" << php.rMaxLayHex_[i]
1952  << " Compatibiliety Flag " << ok;
1953 #endif
1954  if (!ok)
1955  ++nwarn;
1956  }
1957  }
1958  waferTypes[wl] = corner0;
1959 #ifdef EDM_ML_DEBUG
1960  edm::LogVerbatim("HGCalGeom")
1961  << "Layer " << lay << " u|v " << u << ":" << v << " Index " << std::hex << wl << std::dec << " pos "
1962  << xpos0 << ":" << ypos0 << " R " << r1 << ":" << R1 << " Range " << php.rMinLayHex_[i] << ":"
1963  << php.rMaxLayHex_[i] << type << ":" << php.waferMaskMode_ << " corner " << corner.first << ":"
1964  << corner.second << " croner0 " << corner0.first << ":" << corner0.second;
1965 #endif
1966  } else {
1967  waferTypes[wl] = corner;
1968 #ifdef EDM_ML_DEBUG
1969  edm::LogVerbatim("HGCalGeom") << "Layer " << lay << " u|v " << u << ":" << v << " with corner "
1970  << corner.first << ":" << corner.second;
1971 #endif
1972  }
1973  }
1974  }
1975  }
1976  }
1977  if (nwarn > 0)
1978  edm::LogWarning("HGCalGeom") << "HGCalGeomParameters::loadWafer8: there are " << nwarn
1979  << " wafers with non-matching partial- orientation types";
1980  php.waferUVMax_ = uvmax;
1981  php.waferUVMaxLayer_ = uvmx;
1982  php.wafersInLayers_ = wafersInLayers;
1983  php.typesInLayers_ = typesInLayers;
1984  php.waferTypes_ = waferTypes;
1985  php.nSectors_ = (int)(php.waferCopy_.size());
1987  mytr.lay = 1;
1988  mytr.bl = php.waferR_;
1989  mytr.tl = php.waferR_;
1990  mytr.h = php.waferR_;
1991  mytr.alpha = 0.0;
1993  for (auto const& dz : php.cellThickness_) {
1994  mytr.dz = 0.5 * HGCalParameters::k_ScaleToDDD * dz;
1995  php.fillModule(mytr, false);
1996  }
1997  for (unsigned k = 0; k < php.cellThickness_.size(); ++k) {
1998  HGCalParameters::hgtrap mytr = php.getModule(k, false);
2004  php.fillModule(mytr, true);
2005  }
2006 #ifdef EDM_ML_DEBUG
2007  edm::LogVerbatim("HGCalGeom") << "HGCalGeomParameters: Total of " << php.waferCopy_.size() << " wafers";
2008  for (unsigned int k = 0; k < php.waferCopy_.size(); ++k) {
2009  int id = php.waferCopy_[k];
2010  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << std::hex << id << std::dec << ":"
2011  << HGCalWaferIndex::waferLayer(id) << ":" << HGCalWaferIndex::waferU(id) << ":"
2012  << HGCalWaferIndex::waferV(id) << " x " << php.waferPosX_[k] << " y "
2013  << php.waferPosY_[k] << " index " << php.wafersInLayers_[id];
2014  }
2015  edm::LogVerbatim("HGCalGeom") << "HGCalParameters: Total of " << php.waferTypeL_.size() << " wafer types";
2016  for (unsigned int k = 0; k < php.waferTypeL_.size(); ++k) {
2017  int id = indtypes[k];
2018  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << php.typesInLayers_[id] << ":" << php.waferTypeL_[k] << " ID "
2019  << std::hex << id << std::dec << ":" << HGCalWaferIndex::waferLayer(id) << ":"
2020  << HGCalWaferIndex::waferU(id) << ":" << HGCalWaferIndex::waferV(id);
2021  }
2022 #endif
2023 
2024  //Wafer offset
2025  php.xLayerHex_.clear();
2026  php.yLayerHex_.clear();
2027  double waferSize = php.waferSize_ + php.sensorSeparation_;
2028 #ifdef EDM_ML_DEBUG
2029  edm::LogVerbatim("HGCalGeom") << "WaferSize " << waferSize;
2030 #endif
2031  for (unsigned int k = 0; k < php.zLayerHex_.size(); ++k) {
2032  int copy = k + php.layerOffset_;
2033  std::pair<double, double> xyoff = geomTools_.shiftXY(php.layerCenter_[copy], waferSize);
2034  php.xLayerHex_.emplace_back(xyoff.first);
2035  php.yLayerHex_.emplace_back(xyoff.second);
2036 #ifdef EDM_ML_DEBUG
2037  edm::LogVerbatim("HGCalGeom") << "Layer[" << k << "] Off " << copy << ":" << php.layerCenter_[copy] << " Shift "
2038  << xyoff.first << ":" << xyoff.second;
2039 #endif
2040  }
2041 }

References funct::abs(), HGCalParameters::hgtrap::alpha, HGCalParameters::hgtrap::bl, HGCalParameters::hgtrap::cellSize, HGCalParameters::cellThickness_, HGCalParameters::choiceType_, filterCSVwithJSON::copy, TCMET_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, HGCalGeometryMode::Hexagon8Module, 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 2304 of file HGCalGeomParameters.cc.

2304  {
2305  std::for_each(v.begin(), v.end(), [s](double& n) { n *= s; });
2306 }

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

2308  {
2309  for (auto& n : v) {
2310  if (std::abs(n) < tolmin)
2311  n = 0;
2312  }
2313 }

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

Member Data Documentation

◆ geomTools_

HGCalGeomTools HGCalGeomParameters::geomTools_
private

Definition at line 149 of file HGCalGeomParameters.h.

Referenced by loadWaferHexagon8().

◆ scintillatorFile

constexpr static int HGCalGeomParameters::scintillatorFile = 4
staticconstexprprivate

Definition at line 148 of file HGCalGeomParameters.h.

Referenced by loadSpecParsTrapezoid().

◆ siliconFileEE

constexpr static int HGCalGeomParameters::siliconFileEE = 2
staticconstexprprivate

Definition at line 146 of file HGCalGeomParameters.h.

Referenced by loadSpecParsHexagon8().

◆ siliconFileHE

constexpr static int HGCalGeomParameters::siliconFileHE = 3
staticconstexprprivate

Definition at line 147 of file HGCalGeomParameters.h.

Referenced by loadSpecParsHexagon8().

◆ sqrt3_

const double HGCalGeomParameters::sqrt3_
private

Definition at line 150 of file HGCalGeomParameters.h.

Referenced by loadWaferHexagon8().

◆ tan30deg_

constexpr static double HGCalGeomParameters::tan30deg_ = 0.5773502693
staticconstexprprivate

Definition at line 145 of file HGCalGeomParameters.h.

Referenced by loadGeometryHexagon().

◆ waferSize_

double HGCalGeomParameters::waferSize_
private
HGCalParameters::layerFrontBH_
std::vector< int > layerFrontBH_
Definition: HGCalParameters.h:161
HGCalParameters::layerRotation_
double layerRotation_
Definition: HGCalParameters.h:176
HGCalParameters::k_ScaleFromDD4HepToG4
static constexpr double k_ScaleFromDD4HepToG4
Definition: HGCalParameters.h:42
HGCalParameters::trformRotXX_
std::vector< double > trformRotXX_
Definition: HGCalParameters.h:94
HGCalGeomParameters::layerParameters
Definition: HGCalGeomParameters.h:90
HGCalParameters::hgtrap::bl
float bl
Definition: HGCalParameters.h:49
DDAxes::y
HGCalParameters::tol
static constexpr double tol
Definition: HGCalParameters.h:45
testProducerWithPsetDescEmpty_cfi.i2
i2
Definition: testProducerWithPsetDescEmpty_cfi.py:46
HGCalParameters::cellCoarseHalf_
std::vector< bool > cellCoarseHalf_
Definition: HGCalParameters.h:127
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:287
HGCalParameters::scaleTrForm
void scaleTrForm(double)
Definition: HGCalParameters.cc:150
HGCalParameters::nSectors_
int nSectors_
Definition: HGCalParameters.h:74
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:342
HGCalParameters::trformRotYY_
std::vector< double > trformRotYY_
Definition: HGCalParameters.h:98
HGCalGeometryMode::TrapezoidFile
Definition: HGCalGeometryMode.h:33
HGCalGeomParameters::loadGeometryHexagon8
void loadGeometryHexagon8(const DDFilteredView &_fv, HGCalParameters &php, int firstLayer)
Definition: HGCalGeomParameters.cc:682
HGCalParameters::firstLayer_
int firstLayer_
Definition: HGCalParameters.h:173
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
HGCalGeomParameters::siliconFileEE
constexpr static int siliconFileEE
Definition: HGCalGeomParameters.h:146
cms::DDSolidShape::ddtubs
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
HGCalParameters::moduleTlR_
std::vector< double > moduleTlR_
Definition: HGCalParameters.h:85
HGCalParameters::moduleBlS_
std::vector< double > moduleBlS_
Definition: HGCalParameters.h:77
HGCalParameters::zLayerHex_
std::vector< double > zLayerHex_
Definition: HGCalParameters.h:112
HGCalParameters::moduleHS_
std::vector< double > moduleHS_
Definition: HGCalParameters.h:79
HGCalGeomParameters::waferSize_
double waferSize_
Definition: HGCalGeomParameters.h:151
HGCalParameters::choiceType_
int choiceType_
Definition: HGCalParameters.h:155
HGCalGeomParameters::scintillatorFile
constexpr static int scintillatorFile
Definition: HGCalGeomParameters.h:148
LaserClient_cfi.wl
wl
Definition: LaserClient_cfi.py:46
HGCalParameters::levelZSide_
int levelZSide_
Definition: HGCalParameters.h:136
HGCalParameters::zFrontMin_
std::vector< double > zFrontMin_
Definition: HGCalParameters.h:139
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:328
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
findQualityFiles.rr
string rr
Definition: findQualityFiles.py:185
HGCalGeomParameters::cellParameters
Definition: HGCalGeomParameters.h:94
HGCalParameters::hgtrform::subsec
int subsec
Definition: HGCalParameters.h:53
HGCalParameters::rMaxLayHex_
std::vector< double > rMaxLayHex_
Definition: HGCalParameters.h:114
HGCalParameters::trformRotYX_
std::vector< double > trformRotYX_
Definition: HGCalParameters.h:95
HGCalParameters::hgtrap::cellSize
float cellSize
Definition: HGCalParameters.h:49
HGCalParameters::cellFineY_
std::vector< double > cellFineY_
Definition: HGCalParameters.h:121
DDFilteredView::mergedSpecifics
DDsvalues_type mergedSpecifics() const
Definition: DDFilteredView.cc:42
DDSolidShape::ddpolyhedra_rrz
DDFilteredView::logicalPart
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
Definition: DDFilteredView.cc:16
HGCalTypes::WaferCenter
Definition: HGCalTypes.h:40
HGCalParameters::k_CornerSize
static constexpr uint32_t k_CornerSize
Definition: HGCalParameters.h:44
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
HGCalWaferIndex::waferU
int32_t waferU(const int32_t index)
Definition: HGCalWaferIndex.cc:27
HGCalProperty::waferOrient
int32_t waferOrient(const int32_t property)
Definition: HGCalProperty.cc:17
HGCalParameters::slopeTop_
std::vector< double > slopeTop_
Definition: HGCalParameters.h:169
HGCalParameters::layerIndex_
std::vector< int > layerIndex_
Definition: HGCalParameters.h:104
HGCalWaferIndex::waferIndex
int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
Definition: HGCalWaferIndex.cc:4
if
if(0==first)
Definition: CAHitNtupletGeneratorKernelsImpl.h:58
HGCalParameters::yLayerHex_
std::vector< double > yLayerHex_
Definition: HGCalParameters.h:111
gpuPixelDoublets::ntot
__shared__ uint32_t ntot
Definition: gpuPixelDoubletsAlgos.h:67
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:2277
HGCalParameters::scintCellSize
double scintCellSize(const int layer) const
Definition: HGCalParameters.h:67
HGCalParameters::hgtrap::alpha
float alpha
Definition: HGCalParameters.h:49
DDPolyhedra::rMinVec
std::vector< double > rMinVec(void) const
Definition: DDSolid.cc:335
HGCalParameters::cellFine_
std::vector< int > cellFine_
Definition: HGCalParameters.h:132
HGCalParameters::nCellsCoarse_
int nCellsCoarse_
Definition: HGCalParameters.h:143
DDExtrudedPolygon::xVec
std::vector< double > xVec(void) const
Definition: DDSolid.cc:378
HGCalParameters::waferZSide_
int waferZSide_
Definition: HGCalParameters.h:183
HGCalParameters::wafersInLayers_
wafer_map wafersInLayers_
Definition: HGCalParameters.h:179
HGCalParameters::waferSize_
double waferSize_
Definition: HGCalParameters.h:144
HGCalProperty::tileType
int32_t tileType(const int32_t property)
Definition: HGCalProperty.cc:26
gpuVertexFinder::zv
float *__restrict__ zv
Definition: gpuFitVertices.h:26
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:45
HGCalTypes::CornerCenterYm
Definition: HGCalTypes.h:42
HGCalGeomTools::shiftXY
std::pair< double, double > shiftXY(int waferPosition, double waferSize) const
Definition: HGCalGeomTools.cc:234
HGCalParameters::hgtrap::dz
float dz
Definition: HGCalParameters.h:49
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
HGCalGeometryMode::Hexagon8Module
Definition: HGCalGeometryMode.h:34
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
HGCalParameters::moduleLayR_
std::vector< int > moduleLayR_
Definition: HGCalParameters.h:83
HGCalParameters::hgtrform::zp
int zp
Definition: HGCalParameters.h:53
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:149
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
HGCalParameters::iradMaxBH_
std::vector< int > iradMaxBH_
Definition: HGCalParameters.h:165
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
HGCalParameters::moduleBlR_
std::vector< double > moduleBlR_
Definition: HGCalParameters.h:84
HGCalParameters::boundR_
std::vector< double > boundR_
Definition: HGCalParameters.h:130
DDExtrudedPolygon::zVec
std::vector< double > zVec(void) const
Definition: DDSolid.cc:387
HGCalGeomParameters::geomTools_
HGCalGeomTools geomTools_
Definition: HGCalGeomParameters.h:149
HGCalWaferMask::getRotation
static int getRotation(int zside, int type, int rotn)
Definition: HGCalWaferMask.cc:397
HGCalParameters::fillModule
void fillModule(const hgtrap &mytr, bool reco)
Definition: HGCalParameters.cc:15
HGCalParameters::waferPosY_
std::vector< double > waferPosY_
Definition: HGCalParameters.h:119
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
HGCalParameters::moduleTlS_
std::vector< double > moduleTlS_
Definition: HGCalParameters.h:78
HGCalParameters::sensorSeparation_
double sensorSeparation_
Definition: HGCalParameters.h:146
HGCalGeomParameters::rescale
void rescale(std::vector< double > &, const double s)
Definition: HGCalGeomParameters.cc:2304
cms::DDFilteredView::get
T get(const std::string &)
extract attribute value
HGCalParameters::trformRotZY_
std::vector< double > trformRotZY_
Definition: HGCalParameters.h:99
HGCalParameters::trformTranX_
std::vector< double > trformTranX_
Definition: HGCalParameters.h:91
HGCalGeomParameters::getDDDArray
std::vector< double > getDDDArray(const std::string &str, const DDsvalues_type &sv, const int nmin)
Definition: HGCalGeomParameters.cc:2250
HGCalParameters::moduleDzR_
std::vector< double > moduleDzR_
Definition: HGCalParameters.h:87
DDSolid::shape
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:123
HGCalTypes::WaferCenterB
Definition: HGCalTypes.h:45
alignCSCRings.s
s
Definition: alignCSCRings.py:92
part
part
Definition: HCALResponse.h:20
HGCalGeomParameters::tan30deg_
constexpr static double tan30deg_
Definition: HGCalGeomParameters.h:145
HGCalParameters::hgtrform::h3v
CLHEP::Hep3Vector h3v
Definition: HGCalParameters.h:54
HGCalParameters::trformIndex_
std::vector< uint32_t > trformIndex_
Definition: HGCalParameters.h:90
HGCalParameters::hgtrap::tl
float tl
Definition: HGCalParameters.h:49
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
HGCalParameters::radiusLayer_
std::vector< double > radiusLayer_[2]
Definition: HGCalParameters.h:163
cms::DDFilter
Definition: DDFilteredView.h:59
HGCalParameters::cellFineHalf_
std::vector< bool > cellFineHalf_
Definition: HGCalParameters.h:123
HGCalParameters::radius100to200_
std::vector< double > radius100to200_
Definition: HGCalParameters.h:153
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:105
HGCalParameters::layerRotV_
std::vector< std::pair< double, double > > layerRotV_
Definition: HGCalParameters.h:185
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:31
HGCalParameters::radiusMixBoundary_
std::vector< double > radiusMixBoundary_
Definition: HGCalParameters.h:159
HGCalParameters::k_ScaleFromDDDToG4
static constexpr double k_ScaleFromDDDToG4
Definition: HGCalParameters.h:38
PVValHelper::eta
Definition: PVValidationHelpers.h:70
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:118
HGCalParameters::waferUVMax_
int waferUVMax_
Definition: HGCalParameters.h:148
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:53
p2
double p2[4]
Definition: TauolaWrapper.h:90
N
#define N
Definition: blowfish.cc:9
HGCalWaferIndex::waferV
int32_t waferV(const int32_t index)
Definition: HGCalWaferIndex.cc:32
HGCalParameters::rMinLayHex_
std::vector< double > rMinLayHex_
Definition: HGCalParameters.h:113
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:180
HGCalGeomParameters::loadSpecParsTrapezoid
void loadSpecParsTrapezoid(const DDFilteredView &fv, HGCalParameters &php)
Definition: HGCalGeomParameters.cc:1502
HGCalParameters::waferThickness_
std::vector< double > waferThickness_
Definition: HGCalParameters.h:151
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
dqmdumpme.k
k
Definition: dqmdumpme.py:60
HGCalParameters::waferCopy_
std::vector< int > waferCopy_
Definition: HGCalParameters.h:115
Point3DBase< float, GlobalTag >
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
HGCalParameters::iradMinBH_
std::vector< int > iradMinBH_
Definition: HGCalParameters.h:164
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:96
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
HGCalParameters::cellSize_
std::vector< double > cellSize_
Definition: HGCalParameters.h:75
DD3Vector
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
Definition: PGeometricDetBuilder.cc:20
HGCalParameters::trformRotXZ_
std::vector< double > trformRotXZ_
Definition: HGCalParameters.h:100
DDTubs::rIn
double rIn(void) const
Definition: DDSolid.cc:456
HGCalParameters::moduleAlphaS_
std::vector< double > moduleAlphaS_
Definition: HGCalParameters.h:81
HGCalTypes::CornerCenterYp
Definition: HGCalTypes.h:41
HGCalParameters::nCellsFine_
int nCellsFine_
Definition: HGCalParameters.h:142
HGCalParameters::firstModule_
std::vector< int > firstModule_
Definition: HGCalParameters.h:167
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:435
HGCalParameters::depth_
std::vector< int > depth_
Definition: HGCalParameters.h:107
EgHLTOffHistBins_cfi.nr
nr
Definition: EgHLTOffHistBins_cfi.py:4
HGCalGeometryMode::TrapezoidModule
Definition: HGCalGeometryMode.h:35
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
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:681
HGCalParameters::rMaxFront_
std::vector< double > rMaxFront_
Definition: HGCalParameters.h:171
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:137
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
HGCalParameters::hgtrform::sec
int sec
Definition: HGCalParameters.h:53
HGCalParameters::cellCoarseY_
std::vector< double > cellCoarseY_
Definition: HGCalParameters.h:125
DDTubs::rOut
double rOut(void) const
Definition: DDSolid.cc:458
HGCalParameters::rLimit_
std::vector< double > rLimit_
Definition: HGCalParameters.h:131
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
HGCalWaferMask::k_OffsetRotation
static constexpr int k_OffsetRotation
Definition: HGCalWaferMask.h:37
HGCalParameters::trformTranZ_
std::vector< double > trformTranZ_
Definition: HGCalParameters.h:93
HGCalParameters::fillTrForm
void fillTrForm(const hgtrform &mytr)
Definition: HGCalParameters.cc:67
HGCalParameters::scintType
int scintType(const int layer) const
Definition: HGCalParameters.h:68
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:66
HGCalProperty::waferThick
int32_t waferThick(const int32_t property)
Definition: HGCalProperty.cc:9
HGCalParameters::hgtrap::h
float h
Definition: HGCalParameters.h:49
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:129
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:29
HGCalParameters::nPhiBinBH_
std::vector< int > nPhiBinBH_
Definition: HGCalParameters.h:160
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:97
PVValHelper::dy
Definition: PVValidationHelpers.h:50
HGCalParameters::layerGroupM_
std::vector< int > layerGroupM_
Definition: HGCalParameters.h:128
HGCalParameters::waferR_
double waferR_
Definition: HGCalParameters.h:134
HGCalParameters::nCornerCut_
int nCornerCut_
Definition: HGCalParameters.h:156
DDExtrudedPolygon
Definition: DDSolid.h:249
HGCalParameters::layerOffset_
int layerOffset_
Definition: HGCalParameters.h:175
cms::cuda::for
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
Definition: HistoContainer.h:15
HGCalParameters::waferThick_
double waferThick_
Definition: HGCalParameters.h:145
HGCalParameters::hgtrform::lay
int lay
Definition: HGCalParameters.h:53
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HGCalParameters::trformTranY_
std::vector< double > trformTranY_
Definition: HGCalParameters.h:92
HGCalProperty::tileSiPM
int32_t tileSiPM(const int32_t property)
Definition: HGCalProperty.cc:30
HGCalParameters::cellCoarse_
std::vector< int > cellCoarse_
Definition: HGCalParameters.h:133
HGCalParameters::k_ScaleFromDDD
static constexpr double k_ScaleFromDDD
Definition: HGCalParameters.h:36
HGCalParameters::waferTypeT_
std::vector< int > waferTypeT_
Definition: HGCalParameters.h:117
DDPolyhedra
Definition: DDSolid.h:235
HGCalProperty::waferPartial
int32_t waferPartial(const int32_t property)
Definition: HGCalProperty.cc:13
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HGCalTypes::WaferCenterR
Definition: HGCalTypes.h:46
HGCalGeomParameters::loadCellParsHexagon
void loadCellParsHexagon(const DDCompactView *cpv, HGCalParameters &php)
Definition: HGCalGeomParameters.cc:2043
HGCalParameters::waferInfo
Definition: HGCalParameters.h:16
types
types
Definition: AlignPCLThresholds_PayloadInspector.cc:30
nmin
const HitContainer *__restrict__ const TkSoA *__restrict__ Quality *__restrict__ uint16_t nmin
Definition: CAHitNtupletGeneratorKernelsImpl.h:634
HGCalParameters::k_ScaleToDDD
static constexpr double k_ScaleToDDD
Definition: HGCalParameters.h:37
HGCalParameters::tileRingR_
std::vector< std::pair< double, double > > tileRingR_
Definition: HGCalParameters.h:187
HGCalParameters::moduleLayS_
std::vector< int > moduleLayS_
Definition: HGCalParameters.h:76
HGCalParameters::k_ScaleFromDD4Hep
static constexpr double k_ScaleFromDD4Hep
Definition: HGCalParameters.h:40
HGCalParameters::layerType_
std::vector< int > layerType_
Definition: HGCalParameters.h:177
HGCalGeomParameters::siliconFileHE
constexpr static int siliconFileHE
Definition: HGCalGeomParameters.h:147
HGCalWaferIndex::waferLayer
int32_t waferLayer(const int32_t index)
Definition: HGCalWaferIndex.cc:23
HGCalParameters::tileRingRange_
std::vector< std::pair< int, int > > tileRingRange_
Definition: HGCalParameters.h:188
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:1159
HGCalParameters::waferMaskMode_
int waferMaskMode_
Definition: HGCalParameters.h:182
HGCalParameters::addTrForm
void addTrForm(const CLHEP::Hep3Vector &h3v)
Definition: HGCalParameters.cc:141
HGCalParameters::zMinForRad_
double zMinForRad_
Definition: HGCalParameters.h:158
HGCalParameters::waferInfoMap_
waferInfo_map waferInfoMap_
Definition: HGCalParameters.h:184
HGCalParameters::waferT_map
std::unordered_map< int32_t, std::pair< int32_t, int32_t > > waferT_map
Definition: HGCalParameters.h:32
HGCalParameters::slopeMin_
std::vector< double > slopeMin_
Definition: HGCalParameters.h:138
HGCalParameters::depthIndex_
std::vector< int > depthIndex_
Definition: HGCalParameters.h:108
hgcalPerformanceValidation.orient
orient
Definition: hgcalPerformanceValidation.py:733
HGCalParameters::defineFull_
bool defineFull_
Definition: HGCalParameters.h:150
HGCalParameters::xLayerHex_
std::vector< double > xLayerHex_
Definition: HGCalParameters.h:110
PVValHelper::dz
Definition: PVValidationHelpers.h:51
DDValue
Definition: DDValue.h:22
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:29
HGCalParameters::waferTypes_
waferT_map waferTypes_
Definition: HGCalParameters.h:181
DDFilteredView::translation
const DDTranslation & translation() const
The absolute translation of the current node.
Definition: DDFilteredView.cc:26
HGCalGeometryMode::Polyhedra
Definition: HGCalGeometryMode.h:37
relativeConstraints.value
value
Definition: relativeConstraints.py:53
Exception
Definition: hltDiff.cc:245
HGCalParameters::moduleDzS_
std::vector< double > moduleDzS_
Definition: HGCalParameters.h:80
HGCalParameters::layerCenter_
std::vector< int > layerCenter_
Definition: HGCalParameters.h:178
HGCalParameters::rMinFront_
std::vector< double > rMinFront_
Definition: HGCalParameters.h:140
HGCalGeometryMode::Hexagon8File
Definition: HGCalGeometryMode.h:32
HGCalParameters::lastModule_
std::vector< int > lastModule_
Definition: HGCalParameters.h:168
HGCalParameters::tileInfo
Definition: HGCalParameters.h:20
HGCalProperty::tileProperty
int32_t tileProperty(const int32_t type, const int32_t sipm)
Definition: HGCalProperty.cc:21
HGCalParameters::cellFineX_
std::vector< double > cellFineX_
Definition: HGCalParameters.h:120
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
DDSolid
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
DDSpecificsMatchesValueFilter
Definition: DDFilter.h:70
TCMET_cfi.corner
corner
Definition: TCMET_cfi.py:34
HGCalParameters::cellThickness_
std::vector< double > cellThickness_
Definition: HGCalParameters.h:152
DDFilteredView::rotation
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
Definition: DDFilteredView.cc:28
HGCalParameters::fracAreaMin_
double fracAreaMin_
Definition: HGCalParameters.h:157
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
HGCalParameters::firstMixedLayer_
int firstMixedLayer_
Definition: HGCalParameters.h:174
HGCalParameters::minTileSize_
double minTileSize_
Definition: HGCalParameters.h:166
HGCalGeomParameters::sqrt3_
const double sqrt3_
Definition: HGCalGeomParameters.h:150
HGCalParameters::rMinLayerBH_
std::vector< double > rMinLayerBH_
Definition: HGCalParameters.h:162
HGCalParameters::hgtrform
Definition: HGCalParameters.h:52
tolmin
const double tolmin
Definition: HGCalGeomParameters.cc:30
DDFilteredView
Definition: DDFilteredView.h:20
HGCalGeomParameters::loadSpecParsHexagon8
void loadSpecParsHexagon8(const DDFilteredView &fv, HGCalParameters &php)
Definition: HGCalGeomParameters.cc:1248
HGCalParameters::waferTypeL_
std::vector< int > waferTypeL_
Definition: HGCalParameters.h:116
HGCalParameters::cellCoarseX_
std::vector< double > cellCoarseX_
Definition: HGCalParameters.h:124
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
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::moduleHR_
std::vector< double > moduleHR_
Definition: HGCalParameters.h:86
HGCalParameters::layer_
std::vector< int > layer_
Definition: HGCalParameters.h:103
dummy
Definition: DummySelector.h:38
HGCalParameters::trformRotYZ_
std::vector< double > trformRotYZ_
Definition: HGCalParameters.h:101
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
HGCalParameters::depthLayerF_
std::vector< int > depthLayerF_
Definition: HGCalParameters.h:109
HGCalParameters::layer_map
std::vector< std::unordered_map< int32_t, int32_t > > layer_map
Definition: HGCalParameters.h:30
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:191
HGCalParameters::zFrontTop_
std::vector< double > zFrontTop_
Definition: HGCalParameters.h:170
HGCalParameters::hgtrap
Definition: HGCalParameters.h:47
edm::Log
Definition: MessageLogger.h:70
HGCalParameters::hgtrform::hr
CLHEP::HepRotation hr
Definition: HGCalParameters.h:55
DDsvalues_type
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
HGCalParameters::trformRotZZ_
std::vector< double > trformRotZZ_
Definition: HGCalParameters.h:102
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:142
HGCalParameters::levelT_
std::vector< int > levelT_
Definition: HGCalParameters.h:135
HGCalParameters::zRanges_
std::vector< double > zRanges_
Definition: HGCalParameters.h:172
LaserClient_cfi.low
low
Definition: LaserClient_cfi.py:52
cms::DDSolidShapeMap
const std::array< const cms::dd::NameValuePair< DDSolidShape >, 21 > DDSolidShapeMap
Definition: DDSolidShapes.h:99
PVValHelper::dx
Definition: PVValidationHelpers.h:49
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8
HGCalParameters::moduleAlphaR_
std::vector< double > moduleAlphaR_
Definition: HGCalParameters.h:88
HGCalParameters::hgtrap::lay
int lay
Definition: HGCalParameters.h:48
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19
HGCalParameters::radius200to300_
std::vector< double > radius200to300_
Definition: HGCalParameters.h:154
HGCalParameters::tileInfoMap_
tileInfo_map tileInfoMap_
Definition: HGCalParameters.h:186
DDTubs
Definition: DDSolid.h:266
HGCalParameters::copiesInLayers_
layer_map copiesInLayers_
Definition: HGCalParameters.h:141