CMS 3D CMS Logo

DDHCalBarrelAlgo.cc
Go to the documentation of this file.
1 // File: DDHCalBarrelAlgo.cc
3 // adapted from CCal(G4)HcalBarrel.cc
4 // Description: Geometry factory class for Hcal Barrel
6 
7 #include <cmath>
8 #include <algorithm>
9 
19 
20 //#define EDM_ML_DEBUG
21 using namespace geant_units::operators;
22 
24  theta(0),rmax(0),zoff(0),ttheta(0),layerId(0),layerLabel(0),layerMat(0),
25  layerWidth(0),layerD1(0),layerD2(0),layerAlpha(0),layerT1(0),layerT2(0),
26  layerAbsorb(0),layerGap(0),absorbName(0),absorbMat(0),absorbD(0),absorbT(0),
27  midName(0),midMat(0),midW(0),midT(0),sideMat(0),sideD(0),sideT(0),
28  sideAbsName(0),sideAbsMat(0),sideAbsW(0),detType(0),detdP1(0),detdP2(0),
29  detT11(0),detT12(0),detTsc(0),detT21(0),detT22(0),detWidth1(0),detWidth2(0),
30  detPosY(0) {
31 #ifdef EDM_ML_DEBUG
32  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Creating an instance";
33 #endif
34 }
35 
37 
39  const DDVectorArguments & vArgs,
40  const DDMapArguments & ,
41  const DDStringArguments & sArgs,
42  const DDStringVectorArguments & vsArgs) {
43 
44  genMaterial = sArgs["MaterialName"];
45  nsectors = int (nArgs["NSector"]);
46  nsectortot = int (nArgs["NSectorTot"]);
47  nhalf = int (nArgs["NHalf"]);
48  rin = nArgs["RIn"];
49  rout = nArgs["ROut"];
50  rzones = int (nArgs["RZones"]);
51  rotHalf = sArgs["RotHalf"];
52  rotns = sArgs["RotNameSpace"];
53 
54  theta = vArgs["Theta"];
55  rmax = vArgs["RMax"];
56  zoff = vArgs["ZOff"];
57  for (int i = 0; i < rzones; i++) {
58  ttheta.emplace_back(tan(theta[i])); //*deg already done in XML
59  }
60  if (rzones > 3)
61  rmax[2] = (zoff[3] - zoff[2]) / ttheta[2];
62 
63 #ifdef EDM_ML_DEBUG
64  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: General material "
65  << genMaterial << "\tSectors " << nsectors
66  << ", " << nsectortot <<"\tHalves "
67  << nhalf << "\tRotation matrix " << rotns
68  << ":" << rotHalf << "\n\t\t" << rin << "\t"
69  << rout << "\t" << rzones;
70  for (int i = 0; i < rzones; i++)
71  edm::LogVerbatim("HCalGeom") << "\tTheta[" << i << "] = " << theta[i]
72  << "\trmax[" << i << "] = " << rmax[i]
73  << "\tzoff[" << i << "] = " << zoff[i];
74 #endif
75  //Layers
77  nLayers = int(nArgs["NLayers"]);
78 #ifdef EDM_ML_DEBUG
79  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Layer\t" << nLayers;
80 #endif
81  layerId = dbl_to_int (vArgs["Id"]);
82  layerLabel = vsArgs["LayerLabel"];
83  layerMat = vsArgs["LayerMat"];
84  layerWidth = vArgs["LayerWidth"];
85  layerD1 = vArgs["D1"];
86  layerD2 = vArgs["D2"];
87  layerAlpha = vArgs["Alpha2"];
88  layerT1 = vArgs["T1"];
89  layerT2 = vArgs["T2"];
90  layerAbsorb = dbl_to_int(vArgs["AbsL"]);
91  layerGap = vArgs["Gap"];
92 #ifdef EDM_ML_DEBUG
93  for (int i = 0; i < nLayers; i++)
94  edm::LogVerbatim("HCalGeom") << layerLabel[i] << "\t" << layerId[i] << "\t"
95  << layerMat[i] << "\t" << layerWidth[i]
96  << "\t" << layerD1[i] << "\t" << layerD2[i]
97  << "\t" << layerAlpha[i] << "\t" << layerT1[i]
98  << "\t" << layerT2[i] << "\t"
99  << layerAbsorb[i] << "\t" << layerGap[i];
100 #endif
101 
103  //Absorber Layers and middle part
104  absorbName = vsArgs["AbsorbName"];
105  absorbMat = vsArgs["AbsorbMat"];
106  absorbD = vArgs["AbsorbD"];
107  absorbT = vArgs["AbsorbT"];
108  nAbsorber = absorbName.size();
109 #ifdef EDM_ML_DEBUG
110  for (int i = 0; i < nAbsorber; i++)
111  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << absorbName[i]
112  <<" Material " << absorbMat[i] << " d "
113  << absorbD[i] << " t " <<absorbT[i];
114 #endif
115  middleMat = sArgs["MiddleMat"];
116  middleD = nArgs["MiddleD"];
117  middleW = nArgs["MiddleW"];
118 #ifdef EDM_ML_DEBUG
119  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Middle material "
120  << middleMat << " d " << middleD << " w "
121  << middleW;
122 #endif
123  midName = vsArgs["MidAbsName"];
124  midMat = vsArgs["MidAbsMat"];
125  midW = vArgs["MidAbsW"];
126  midT = vArgs["MidAbsT"];
127  nMidAbs = midName.size();
128 #ifdef EDM_ML_DEBUG
129  for (int i = 0; i < nMidAbs; i++)
130  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << midName[i]
131  << " Material " << midMat[i] << " W "
132  << midW[i] << " T " << midT[i];
133 #endif
134 
135  //Absorber layers in the side part
136  sideMat = vsArgs["SideMat"];
137  sideD = vArgs["SideD"];
138  sideT = vArgs["SideT"];
139 #ifdef EDM_ML_DEBUG
140  for (unsigned int i = 0; i < sideMat.size(); i++)
141  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Side material "
142  << sideMat[i] << " d " << sideD[i] << " t "
143  << sideT[i];
144 #endif
145  sideAbsName = vsArgs["SideAbsName"];
146  sideAbsMat = vsArgs["SideAbsMat"];
147  sideAbsW = vArgs["SideAbsW"];
148  nSideAbs = sideAbsName.size();
149 #ifdef EDM_ML_DEBUG
150  for (int i = 0; i < nSideAbs; i++)
151  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << sideAbsName[i]
152  <<" Material " << sideAbsMat[i] << " W "
153  << sideAbsW[i];
154 #endif
155 
157  // Detectors
158 
159  detMat = sArgs["DetMat"];
160  detRot = sArgs["DetRot"];
161  detMatPl = sArgs["DetMatPl"];
162  detMatSc = sArgs["DetMatSc"];
163 #ifdef EDM_ML_DEBUG
164  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Detector (" << nLayers
165  << ") Rotation matrix " << rotns << ":"
166  << detRot << "\n\t\t" << detMat << "\t"
167  << detMatPl << "\t" << detMatSc;
168 #endif
169  detType = dbl_to_int(vArgs["DetType"]);
170  detdP1 = vArgs["DetdP1"];
171  detdP2 = vArgs["DetdP2"];
172  detT11 = vArgs["DetT11"];
173  detT12 = vArgs["DetT12"];
174  detTsc = vArgs["DetTsc"];
175  detT21 = vArgs["DetT21"];
176  detT22 = vArgs["DetT22"];
177  detWidth1 = vArgs["DetWidth1"];
178  detWidth2 = vArgs["DetWidth2"];
179  detPosY = dbl_to_int(vArgs["DetPosY"]);
180 #ifdef EDM_ML_DEBUG
181  for (int i = 0; i < nLayers; i ++)
182  edm::LogVerbatim("HCalGeom") << i+1 << "\t" << detType[i] << "\t"
183  << detdP1[i] << ", " << detdP2[i] << "\t"
184  << detT11[i] << ", " << detT12[i] << "\t"
185  << detTsc[i] << "\t" << detT21[i] << ", "
186  << detT22[i] << "\t" << detWidth1[i] << "\t"
187  << detWidth2[i] << "\t" << detPosY[i];
188 #endif
189 
190  // idName = parentName.name();
191  idName = sArgs["MotherName"];
193  idOffset = int (nArgs["IdOffset"]);
194 #ifdef EDM_ML_DEBUG
195  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Parent " <<parent().name()
196  <<" idName " << idName << " NameSpace "
197  << idNameSpace << " Offset " << idOffset;
198 #endif
199 }
200 
202 // DDHCalBarrelAlgo methods...
204 
206 
207 #ifdef EDM_ML_DEBUG
208  edm::LogVerbatim("HCalGeom") << "==>> Constructing DDHCalBarrelAlgo...";
209 #endif
211 #ifdef EDM_ML_DEBUG
212  edm::LogVerbatim("HCalGeom") << "<<== End of DDHCalBarrelAlgo construction";
213 #endif
214 }
215 
216 //----------------------start here for DDD work!!! ---------------
217 
219 
220 #ifdef EDM_ML_DEBUG
221  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: General volume...";
222 #endif
223 
225 
226  double alpha = (1._pi)/getNsectors();
227  double dphi = getNsectortot()*(2._pi)/getNsectors();
228  int nsec, ntot=15;
229  if (getNhalf() == 1)
230  nsec = 8;
231  else
232  nsec = 15;
233  int nf = ntot - nsec;
234 
235  //Calculate zmin... see HCalBarrel.hh picture. For polyhedra
236  //Rmin and Rmax are distances to vertex
237  double zmax = getZoff(3);
238  double zstep5 = getZoff(4);
239  double zstep4 =(getZoff(1) + getRmax(1)*getTanTheta(1));
240  if ((getZoff(2)+getRmax(1)*getTanTheta(2)) > zstep4)
241  zstep4 = (getZoff(2)+getRmax(1)*getTanTheta(2));
242  double zstep3 =(getZoff(1) + getRmax(0)*getTanTheta(1));
243  double zstep2 =(getZoff(0) + getRmax(0)*getTanTheta(0));
244  double zstep1 =(getZoff(0) + getRin() *getTanTheta(0));
245  double rout = getRout();
246  double rout1 = getRmax(3);
247  double rin = getRin();
248  double rmid1 = getRmax(0);
249  double rmid2 = getRmax(1);
250  double rmid3 =(getZoff(4) - getZoff(2))/getTanTheta(2);
251  double rmid4 = getRmax(2);
252 
253  std::vector<double> pgonZ = {-zmax, -zstep5,-zstep5,-zstep4,-zstep3,
254  -zstep2,-zstep1, 0, zstep1, zstep2,
255  zstep3, zstep4, zstep5, zstep5, zmax};
256 
257  std::vector<double> pgonRmin = {rmid4,rmid3,rmid3,rmid2,rmid1,
258  rmid1, rin, rin, rin,rmid1,
259  rmid1,rmid2,rmid3,rmid3,rmid4};
260 
261  std::vector<double> pgonRmax = {rout1,rout1,rout, rout, rout, rout,
262  rout, rout, rout, rout, rout, rout,
263  rout, rout1,rout1};
264 
265  std::vector<double> pgonZHalf = {0, zstep1,zstep2,zstep3,zstep4,zstep5,
266  zstep5,zmax};
267 
268  std::vector<double> pgonRminHalf = {rin, rin,rmid1,rmid1,rmid2,rmid3,
269  rmid3,rmid4};
270 
271  std::vector<double> pgonRmaxHalf = {rout, rout, rout, rout, rout, rout,
272  rout1,rout1};
273 
274  std::string name("Null");
275  DDSolid solid;
276  if (nf == 0) {
278  getNsectortot(), -alpha, dphi, pgonZ,
279  pgonRmin, pgonRmax);
280 #ifdef EDM_ML_DEBUG
281  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: "
283  << " Polyhedra made of " << getGenMaterial()
284  << " with " << getNsectortot()
285  << " sectors from " << convertRadToDeg(-alpha)
286  << " to " << convertRadToDeg(-alpha+dphi)
287  << " and with " << nsec << " sections ";
288  for (unsigned int i = 0; i <pgonZ.size(); i++)
289  edm::LogVerbatim("HCalGeom") << "\t" << "\tZ = " << pgonZ[i]
290  << "\tRmin = " << pgonRmin[i] << "\tRmax = "
291  << pgonRmax[i];
292 #endif
293  } else {
295  getNsectortot(), -alpha, dphi, pgonZHalf,
296  pgonRminHalf, pgonRmaxHalf);
297 #ifdef EDM_ML_DEBUG
298  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: "
300  << " Polyhedra made of " << getGenMaterial()
301  << " with " << getNsectortot()
302  << " sectors from " << convertRadToDeg(-alpha)
303  << " to " << convertRadToDeg(-alpha+dphi)
304  << " and with " << nsec << " sections ";
305  for (unsigned int i = 0; i < pgonZHalf.size(); i++)
306  edm::LogVerbatim("HCalGeom") << "\t" << "\tZ = " << pgonZHalf[i]
307  << "\tRmin = " << pgonRminHalf[i]
308  << "\tRmax = " << pgonRmaxHalf[i];
309 #endif
310  }
311 
312 
314  DDMaterial matter(matname);
315  DDLogicalPart genlogic(DDName(idName, idNameSpace), matter, solid);
316 
317  DDName parentName = parent().name();
318  DDTranslation r0(0,0,0);
319  cpv.position(DDName(idName, idNameSpace), parentName, 1, r0, rot);
320 #ifdef EDM_ML_DEBUG
321  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: "
323  << " number 1 positioned in " << parentName
324  << " at " << r0 << " with " << rot;
325 #endif
326  //Forward and backwards halfs
327  name = idName + "Half";
328  nf = (ntot+1)/2;
329 #ifdef EDM_ML_DEBUG
330  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: "
331  << DDName(name,idNameSpace)
332  << " Polyhedra made of " << getGenMaterial()
333  << " with " << getNsectortot()
334  << " sectors from " << convertRadToDeg(-alpha)
335  << " to " << convertRadToDeg(-alpha+dphi)
336  << " and with " << nf << " sections ";
337  for (unsigned int i = 0; i < pgonZHalf.size(); i++)
338  edm::LogVerbatim("HCalGeom") << "\t" << "\tZ = " << pgonZHalf[i]
339  << "\tRmin = " << pgonRminHalf[i]
340  << "\tRmax = " << pgonRmaxHalf[i];
341 #endif
342 
344  getNsectortot(), -alpha, dphi, pgonZHalf,
345  pgonRminHalf, pgonRmaxHalf);
346  DDLogicalPart genlogich(DDName(name, idNameSpace), matter, solid);
347 
348  cpv.position(genlogich, genlogic, 1, r0, rot);
349 #ifdef EDM_ML_DEBUG
350  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << genlogich.name()
351  << " number 1 positioned in " << genlogic.name()
352  << " at " << r0 << " with " << rot;
353 #endif
354  if (getNhalf() != 1) {
355  rot = DDRotation(DDName(rotHalf, rotns));
356  cpv.position(genlogich, genlogic, 2, r0, rot);
357 #ifdef EDM_ML_DEBUG
358  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << genlogich.name()
359  << " number 2 positioned in "
360  << genlogic.name() << " at " << r0
361  << " with " << rot;
362 #endif
363  } //end if (getNhalf...
364 
365  //Construct sector (from -alpha to +alpha)
366  name = idName + "Module";
367 #ifdef EDM_ML_DEBUG
368  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: "
369  << DDName(name,idNameSpace)
370  << " Polyhedra made of " << getGenMaterial()
371  << " with 1 sector from "
372  << convertRadToDeg(-alpha) << " to "
373  << convertRadToDeg(alpha) << " and with "
374  << nf <<" sections";
375  for (unsigned int i = 0; i < pgonZHalf.size(); i++)
376  edm::LogVerbatim("HCalGeom") << "\t" << "\tZ = " << pgonZHalf[i]
377  << "\tRmin = " << pgonRminHalf[i]
378  << "\tRmax = " << pgonRmaxHalf[i];
379 #endif
380 
382  1, -alpha, 2*alpha, pgonZHalf,
383  pgonRminHalf, pgonRmaxHalf);
384  DDLogicalPart seclogic(DDName(name, idNameSpace), matter, solid);
385 
386  double theta = 90._deg;
387  for (int ii=0; ii<getNsectortot(); ii++) {
388  double phi = ii*2*alpha;
389  double phiy = phi + 90._deg;
390 
392  std::string rotstr("NULL");
393  if (phi != 0) {
394  rotstr = "R" + formatAsDegreesInInteger(phi);
395  rotation = DDRotation(DDName(rotstr, rotns));
396  if (!rotation) {
397 #ifdef EDM_ML_DEBUG
398  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Creating a new "
399  << "rotation " << rotstr << "\t 90,"
400  << convertRadToDeg(phi) << ",90,"
401  << (90+convertRadToDeg(phi)) << ", 0, 0";
402 #endif
403  rotation = DDrot(DDName(rotstr, rotns), theta, phi, theta, phiy, 0, 0);
404  } //if !rotation
405  } //if phideg!=0
406 
407  cpv.position(seclogic, genlogich, ii+1, r0, rotation);
408 #ifdef EDM_ML_DEBUG
409  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << seclogic.name()
410  << " number " << ii+1 << " positioned in "
411  << genlogich.name() << " at " << r0
412  << " with " << rotation;
413 #endif
414  }
415 
416  //Construct the things inside the sector
417  constructInsideSector(seclogic, cpv);
418 }
419 
420 
422 
423 #ifdef EDM_ML_DEBUG
424  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: Layers (" << getNLayers()
425  << ") ...";
426 #endif
427  double alpha = (1._pi)/getNsectors();
428  double rin = getRin();
429  for (int i = 0; i < getNLayers(); i++) {
432  DDSplit(getLayerMaterial(i)).second); //idNameSpace);
433  DDMaterial matter(matname);
434 
435  double width = getLayerWidth(i);
436  double rout = rin + width;
437 
438  int in = 0, out = 0;
439  for (int j = 0; j < getRzones()-1; j++) {
440  if (rin >= getRmax(j)) in = j+1;
441  if (rout> getRmax(j)) out= j+1;
442  }
443  double zout = getZoff(in) + rin*getTanTheta(in);
444 
446  //vertical walls are allowed in SolidPolyhedra
447  double deltaz = 0;
448  int nsec=2;
449  std::vector<double> pgonZ, pgonRmin, pgonRmax;
450  // index 0
451  pgonZ.emplace_back(0);
452  pgonRmin.emplace_back(rin);
453  pgonRmax.emplace_back(rout);
454  // index 1
455  pgonZ.emplace_back(zout);
456  pgonRmin.emplace_back(rin);
457  pgonRmax.emplace_back(rout);
458  if (in == out) {
459  if (in <= 3) {
460  //index 2
461  pgonZ.emplace_back(getZoff(in) + rout*getTanTheta(in));
462  pgonRmin.emplace_back(pgonRmax[1]);
463  pgonRmax.emplace_back(pgonRmax[1]);
464  nsec++;
465  }
466  } else {
467  if (in == 3) {
468  //redo index 1, add index 2
469  pgonZ[1] =(getZoff(out) + getRmax(out)*getTanTheta(out));
470  pgonZ.emplace_back(pgonZ[1] + deltaz);
471  pgonRmin.emplace_back(pgonRmin[1]);
472  pgonRmax.emplace_back(getRmax(in));
473  //index 3
474  pgonZ.emplace_back(getZoff(in) + getRmax(in)*getTanTheta(in));
475  pgonRmin.emplace_back(pgonRmin[2]);
476  pgonRmax.emplace_back(pgonRmax[2]);
477  nsec += 2;
478  } else {
479  //index 2
480  pgonZ.emplace_back(getZoff(in) + getRmax(in)*getTanTheta(in));
481  pgonRmin.emplace_back(getRmax(in));
482  pgonRmax.emplace_back(pgonRmax[1]);
483  nsec++;
484  if (in == 0) {
485  pgonZ.emplace_back(getZoff(out) + getRmax(in)*getTanTheta(out));
486  pgonRmin.emplace_back(pgonRmin[2]);
487  pgonRmax.emplace_back(pgonRmax[2]);
488  nsec++;
489  }
490  if (in <= 1) {
491  pgonZ.emplace_back(getZoff(out) + rout*getTanTheta(out));
492  pgonRmin.emplace_back(rout);
493  pgonRmax.emplace_back(rout);
494  nsec++;
495  }
496  }
497  }
498  //Solid & volume
499  DDSolid solid;
500  double alpha1 = alpha;
501  if (getLayerGap(i)>1.e-6) {
502  double rmid = 0.5*(rin+rout);
503  double width = rmid*tan(alpha) - getLayerGap(i);
504  alpha1 = atan(width/rmid);
505 #ifdef EDM_ML_DEBUG
506  edm::LogVerbatim("HCalGeom") << "\t" << "Alpha_1 modified from "
507  << convertRadToDeg(alpha) << " to "
508  << convertRadToDeg(alpha1)
509  << " Rmid " << rmid << " Reduced width "
510  << width;
511 #endif
512  }
513 #ifdef EDM_ML_DEBUG
514  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << name << " (Layer "
515  << i << ") Polyhedra made of "
516  << getLayerMaterial(i)
517  << " with 1 sector from "
518  << convertRadToDeg(-alpha1) << " to "
519  << convertRadToDeg(alpha1) << " and with "
520  << nsec << " sections";
521  for (unsigned int k=0; k<pgonZ.size(); k++)
522  edm::LogVerbatim("HCalGeom") << "\t" << "\t" << pgonZ[k] << "\t"
523  << pgonRmin[k] << "\t" << pgonRmax[k];
524 #endif
526  1, -alpha1, 2*alpha1,
527  pgonZ, pgonRmin, pgonRmax);
528  DDLogicalPart glog(DDName(name, idNameSpace), matter, solid);
529 
530  cpv.position(glog, sector, getLayerId(i), DDTranslation(0.0, 0.0, 0.0),
531  DDRotation());
532 #ifdef EDM_ML_DEBUG
533  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
534  << " number " << getLayerId(i)
535  << " positioned in " << sector.name()
536  << " at (0,0,0) with no rotation";
537 #endif
539  getLayerAbsorb(i), rin, getLayerD1(i), alpha1,
541  getLayerT2(i), cpv);
542  rin = rout;
543  }
544 
545 }
546 
548  const std::string& nm, int id,
549  int nAbs, double rin, double d1,
550  double alpha1, double d2,
551  double alpha2, double t1,
552  double t2, DDCompactView& cpv) {
553 
554 #ifdef EDM_ML_DEBUG
555  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: \t\tInside layer " << id
556  << "...";
557 #endif
558  //Pointers to the Rotation Matrices and to the Materials
561 
562  std::string nam0 = nm + "In";
563  std::string name = idName + nam0;
565  DDMaterial matter (matName);
566 
567  DDSolid solid;
568  DDLogicalPart glog, mother;
569  double rsi, dx, dy, dz, x, y;
570  int i, in;
571  //Two lower volumes
572  if (alpha1 > 0) {
573  rsi = rin + d1;
574  in = 0;
575  for (i = 0; i < getRzones()-1; i++) {
576  if (rsi >= getRmax(i)) in = i+1;
577  }
578  dx = 0.5*t1;
579  dy = 0.5*rsi*(tan(alpha1)-tan(alpha2));
580  dz = 0.5*(getZoff(in) + rsi*getTanTheta(in));
581  x = rsi + dx;
582  y = 0.5*rsi*(tan(alpha1)+tan(alpha2));
583  DDTranslation r11(x, y, dz);
584  DDTranslation r12(x, -y, dz);
585 
586  solid = DDSolidFactory::box(DDName(name+"1", idNameSpace), dx, dy, dz);
587 #ifdef EDM_ML_DEBUG
588  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
589  <<" Box made of " << getDetMat()
590  << " of dimensions " << dx << ", " << dy
591  << ", " << dz;
592 #endif
593  glog = DDLogicalPart(solid.ddname(), matter, solid);
594 
595  if (nAbs != 0) {
596  mother = constructSideLayer(laylog, name, nAbs, rin, alpha1, cpv);
597  } else {
598  mother = laylog;
599  }
600  cpv.position(glog, mother, idOffset+1, r11, DDRotation());
601  cpv.position(glog, mother, idOffset+2, r12, rot);
602 #ifdef EDM_ML_DEBUG
603  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
604  << " Number " << idOffset+1
605  << " positioned in " << mother.name()
606  << " at " << r11 << " with no rotation\n"
607  << "DDHCalBarrelAlgo: " << glog.name()
608  << " Number " << idOffset+2
609  << " positioned in " << mother.name()
610  << " at " << r12 << " with " << rot;
611 #endif
612  //Constructin the plastics and scintillators inside
613  constructInsideDetectors(glog, nam0+"1", id, dx, dy, dz, 1, cpv);
614  }
615 
616  //Upper volume
617  rsi = rin + d2;
618  in = 0;
619  for (i = 0; i < getRzones()-1; i++) {
620  if (rsi >= getRmax(i)) in = i+1;
621  }
622  dx = 0.5*t2;
623  dy = 0.5*rsi*tan(alpha2);
624  dz = 0.5*(getZoff(in) + rsi*getTanTheta(in));
625  x = rsi + dx;
626  DDTranslation r21(x, dy, dz);
627  DDTranslation r22(x, -dy, dz);
628 
629  solid = DDSolidFactory::box(DDName(name+"2", idNameSpace), dx, dy, dz);
630 #ifdef EDM_ML_DEBUG
631  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
632  << " Box made of " << getDetMat()
633  << " of dimensions " << dx << ", " << dy
634  << ", " << dz;
635 #endif
636  glog = DDLogicalPart(solid.ddname(), matter, solid);
637 
638  if (nAbs < 0) {
639  mother = constructMidLayer(laylog, name, rin, alpha1, cpv);
640  } else {
641  mother = laylog;
642  }
643  cpv.position(glog, mother, idOffset+3, r21, DDRotation());
644  cpv.position(glog, mother, idOffset+4, r22, rot);
645 #ifdef EDM_ML_DEBUG
646  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
647  << " Number " << idOffset+3 << " positioned in "
648  << mother.name() << " at " << r21
649  << " with no rotation\nDDHCalBarrelAlgo: "
650  << glog.name() << " Number " << idOffset+4
651  << " positioned in " << mother.name() << " at "
652  << r22 << " with " << rot;
653 #endif
654  //Constructin the plastics and scintillators inside
655  constructInsideDetectors(glog, nam0+"2", id, dx, dy, dz, 2, cpv);
656 }
657 
659  const std::string& nm,
660  int nAbs, double rin,
661  double alpha,
662  DDCompactView& cpv) {
663 
664  //Extra absorber layer
665  int k = abs(nAbs) - 1;
666  std::string namek = nm + "Side";
667  double rsi = rin + getSideD(k);
668  int in = 0;
669  for (int i = 0; i < getRzones()-1; i++) {
670  if (rsi >= getRmax(i)) in = i+1;
671  }
672  std::vector<double> pgonZ, pgonRmin, pgonRmax;
673  // index 0
674  pgonZ.emplace_back(0.0);
675  pgonRmin.emplace_back(rsi);
676  pgonRmax.emplace_back(rsi+getSideT(k));
677  // index 1
678  pgonZ.emplace_back(getZoff(in) + rsi*getTanTheta(in));
679  pgonRmin.emplace_back(rsi);
680  pgonRmax.emplace_back(pgonRmax[0]);
681  // index 2
682  pgonZ.emplace_back(getZoff(in) + pgonRmax[0]*getTanTheta(in));
683  pgonRmin.emplace_back(pgonRmax[1]);
684  pgonRmax.emplace_back(pgonRmax[1]);
686  -alpha, 2*alpha, pgonZ, pgonRmin,
687  pgonRmax);
688 #ifdef EDM_ML_DEBUG
689  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
690  << " Polyhedra made of " << getSideMat(k)
691  << " with 1 sector from "
692  << convertRadToDeg(-alpha) << " to "
693  << convertRadToDeg(alpha) << " and with "
694  << pgonZ.size() << " sections";
695  for (unsigned int ii=0; ii<pgonZ.size(); ii++)
696  edm::LogVerbatim("HCalGeom") << "\t\tZ = " << pgonZ[ii] << "\tRmin = "
697  << pgonRmin[ii] << "\tRmax = " <<pgonRmax[ii];
698 #endif
699 
701  DDMaterial matter(matName);
702  DDLogicalPart glog = DDLogicalPart(solid.ddname(), matter, solid);
703 
704  cpv.position(glog, laylog, 1, DDTranslation(), DDRotation());
705 #ifdef EDM_ML_DEBUG
706  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
707  << " Number 1 positioned in " << laylog.name()
708  << " at (0,0,0) with no rotation";
709 #endif
710  if (nAbs < 0) {
711  DDLogicalPart mother = glog;
712  double rmid = pgonRmax[0];
713  for (int i = 0; i < getSideAbsorber(); i++) {
714  double alpha1 = atan(getSideAbsW(i)/rmid);
715  if (alpha1 > 0) {
716  std::string name = namek + getSideAbsName(i);
717  solid = DDSolidFactory::polyhedra(DDName(name, idNameSpace), 1,
718  -alpha1, 2*alpha1, pgonZ, pgonRmin,
719  pgonRmax);
720 #ifdef EDM_ML_DEBUG
721  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
722  << " Polyhedra made of "
723  << getSideAbsMat(i)
724  << " with 1 sector from "
725  << convertRadToDeg(-alpha1) << " to "
726  << convertRadToDeg(alpha1) << " and with "
727  << pgonZ.size() << " sections";
728  for (unsigned int ii=0; ii<pgonZ.size(); ii++)
729  edm::LogVerbatim("HCalGeom") << "\t\tZ = " << pgonZ[ii]
730  << "\tRmin = " << pgonRmin[ii]
731  << "\tRmax = " << pgonRmax[ii];
732 #endif
733 
734  DDName matName(DDSplit(getSideAbsMat(i)).first,
735  DDSplit(getSideAbsMat(i)).second);
736  DDMaterial matter(matName);
737  DDLogicalPart log = DDLogicalPart(solid.ddname(), matter, solid);
738 
739  cpv.position(log, mother, 1, DDTranslation(), DDRotation());
740 #ifdef EDM_ML_DEBUG
741  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << log.name()
742  << " Number 1 positioned in "
743  << mother.name()
744  << " at (0,0,0) with no rotation";
745 #endif
746  mother = log;
747  }
748  }
749  }
750  return glog;
751 }
752 
754  const std::string& nm,
755  double rin, double alpha,
756  DDCompactView& cpv) {
757 
758  DDSolid solid;
759  DDLogicalPart log, glog;
760  std::string name = nm + "Mid";
761  for (int k=0; k < getAbsorberN(); k++) {
762  std::string namek = name + getAbsorbName(k);
763  double rsi = rin + getAbsorbD(k);
764  int in = 0;
765  for (int i = 0; i < getRzones()-1; i++) {
766  if (rsi >= getRmax(i)) in = i+1;
767  }
768  std::vector<double> pgonZ, pgonRmin, pgonRmax;
769  // index 0
770  pgonZ.emplace_back(0.0);
771  pgonRmin.emplace_back(rsi);
772  pgonRmax.emplace_back(rsi+getAbsorbT(k));
773  // index 1
774  pgonZ.emplace_back(getZoff(in) + rsi*getTanTheta(in));
775  pgonRmin.emplace_back(rsi);
776  pgonRmax.emplace_back(pgonRmax[0]);
777  // index 2
778  pgonZ.emplace_back(getZoff(in) + pgonRmax[0]*getTanTheta(in));
779  pgonRmin.emplace_back(pgonRmax[1]);
780  pgonRmax.emplace_back(pgonRmax[1]);
781  solid = DDSolidFactory::polyhedra(DDName(namek, idNameSpace), 1, -alpha,
782  2*alpha, pgonZ, pgonRmin, pgonRmax);
783 #ifdef EDM_ML_DEBUG
784  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
785  << " Polyhedra made of " << getAbsorbMat(k)
786  << " with 1 sector from "
787  << convertRadToDeg(-alpha) << " to "
788  << convertRadToDeg(alpha) << " and with "
789  << pgonZ.size() << " sections";
790  for (unsigned int ii=0; ii<pgonZ.size(); ii++)
791  edm::LogVerbatim("HCalGeom") << "\t\tZ = " << pgonZ[ii] << "\tRmin = "
792  << pgonRmin[ii] << "\tRmax = "
793  << pgonRmax[ii];
794 #endif
795 
797  DDMaterial matter(matName);
798  log = DDLogicalPart(solid.ddname(), matter, solid);
799 
800  cpv.position(log, laylog, 1, DDTranslation(), DDRotation());
801 #ifdef EDM_ML_DEBUG
802  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << log.name()
803  << " Number 1 positioned in " << laylog.name()
804  << " at (0,0,0) with no rotation";
805 #endif
806  if (k==0) {
807  double rmin = pgonRmin[0];
808  double rmax = pgonRmax[0];
809  DDLogicalPart mother = log;
810  for (int i=0; i<1; i++) {
811  double alpha1 = atan(getMidAbsW(i)/rmin);
812  std::string namek = name + getMidAbsName(i);
813  solid = DDSolidFactory::polyhedra(DDName(namek, idNameSpace), 1,
814  -alpha1, 2*alpha1, pgonZ, pgonRmin,
815  pgonRmax);
816 #ifdef EDM_ML_DEBUG
817  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
818  << " Polyhedra made of " <<getMidAbsMat(i)
819  << " with 1 sector from "
820  << convertRadToDeg(-alpha1) << " to "
821  << convertRadToDeg(alpha1) << " and with "
822  << pgonZ.size() << " sections";
823  for (unsigned int ii=0; ii<pgonZ.size(); ii++)
824  edm::LogVerbatim("HCalGeom") << "\t\tZ = " << pgonZ[ii]
825  << "\tRmin = " << pgonRmin[ii]
826  << "\tRmax = " << pgonRmax[ii];
827 #endif
828 
829  DDName matNam1(DDSplit(getMidAbsMat(i)).first,
830  DDSplit(getMidAbsMat(i)).second);
831  DDMaterial matter1(matNam1);
832  log = DDLogicalPart(solid.ddname(), matter1, solid);
833 
834  cpv.position(log, mother, 1, DDTranslation(), DDRotation());
835 #ifdef EDM_ML_DEBUG
836  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << log.name()
837  << " Number 1 positioned in "
838  << mother.name()
839  << " at (0,0,0) with no rotation";
840 #endif
841  mother = log;
842  }
843 
844  // Now the layer with detectors
845  double rmid = rmin + getMiddleD();
846  pgonRmin[0] = rmid; pgonRmax[0] = rmax;
847  pgonRmin[1] = rmid; pgonRmax[1] = rmax; pgonZ[1] = getZoff(in) + rmid*getTanTheta(in);
848  pgonRmin[2] = rmax; pgonRmax[2] = rmax; pgonZ[2] = getZoff(in) + rmax*getTanTheta(in);
849  double alpha1 = atan(getMiddleW()/rmin);
850  solid = DDSolidFactory::polyhedra(DDName(name, idNameSpace), 1,
851  -alpha1, 2*alpha1, pgonZ, pgonRmin,
852  pgonRmax);
853 #ifdef EDM_ML_DEBUG
854  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
855  << " Polyhedra made of " << getMiddleMat()
856  << " with 1 sector from "
857  << convertRadToDeg(-alpha1) << " to "
858  << convertRadToDeg(alpha1) << " and with "
859  << pgonZ.size() << " sections";
860  for (unsigned int ii=0; ii<pgonZ.size(); ii++)
861  edm::LogVerbatim("HCalGeom") << "\t\tZ = " << pgonZ[ii] << "\tRmin = "
862  << pgonRmin[ii] << "\tRmax = "
863  << pgonRmax[ii];
864 #endif
865 
866  DDName matNam1(DDSplit(getMiddleMat()).first,
867  DDSplit(getMiddleMat()).second);
868  DDMaterial matter1(matNam1);
869  glog = DDLogicalPart(solid.ddname(), matter1, solid);
870 
871  cpv.position(glog, mother, 1, DDTranslation(), DDRotation());
872 #ifdef EDM_ML_DEBUG
873  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
874  << " Number 1 positioned in "
875  << mother.name()
876  << " at (0,0,0) with no rotation";
877 #endif
878  // Now the remaining absorber layers
879  for (int i = 1; i < getMidAbsorber(); i++) {
880  namek = name + getMidAbsName(i);
881  rmid = rmin + getMidAbsT(i);
882  pgonRmin[0] = rmin; pgonRmax[0] = rmid;
883  pgonRmin[1] = rmin; pgonRmax[1] = rmid; pgonZ[1] = getZoff(in) + rmin*getTanTheta(in);
884  pgonRmin[2] = rmid; pgonRmax[2] = rmid; pgonZ[2] = getZoff(in) + rmid*getTanTheta(in);
885  alpha1 = atan(getMidAbsW(i)/rmin);
886  solid = DDSolidFactory::polyhedra(DDName(namek, idNameSpace), 1,
887  -alpha1, 2*alpha1, pgonZ, pgonRmin,
888  pgonRmax);
889 #ifdef EDM_ML_DEBUG
890  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
891  << " Polyhedra made of "
892  << getMidAbsMat(i)
893  << " with 1 sector from "
894  << convertRadToDeg(-alpha1) << " to "
895  << convertRadToDeg(alpha1) << " and with "
896  << pgonZ.size() << " sections";
897  for (unsigned int ii=0; ii<pgonZ.size(); ii++)
898  edm::LogVerbatim("HCalGeom") << "\t\tZ = " << pgonZ[ii]
899  << "\tRmin = " << pgonRmin[ii]
900  << "\tRmax = " << pgonRmax[ii];
901 #endif
902 
903  DDName matName2(DDSplit(getMidAbsMat(i)).first,
904  DDSplit(getMidAbsMat(i)).second);
905  DDMaterial matter2(matName2);
906  log = DDLogicalPart(solid.ddname(), matter2, solid);
907 
908  cpv.position(log, mother, i, DDTranslation(), DDRotation());
909 #ifdef EDM_ML_DEBUG
910  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << log.name()
911  << " Number " << i << " positioned in "
912  << mother.name() << " at (0,0,0) with no "
913  << "rotation";
914 #endif
915  mother = log;
916  }
917  }
918  }
919  return glog;
920 }
921 
923  const std::string& name,
924  int id, double dx,
925  double dy, double dz,
926  int type, DDCompactView& cpv) {
927 
928 #ifdef EDM_ML_DEBUG
929  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: \t\tInside detector "
930  << id << "...";
931 #endif
932 
934  DDMaterial plmatter(plmatname);
936  DDMaterial scmatter(scmatname);
937 
938  std::string plname = detector.name().name()+"Plastic_";
939  std::string scname = idName+"Scintillator"+name;
940 
941  id--;
942  DDSolid solid;
943  DDLogicalPart glog;
944  double wid, y=0;
945  double dx1, dx2, shiftX;
946 
947  if (type == 1) {
948  wid = 0.5*getDetWidth1(id);
949  if (getDetPosY(id)>0) y =-dy+wid;
950  dx1 = 0.5*getDetT11(id);
951  dx2 = 0.5*getDetT21(id);
952  shiftX = getDetdP1(id);
953  } else {
954  wid = 0.5*getDetWidth2(id);
955  dx1 = 0.5*getDetT12(id);
956  dx2 = 0.5*getDetT22(id);
957  shiftX = getDetdP2(id);
958  }
959 
960  solid = DDSolidFactory::box(DDName(plname+"1", idNameSpace), dx1, wid, dz);
961 #ifdef EDM_ML_DEBUG
962  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
963  << " Box made of " << getDetMatPl()
964  << " of dimensions " << dx1 <<", " << wid
965  << ", " << dz;
966 #endif
967  glog = DDLogicalPart(solid.ddname(), plmatter, solid);
968 
969  double x = shiftX + dx1 - dx;
970  cpv.position(glog, detector, 1, DDTranslation(x,y,0), DDRotation());
971 #ifdef EDM_ML_DEBUG
972  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
973  << " Number 1 positioned in " << detector.name()
974  << " at (" << x << "," << y
975  << ",0) with no rotation";
976 #endif
977  solid = DDSolidFactory::box(DDName(scname, idNameSpace),
978  0.5*getDetTsc(id), wid, dz);
979 #ifdef EDM_ML_DEBUG
980  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
981  << " Box made of " << getDetMatSc()
982  << " of dimensions " << 0.5*getDetTsc(id)
983  << ", " << wid << ", " << dz;
984 #endif
985  glog = DDLogicalPart(solid.ddname(), scmatter, solid);
986 
987  x += dx1 + 0.5*getDetTsc(id);
988  int copyNo = id*10 + getDetType(id);
989  cpv.position(glog, detector, copyNo, DDTranslation(x, y, 0), DDRotation());
990 #ifdef EDM_ML_DEBUG
991  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
992  << " Number " << copyNo << " positioned in "
993  << detector.name() << " at (" << x << "," << y
994  << ",0) with no rotation";
995 #endif
996  solid = DDSolidFactory::box(DDName(plname+"2", idNameSpace), dx2, wid, dz);
997 #ifdef EDM_ML_DEBUG
998  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << solid.name()
999  << " Box made of " << getDetMatPl()
1000  << " of dimensions " << dx2 <<", " << wid
1001  << ", " << dz;
1002 #endif
1003  glog = DDLogicalPart(solid.ddname(), plmatter, solid);
1004 
1005  x+=0.5*getDetTsc(id) + dx2;
1006  cpv.position(glog, detector, 1, DDTranslation(x, y, 0), DDRotation());
1007 #ifdef EDM_ML_DEBUG
1008  edm::LogVerbatim("HCalGeom") << "DDHCalBarrelAlgo: " << glog.name()
1009  << " Number 1 positioned in " << detector.name()
1010  << " at (" << x << "," << y
1011  << ",0) with no rotation";
1012 #endif
1013 }
std::vector< std::string > absorbMat
type
Definition: HCALResponse.h:21
std::string getSideAbsName(unsigned int i) const
int getNsectortot() const
float alpha
Definition: AMPTWrapper.h:95
std::string getLayerLabel(unsigned i) const
double getRin() const
const N & name() const
Definition: DDBase.h:74
std::string getGenMaterial() const
std::vector< std::string > midMat
double getLayerD1(unsigned i) const
double getAbsorbT(unsigned int i) const
std::vector< double > sideAbsW
int getNhalf() const
std::string getLayerMaterial(unsigned i) const
std::string getMidAbsName(unsigned int i) const
std::vector< std::string > layerLabel
double getRmax(unsigned int i) const
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:43
int getDetPosY(unsigned int i) const
double getLayerD2(unsigned i) const
double getSideAbsW(unsigned int i) const
std::string idNameSpace
std::vector< double > layerD2
Geom::Theta< T > theta() const
std::vector< std::string > layerMat
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
constexpr NumType convertRadToDeg(NumType radians)
Definition: GeantUnits.h:98
std::string getAbsorbMat(unsigned int i) const
double getLayerAlpha(unsigned i) const
std::vector< int > layerId
static std::string & ns()
std::vector< double > rmax
int getRzones() const
void constructInsideDetectors(const DDLogicalPart &detector, const std::string &name, int id, double dx, double dy, double dz, int type, DDCompactView &cpv)
std::string getDetMatPl() const
double getMidAbsT(unsigned int i) const
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
std::string formatAsDegreesInInteger(double radianVal)
Definition: DDTypes.cc:86
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
void constructInsideSector(const DDLogicalPart &sector, DDCompactView &cpv)
std::string getDetMat() const
double getRout() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
std::string detMatSc
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:68
double getZoff(unsigned int i) const
std::string genMaterial
std::string getDetMatSc() const
U second(std::pair< T, U > const &p)
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
std::vector< double > layerT1
std::vector< double > detdP2
std::vector< double > detWidth2
double getDetT22(unsigned int i) const
int getAbsorberN() const
double getLayerGap(unsigned int i) const
std::vector< std::string > sideAbsName
std::vector< double > detdP1
std::vector< double > absorbT
void execute(DDCompactView &cpv) override
std::vector< double > detWidth1
DDLogicalPart constructSideLayer(const DDLogicalPart &laylog, const std::string &nm, int nAbs, double rin, double alpha, DDCompactView &cpv)
double getDetT11(unsigned int i) const
int getNLayers() const
void constructGeneralVolume(DDCompactView &cpv)
int getLayerAbsorb(unsigned int i) const
double getLayerT2(unsigned i) const
int getDetType(unsigned int i) const
double getDetdP1(unsigned int i) const
double getLayerT1(unsigned i) const
int getSideAbsorber() const
double getSideD(unsigned int i) const
double getMidAbsW(unsigned int i) const
std::string getSideAbsMat(unsigned int i) const
std::vector< double > layerGap
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::string getSideMat(unsigned int i) const
std::vector< double > layerAlpha
void constructInsideLayers(const DDLogicalPart &laylog, const std::string &name, int id, int nAbs, double rin, double d1, double alpha1, double d2, double alpha2, double t1, double t2, DDCompactView &cpv)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
double getTanTheta(unsigned int i) const
std::vector< double > detT22
std::vector< int > layerAbsorb
DDRotation DDrot(const DDName &name, std::unique_ptr< DDRotationMatrix > rot)
Definition of a uniquely identifiable rotation matrix named by DDName name.
Definition: DDRotation.cc:80
int getNsectors() const
std::vector< std::string > sideAbsMat
std::vector< double > sideT
std::vector< double > detTsc
~DDHCalBarrelAlgo() override
double getDetTsc(unsigned int i) const
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
Definition: DDSolid.cc:704
int getLayerId(unsigned i) const
std::string getAbsorbName(unsigned int i) const
double getMiddleW() const
ii
Definition: cuy.py:590
int k[5][pyjets_maxn]
double getDetdP2(unsigned int i) const
std::vector< std::string > midName
std::vector< std::string > sideMat
std::vector< double > detT21
std::vector< int > detPosY
double getLayerWidth(unsigned i) const
double getAbsorbD(unsigned int i) const
std::vector< int > detType
double getDetT21(unsigned int i) const
std::string detMatPl
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::vector< double > zoff
std::vector< double > sideD
std::vector< double > detT11
double getMiddleD() const
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:3
std::vector< double > absorbD
std::vector< double > ttheta
double getDetWidth2(unsigned int i) const
std::vector< double > theta
int getMidAbsorber() const
std::string middleMat
std::vector< double > layerWidth
std::vector< std::string > absorbName
double getDetT12(unsigned int i) const
std::vector< double > midW
double getDetWidth1(unsigned int i) const
std::vector< double > layerD1
double getSideT(unsigned int i) const
std::vector< double > detT12
std::string getMiddleMat() const
const std::string & name() const
Returns the name.
Definition: DDName.cc:53
static DDSolid polyhedra(const DDName &name, int sides, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polyhedra (refere to Geant3 or Geant4 documentation)
Definition: DDSolid.cc:730
std::vector< double > midT
std::vector< double > layerT2
DDLogicalPart constructMidLayer(const DDLogicalPart &laylog, const std::string &nm, double rin, double alpha, DDCompactView &cpv)
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
std::string getMidAbsMat(unsigned int i) const
const N & ddname() const
Definition: DDBase.h:76