CMS 3D CMS Logo

HcalGeomParameters.cc
Go to the documentation of this file.
2 
5 
15 
16 //#define EDM_ML_DEBUG
17 using namespace geant_units::operators;
18 
19 static const double tan10deg = std::tan(10._deg);
20 
21 void HcalGeomParameters::getConstRHO(std::vector<double>& rHO) const {
22  rHO.emplace_back(rminHO_);
23  for (double i : etaHO_)
24  rHO.emplace_back(i);
25 }
26 
27 std::vector<int> HcalGeomParameters::getModHalfHBHE(const int type) const {
28  std::vector<int> modHalf;
29  if (type == 0) {
30  modHalf.emplace_back(nmodHB_);
31  modHalf.emplace_back(nzHB_);
32  } else {
33  modHalf.emplace_back(nmodHE_);
34  modHalf.emplace_back(nzHE_);
35  }
36  return modHalf;
37 }
38 
40  DDFilteredView fv = _fv;
41  bool dodet = true;
42  bool hf = false;
43  clear(php);
44 
45  while (dodet) {
47  std::vector<int> copy = fv.copyNumbers();
48  const DDSolid& sol = fv.logicalPart().solid();
49  int idet = 0, lay = -1;
50  int nsiz = static_cast<int>(copy.size());
51  if (nsiz > 0)
52  lay = copy[nsiz - 1] / 10;
53  if (nsiz > 1)
54  idet = copy[nsiz - 2] / 1000;
55 #ifdef EDM_ML_DEBUG
56  edm::LogVerbatim("HCalGeom") << "Name " << fv.logicalPart().solid().name() << " Copy " << copy.size();
57 #endif
58  double dx = 0, dy = 0, dz = 0, dx1 = 0, dx2 = 0;
59  double alp(0);
60  if (sol.shape() == DDSolidShape::ddbox) {
61  const DDBox& box = static_cast<DDBox>(sol);
65  } else if (sol.shape() == DDSolidShape::ddtrap) {
66  const DDTrap& trp = static_cast<DDTrap>(sol);
69  dx = 0.25 * HcalGeomParameters::k_ScaleFromDDDToG4 * (trp.x1() + trp.x2() + trp.x3() + trp.x4());
70  dy = 0.5 * HcalGeomParameters::k_ScaleFromDDDToG4 * (trp.y1() + trp.y2());
72  alp = 0.5 * (trp.alpha1() + trp.alpha2());
73  } else if (sol.shape() == DDSolidShape::ddtubs) {
74  const DDTubs& tub = static_cast<DDTubs>(sol);
78  }
79  if (idet == 3) {
80  // HB
81 #ifdef EDM_ML_DEBUG
82  edm::LogVerbatim("HCalGeom") << "HB " << sol.name() << " Shape " << sol.shape() << " Layer " << lay << " R "
83  << t.Rho();
84 #endif
85  if (lay >= 0 && lay < maxLayer_) {
86  ib_[lay]++;
87  rb_[lay] += (HcalGeomParameters::k_ScaleFromDDDToG4 * t.Rho());
88  if (thkb_[lay] <= 0) {
89  if (lay < 17)
90  thkb_[lay] = dx;
91  else
92  thkb_[lay] = std::min(dx, dy);
93  }
94  if (lay < 17) {
95  bool found = false;
96  for (double k : rxb_) {
97  if (std::abs(k - (HcalGeomParameters::k_ScaleFromDDDToG4 * t.Rho())) < 0.01) {
98  found = true;
99  break;
100  }
101  }
102  if (!found) {
103  rxb_.emplace_back(HcalGeomParameters::k_ScaleFromDDDToG4 * t.Rho());
104  php.rhoxHB.emplace_back(HcalGeomParameters::k_ScaleFromDDDToG4 * t.Rho() * std::cos(t.phi()));
105  php.zxHB.emplace_back(HcalGeomParameters::k_ScaleFromDDDToG4 * std::abs(t.z()));
106  php.dyHB.emplace_back(2. * dy);
107  php.dxHB.emplace_back(2. * dz);
108  php.layHB.emplace_back(lay);
109  }
110  }
111  }
112  if (lay == 2) {
113  int iz = copy[nsiz - 5];
114  int fi = copy[nsiz - 4];
115  unsigned int it1 = find(iz, izb_);
116  if (it1 == izb_.size())
117  izb_.emplace_back(iz);
118  unsigned int it2 = find(fi, phib_);
119  if (it2 == phib_.size())
120  phib_.emplace_back(fi);
121  }
122  if (lay == 18) {
123  int ifi = -1, ich = -1;
124  if (nsiz > 2)
125  ifi = copy[nsiz - 3];
126  if (nsiz > 3)
127  ich = copy[nsiz - 4];
128  double z1 = std::abs((HcalGeomParameters::k_ScaleFromDDDToG4 * t.z()) + dz);
130  if (std::abs(z1 - z2) < 0.01)
131  z1 = 0;
132  if (ifi == 1 && ich == 4) {
133  if (z1 > z2) {
134  double tmp = z1;
135  z1 = z2;
136  z2 = tmp;
137  }
138  bool sok = true;
139  for (unsigned int kk = 0; kk < php.zHO.size(); kk++) {
140  if (std::abs(z2 - php.zHO[kk]) < 0.01) {
141  sok = false;
142  break;
143  } else if (z2 < php.zHO[kk]) {
144  php.zHO.resize(php.zHO.size() + 2);
145  for (unsigned int kz = php.zHO.size() - 1; kz > kk + 1; kz = kz - 2) {
146  php.zHO[kz] = php.zHO[kz - 2];
147  php.zHO[kz - 1] = php.zHO[kz - 3];
148  }
149  php.zHO[kk + 1] = z2;
150  php.zHO[kk] = z1;
151  sok = false;
152  break;
153  }
154  }
155  if (sok) {
156  php.zHO.emplace_back(z1);
157  php.zHO.emplace_back(z2);
158  }
159 #ifdef EDM_ML_DEBUG
160  edm::LogVerbatim("HCalGeom") << "Detector " << idet << " Lay " << lay << " fi " << ifi << " " << ich << " z "
161  << z1 << " " << z2;
162 #endif
163  }
164  }
165  } else if (idet == 4) {
166  // HE
167 #ifdef EDM_ML_DEBUG
168  edm::LogVerbatim("HCalGeom") << "HE " << sol.name() << " Shape " << sol.shape() << " Layer " << lay << " Z "
169  << t.z();
170 #endif
171  if (lay >= 0 && lay < maxLayer_) {
172  ie_[lay]++;
174  if (thke_[lay] <= 0)
175  thke_[lay] = dz;
176  double rinHE = HcalGeomParameters::k_ScaleFromDDDToG4 * t.Rho() * cos(alp) - dy;
177  double routHE = HcalGeomParameters::k_ScaleFromDDDToG4 * t.Rho() * cos(alp) + dy;
178  rminHE_[lay] += rinHE;
179  rmaxHE_[lay] += routHE;
180  bool found = false;
181  for (double k : php.zxHE) {
183  found = true;
184  break;
185  }
186  }
187  if (!found) {
188  php.zxHE.emplace_back(HcalGeomParameters::k_ScaleFromDDDToG4 * std::abs(t.z()));
189  php.rhoxHE.emplace_back(HcalGeomParameters::k_ScaleFromDDDToG4 * t.Rho() * std::cos(t.phi()));
190  php.dyHE.emplace_back(dy * std::cos(t.phi()));
191  dx1 -= 0.5 * (HcalGeomParameters::k_ScaleFromDDDToG4 * t.rho() - dy) * std::cos(t.phi()) * tan10deg;
192  dx2 -= 0.5 * (HcalGeomParameters::k_ScaleFromDDDToG4 * t.rho() + dy) * std::cos(t.phi()) * tan10deg;
193  php.dx1HE.emplace_back(-dx1);
194  php.dx2HE.emplace_back(-dx2);
195  php.layHE.emplace_back(lay);
196  }
197  }
198  if (copy[nsiz - 1] == kHELayer1_ || copy[nsiz - 1] == kHELayer2_) {
199  int iz = copy[nsiz - 7];
200  int fi = copy[nsiz - 5];
201  unsigned int it1 = find(iz, ize_);
202  if (it1 == ize_.size())
203  ize_.emplace_back(iz);
204  unsigned int it2 = find(fi, phie_);
205  if (it2 == phie_.size())
206  phie_.emplace_back(fi);
207  }
208  } else if (idet == 5) {
209  // HF
210  if (!hf) {
211  const std::vector<double>& paras = sol.parameters();
212 #ifdef EDM_ML_DEBUG
213  edm::LogVerbatim("HCalGeom") << "HF " << sol.name() << " Shape " << sol.shape() << " Z " << t.z() << " with "
214  << paras.size() << " Parameters";
215  for (unsigned j = 0; j < paras.size(); j++)
216  edm::LogVerbatim("HCalGeom") << "HF Parameter[" << j << "] = " << paras[j];
217 #endif
218  if (sol.shape() == DDSolidShape::ddpolycone_rrz) {
219  int nz = (int)(paras.size()) - 3;
220  dzVcal_ = 0.5 * HcalGeomParameters::k_ScaleFromDDDToG4 * (paras[nz] - paras[3]);
221  hf = true;
222  } else if (sol.shape() == DDSolidShape::ddtubs || sol.shape() == DDSolidShape::ddcons) {
223  dzVcal_ = HcalGeomParameters::k_ScaleFromDDDToG4 * paras[0];
224  hf = true;
225  }
226  }
227 #ifdef EDM_ML_DEBUG
228  } else {
229  edm::LogVerbatim("HCalGeom") << "Unknown Detector " << idet << " for " << sol.name() << " Shape " << sol.shape()
230  << " R " << t.Rho() << " Z " << t.z();
231 #endif
232  }
233  dodet = fv.next();
234  }
235 
236  loadfinal(php);
237 }
238 
240  const cms::DDFilter filter("OnlyForHcalSimNumbering", "HCAL");
241  cms::DDFilteredView fv(cpv, filter);
242  clear(php);
243  bool hf(false);
244  while (fv.firstChild()) {
245  auto t = fv.translation();
246  std::vector<double> paras = fv.parameters();
247  std::vector<int> copy = fv.copyNos();
248  int idet = 0, lay = -1;
249  int nsiz = static_cast<int>(copy.size());
250  if (nsiz > 0)
251  lay = copy[0] / 10;
252  if (nsiz > 1)
253  idet = copy[1] / 1000;
254 #ifdef EDM_ML_DEBUG
255  edm::LogVerbatim("HCalGeom") << "Name " << fv.name() << " Copy " << copy.size();
256  for (unsigned int n = 0; n < copy.size(); ++n)
257  edm::LogVerbatim("HCalGeom") << "[" << n << "] " << copy[n];
258  edm::LogVerbatim("HCalGeom") << "Detector " << idet << " Layer " << lay << " parameters: " << paras.size();
259  for (unsigned int n = 0; n < paras.size(); ++n)
260  edm::LogVerbatim("HCalGeom") << "[" << n << "] " << paras[n];
261 #endif
262  double dx = 0, dy = 0, dz = 0, dx1 = 0, dx2 = 0;
263  double alp(0);
264  if (fv.isABox()) {
268  } else if (fv.isATrapezoid()) {
271  dx = 0.25 * HcalGeomParameters::k_ScaleFromDD4HepToG4 * (paras[4] + paras[5] + paras[8] + paras[9]);
272  dy = 0.5 * HcalGeomParameters::k_ScaleFromDD4HepToG4 * (paras[3] + paras[7]);
274  alp = 0.5 * (paras[6] + paras[10]);
275  } else if (fv.isATubeSeg()) {
279  }
280  if (idet == 3) {
281  // HB
282 #ifdef EDM_ML_DEBUG
283  edm::LogVerbatim("HCalGeom") << "HB " << fv.name() << " Shape " << cms::dd::name(cms::DDSolidShapeMap, fv.shape())
284  << " Layer " << lay << " R " << t.Rho();
285 #endif
286  if (lay >= 0 && lay < maxLayer_) {
287  ib_[lay]++;
288  rb_[lay] += (HcalGeomParameters::k_ScaleFromDD4HepToG4 * t.Rho());
289  if (thkb_[lay] <= 0) {
290  if (lay < 17)
291  thkb_[lay] = dx;
292  else
293  thkb_[lay] = std::min(dx, dy);
294  }
295  if (lay < 17) {
296  bool found = false;
297  for (double k : rxb_) {
298  if (std::abs(k - (HcalGeomParameters::k_ScaleFromDD4HepToG4 * t.Rho())) < 0.01) {
299  found = true;
300  break;
301  }
302  }
303  if (!found) {
304  rxb_.emplace_back(HcalGeomParameters::k_ScaleFromDD4HepToG4 * t.Rho());
305  php.rhoxHB.emplace_back(HcalGeomParameters::k_ScaleFromDD4HepToG4 * t.Rho() * std::cos(t.phi()));
306  php.zxHB.emplace_back(std::abs(HcalGeomParameters::k_ScaleFromDD4HepToG4 * t.z()));
307  php.dyHB.emplace_back(2. * dy);
308  php.dxHB.emplace_back(2. * dz);
309  php.layHB.emplace_back(lay);
310  }
311  }
312  }
313  if (lay == 2) {
314  int iz = copy[4];
315  int fi = copy[3];
316  unsigned int it1 = find(iz, izb_);
317  if (it1 == izb_.size())
318  izb_.emplace_back(iz);
319  unsigned int it2 = find(fi, phib_);
320  if (it2 == phib_.size())
321  phib_.emplace_back(fi);
322  }
323  if (lay == 18) {
324  int ifi = -1, ich = -1;
325  if (nsiz > 2)
326  ifi = copy[2];
327  if (nsiz > 3)
328  ich = copy[3];
331  if (std::abs(z1 - z2) < 0.01)
332  z1 = 0;
333  if (ifi == 1 && ich == 4) {
334  if (z1 > z2) {
335  double tmp = z1;
336  z1 = z2;
337  z2 = tmp;
338  }
339  bool sok = true;
340  for (unsigned int kk = 0; kk < php.zHO.size(); kk++) {
341  if (std::abs(z2 - php.zHO[kk]) < 0.01) {
342  sok = false;
343  break;
344  } else if (z2 < php.zHO[kk]) {
345  php.zHO.resize(php.zHO.size() + 2);
346  for (unsigned int kz = php.zHO.size() - 1; kz > kk + 1; kz = kz - 2) {
347  php.zHO[kz] = php.zHO[kz - 2];
348  php.zHO[kz - 1] = php.zHO[kz - 3];
349  }
350  php.zHO[kk + 1] = z2;
351  php.zHO[kk] = z1;
352  sok = false;
353  break;
354  }
355  }
356  if (sok) {
357  php.zHO.emplace_back(z1);
358  php.zHO.emplace_back(z2);
359  }
360 #ifdef EDM_ML_DEBUG
361  edm::LogVerbatim("HCalGeom") << "Detector " << idet << " Lay " << lay << " fi " << ifi << " " << ich << " z "
362  << z1 << " " << z2;
363 #endif
364  }
365  }
366  } else if (idet == 4) {
367  // HE
368 #ifdef EDM_ML_DEBUG
369  edm::LogVerbatim("HCalGeom") << "HE " << fv.name() << " Shape " << cms::dd::name(cms::DDSolidShapeMap, fv.shape())
370  << " Layer " << lay << " Z " << t.z();
371 #endif
372  if (lay >= 0 && lay < maxLayer_) {
373  ie_[lay]++;
375  if (thke_[lay] <= 0)
376  thke_[lay] = dz;
377  double rinHE = HcalGeomParameters::k_ScaleFromDD4HepToG4 * t.Rho() * cos(alp) - dy;
378  double routHE = HcalGeomParameters::k_ScaleFromDD4HepToG4 * t.Rho() * cos(alp) + dy;
379  rminHE_[lay] += rinHE;
380  rmaxHE_[lay] += routHE;
381  bool found = false;
382  for (double k : php.zxHE) {
384  found = true;
385  break;
386  }
387  }
388  if (!found) {
389  php.zxHE.emplace_back(std::abs(HcalGeomParameters::k_ScaleFromDD4HepToG4 * t.z()));
390  php.rhoxHE.emplace_back(HcalGeomParameters::k_ScaleFromDD4HepToG4 * t.Rho() * std::cos(t.phi()));
391  php.dyHE.emplace_back(dy * std::cos(t.phi()));
392  dx1 -= 0.5 * (HcalGeomParameters::k_ScaleFromDD4HepToG4 * t.Rho() - dy) * std::cos(t.phi()) * tan10deg;
393  dx2 -= 0.5 * (HcalGeomParameters::k_ScaleFromDD4HepToG4 * t.Rho() + dy) * std::cos(t.phi()) * tan10deg;
394  php.dx1HE.emplace_back(-dx1);
395  php.dx2HE.emplace_back(-dx2);
396  php.layHE.emplace_back(lay);
397  }
398  }
399  if (copy[0] == kHELayer1_ || copy[0] == kHELayer2_) {
400  int iz = copy[6];
401  int fi = copy[4];
402  unsigned int it1 = find(iz, ize_);
403  if (it1 == ize_.size())
404  ize_.emplace_back(iz);
405  unsigned int it2 = find(fi, phie_);
406  if (it2 == phie_.size())
407  phie_.emplace_back(fi);
408  }
409  } else if (idet == 5) {
410  // HF
411  if (!hf) {
412 #ifdef EDM_ML_DEBUG
413  edm::LogVerbatim("HCalGeom") << "HF " << fv.name() << " Shape "
414  << cms::dd::name(cms::DDSolidShapeMap, fv.shape()) << " Z "
415  << HcalGeomParameters::k_ScaleFromDD4HepToG4 * t.z() << " with " << paras.size()
416  << " Parameters";
417  for (unsigned j = 0; j < paras.size(); j++)
418  edm::LogVerbatim("HCalGeom") << "HF Parameter[" << j << "] = " << paras[j];
419 #endif
420  if (fv.isA<dd4hep::Polycone>()) {
421  int nz = (int)(paras.size()) - 3;
422  dzVcal_ = 0.5 * HcalGeomParameters::k_ScaleFromDD4HepToG4 * (paras[nz] - paras[3]);
423  hf = true;
424  } else if (fv.isATubeSeg() || fv.isAConeSeg()) {
425  dzVcal_ = HcalGeomParameters::k_ScaleFromDD4HepToG4 * paras[2];
426  hf = true;
427  }
428  }
429 #ifdef EDM_ML_DEBUG
430  } else {
431  edm::LogVerbatim("HCalGeom") << "Unknown Detector " << idet << " for " << fv.name() << " Shape "
432  << cms::dd::name(cms::DDSolidShapeMap, fv.shape()) << " R "
433  << (HcalGeomParameters::k_ScaleFromDD4HepToG4 * t.Rho()) << " Z "
435 #endif
436  }
437  }
438  loadfinal(php);
439 }
440 
441 unsigned int HcalGeomParameters::find(int element, std::vector<int>& array) const {
442  unsigned int id = array.size();
443  for (unsigned int i = 0; i < array.size(); i++) {
444  if (element == array[i]) {
445  id = i;
446  break;
447  }
448  }
449  return id;
450 }
451 
452 double HcalGeomParameters::getEta(double r, double z) const {
453  double tmp = 0;
454  if (z != 0)
455  tmp = -log(tan(0.5 * atan(r / z)));
456 #ifdef EDM_ML_DEBUG
457  edm::LogVerbatim("HCalGeom") << "HcalGeomParameters::getEta " << r << " " << z << " ==> " << tmp;
458 #endif
459  return tmp;
460 }
461 
463  php.rhoxHB.clear();
464  php.zxHB.clear();
465  php.dyHB.clear();
466  php.dxHB.clear();
467  php.layHB.clear();
468  php.layHE.clear();
469  php.zxHE.clear();
470  php.rhoxHE.clear();
471  php.dyHE.clear();
472  php.dx1HE.clear();
473  php.dx2HE.clear();
474 
475  // Initialize all variables
476  nzHB_ = nmodHB_ = 0;
477  nzHE_ = nmodHE_ = 0;
478  for (int i = 0; i < 4; ++i)
479  etaHO_[i] = 0;
480  zVcal_ = dzVcal_ = dlShort_ = 0;
481  rminHO_ = dzVcal_ = -1.;
482  for (int i = 0; i < maxLayer_; ++i) {
483  rb_.emplace_back(0.0);
484  ze_.emplace_back(0.0);
485  thkb_.emplace_back(-1.0);
486  thke_.emplace_back(-1.0);
487  ib_.emplace_back(0);
488  ie_.emplace_back(0);
489  rminHE_.emplace_back(0.0);
490  rmaxHE_.emplace_back(0.0);
491  }
492 }
493 
495  int ibmx = 0, iemx = 0;
496  for (int i = 0; i < maxLayer_; i++) {
497  if (ib_[i] > 0) {
498  rb_[i] /= static_cast<double>(ib_[i]);
499  ibmx = i + 1;
500  }
501  if (ie_[i] > 0) {
502  ze_[i] /= static_cast<double>(ie_[i]);
503  rminHE_[i] /= static_cast<double>(ie_[i]);
504  rmaxHE_[i] /= static_cast<double>(ie_[i]);
505  iemx = i + 1;
506  }
507 #ifdef EDM_ML_DEBUG
508  edm::LogVerbatim("HCalGeom") << "Index " << i << " Barrel " << ib_[i] << " " << rb_[i] << " Endcap " << ie_[i]
509  << " " << ze_[i] << ":" << rminHE_[i] << ":" << rmaxHE_[i];
510 #endif
511  }
512  for (int i = 4; i >= 0; i--) {
513  if (ib_[i] == 0) {
514  rb_[i] = rb_[i + 1];
515  thkb_[i] = thkb_[i + 1];
516  }
517  if (ie_[i] == 0) {
518  ze_[i] = ze_[i + 1];
519  thke_[i] = thke_[i + 1];
520  }
521 #ifdef EDM_ML_DEBUG
522  if (ib_[i] == 0 || ie_[i] == 0)
523  edm::LogVerbatim("HCalGeom") << "Index " << i << " Barrel " << ib_[i] << " " << rb_[i] << " Endcap " << ie_[i]
524  << " " << ze_[i];
525 #endif
526  }
527 
528 #ifdef EDM_ML_DEBUG
529  for (unsigned int k = 0; k < php.layHB.size(); ++k)
530  edm::LogVerbatim("HCalGeom") << "HB: " << php.layHB[k] << " R " << rxb_[k] << " " << php.rhoxHB[k] << " Z "
531  << php.zxHB[k] << " DY " << php.dyHB[k] << " DZ " << php.dxHB[k];
532  for (unsigned int k = 0; k < php.layHE.size(); ++k)
533  edm::LogVerbatim("HCalGeom") << "HE: " << php.layHE[k] << " R " << php.rhoxHE[k] << " Z " << php.zxHE[k]
534  << " X1|X2 " << php.dx1HE[k] << "|" << php.dx2HE[k] << " DY " << php.dyHE[k];
535  edm::LogVerbatim("HCalGeom") << "HcalGeomParameters: Maximum Layer for HB " << ibmx << " for HE " << iemx
536  << " extent " << dzVcal_;
537 #endif
538 
539  if (ibmx > 0) {
540  php.rHB.resize(ibmx);
541  php.drHB.resize(ibmx);
542  for (int i = 0; i < ibmx; i++) {
543  php.rHB[i] = rb_[i];
544  php.drHB[i] = thkb_[i];
545 #ifdef EDM_ML_DEBUG
546  edm::LogVerbatim("HCalGeom") << "HcalGeomParameters: php.rHB[" << i << "] = " << php.rHB[i] << " php.drHB[" << i
547  << "] = " << php.drHB[i];
548 #endif
549  }
550  }
551  if (iemx > 0) {
552  php.zHE.resize(iemx);
553  php.dzHE.resize(iemx);
554  for (int i = 0; i < iemx; i++) {
555  php.zHE[i] = ze_[i];
556  php.dzHE[i] = thke_[i];
557 #ifdef EDM_ML_DEBUG
558  edm::LogVerbatim("HCalGeom") << "HcalGeomParameters: php.zHE[" << i << "] = " << php.zHE[i] << " php.dzHE[" << i
559  << "] = " << php.dzHE[i];
560 #endif
561  }
562  }
563 
564  nzHB_ = static_cast<int>(izb_.size());
565  nmodHB_ = static_cast<int>(phib_.size());
566 #ifdef EDM_ML_DEBUG
567  edm::LogVerbatim("HCalGeom") << "HcalGeomParameters::loadGeometry: " << nzHB_ << " barrel half-sectors";
568  for (int i = 0; i < nzHB_; i++)
569  edm::LogVerbatim("HCalGeom") << "Section " << i << " Copy number " << izb_[i];
570  edm::LogVerbatim("HCalGeom") << "HcalGeomParameters::loadGeometry: " << nmodHB_ << " barrel modules";
571  for (int i = 0; i < nmodHB_; i++)
572  edm::LogVerbatim("HCalGeom") << "Module " << i << " Copy number " << phib_[i];
573 #endif
574 
575  nzHE_ = static_cast<int>(ize_.size());
576  nmodHE_ = static_cast<int>(phie_.size());
577 #ifdef EDM_ML_DEBUG
578  edm::LogVerbatim("HCalGeom") << "HcalGeomParameters::loadGeometry: " << nzHE_ << " endcap half-sectors";
579  for (int i = 0; i < nzHE_; i++)
580  edm::LogVerbatim("HCalGeom") << "Section " << i << " Copy number " << ize_[i];
581  edm::LogVerbatim("HCalGeom") << "HcalGeomParameters::loadGeometry: " << nmodHE_ << " endcap modules";
582  for (int i = 0; i < nmodHE_; i++)
583  edm::LogVerbatim("HCalGeom") << "Module " << i << " Copy number " << phie_[i];
584 #endif
585 
586 #ifdef EDM_ML_DEBUG
587  edm::LogVerbatim("HCalGeom") << "HO has Z of size " << php.zHO.size();
588  for (unsigned int kk = 0; kk < php.zHO.size(); kk++)
589  edm::LogVerbatim("HCalGeom") << "ZHO[" << kk << "] = " << php.zHO[kk];
590 #endif
591  if (ibmx > 17 && php.zHO.size() > 4) {
592  rminHO_ = php.rHB[17] - 100.0;
593  etaHO_[0] = getEta(0.5 * (php.rHB[17] + php.rHB[18]), php.zHO[1]);
594  etaHO_[1] = getEta(php.rHB[18] + php.drHB[18], php.zHO[2]);
595  etaHO_[2] = getEta(php.rHB[18] - php.drHB[18], php.zHO[3]);
596  etaHO_[3] = getEta(php.rHB[18] + php.drHB[18], php.zHO[4]);
597  }
598 #ifdef EDM_ML_DEBUG
599  edm::LogVerbatim("HCalGeom") << "HO Eta boundaries " << etaHO_[0] << " " << etaHO_[1] << " " << etaHO_[2] << " "
600  << etaHO_[3];
601  edm::LogVerbatim("HCalGeom") << "HO Parameters " << rminHO_ << " " << php.zHO.size();
602  for (unsigned int i = 0; i < php.zHO.size(); ++i)
603  edm::LogVerbatim("HCalGeom") << " zho[" << i << "] = " << php.zHO[i];
604 #endif
605 }
DDVectorGetter.h
DDTubs::zhalf
double zhalf(void) const
Definition: DDSolid.cc:450
mps_fire.i
i
Definition: mps_fire.py:355
HcalGeomParameters::getEta
double getEta(double r, double z) const
Definition: HcalGeomParameters.cc:452
cms::DDFilteredView::parameters
const std::vector< double > parameters() const
extract shape parameters
Definition: DDFilteredView.cc:448
MessageLogger.h
DDTrap::halfZ
double halfZ(void) const
half of the z-Axis
Definition: DDSolid.cc:131
HcalParameters::layHB
std::vector< int > layHB
Definition: HcalParameters.h:51
DDTrap::x4
double x4(void) const
Half-length along x of the side at y=+pDy2 of the face at +pDz.
Definition: DDSolid.cc:149
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
DDSolidShape::ddtrap
cms::DDFilteredView::isAConeSeg
auto isAConeSeg(Ts &&... ts) const -> decltype(isA< dd4hep::ConeSegment >(std::forward< Ts >(ts)...))
Definition: DDFilteredView.h:158
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
DDTrap::x2
double x2(void) const
Half-length along x of the side at y=+pDy1 of the face at -pDz.
Definition: DDSolid.cc:141
min
T min(T a, T b)
Definition: MathUtil.h:58
DDBox::halfZ
double halfZ(void) const
Definition: DDSolid.cc:212
DDFilteredView::logicalPart
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
Definition: DDFilteredView.cc:16
DDFilteredView::copyNumbers
nav_type copyNumbers() const
return the stack of copy numbers
Definition: DDFilteredView.cc:193
cms::DDFilteredView::isATubeSeg
auto isATubeSeg(Ts &&... ts) const -> decltype(isA< dd4hep::Tube >(std::forward< Ts >(ts)...))
Definition: DDFilteredView.h:178
HcalParameters::zxHB
std::vector< double > zxHB
Definition: HcalParameters.h:24
HcalParameters.h
mps_check.array
array
Definition: mps_check.py:216
HcalParameters::zHO
std::vector< double > zHO
Definition: HcalParameters.h:21
geant_units::operators
Definition: GeantUnits.h:18
cms::DDFilteredView
Definition: DDFilteredView.h:65
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
cms::DDFilteredView::isA
bool isA() const
Definition: DDFilteredView.h:148
cms::DDFilteredView::name
std::string_view name() const
Definition: DDFilteredView.cc:606
cms::DDFilteredView::translation
const Translation translation() const
Definition: DDFilteredView.cc:103
testProducerWithPsetDescEmpty_cfi.z2
z2
Definition: testProducerWithPsetDescEmpty_cfi.py:41
HcalParameters::layHE
std::vector< int > layHE
Definition: HcalParameters.h:52
DDSolid::shape
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:119
photonIsolationHIProducer_cfi.hf
hf
Definition: photonIsolationHIProducer_cfi.py:9
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
cms::DDFilter
Definition: DDFilteredView.h:54
HcalParameters::dx1HE
std::vector< double > dx1HE
Definition: HcalParameters.h:30
HcalParameters::rhoxHE
std::vector< double > rhoxHE
Definition: HcalParameters.h:27
DDSolidShape::ddtubs
HcalGeomParameters::find
unsigned find(int element, std::vector< int > &array) const
Definition: HcalGeomParameters.cc:441
cms::dd::name
std::string name(Mapping a, V value)
Definition: DDSolidShapes.h:31
DDBox
Interface to a Box.
Definition: DDSolid.h:156
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
DDTrap::y1
double y1(void) const
Half-length along y of the face at -pDz.
Definition: DDSolid.cc:137
HcalParameters::dxHB
std::vector< double > dxHB
Definition: HcalParameters.h:26
DDFilteredView::next
bool next()
set current node to the next node in the filtered tree
Definition: DDFilteredView.cc:67
HcalParameters::dx2HE
std::vector< double > dx2HE
Definition: HcalParameters.h:31
cms::DDFilteredView::copyNos
const std::vector< int > copyNos() const
The list of the volume copy numbers.
Definition: DDFilteredView.cc:89
DDBase::name
const N & name() const
Definition: DDBase.h:59
HcalGeomParameters::getModHalfHBHE
std::vector< int > getModHalfHBHE(const int type) const
Definition: HcalGeomParameters.cc:27
tan10deg
static const double tan10deg
Definition: HcalGeomParameters.cc:19
cms::DDFilteredView::firstChild
bool firstChild()
set the current node to the first child
Definition: DDFilteredView.cc:218
DDSolid.h
cms::DDFilteredView::shape
const cms::DDSolidShape shape() const
Definition: DDFilteredView.cc:464
GetRecoTauVFromDQM_MC_cff.kk
kk
Definition: GetRecoTauVFromDQM_MC_cff.py:84
HcalParameters::dzHE
std::vector< double > dzHE
Definition: HcalParameters.h:20
dqmdumpme.k
k
Definition: dqmdumpme.py:60
OrderedSet.t
t
Definition: OrderedSet.py:90
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
DDValue.h
HcalParameters::rHB
std::vector< double > rHB
Definition: HcalParameters.h:17
DDTubs::rIn
double rIn(void) const
Definition: DDSolid.cc:452
DDTrap
Interface to a Trapezoid.
Definition: DDSolid.h:77
clear
void clear(HadCaloObj &c)
Definition: data.h:124
GeantUnits.h
cms::DDSolidShapeMap
const std::array< const cms::dd::NameValuePair< DDSolidShape >, 19 > DDSolidShapeMap
Definition: DDSolidShapes.h:84
HcalGeomParameters::getConstRHO
void getConstRHO(std::vector< double > &) const
Definition: HcalGeomParameters.cc:21
HcalGeomParameters::k_ScaleFromDDDToG4
static constexpr double k_ScaleFromDDDToG4
Definition: HcalGeomParameters.h:30
HcalGeomParameters::k_ScaleFromDD4HepToG4
static constexpr double k_ScaleFromDD4HepToG4
Definition: HcalGeomParameters.h:34
DDTubs::rOut
double rOut(void) const
Definition: DDSolid.cc:454
HcalParameters::zxHE
std::vector< double > zxHE
Definition: HcalParameters.h:28
DDSolidShape::ddcons
HcalGeomParameters::loadfinal
void loadfinal(HcalParameters &php)
Definition: HcalGeomParameters.cc:494
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
HcalParameters::zHE
std::vector< double > zHE
Definition: HcalParameters.h:19
createfilelist.int
int
Definition: createfilelist.py:10
DDutils.h
DDFilter.h
HcalGeomParameters.h
DDBox::halfX
double halfX(void) const
Definition: DDSolid.cc:208
edm::LogVerbatim
Definition: MessageLogger.h:297
PVValHelper::dy
Definition: PVValidationHelpers.h:49
DDBox::halfY
double halfY(void) const
Definition: DDSolid.cc:210
HcalParameters::dyHE
std::vector< double > dyHE
Definition: HcalParameters.h:29
HcalGeomParameters::clear
void clear(HcalParameters &php)
Definition: HcalGeomParameters.cc:462
alignCSCRings.r
r
Definition: alignCSCRings.py:93
cms::DDFilteredView::isABox
auto isABox(Ts &&... ts) const -> decltype(isA< dd4hep::Box >(std::forward< Ts >(ts)...))
Definition: DDFilteredView.h:153
DDErrorDetection.h
HcalParameters::dyHB
std::vector< double > dyHB
Definition: HcalParameters.h:25
DDTrap::y2
double y2(void) const
Half-length along y of the face at +pDz.
Definition: DDSolid.cc:145
type
type
Definition: HCALResponse.h:21
DDSolidShape::ddbox
PVValHelper::dz
Definition: PVValidationHelpers.h:50
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
DDFilteredView::translation
const DDTranslation & translation() const
The absolute translation of the current node.
Definition: DDFilteredView.cc:26
HcalGeomParameters::loadGeometry
void loadGeometry(const DDFilteredView &_fv, HcalParameters &php)
Definition: HcalGeomParameters.cc:39
HcalParameters::drHB
std::vector< double > drHB
Definition: HcalParameters.h:18
HcalParameters
Definition: HcalParameters.h:6
cms::DDCompactView
Definition: DDCompactView.h:29
DDSolid::parameters
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Definition: DDSolid.cc:121
DDSolid
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
Exception.h
DDTrap::x1
double x1(void) const
Half-length along x of the side at y=-pDy1 of the face at -pDz.
Definition: DDSolid.cc:139
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
DDFilteredView
Definition: DDFilteredView.h:20
DDSolidShape::ddpolycone_rrz
DDTrap::alpha1
double alpha1(void) const
Angle with respect to the y axis from the centre of the side at y=-pDy1 to the centre at y=+pDy1 of t...
Definition: DDSolid.cc:143
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
cms::DDFilteredView::isATrapezoid
auto isATrapezoid(Ts &&... ts) const -> decltype(isA< dd4hep::Trap >(std::forward< Ts >(ts)...))
Definition: DDFilteredView.h:168
DDTrap::alpha2
double alpha2(void) const
Angle with respect to the y axis from the centre of the side at y=-pDy2 to the centre at y=+pDy2 of t...
Definition: DDSolid.cc:151
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
DDConstant.h
DDLogicalPart::solid
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
Definition: DDLogicalPart.cc:120
PVValHelper::dx
Definition: PVValidationHelpers.h:48
HcalParameters::rhoxHB
std::vector< double > rhoxHB
Definition: HcalParameters.h:23
DDTrap::x3
double x3(void) const
Half-length along x of the side at y=-pDy2 of the face at +pDz.
Definition: DDSolid.cc:147
DDTubs
Definition: DDSolid.h:255