CMS 3D CMS Logo

HGCalParametersFromDD.cc
Go to the documentation of this file.
2 
10 
11 //#define EDM_ML_DEBUG
12 using namespace geant_units::operators;
13 
14 namespace {
15  HGCalGeometryMode::GeometryMode getGeometryMode(const char* s, const DDsvalues_type& sv) {
16  DDValue val(s);
17  if (DDfetch(&sv, val)) {
18  const std::vector<std::string>& fvec = val.strings();
19  if (fvec.empty()) {
20  throw cms::Exception("HGCalGeom") << "Failed to get " << s << " tag.";
21  }
22 
25  return result;
26  } else {
27  throw cms::Exception("HGCalGeom") << "Failed to get " << s << " tag";
28  }
29  }
30  HGCalGeometryMode::GeometryMode getGeometryMode(const std::string& s) {
33  return result;
34  }
35  HGCalGeometryMode::WaferMode getGeometryWaferMode(const char* s, const DDsvalues_type& sv) {
36  DDValue val(s);
37  if (DDfetch(&sv, val)) {
38  const std::vector<std::string>& fvec = val.strings();
39  if (fvec.empty()) {
40  throw cms::Exception("HGCalGeom") << "Failed to get " << s << " tag.";
41  }
42 
45  return result;
46  } else {
47  throw cms::Exception("HGCalGeom") << "Failed to get " << s << " tag";
48  }
49  }
50  HGCalGeometryMode::WaferMode getGeometryWaferMode(std::string& s) {
53  return result;
54  }
55 } // namespace
56 
58  HGCalParameters& php,
59  const std::string& name,
60  const std::string& namew,
61  const std::string& namec,
62  const std::string& namet) {
63 #ifdef EDM_ML_DEBUG
64  edm::LogVerbatim("HGCalGeom") << "HGCalParametersFromDD (DDD)::build called with "
65  << "names " << name << ":" << namew << ":" << namec << ":" << namet;
66 #endif
67 
68  // Special parameters at simulation level
69  std::string attribute = "Volume";
71  DDValue val(attribute, value, 0.0);
73  DDFilteredView fv(*cpv, filter);
74  bool ok = fv.firstChild();
76 
77  if (ok) {
79  php.mode_ = getGeometryMode("GeometryMode", sv);
80 #ifdef EDM_ML_DEBUG
81  edm::LogVerbatim("HGCalGeom") << "GeometryMode " << php.mode_ << ":" << HGCalGeometryMode::Hexagon << ":"
85 #endif
86  php.levelZSide_ = 3; // Default level for ZSide
87  php.detectorType_ = 0; // These two parameters are
88  php.firstMixedLayer_ = -1; // defined for post TDR geometry
89  std::unique_ptr<HGCalGeomParameters> geom = std::make_unique<HGCalGeomParameters>();
91  attribute = "OnlyForHGCalNumbering";
92  value = namet;
93  DDValue val2(attribute, value, 0.0);
94  DDSpecificsMatchesValueFilter filter2{val2};
95  DDFilteredView fv2(*cpv, filter2);
96  bool ok2 = fv2.firstChild();
97  if (ok2) {
99  mode = getGeometryWaferMode("WaferMode", sv2);
100 #ifdef EDM_ML_DEBUG
101  edm::LogVerbatim("HGCalGeom") << "WaferMode " << mode << ":" << HGCalGeometryMode::Polyhedra << ":"
103 #endif
104  }
105  php.minTileSize_ = 0;
106  php.waferMaskMode_ = 0;
107  php.waferZSide_ = 0;
108  }
111  php.levelT_ = dbl_to_int(getDDDArray("LevelTop", sv));
112  php.levelZSide_ = static_cast<int>(getDDDValue("LevelZSide", sv));
113  php.nCellsFine_ = php.nCellsCoarse_ = 0;
114  php.firstLayer_ = 1;
115  php.firstMixedLayer_ = static_cast<int>(getDDDValue("FirstMixedLayer", sv));
116  php.detectorType_ = static_cast<int>(getDDDValue("DetectorType", sv));
117  php.minTileSize_ = 0;
118  php.waferMaskMode_ = static_cast<int>(getDDDValue("WaferMaskMode", sv));
119  php.waferZSide_ = static_cast<int>(getDDDValue("WaferZside", sv));
120 #ifdef EDM_ML_DEBUG
121  edm::LogVerbatim("HGCalGeom") << "Top levels " << php.levelT_[0] << ":" << php.levelT_[1] << " ZSide Level "
122  << php.levelZSide_ << " first layers " << php.firstLayer_ << ":"
123  << php.firstMixedLayer_ << " Det Type " << php.detectorType_ << " Wafer Mask Mode "
124  << php.waferMaskMode_ << " Zside " << php.waferZSide_;
125 #endif
126  attribute = "OnlyForHGCalNumbering";
127  value = namet;
128  DDValue val2(attribute, value, 0.0);
129  DDSpecificsMatchesValueFilter filter2{val2};
130  DDFilteredView fv2(*cpv, filter2);
131  bool ok2 = fv2.firstChild();
132  if (ok2) {
133  DDsvalues_type sv2(fv2.mergedSpecifics());
134  mode = getGeometryWaferMode("WaferMode", sv2);
135  php.nCellsFine_ = static_cast<int>(getDDDValue("NumberOfCellsFine", sv2));
136  php.nCellsCoarse_ = static_cast<int>(getDDDValue("NumberOfCellsCoarse", sv2));
137  php.waferSize_ = HGCalParameters::k_ScaleFromDDD * getDDDValue("WaferSize", sv2);
138  php.waferThick_ = HGCalParameters::k_ScaleFromDDD * getDDDValue("WaferThickness", sv2);
139  php.sensorSeparation_ = HGCalParameters::k_ScaleFromDDD * getDDDValue("SensorSeparation", sv2);
140  php.mouseBite_ = HGCalParameters::k_ScaleFromDDD * getDDDValue("MouseBite", sv2);
141  php.waferR_ = HGCalParameters::k_ScaleToDDD * php.waferSize_ * tan30deg_;
142  php.cellSize_.emplace_back(HGCalParameters::k_ScaleToDDD * php.waferSize_ / php.nCellsFine_);
143  php.cellSize_.emplace_back(HGCalParameters::k_ScaleToDDD * php.waferSize_ / php.nCellsCoarse_);
144 #ifdef EDM_ML_DEBUG
145  edm::LogVerbatim("HGCalGeom") << "WaferMode " << mode << ":" << HGCalGeometryMode::Polyhedra << ":"
146  << HGCalGeometryMode::ExtrudedPolygon << " # of cells|size for fine/coarse "
147  << php.nCellsFine_ << ":" << php.cellSize_[0] << ":" << php.nCellsCoarse_ << ":"
148  << php.cellSize_[1] << " wafer Params " << php.waferSize_ << ":" << php.waferR_
149  << ":" << php.waferThick_ << ":" << php.sensorSeparation_ << ":" << php.mouseBite_
150  << ":" << php.waferR_;
151 #endif
152  for (int k = 0; k < 2; ++k)
153  getCellPosition(php, k);
154  }
155  }
156  if (php.mode_ == HGCalGeometryMode::Hexagon) {
157  // Load the SpecPars
158  php.firstLayer_ = 1;
159  geom->loadSpecParsHexagon(fv, php, cpv, namew, namec);
160  // Load the Geometry parameters
161  geom->loadGeometryHexagon(fv, php, name, cpv, namew, namec, mode);
162  // Load cell parameters
163  geom->loadCellParsHexagon(cpv, php);
164  // Set complete fill mode
165  php.defineFull_ = false;
166  } else if (php.mode_ == HGCalGeometryMode::HexagonFull) {
167  // Load the SpecPars
168  php.firstLayer_ = 1;
169  geom->loadSpecParsHexagon(fv, php, cpv, namew, namec);
170  // Load the Geometry parameters
171  geom->loadGeometryHexagon(fv, php, name, cpv, namew, namec, mode);
172  // Modify some constants
173  geom->loadWaferHexagon(php);
174  // Load cell parameters
175  geom->loadCellParsHexagon(cpv, php);
176  // Set complete fill mode
177  php.defineFull_ = true;
178  } else if (php.mode_ == HGCalGeometryMode::Hexagon8) {
179  // Load the SpecPars
180  geom->loadSpecParsHexagon8(fv, php);
181  // Load Geometry parameters
182  geom->loadGeometryHexagon8(fv, php, 1);
183  // Set complete fill mode
184  php.defineFull_ = false;
185  // Load wafer positions
186  geom->loadWaferHexagon8(php);
188  // Load the SpecPars
189  geom->loadSpecParsHexagon8(fv, php);
190  // Load Geometry parameters
191  geom->loadGeometryHexagon8(fv, php, 1);
192  // Set complete fill mode
193  php.defineFull_ = true;
194  // Load wafer positions
195  geom->loadWaferHexagon8(php);
197  // Load maximum eta & top level
198  php.levelT_ = dbl_to_int(getDDDArray("LevelTop", sv));
199  php.firstLayer_ = (int)(getDDDValue("FirstLayer", sv));
200  php.firstMixedLayer_ = (int)(getDDDValue("FirstMixedLayer", sv));
201  php.detectorType_ = (int)(getDDDValue("DetectorType", sv));
202  php.waferThick_ = HGCalParameters::k_ScaleFromDDD * getDDDValue("WaferThickness", sv);
203  php.minTileSize_ = HGCalParameters::k_ScaleFromDDD * getDDDValue("MinimumTileSize", sv);
204  php.waferSize_ = php.waferR_ = 0;
205  php.sensorSeparation_ = php.mouseBite_ = 0;
206  php.waferMaskMode_ = static_cast<int>(getDDDValue("WaferMaskMode", sv));
207  php.waferZSide_ = static_cast<int>(getDDDValue("WaferZside", sv));
208 #ifdef EDM_ML_DEBUG
209  edm::LogVerbatim("HGCalGeom") << "Top levels " << php.levelT_[0] << ":" << php.levelT_[1] << " first layers "
210  << php.firstLayer_ << ":" << php.firstMixedLayer_ << " Det Type "
211  << php.detectorType_ << " thickenss " << php.waferThick_ << " Tile Mask Mode "
212  << php.waferMaskMode_ << " Zside " << php.waferZSide_;
213 #endif
214  // Load the SpecPars
215  geom->loadSpecParsTrapezoid(fv, php);
216  // Load Geometry parameters
217  geom->loadGeometryHexagon8(fv, php, php.firstLayer_);
218  // Load cell positions
219  geom->loadCellTrapezoid(php);
220  } else {
221  edm::LogError("HGCalGeom") << "Unknown Geometry type " << php.mode_ << " for HGCal " << name << ":" << namew
222  << ":" << namec;
223  throw cms::Exception("DDException")
224  << "Unknown Geometry type " << php.mode_ << " for HGCal " << name << ":" << namew << ":" << namec;
225  }
226  } else {
227  edm::LogError("HGCalGeom") << " Attribute " << val << " not found but needed.";
228  throw cms::Exception("DDException") << "Attribute " << val << " not found but needed.";
229  }
230 #ifdef EDM_ML_DEBUG
231  edm::LogVerbatim("HGCalGeom") << "Return from HGCalParametersFromDD::build"
232  << " with flag " << ok;
233 #endif
234  return ok;
235 }
236 
238  HGCalParameters& php,
239  const std::string& name,
240  const std::string& namew,
241  const std::string& namec,
242  const std::string& namet,
243  const std::string& name2) {
244 #ifdef EDM_ML_DEBUG
245  edm::LogVerbatim("HGCalGeom") << "HGCalParametersFromDD (DD4Hep)::build called with "
246  << "names " << name << ":" << namew << ":" << namec << ":" << namet;
247 #endif
248  cms::DDVectorsMap vmap = cpv->detector()->vectors();
249  const cms::DDFilter filter("Volume", name);
250  cms::DDFilteredView fv((*cpv), filter);
251  std::vector<std::string> tempS;
252  std::vector<double> tempD;
253  bool ok = fv.firstChild();
254  tempS = fv.get<std::vector<std::string> >(name2, "GeometryMode");
255  if (tempS.empty())
256  tempS = fv.get<std::vector<std::string> >(name, "GeometryMode");
257  std::string sv = (!tempS.empty()) ? tempS[0] : "HGCalGeometryMode::Hexagon8Full";
259 
260  if (ok) {
261  php.mode_ = getGeometryMode(sv);
262 #ifdef EDM_ML_DEBUG
263  edm::LogVerbatim("HGCalGeom") << "GeometryMode " << php.mode_ << ":" << HGCalGeometryMode::Hexagon << ":"
267 #endif
268  php.levelZSide_ = 3; // Default level for ZSide
269  php.detectorType_ = 0; // These two parameters are
270  php.firstMixedLayer_ = -1; // defined for post TDR geometry
271  std::unique_ptr<HGCalGeomParameters> geom = std::make_unique<HGCalGeomParameters>();
273  tempS = fv.get<std::vector<std::string> >(namet, "WaferMode");
274  std::string sv2 = (!tempS.empty()) ? tempS[0] : "HGCalGeometryMode::Polyhedra";
275  mode = getGeometryWaferMode(sv2);
276 #ifdef EDM_ML_DEBUG
277  edm::LogVerbatim("HGCalGeom") << "WaferMode " << mode << ":" << HGCalGeometryMode::Polyhedra << ":"
279 #endif
280  php.minTileSize_ = 0;
281  php.waferMaskMode_ = 0;
282  php.waferZSide_ = 0;
283  }
286  php.levelT_ = dbl_to_int(fv.get<std::vector<double> >(name, "LevelTop"));
287  tempD = fv.get<std::vector<double> >(name, "LevelZSide");
288  php.levelZSide_ = static_cast<int>(tempD[0]);
289  php.nCellsFine_ = php.nCellsCoarse_ = 0;
290  php.firstLayer_ = 1;
291  tempD = fv.get<std::vector<double> >(name, "FirstMixedLayer");
292  php.firstMixedLayer_ = static_cast<int>(tempD[0]);
293  tempD = fv.get<std::vector<double> >(name, "DetectorType");
294  php.detectorType_ = static_cast<int>(tempD[0]);
295  php.minTileSize_ = 0;
296  tempD = fv.get<std::vector<double> >(name, "WaferMaskMode");
297  php.waferMaskMode_ = static_cast<int>(tempD[0]);
298  tempD = fv.get<std::vector<double> >(name, "WaferZside");
299  php.waferZSide_ = static_cast<int>(tempD[0]);
300 #ifdef EDM_ML_DEBUG
301  edm::LogVerbatim("HGCalGeom") << "Top levels " << php.levelT_[0] << ":" << php.levelT_[1] << " ZSide Level "
302  << php.levelZSide_ << " first layers " << php.firstLayer_ << ":"
303  << php.firstMixedLayer_ << " Det Type " << php.detectorType_ << " Wafer Mask Mode "
304  << php.waferMaskMode_ << " ZSide " << php.waferZSide_;
305 #endif
306 
307  tempS = fv.get<std::vector<std::string> >(namet, "WaferMode");
308  std::string sv2 = (!tempS.empty()) ? tempS[0] : "HGCalGeometryMode::ExtrudedPolygon";
309  mode = getGeometryWaferMode(sv2);
310  tempD = fv.get<std::vector<double> >(namet, "NumberOfCellsFine");
311  php.nCellsFine_ = static_cast<int>(tempD[0]);
312  tempD = fv.get<std::vector<double> >(namet, "NumberOfCellsCoarse");
313  php.nCellsCoarse_ = static_cast<int>(tempD[0]);
314  tempD = fv.get<std::vector<double> >(namet, "WaferSize");
316  tempD = fv.get<std::vector<double> >(namet, "WaferThickness");
318  tempD = fv.get<std::vector<double> >(namet, "SensorSeparation");
320  tempD = fv.get<std::vector<double> >(namet, "MouseBite");
322  php.waferR_ = HGCalParameters::k_ScaleToDDD * php.waferSize_ * tan30deg_;
323  php.cellSize_.emplace_back(HGCalParameters::k_ScaleToDDD * php.waferSize_ / php.nCellsFine_);
324  php.cellSize_.emplace_back(HGCalParameters::k_ScaleToDDD * php.waferSize_ / php.nCellsCoarse_);
325 #ifdef EDM_ML_DEBUG
326  edm::LogVerbatim("HGCalGeom") << "WaferMode " << mode << ":" << HGCalGeometryMode::Polyhedra << ":"
327  << HGCalGeometryMode::ExtrudedPolygon << " # of cells|size for fine/coarse "
328  << php.nCellsFine_ << ":" << php.cellSize_[0] << ":" << php.nCellsCoarse_ << ":"
329  << php.cellSize_[1] << " wafer Params " << php.waferSize_ << ":" << php.waferR_
330  << ":" << php.waferThick_ << ":" << php.sensorSeparation_ << ":" << php.mouseBite_
331  << ":" << php.waferR_;
332 #endif
333  for (int k = 0; k < 2; ++k)
334  getCellPosition(php, k);
335  }
336  if (php.mode_ == HGCalGeometryMode::Hexagon) {
337  // Load the SpecPars
338  php.firstLayer_ = 1;
339  geom->loadSpecParsHexagon(fv, php, name, namew, namec, name2);
340  // Load the Geometry parameters
341  geom->loadGeometryHexagon(cpv, php, name, namew, namec, mode);
342  // Load cell parameters
343  geom->loadCellParsHexagon(vmap, php);
344  // Set complete fill mode
345  php.defineFull_ = false;
346  } else if (php.mode_ == HGCalGeometryMode::HexagonFull) {
347  // Load the SpecPars
348  php.firstLayer_ = 1;
349  geom->loadSpecParsHexagon(fv, php, name, namew, namec, name2);
350  // Load the Geometry parameters
351  geom->loadGeometryHexagon(cpv, php, name, namew, namec, mode);
352  // Modify some constants
353  geom->loadWaferHexagon(php);
354  // Load cell parameters
355  geom->loadCellParsHexagon(vmap, php);
356  // Set complete fill mode
357  php.defineFull_ = true;
358  } else if (php.mode_ == HGCalGeometryMode::Hexagon8) {
359  // Load the SpecPars
360  geom->loadSpecParsHexagon8(fv, vmap, php, name);
361  // Load Geometry parameters
362  geom->loadGeometryHexagon8(cpv, php, name, 1);
363  // Set complete fill mode
364  php.defineFull_ = false;
365  // Load wafer positions
366  geom->loadWaferHexagon8(php);
368  // Load the SpecPars
369  geom->loadSpecParsHexagon8(fv, vmap, php, name);
370  // Load Geometry parameters
371  geom->loadGeometryHexagon8(cpv, php, name, 1);
372  // Set complete fill mode
373  php.defineFull_ = true;
374  // Load wafer positions
375  geom->loadWaferHexagon8(php);
377  // Load maximum eta & top level
378  php.levelT_ = dbl_to_int(fv.get<std::vector<double> >(name, "LevelTop"));
379  tempD = fv.get<std::vector<double> >(name, "LevelZSide");
380  php.levelZSide_ = static_cast<int>(tempD[0]);
381  php.nCellsFine_ = php.nCellsCoarse_ = 0;
382  tempD = fv.get<std::vector<double> >(name, "FirstLayer");
383  php.firstLayer_ = static_cast<int>(tempD[0]);
384  tempD = fv.get<std::vector<double> >(name, "FirstMixedLayer");
385  php.firstMixedLayer_ = static_cast<int>(tempD[0]);
386  tempD = fv.get<std::vector<double> >(name, "DetectorType");
387  php.detectorType_ = static_cast<int>(tempD[0]);
388  tempD = fv.get<std::vector<double> >(name, "WaferThickness");
390  tempD = fv.get<std::vector<double> >(name, "MinimumTileSize");
392  php.waferSize_ = php.waferR_ = 0;
393  php.sensorSeparation_ = php.mouseBite_ = 0;
394  tempD = fv.get<std::vector<double> >(name, "WaferMaskMode");
395  php.waferMaskMode_ = static_cast<int>(tempD[0]);
396  tempD = fv.get<std::vector<double> >(name, "WaferZside");
397  php.waferZSide_ = static_cast<int>(tempD[0]);
398 #ifdef EDM_ML_DEBUG
399  edm::LogVerbatim("HGCalGeom") << "Top levels " << php.levelT_[0] << ":" << php.levelT_[1] << " first layers "
400  << php.firstLayer_ << ":" << php.firstMixedLayer_ << " Det Type "
401  << php.detectorType_ << " thickenss " << php.waferThick_ << " min tile size "
402  << php.minTileSize_ << " Tile Mask Mode " << php.waferMaskMode_ << " ZSide "
403  << php.waferZSide_;
404 #endif
405  // Load the SpecPars
406  geom->loadSpecParsTrapezoid(fv, vmap, php, name);
407  // Load Geometry parameters
408  geom->loadGeometryHexagon8(cpv, php, name, php.firstLayer_);
409  // Load cell positions
410  geom->loadCellTrapezoid(php);
411  } else {
412  edm::LogError("HGCalGeom") << "Unknown Geometry type " << php.mode_ << " for HGCal " << name << ":" << namew
413  << ":" << namec;
414  throw cms::Exception("DDException")
415  << "Unknown Geometry type " << php.mode_ << " for HGCal " << name << ":" << namew << ":" << namec;
416  }
417  } else {
418  edm::LogError("HGCalGeom") << " Attribute Volume:" << name << " not found but needed.";
419  throw cms::Exception("DDException") << "Attribute Volume:" << name << " not found but needed.";
420  }
421 #ifdef EDM_ML_DEBUG
422  edm::LogVerbatim("HGCalGeom") << "Return from HGCalParametersFromDD::build"
423  << " with flag " << ok;
424 #endif
425  return ok;
426 }
427 
429  if (type == 1) {
430  php.cellCoarseX_.clear();
431  php.cellCoarseY_.clear();
432  } else {
433  php.cellFineX_.clear();
434  php.cellFineY_.clear();
435  }
436  HGCalParameters::wafer_map cellIndex;
437 #ifdef EDM_ML_DEBUG
438  std::vector<int> indtypes;
439 #endif
440  int N = (type == 1) ? php.nCellsCoarse_ : php.nCellsFine_;
441  double R = php.waferSize_ / (3 * N);
442  double r = 0.5 * R * sqrt(3.0);
443  int n2 = N / 2;
444  int ipos(0);
445  for (int u = 0; u < 2 * N; ++u) {
446  for (int v = 0; v < 2 * N; ++v) {
447  if (((v - u) < N) && (u - v) <= N) {
448  double yp = (u - 0.5 * v - n2) * 2 * r;
449  double xp = (1.5 * (v - N) + 1.0) * R;
450  int id = v * 100 + u;
451 #ifdef EDM_ML_DEBUG
452  indtypes.emplace_back(id);
453 #endif
454  if (type == 1) {
455  php.cellCoarseX_.emplace_back(xp);
456  php.cellCoarseY_.emplace_back(yp);
457  } else {
458  php.cellFineX_.emplace_back(xp);
459  php.cellFineY_.emplace_back(yp);
460  }
461  cellIndex[id] = ipos;
462  ++ipos;
463  }
464  }
465  }
466  if (type == 1)
467  php.cellCoarseIndex_ = cellIndex;
468  else
469  php.cellFineIndex_ = cellIndex;
470 #ifdef EDM_ML_DEBUG
471  if (type == 1) {
472  edm::LogVerbatim("HGCalGeom") << "CellPosition for type " << type << " for " << php.cellCoarseX_.size()
473  << " cells";
474  for (unsigned int k = 0; k < php.cellCoarseX_.size(); ++k) {
475  int id = indtypes[k];
476  edm::LogVerbatim("HGCalGeom") << "[" << k << "] ID " << id << ":" << php.cellCoarseIndex_[id] << " X "
477  << php.cellCoarseX_[k] << " Y " << php.cellCoarseY_[k];
478  }
479  } else {
480  edm::LogVerbatim("HGCalGeom") << "CellPosition for type " << type << " for " << php.cellFineX_.size() << " cells";
481  for (unsigned int k = 0; k < php.cellFineX_.size(); ++k) {
482  int id = indtypes[k];
483  edm::LogVerbatim("HGCalGeom") << "[" << k << "] ID " << id << ":" << php.cellFineIndex_[k] << " X "
484  << php.cellFineX_[k] << " Y " << php.cellFineY_[k];
485  }
486  }
487 #endif
488 }
489 
491  DDValue val(s);
492  if (DDfetch(&sv, val)) {
493  const std::vector<double>& fvec = val.doubles();
494  if (fvec.empty()) {
495  throw cms::Exception("HGCalGeom") << "Failed to get " << s << " tag.";
496  }
497  return fvec[0];
498  } else {
499  throw cms::Exception("HGCalGeom") << "Failed to get " << s << " tag";
500  }
501 }
502 
503 std::vector<double> HGCalParametersFromDD::getDDDArray(const char* s, const DDsvalues_type& sv) {
504  DDValue val(s);
505  if (DDfetch(&sv, val)) {
506  const std::vector<double>& fvec = val.doubles();
507  if (fvec.empty()) {
508  throw cms::Exception("HGCalGeom") << "Failed to get " << s << " tag.";
509  }
510  return fvec;
511  } else {
512  throw cms::Exception("HGCalGeom") << "Failed to get " << s << " tag";
513  }
514 }
HGCalGeometryMode::TrapezoidFile
Definition: HGCalGeometryMode.h:33
HGCalParameters::firstLayer_
int firstLayer_
Definition: HGCalParameters.h:166
cms::DDDetector::vectors
cms::DDVectorsMap const & vectors() const
Definition: DDDetector.h:17
HGCalParameters::levelZSide_
int levelZSide_
Definition: HGCalParameters.h:130
HGCalParameters::cellFineY_
std::vector< double > cellFineY_
Definition: HGCalParameters.h:115
HGCalGeometryMode.h
DDFilteredView::mergedSpecifics
DDsvalues_type mergedSpecifics() const
Definition: DDFilteredView.cc:42
HGCalStringToEnumParser
Definition: HGCalGeometryMode.h:10
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
HGCalParameters::nCellsCoarse_
int nCellsCoarse_
Definition: HGCalParameters.h:137
HGCalParameters::waferZSide_
int waferZSide_
Definition: HGCalParameters.h:174
HGCalParameters::waferSize_
double waferSize_
Definition: HGCalParameters.h:138
geant_units::operators
Definition: GeantUnits.h:18
cms::DDFilteredView
Definition: DDFilteredView.h:70
findQualityFiles.v
v
Definition: findQualityFiles.py:179
dbl_to_int
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
Definition: DDutils.h:7
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
HGCalParameters::sensorSeparation_
double sensorSeparation_
Definition: HGCalParameters.h:140
cms::DDFilteredView::get
T get(const std::string &)
extract attribute value
alignCSCRings.s
s
Definition: alignCSCRings.py:92
HGCalGeometryMode::Trapezoid
Definition: HGCalGeometryMode.h:31
DDFilteredView::firstChild
bool firstChild()
set the current node to the first child ...
Definition: DDFilteredView.cc:86
DDFilteredView.h
cms::DDFilter
Definition: DDFilteredView.h:59
HGCalParameters::wafer_map
std::unordered_map< int32_t, int32_t > wafer_map
Definition: HGCalParameters.h:25
HGCalGeometryMode::WaferMode
WaferMode
Definition: HGCalGeometryMode.h:35
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
HGCalParametersFromDD.h
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:352
cms::DDFilteredView::firstChild
bool firstChild()
set the current node to the first child
Definition: DDFilteredView.cc:268
N
#define N
Definition: blowfish.cc:9
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
DDfetch
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:79
DDFilteredView.h
dqmdumpme.k
k
Definition: dqmdumpme.py:60
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HGCalParameters::cellSize_
std::vector< double > cellSize_
Definition: HGCalParameters.h:69
HGCalParameters::mouseBite_
double mouseBite_
Definition: HGCalParameters.h:141
HGCalParameters::nCellsFine_
int nCellsFine_
Definition: HGCalParameters.h:136
HGCalParameters::cellFineIndex_
wafer_map cellFineIndex_
Definition: HGCalParameters.h:116
HGCalParameters::mode_
HGCalGeometryMode::GeometryMode mode_
Definition: HGCalParameters.h:131
GeantUnits.h
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
HGCalParameters::cellCoarseY_
std::vector< double > cellCoarseY_
Definition: HGCalParameters.h:119
HGCalGeometryMode::Hexagon8Full
Definition: HGCalGeometryMode.h:30
HGCalParametersFromDD::getDDDValue
double getDDDValue(const char *s, const DDsvalues_type &sv)
Definition: HGCalParametersFromDD.cc:490
HGCalGeometryMode::GeometryMode
GeometryMode
Definition: HGCalGeometryMode.h:25
HGCalGeomParameters.h
createfilelist.int
int
Definition: createfilelist.py:10
DDutils.h
value
Definition: value.py:1
HGCalParametersFromDD::getDDDArray
std::vector< double > getDDDArray(const char *s, const DDsvalues_type &sv)
Definition: HGCalParametersFromDD.cc:503
HGCalParameters::waferR_
double waferR_
Definition: HGCalParameters.h:128
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
HGCalParametersFromDD::getCellPosition
void getCellPosition(HGCalParameters &php, int type)
Definition: HGCalParametersFromDD.cc:428
HGCalParameters::waferThick_
double waferThick_
Definition: HGCalParameters.h:139
HGCalGeometryMode::Hexagon
Definition: HGCalGeometryMode.h:27
HGCalParameters::k_ScaleFromDDD
static constexpr double k_ScaleFromDDD
Definition: HGCalParameters.h:30
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HGCalParameters
Definition: HGCalParameters.h:13
HGCalParameters::k_ScaleToDDD
static constexpr double k_ScaleToDDD
Definition: HGCalParameters.h:31
HGCalParametersFromDD::build
bool build(const DDCompactView *cpv, HGCalParameters &php, const std::string &name, const std::string &namew, const std::string &namec, const std::string &namet)
Definition: HGCalParametersFromDD.cc:57
HGCalParameters::k_ScaleFromDD4Hep
static constexpr double k_ScaleFromDD4Hep
Definition: HGCalParameters.h:34
HGCalGeometryMode::HexagonFull
Definition: HGCalGeometryMode.h:28
heppy_batch.val
val
Definition: heppy_batch.py:351
HGCalParameters::detectorType_
int detectorType_
Definition: HGCalParameters.h:66
HGCalParameters::waferMaskMode_
int waferMaskMode_
Definition: HGCalParameters.h:173
HGCalParameters::defineFull_
bool defineFull_
Definition: HGCalParameters.h:144
DDValue
Definition: DDValue.h:21
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
HGCalGeometryMode::Polyhedra
Definition: HGCalGeometryMode.h:35
Exception
Definition: hltDiff.cc:246
cms::DDVectorsMap
std::unordered_map< std::string, std::vector< double > > DDVectorsMap
Definition: DDNamespace.h:14
cms::DDCompactView
Definition: DDCompactView.h:31
HGCalGeometryMode::Hexagon8File
Definition: HGCalGeometryMode.h:32
HGCalGeometryMode::ExtrudedPolygon
Definition: HGCalGeometryMode.h:35
HGCalParameters::cellFineX_
std::vector< double > cellFineX_
Definition: HGCalParameters.h:114
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
DDSpecificsMatchesValueFilter
Definition: DDFilter.h:70
HGCalParameters::firstMixedLayer_
int firstMixedLayer_
Definition: HGCalParameters.h:167
HGCalParameters::minTileSize_
double minTileSize_
Definition: HGCalParameters.h:159
HGCalGeometryMode::Hexagon8
Definition: HGCalGeometryMode.h:29
DDFilteredView
Definition: DDFilteredView.h:20
HGCalParameters::cellCoarseX_
std::vector< double > cellCoarseX_
Definition: HGCalParameters.h:118
mps_fire.result
result
Definition: mps_fire.py:311
HGCalParameters::cellCoarseIndex_
wafer_map cellCoarseIndex_
Definition: HGCalParameters.h:120
hfnoseParametersInitialization_cfi.name2
name2
Definition: hfnoseParametersInitialization_cfi.py:8
DDsvalues_type
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
dttmaxenums::R
Definition: DTTMax.h:29
HGCalParameters.h
HGCalStringToEnumParser::parseString
T parseString(const std::string &value)
Definition: HGCalGeometryMode.h:16
HGCalParameters::levelT_
std::vector< int > levelT_
Definition: HGCalParameters.h:129
cms::DDCompactView::detector
const cms::DDDetector * detector() const
Definition: DDCompactView.h:34