CMS 3D CMS Logo

DDHCalEndcapAlgo.cc
Go to the documentation of this file.
1 // File: DDHCalEndcapAlgo.cc
3 // adapted from CCal(G4)HcalEndcap.cc
4 // Description: Geometry factory class for Hcal Endcap
6 
7 #include <cmath>
8 #include <algorithm>
9 
10 namespace std{} using namespace std;
19 #include "CLHEP/Units/GlobalPhysicalConstants.h"
20 #include "CLHEP/Units/GlobalSystemOfUnits.h"
21 
23  modMat(0),modType(0),sectionModule(0),layerN(0),layerN0(0),layerN1(0),
24  layerN2(0),layerN3(0),layerN4(0),layerN5(0),thick(0),trimLeft(0),
25  trimRight(0),zminBlock(0),zmaxBlock(0),rinBlock1(0),routBlock1(0),
26  rinBlock2(0),routBlock2(0),layerType(0),layerT(0),scintT(0) {
27 
28 #ifdef EDM_ML_DEBUG
29  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo info: Creating an instance";
30 #endif
31 }
32 
34 
35 int DDHCalEndcapAlgo::getLayer(unsigned int i, unsigned int j) const {
36 
37  switch (i) {
38  case 0:
39  return layerN0[j];
40  break;
41 
42  case 1:
43  return layerN1[j];
44  break;
45 
46  case 2:
47  return layerN2[j];
48  break;
49 
50  case 3:
51  return layerN3[j];
52  break;
53 
54  case 4:
55  return layerN4[j];
56  break;
57 
58  case 5:
59  return layerN5[j];
60  break;
61 
62  default:
63  return 0;
64  }
65 }
66 
67 double DDHCalEndcapAlgo::getTrim(unsigned int i, unsigned int j) const {
68 
69  if (j == 0)
70  return trimLeft[i];
71  else
72  return trimRight[j];
73 }
74 
76  const DDVectorArguments & vArgs,
77  const DDMapArguments & ,
78  const DDStringArguments & sArgs,
79  const DDStringVectorArguments & vsArgs) {
80 
81  genMaterial = sArgs["MaterialName"];
82  rotation = sArgs["Rotation"];
83  nsectors = int (nArgs["Sector"]);
84  nsectortot = int (nArgs["SectorTot"]);
85  nEndcap = int (nArgs["Endcap"]);
86  rotHalf = sArgs["RotHalf"];
87  rotns = sArgs["RotNameSpace"];
88  zShift = nArgs["ZShift"];
89 
90  zFront = nArgs["ZFront"];
91  zEnd = nArgs["ZEnd"];
92  ziNose = nArgs["ZiNose"];
93  ziL0Nose = nArgs["ZiL0Nose"];
94  ziBody = nArgs["ZiBody"];
95  ziL0Body = nArgs["ZiL0Body"];
96  z0Beam = nArgs["Z0Beam"];
97  ziDip = nArgs["ZiDip"];
98  dzStep = nArgs["DzStep"];
99  zShiftHac2 = nArgs["ZShiftHac2"];
100  double gap = nArgs["Gap"];
101  double z1 = nArgs["Z1"];
102  double r1 = nArgs["R1"];
103  rout = nArgs["Rout"];
104  heboxDepth = nArgs["HEboxDepth"];
105  drEnd = nArgs["DrEnd"];
106  double etamin = nArgs["Etamin"];
107  angBot = nArgs["AngBot"];
108  angGap = nArgs["AngGap"];
109 
110 #ifdef EDM_ML_DEBUG
111  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo debug: General material "
112  << genMaterial << "\tSectors " << nsectors << ", "
113  << nsectortot << "\tEndcaps " << nEndcap
114  << "\tRotation matrix for half " << rotns
115  << ":" << rotHalf << "\n\tzFront " << zFront
116  << " zEnd " << zEnd << " ziNose " << ziNose
117  << " ziL0Nose " << ziL0Nose << " ziBody " << ziBody
118  << " ziL0Body " << ziL0Body << " z0Beam " << z0Beam
119  << " ziDip " << ziDip << " dzStep " << dzStep
120  << " Gap " << gap << " z1 " << z1 << "\n\tr1 " << r1
121  << " rout " << rout << " HeboxDepth " << heboxDepth
122  << " drEnd " << drEnd << "\tetamin " << etamin
123  << " Bottom angle " << angBot << " Gap angle "
124  << angGap << " Z-Shift " << zShift << " "
125  << zShiftHac2;
126 #endif
127 
128  //Derived quantities
129  angTop = 2.0 * atan (exp(-etamin));
130  slope = tan(angGap);
131  z1Beam = z1 - r1/slope;
132  ziKink = z1Beam + rout/slope;
133  riKink = ziKink*tan(angBot);
134  riDip = ziDip*tan(angBot);
135  roDip = rout - heboxDepth;
136  dzShift = (z1Beam - z0Beam) - gap/sin(angGap);
137 
138 #ifdef EDM_ML_DEBUG
139  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo debug: angTop "
140  << angTop/CLHEP::deg <<"\tSlope " << slope
141  << "\tDzShift " << dzShift << "\n\tz1Beam " << z1Beam
142  << "\tziKink" << ziKink << "\triKink " << riKink
143  << "\triDip " << riDip << "\n\troDip " << roDip
144  << "\tRotation " << rotation;
145 #endif
146 
148  //Modules
149  absMat = sArgs["AbsMat"];
150  modules = int(nArgs["Modules"]);
151 
152 #ifdef EDM_ML_DEBUG
153  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo debug: Number of modules "
154  << modules << " and absorber material " << absMat;
155 #endif
156 
157  modName = vsArgs["ModuleName"];
158  modMat = vsArgs["ModuleMat"];
159  modType = dbl_to_int(vArgs["ModuleType"]);
160  sectionModule = dbl_to_int(vArgs["SectionModule"]);
161  thick = vArgs["ModuleThick"];
162  trimLeft = vArgs["TrimLeft"];
163  trimRight = vArgs["TrimRight"];
164  eModule = dbl_to_int(vArgs["EquipModule"]);
165  layerN = dbl_to_int(vArgs["LayerN"]);
166  layerN0 = dbl_to_int(vArgs["LayerN0"]);
167  layerN1 = dbl_to_int(vArgs["LayerN1"]);
168  layerN2 = dbl_to_int(vArgs["LayerN2"]);
169  layerN3 = dbl_to_int(vArgs["LayerN3"]);
170  layerN4 = dbl_to_int(vArgs["LayerN4"]);
171  layerN5 = dbl_to_int(vArgs["LayerN5"]);
172 
173 #ifdef EDM_ML_DEBUG
174  for (int i = 0; i < modules; i++) {
175  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo debug: " << modName[i]
176  << " type " << modType[i] << " Sections "
177  << sectionModule[i] <<" thickness of absorber/air "
178  << thick[i] << " trim " << trimLeft[i] << ", "
179  << trimRight[i] << " equip module " << eModule[i]
180  << " with " << layerN[i] << " layers";
181  if (i == 0) {
182  for (int j = 0; j < layerN[i]; j++) {
183  edm::LogInfo("HCalGeom") << "\t " << layerN0[j] << "/" << layerN0[j+1];
184  }
185  } else if (i == 1) {
186  for (int j = 0; j < layerN[i]; j++) {
187  edm::LogInfo("HCalGeom") << "\t " << layerN1[j] << "/" << layerN1[j+1];
188  }
189  } else if (i == 2) {
190  for (int j = 0; j < layerN[i]; j++) {
191  edm::LogInfo("HCalGeom") << "\t " << layerN2[j];
192  }
193  } else if (i == 3) {
194  for (int j = 0; j < layerN[i]; j++) {
195  edm::LogInfo("HCalGeom") << "\t " << layerN3[j];
196  }
197  } else if (i == 4) {
198  for (int j = 0; j < layerN[i]; j++) {
199  edm::LogInfo("HCalGeom") << "\t " << layerN4[j];
200  }
201  } else if (i == 5) {
202  for (int j = 0; j < layerN[i]; j++) {
203  edm::LogInfo("HCalGeom") << "\t " << layerN5[j];
204  }
205  }
206  }
207 #endif
208 
210  //Layers
211  phiSections = int(nArgs["PhiSections"]);
212  phiName = vsArgs["PhiName"];
213  layers = int(nArgs["Layers"]);
214  layerName = vsArgs["LayerName"];
215  layerType = dbl_to_int(vArgs["LayerType"]);
216  layerT = vArgs["LayerT"];
217  scintT = vArgs["ScintT"];
218  scintMat = sArgs["ScintMat"];
219  plastMat = sArgs["PlastMat"];
220  rotmat = sArgs["RotMat"];
221 
222 #ifdef EDM_ML_DEBUG
223  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo debug: Phi Sections "
224  << phiSections;
225  for (int i = 0; i < phiSections; i++)
226  edm::LogInfo("HCalGeom") << "\tName[" << i << "] : " << phiName[i];
227  edm::LogInfo("HCalGeom") << "\tPlastic: " << plastMat << "\tScintillator: "
228  << scintMat << "\tRotation matrix " << rotns << ":"
229  << rotmat << "\n\tNumber of layers " << layers;
230  for (int i = 0; i < layers; i++) {
231  edm::LogInfo("HCalGeom") << "\t" << layerName[i] << "\tType "
232  << layerType[i] << "\tThickness " << layerT[i]
233  << "\tScint.Thick " << scintT[i];
234  }
235 #endif
236 
238  // Derive bounding of the modules
239  int module = 0;
240  // Layer 0 (Nose)
241  if (modules > 0) {
242  zminBlock.emplace_back(ziL0Nose);
243  zmaxBlock.emplace_back(zminBlock[module] + layerT[0] + 0.5*dzStep);
244  rinBlock1.emplace_back(zminBlock[module] * tan(angTop));
245  rinBlock2.emplace_back(zmaxBlock[module] * tan(angTop));
246  routBlock1.emplace_back((zminBlock[module] - z1Beam) * slope);
247  routBlock2.emplace_back((zmaxBlock[module] - z1Beam) * slope);
248  module++;
249  }
250 
251  // Layer 0 (Body)
252  if (modules > 1) {
253  zminBlock.emplace_back(ziL0Body);
254  zmaxBlock.emplace_back(zminBlock[module] + layerT[0] + 0.5*dzStep);
255  rinBlock1.emplace_back(zminBlock[module] * tan(angBot));
256  rinBlock2.emplace_back(zmaxBlock[module] * tan(angBot));
257  routBlock1.emplace_back(zminBlock[module] * tan(angTop));
258  routBlock2.emplace_back(zmaxBlock[module] * tan(angTop));
259  module++;
260  }
261 
262  // Hac1
263  if (modules > 2) {
264  zminBlock.emplace_back(ziNose);
265  zmaxBlock.emplace_back(ziBody);
266  rinBlock1.emplace_back(zminBlock[module] * tan(angTop));
267  rinBlock2.emplace_back(zmaxBlock[module] * tan(angTop));
268  routBlock1.emplace_back((zminBlock[module] - z1Beam) * slope);
269  routBlock2.emplace_back((zmaxBlock[module] - z1Beam) * slope);
270  module++;
271  }
272 
273  // Hac2
274  if (modules > 3) {
275  zminBlock.emplace_back(ziBody);
276  zmaxBlock.emplace_back(zminBlock[module] + layerN[3]*dzStep);
277  rinBlock1.emplace_back(zminBlock[module] * tan(angBot));
278  rinBlock2.emplace_back(zmaxBlock[module] * tan(angBot));
279  routBlock1.emplace_back((zmaxBlock[module-1] - z1Beam) * slope);
280  routBlock2.emplace_back(rout);
281  module++;
282  }
283 
284  // Hac3
285  if (modules > 4) {
286  zminBlock.emplace_back(zmaxBlock[module-1]);
287  zmaxBlock.emplace_back(zminBlock[module] + layerN[4]*dzStep);
288  rinBlock1.emplace_back(zminBlock[module] * tan(angBot));
289  rinBlock2.emplace_back(zmaxBlock[module] * tan(angBot));
290  routBlock1.emplace_back(rout);
291  routBlock2.emplace_back(rout);
292  module++;
293  }
294 
295  // Hac4
296  if (modules > 5) {
297  zminBlock.emplace_back(zmaxBlock[module-1]);
298  zmaxBlock.emplace_back(zminBlock[module] + layerN[5]*dzStep);
299  rinBlock1.emplace_back(zminBlock[module] * tan(angBot));
300  rinBlock2.emplace_back(zmaxBlock[module] * tan(angBot));
301  routBlock1.emplace_back(rout);
302  routBlock2.emplace_back(roDip);
303  module++;
304  }
305 
306 #ifdef EDM_ML_DEBUG
307  for (int i = 0; i < module; i++)
308  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo debug: Module " << i
309  << "\tZ/Rin/Rout " << zminBlock[i] << ", "
310  << zmaxBlock[i] << "/ " << rinBlock1[i] << ", "
311  << rinBlock2[i] << "/ " << routBlock1[i] << ", "
312  << routBlock2[i];
313 #endif
314 
315  idName = sArgs["MotherName"];
317  idOffset = int (nArgs["IdOffset"]);
318 
319 #ifdef EDM_ML_DEBUG
320  DDName parentName = parent().name();
321  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo debug: Parent " << parentName
322  << " idName " << idName << " NameSpace "
323  << idNameSpace << " Offset " << idOffset;
324 #endif
325 
326  tolPos = nArgs["TolPos"];
327  tolAbs = nArgs["TolAbs"];
328 
329 #ifdef EDM_ML_DEBUG
330  edm::LogInfo("HCalGeom") <<"DDHCalEndcapAlgo debug: Tolerances - Positioning "
331  << tolPos << " Absorber " << tolAbs;
332 #endif
333 }
334 
336 // DDHCalEndcapAlgo methods...
338 
340 
341 #ifdef EDM_ML_DEBUG
342  edm::LogInfo("HCalGeom") << "==>> Constructing DDHCalEndcapAlgo...";
343 #endif
344 
346 
347 #ifdef EDM_ML_DEBUG
348  edm::LogInfo("HCalGeom") << "<<== End of DDHCalEndcapAlgo construction ...";
349 #endif
350 }
351 
352 //----------------------start here for DDD work!!! ---------------
353 
355 
356 #ifdef EDM_ML_DEBUG
357  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: General volume...";
358 #endif
359 
360  bool proto = true;
361  for (int i=0; i<3; i++)
362  if (equipModule(i) > 0) proto = false;
363 
364  DDRotation rot;
365  if (DDSplit(getRotation()).first == "NULL") rot = DDRotation();
367 
368 #ifdef EDM_ML_DEBUG
369  edm::LogInfo("HCalGeom") << " First " << DDSplit(getRotation()).first
370  << " Second " << DDSplit(getRotation()).second
371  << " Rotation " << rot;
372 #endif
373 
374  DDTranslation r0(0,0,getZShift());
375  double alpha = CLHEP::pi/getNsectors();
376  double dphi = getNsectortot()*CLHEP::twopi/getNsectors();
377 
379  //vertical walls are allowed in SolidPolyhedra
380  double delz = 0;
381 
382  vector<double> pgonZ, pgonRmin, pgonRmax;
383  if (proto) {
384  double zf = getZiBody() + getZShiftHac2();
385  pgonZ.emplace_back(zf - getDzShift());
386  pgonRmin.emplace_back(zf * tan(getAngBot()));
387  pgonRmax.emplace_back((zf - getZ1Beam())*getSlope());
388  } else {
389  pgonZ.emplace_back(getZFront() - getDzShift());
390  pgonRmin.emplace_back(getZFront() * tan(getAngTop()));
391  pgonRmax.emplace_back((getZFront() - getZ1Beam())*getSlope());
392  pgonZ.emplace_back(getZiL0Body() - getDzShift());
393  pgonRmin.emplace_back(getZiL0Body() * tan(getAngTop()));
394  pgonRmax.emplace_back((getZiL0Body() - getZ1Beam())*getSlope());
395  pgonZ.emplace_back(getZiL0Body() - getDzShift());
396  pgonRmin.emplace_back(getZiL0Body() * tan(getAngBot()));
397  pgonRmax.emplace_back((getZiL0Body() - getZ1Beam())*getSlope());
398  }
399  pgonZ.emplace_back(getZiKink() - getDzShift());
400  pgonRmin.emplace_back(getRinKink());
401  pgonRmax.emplace_back(getRout());
402  pgonZ.emplace_back(getZiDip() - getDzShift());
403  pgonRmin.emplace_back(getRinDip());
404  pgonRmax.emplace_back(getRout());
405  pgonZ.emplace_back(getZiDip() - getDzShift() + delz);
406  pgonRmin.emplace_back(getRinDip());
407  pgonRmax.emplace_back(getRoutDip());
408  pgonZ.emplace_back(getZEnd() - getDzShift());
409  pgonRmin.emplace_back(getZEnd() * tan(getAngBot()));
410  pgonRmax.emplace_back(getRoutDip());
411  pgonZ.emplace_back(getZEnd());
412  pgonRmin.emplace_back(getZEnd() * tan(getAngBot()));
413  pgonRmax.emplace_back(getRoutDip());
414 
415  string name("Null");
416  DDSolid solid;
418  getNsectortot(), -alpha, dphi, pgonZ,
419  pgonRmin, pgonRmax);
420 #ifdef EDM_ML_DEBUG
421  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: "
423  << " Polyhedra made of " << getGenMat() << " with "
424  << getNsectortot() << " sectors from "
425  << -alpha/CLHEP::deg << " to "
426  << (-alpha+dphi)/CLHEP::deg << " and with "
427  << pgonZ.size() << " sections";
428  for (unsigned int i = 0; i <pgonZ.size(); i++)
429  edm::LogInfo("HCalGeom") << "\t\tZ = " << pgonZ[i] << "\tRmin = "
430  << pgonRmin[i] << "\tRmax = " << pgonRmax[i];
431 #endif
432 
434  DDMaterial matter(matname);
435  DDLogicalPart genlogic(DDName(idName, idNameSpace), matter, solid);
436 
437  DDName parentName = parent().name();
438  cpv.position(DDName(idName, idNameSpace), parentName, 1, r0, rot);
439 
440 #ifdef EDM_ML_DEBUG
441  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: "
443  << " number 1 positioned in " << parentName
444  << " at " << r0 << " with " << rot;
445 #endif
446 
447  if (getEndcaps() != 1) {
448  rot = DDRotation(DDName(rotHalf,rotns));
449  cpv.position(DDName(idName, idNameSpace), parentName, 2, r0, rot);
450 
451 #ifdef EDM_ML_DEBUG
452  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: "
453  << DDName(idName, idNameSpace) << " number 2 "
454  << "positioned in " << parentName << " at " << r0
455  << " with " << rot;
456 #endif
457 
458  }
459 
460  //Forward half
461  name = idName + "Front";
462  vector<double> pgonZMod, pgonRminMod, pgonRmaxMod;
463  for (unsigned int i=0; i < (pgonZ.size()-1); i++) {
464  pgonZMod.emplace_back(pgonZ[i] + getDzShift());
465  pgonRminMod.emplace_back(pgonRmin[i]);
466  pgonRmaxMod.emplace_back(pgonRmax[i]);
467  }
469  getNsectortot(), -alpha, dphi, pgonZMod,
470  pgonRminMod, pgonRmaxMod);
471 
472 #ifdef EDM_ML_DEBUG
473  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: "
474  << DDName(name,idNameSpace) << " Polyhedra made of "
475  << getGenMat() << " with " << getNsectortot()
476  << " sectors from " << -alpha/CLHEP::deg << " to "
477  << (-alpha+dphi)/CLHEP::deg << " and with "
478  << pgonZMod.size() << " sections ";
479  for (unsigned int i = 0; i < pgonZMod.size(); i++)
480  edm::LogInfo("HCalGeom") << "\t\tZ = " << pgonZMod[i] << "\tRmin = "
481  << pgonRminMod[i] << "\tRmax = " << pgonRmaxMod[i];
482 #endif
483 
484  DDLogicalPart genlogich(DDName(name, idNameSpace), matter, solid);
485 
486  cpv.position(genlogich, genlogic, 1, DDTranslation(0.0, 0.0, -getDzShift()),
487  DDRotation());
488 
489 #ifdef EDM_ML_DEBUG
490  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: " << genlogich.name()
491  << " number 1 positioned in " << genlogic.name()
492  << " at (0,0," << -getDzShift()
493  << ") with no rotation";
494 #endif
495 
496  //Construct sector (from -alpha to +alpha)
497  name = idName + "Module";
499  1, -alpha, 2*alpha, pgonZMod,
500  pgonRminMod, pgonRmaxMod);
501 #ifdef EDM_ML_DEBUG
502  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: "
503  << DDName(name,idNameSpace)<< " Polyhedra made of "
504  << getGenMat() <<" with 1 sector from "
505  << -alpha/CLHEP::deg << " to " << alpha/CLHEP::deg
506  << " and with " << pgonZMod.size() << " sections";
507  for (unsigned int i = 0; i < pgonZMod.size(); i++)
508  edm::LogInfo("HCalGeom") << "\t\tZ = " << pgonZMod[i] << "\tRmin = "
509  << pgonRminMod[i] << "\tRmax = " << pgonRmaxMod[i];
510 #endif
511 
512  DDLogicalPart seclogic(DDName(name, idNameSpace), matter, solid);
513 
514  for (int ii=0; ii<getNsectortot(); ii++) {
515  double phi = ii*2*alpha;
516  double phideg = phi/CLHEP::deg;
517 
519  string rotstr("NULL");
520  if (phideg != 0) {
521  rotstr = "R";
522  if (phideg < 100) rotstr = "R0";
523  rotstr = rotstr + std::to_string(phideg);
524  rotation = DDRotation(DDName(rotstr, rotns));
525  if (!rotation) {
526 
527 #ifdef EDM_ML_DEBUG
528  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: Creating a new "
529  << "rotation " << rotstr << "\t" << 90 << ","
530  << phideg << "," << 90 << "," << (phideg+90)
531  << ", 0, 0";
532 #endif
533 
534  rotation = DDrot(DDName(rotstr, rotns), 90*CLHEP::deg,
535  phideg*CLHEP::deg, 90*CLHEP::deg,
536  (90+phideg)*CLHEP::deg, 0*CLHEP::deg, 0*CLHEP::deg);
537  } //if !rotation
538  } //if phideg!=0
539 
540  cpv.position(seclogic, genlogich, ii+1, DDTranslation(0.0, 0.0, 0.0), rotation);
541 
542 #ifdef EDM_ML_DEBUG
543  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: " << seclogic.name()
544  << " number " << ii+1 << " positioned in "
545  << genlogich.name() << " at (0,0,0) with "
546  << rotation;
547 #endif
548 
549  }
550 
551  //Construct the things inside the sector
552  constructInsideSector(seclogic, cpv);
553 
554  //Backward half
555  name = idName + "Back";
556  vector<double> pgonZBack, pgonRminBack, pgonRmaxBack;
557  pgonZBack.emplace_back(getZEnd() - getDzShift());
558  pgonRminBack.emplace_back(pgonZBack[0]*tan(getAngBot()) + getDrEnd());
559  pgonRmaxBack.emplace_back(getRoutDip());
560  pgonZBack.emplace_back(getZEnd());
561  pgonRminBack.emplace_back(pgonZBack[1]*tan(getAngBot()) + getDrEnd());
562  pgonRmaxBack.emplace_back(getRoutDip());
564  getNsectortot(), -alpha, dphi, pgonZBack,
565  pgonRminBack, pgonRmaxBack);
566 
567 #ifdef EDM_ML_DEBUG
568  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: "
569  << DDName(name,idNameSpace) << " Polyhedra made of "
570  << getAbsMat() << " with " << getNsectortot()
571  << " sectors from " << -alpha/CLHEP::deg << " to "
572  << (-alpha+dphi)/CLHEP::deg << " and with "
573  << pgonZBack.size() << " sections";
574  for (unsigned int i = 0; i < pgonZBack.size(); i++)
575  edm::LogInfo("HCalGeom") << "\t\tZ = " << pgonZBack[i] << "\tRmin = "
576  << pgonRminBack[i] << "\tRmax = "
577  << pgonRmaxBack[i];
578 #endif
579 
580  DDName absMatname(DDSplit(getAbsMat()).first, DDSplit(getAbsMat()).second);
581  DDMaterial absMatter(absMatname);
582  DDLogicalPart glog(DDName(name, idNameSpace), absMatter, solid);
583 
584  cpv.position(glog, genlogic, 1, DDTranslation(0.0, 0.0, 0.0), DDRotation());
585 
586 #ifdef EDM_ML_DEBUG
587  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: " << glog.name()
588  << " number 1 positioned in " << genlogic.name()
589  << " at (0,0,0) with no rotation";
590 #endif
591 }
592 
593 
595 
596 #ifdef EDM_ML_DEBUG
597  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: Modules (" << getModules()
598  << ") ...";
599 #endif
600 
601  double alpha = CLHEP::pi/getNsectors();
602 
603  for (int i = 0; i < getModules(); i++) {
604  string name = idName + getModName(i);
606  DDMaterial matter(matname);
607 
608  if (equipModule(i)>0) {
609  int nsec = getSectionModule(i);
610 
612  //vertical walls are allowed in SolidPolyhedra
613  double deltaz = 0;
614 
615  vector<double> pgonZ, pgonRmin, pgonRmax;
616  if (nsec == 3) {
617  double zf = getZminBlock(i) + getZShiftHac2();
618  pgonZ.emplace_back(zf);
619  pgonRmin.emplace_back(zf*tan(getAngBot()));
620  pgonRmax.emplace_back((zf-getZ1Beam())*getSlope());
621  pgonZ.emplace_back(getZiKink());
622  pgonRmin.emplace_back(getRinKink());
623  pgonRmax.emplace_back(getRout());
624  } else {
625  pgonZ.emplace_back(getZminBlock(i));
626  pgonRmin.emplace_back(getRinBlock1(i));
627  pgonRmax.emplace_back(getRoutBlock1(i));
628  }
629  if (nsec == 4) {
630  pgonZ.emplace_back(getZiDip());
631  pgonRmin.emplace_back(getRinDip());
632  pgonRmax.emplace_back(getRout());
633  pgonZ.emplace_back(pgonZ[1] + deltaz);
634  pgonRmin.emplace_back(pgonRmin[1]);
635  pgonRmax.emplace_back(getRoutDip());
636  }
637  pgonZ.emplace_back(getZmaxBlock(i));
638  pgonRmin.emplace_back(getRinBlock2(i));
639  pgonRmax.emplace_back(getRoutBlock2(i));
640 
641  //Solid & volume
642  DDSolid solid;
644  1, -alpha, 2*alpha,
645  pgonZ, pgonRmin, pgonRmax);
646 
647 #ifdef EDM_ML_DEBUG
648  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: "
649  << DDName(name,idNameSpace)
650  << " Polyhedra made of " << getModMat(i)
651  << " with 1 sector from " << -alpha/CLHEP::deg
652  << " to " << alpha/CLHEP::deg << " and with "
653  << nsec << " sections";
654  for (unsigned int k=0; k<pgonZ.size(); k++)
655  edm::LogInfo("HCalGeom") << "\t\tZ = " << pgonZ[k] << "\tRmin = "
656  << pgonRmin[k] << "\tRmax = " << pgonRmax[k];
657 #endif
658 
659  DDLogicalPart glog(DDName(name, idNameSpace), matter, solid);
660 
661  cpv.position(glog, sector, i+1, DDTranslation(0.0, 0.0, 0.0), DDRotation());
662 
663 #ifdef EDM_ML_DEBUG
664  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: " << glog.name()
665  << " number " << i+1 << " positioned in "
666  <<sector.name() <<" at (0,0,0) with no rotation";
667 #endif
668 
669  if (getModType(i) == 0)
670  constructInsideModule0 (glog, i, cpv);
671  else
672  constructInsideModule (glog, i, cpv);
673  }
674  }
675 }
676 
677 void DDHCalEndcapAlgo::parameterLayer0(int mod, int layer, int iphi,
678  double& yh, double& bl, double& tl,
679  double& alp, double& xpos, double& ypos,
680  double& zpos) {
681 
682  //Given module and layer number compute parameters of trapezoid
683  //and positioning parameters
684  double alpha = CLHEP::pi/getNsectors();
685 
686 #ifdef EDM_ML_DEBUG
687  edm::LogInfo("HCalGeom") << "Input " << iphi << " " << layer << " " << iphi
688  << " Alpha " << alpha/CLHEP::deg;
689 #endif
690 
691  double zi, zo;
692  if (iphi == 0) {
693  zi = getZminBlock(mod);
694  zo = zi + getLayerT(layer);
695  } else {
696  zo = getZmaxBlock(mod);
697  zi = zo - getLayerT(layer);
698  }
699  double rin, rout;
700  if (mod == 0) {
701  rin = zo * tan(getAngTop());
702  rout = (zi - getZ1Beam()) * getSlope();
703  } else {
704  rin = zo * tan(getAngBot());
705  rout = zi * tan(getAngTop());
706  }
707  yh = 0.5 * (rout - rin);
708  bl = 0.5 * rin * tan (alpha);
709  tl = 0.5 * rout * tan(alpha);
710  xpos = 0.5 * (rin + rout);
711  ypos = 0.5 * (bl + tl);
712  zpos = 0.5 * (zi + zo);
713  yh -= getTrim(mod,iphi);
714  bl -= getTrim(mod,iphi);
715  tl -= getTrim(mod,iphi);
716  alp = atan(0.5 * tan(alpha));
717  if (iphi == 0) {
718  ypos = -ypos;
719  } else {
720  alp = -alp;
721  }
722 
723 #ifdef EDM_ML_DEBUG
724  edm::LogInfo("HCalGeom") << "Output Dimensions " << yh << " " << bl << " "
725  << tl << " " << alp/CLHEP::deg << " Position "
726  << xpos << " " << ypos << " " << zpos;
727 #endif
728 }
729 
730 void DDHCalEndcapAlgo::parameterLayer(int iphi, double rinF, double routF,
731  double rinB, double routB, double zi,
732  double zo, double& yh1, double& bl1,
733  double& tl1, double& yh2, double& bl2,
734  double& tl2, double& alp, double& theta,
735  double& phi, double& xpos, double& ypos,
736  double& zpos) {
737 
738  //Given rin, rout compute parameters of the trapezoid and
739  //position of the trapezoid for a standrd layer
740  double alpha = CLHEP::pi/getNsectors();
741 
742 #ifdef EDM_ML_DEBUG
743  edm::LogInfo("HCalGeom") << "Input " << iphi << " Front " << rinF << " "
744  << routF << " " << zi << " Back " << rinB << " "
745  << routB << " " << zo << " Alpha "
746  << alpha/CLHEP::deg;
747 #endif
748 
749  yh1 = 0.5 * (routF - rinB);
750  bl1 = 0.5 * rinB * tan(alpha);
751  tl1 = 0.5 * routF * tan(alpha);
752  yh2 = 0.5 * (routF - rinB);
753  bl2 = 0.5 * rinB * tan(alpha);
754  tl2 = 0.5 * routF * tan(alpha);
755  double dx = 0.25* (bl2+tl2-bl1-tl1);
756  double dy = 0.5 * (rinB+routF-rinB-routF);
757  xpos = 0.25*(rinB+routF+rinB+routF);
758  ypos = 0.25*(bl2+tl2+bl1+tl1);
759  zpos = 0.5*(zi+zo);
760  alp = atan(0.5 * tan(alpha));
761  // ypos-= getTolPos();
762  if (iphi == 0) {
763  ypos = -ypos;
764  } else {
765  alp = -alp;
766  dx = -dx;
767  }
768  double r = sqrt (dx*dx + dy*dy);
769  theta= atan (r/(zo-zi));
770  phi = atan2 (dy, dx);
771 
772 #ifdef EDM_ML_DEBUG
773  edm::LogInfo("HCalGeom") << "Output Dimensions " << yh1 << " " << bl1 << " "
774  << tl1 << " " << yh2 << " " << bl2 << " " << tl2
775  << " " << alp/CLHEP::deg << " " << theta/CLHEP::deg
776  << " " << phi/CLHEP::deg << " Position " << xpos
777  << " " << ypos << " " << zpos;
778 #endif
779 }
780 
781 
783 
784 #ifdef EDM_ML_DEBUG
785  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: \t\tInside module0 ..."
786  << mod;
787 #endif
788 
790  //Pointers to the Rotation Matrices and to the Materials
791  string rotstr = getRotMat();
792  DDRotation rot(DDName(rotstr, rotns));
794  DDMaterial matabsorbr(matName);
796  DDMaterial matplastic(plasName);
797 
798  int layer = getLayer(mod,0);
799  int layer0 = getLayer(mod,1);
800  string name;
801  double xpos, ypos, zpos;
802  DDSolid solid;
803  DDLogicalPart glog, plog;
804  for (int iphi = 0; iphi < getPhi(); iphi++) {
805  double yh, bl, tl, alp;
806  parameterLayer0(mod, layer, iphi, yh, bl, tl, alp, xpos, ypos, zpos);
807  name = module.name().name()+getLayerName(layer)+getPhiName(iphi);
808  solid = DDSolidFactory::trap(DDName(name, idNameSpace),
809  0.5*getLayerT(layer), 0, 0, yh,
810  bl, tl, alp, yh, bl, tl, alp);
811 
812 #ifdef EDM_ML_DEBUG
813  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: " << solid.name()
814  << " Trap made of " << getPlastMat()
815  << " of dimensions " << 0.5*getLayerT(layer)
816  << ", 0, 0, " << yh << ", " << bl << ", " << tl
817  << ", " << alp/CLHEP::deg << ", " << yh << ", "
818  << bl << ", " << tl << ", " << alp/CLHEP::deg;
819 #endif
820 
821  glog = DDLogicalPart(solid.ddname(), matplastic, solid);
822 
823  DDTranslation r1(xpos, ypos, zpos);
824  cpv.position(glog, module, idOffset+layer+1, r1, rot);
825 
826 #ifdef EDM_ML_DEBUG
827  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: " << glog.name()
828  << " number " << idOffset+layer+1
829  << " positioned in " << module.name() << " at "
830  << r1 << " with " << rot;
831 #endif
832 
833  //Now construct the layer of scintillator inside this
834  int copyNo = layer0*10 + getLayerType(layer);
835  name = getModName(mod)+getLayerName(layer)+getPhiName(iphi);
836  constructScintLayer (glog, getScintT(layer), yh, bl, tl, alp, name, copyNo, cpv);
837  }
838 
839  //Now the absorber layer
840  double zi = getZminBlock(mod) + getLayerT(layer);
841  double zo = zi + 0.5*getDzStep();
842  double rinF, routF, rinB, routB;
843  if (mod == 0) {
844  rinF = zi * tan(getAngTop());
845  routF =(zi - getZ1Beam()) * getSlope();
846  rinB = zo * tan(getAngTop());
847  routB =(zo - getZ1Beam()) * getSlope();
848  } else {
849  rinF = zi * tan(getAngBot());
850  routF = zi * tan(getAngTop());
851  rinB = zo * tan(getAngBot());
852  routB = zo * tan(getAngTop());
853  }
854 
855 #ifdef EDM_ML_DEBUG
856  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: Module " << mod
857  << " Front " << zi << ", " << rinF << ", " << routF
858  << " Back " << zo << ", " << rinB << ", " << routB;
859 #endif
860 
861  double yh1, bl1, tl1, yh2, bl2, tl2, theta, phi, alp;
862  parameterLayer(0, rinF, routF, rinB, routB, zi, zo, yh1, bl1, tl1, yh2, bl2,
863  tl2, alp, theta, phi, xpos, ypos, zpos);
864  double fact = getTolAbs();
865 
866 #ifdef EDM_ML_DEBUG
867  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: Trim " << fact
868  << " Param " << yh1 << ", " << bl1 << ", " << tl1
869  << ", " << yh2 << ", " << bl2 << ", " << tl2;
870 #endif
871 
872  bl1 -= fact;
873  tl1 -= fact;
874  bl2 -= fact;
875  tl2 -= fact;
876 
877  name = module.name().name()+"Absorber";
878  solid = DDSolidFactory::trap(DDName(name, idNameSpace),
879  0.5*getThick(mod), theta, phi, yh1,
880  bl1, tl1, alp, yh2, bl2, tl2, alp);
881 #ifdef EDM_ML_DEBUG
882  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: " << solid.name()
883  << " Trap made of " << getAbsMat()
884  << " of dimensions " << 0.5*getThick(mod) << ", "
885  << theta/CLHEP::deg << ", " << phi/CLHEP::deg << ", "
886  << yh1 << ", " << bl1 << ", " << tl1 << ", "
887  << alp/CLHEP::deg << ", " << yh2 << ", "
888  << bl2 << ", " << tl2 << ", " << alp/CLHEP::deg;
889 #endif
890 
891  glog = DDLogicalPart(solid.ddname(), matabsorbr, solid);
892 
893  DDTranslation r2(xpos, ypos, zpos);
894  cpv.position(glog, module, 1, r2, rot);
895 
896 #ifdef EDM_ML_DEBUG
897  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: " << glog.name()
898  << " number 1 positioned in " << module.name()
899  << " at " << r2 << " with " << rot;
900 #endif
901 }
902 
903 
905 
906 #ifdef EDM_ML_DEBUG
907  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: \t\tInside module ..."
908  << mod;
909 #endif
910 
912  //Pointers to the Rotation Matrices and to the Materials
913  string rotstr = getRotMat();
914  DDRotation rot(DDName(rotstr, rotns));
916  DDMaterial matter(matName);
918  DDMaterial matplastic(plasName);
919 
920  double alpha = CLHEP::pi/getNsectors();
921  double zi = getZminBlock(mod);
922 
923  for (int i = 0; i < getLayerN(mod); i++) {
924  string name;
925  DDSolid solid;
926  DDLogicalPart glog, plog;
927  int layer = getLayer(mod,i);
928  double zo = zi + 0.5*getDzStep();
929 
930  for (int iphi = 0; iphi < getPhi(); iphi++) {
931  double ziAir = zo - getThick(mod);
932  double rinF, rinB;
933  if (layer == 1) {
934  rinF = ziAir * tan(getAngTop());
935  rinB = zo * tan(getAngTop());
936  } else {
937  rinF = ziAir * tan(getAngBot());
938  rinB = zo * tan(getAngBot());
939  }
940  double routF = (ziAir - getZ1Beam()) * getSlope();
941  double routB = (zo - getZ1Beam()) * getSlope();
942  if (routF > getRoutBlock2(mod)) routF = getRoutBlock2(mod);
943  if (routB > getRoutBlock2(mod)) routB = getRoutBlock2(mod);
944 
945 #ifdef EDM_ML_DEBUG
946  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: Layer " << i <<" Phi "
947  << iphi << " Front " << ziAir << ", " << rinF
948  << ", " << routF << " Back " << zo << ", "
949  << rinB << ", " << routB;
950 #endif
951 
952  double yh1, bl1, tl1, yh2, bl2, tl2, theta, phi, alp;
953  double xpos, ypos, zpos;
954  parameterLayer(iphi, rinF, routF, rinB, routB, ziAir, zo, yh1, bl1, tl1,
955  yh2, bl2, tl2, alp, theta, phi, xpos, ypos, zpos);
956 
957  name = module.name().name()+getLayerName(layer)+getPhiName(iphi)+"Air";
958  solid = DDSolidFactory::trap(DDName(name, idNameSpace),
959  0.5*getThick(mod), theta, phi, yh1,
960  bl1, tl1, alp, yh2, bl2, tl2, alp);
961 
962 #ifdef EDM_ML_DEBUG
963  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: " << solid.name()
964  << " Trap made of " << getGenMat()
965  << " of dimensions " << 0.5*getThick(mod) << ", "
966  << theta/CLHEP::deg << ", " << phi/CLHEP::deg
967  << ", " << yh1 << ", " << bl1 << ", " << tl1
968  << ", " << alp/CLHEP::deg << ", " << yh2 << ", "
969  << bl2 << ", " << tl2 << ", " << alp/CLHEP::deg;
970 #endif
971 
972  glog = DDLogicalPart(solid.ddname(), matter, solid);
973 
974  DDTranslation r1(xpos, ypos, zpos);
975  cpv.position(glog, module, layer+1, r1, rot);
976 
977 #ifdef EDM_ML_DEBUG
978  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: " << glog.name()
979  << " number " << layer+1 << " positioned in "
980  << module.name() << " at " << r1 << " with "
981  << rot;
982 #endif
983 
984  //Now the plastic with scintillators
985  double yh = 0.5 * (routF - rinB) - getTrim(mod,iphi);
986  double bl = 0.5 * rinB * tan(alpha) - getTrim(mod,iphi);
987  double tl = 0.5 * routF * tan(alpha) - getTrim(mod,iphi);
988  name = module.name().name()+getLayerName(layer)+getPhiName(iphi);
989  solid = DDSolidFactory::trap(DDName(name, idNameSpace),
990  0.5*getLayerT(layer), 0, 0, yh,
991  bl, tl, alp, yh, bl, tl, alp);
992 
993 #ifdef EDM_ML_DEBUG
994  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: " << solid.name()
995  << " Trap made of " << getPlastMat()
996  << " of dimensions " << 0.5*getLayerT(layer)
997  << ", 0, 0, " << yh << ", " << bl << ", " << tl
998  << ", " << alp/CLHEP::deg << ", " << yh << ", "
999  << bl << ", " << tl << ", " << alp/CLHEP::deg;
1000 #endif
1001 
1002  plog = DDLogicalPart(solid.ddname(), matplastic, solid);
1003 
1004  ypos = 0.5*(routF+rinB) - xpos;
1005  DDTranslation r2(0., ypos, 0.);
1006  cpv.position(plog, glog, idOffset+layer+1, r2, DDRotation());
1007 
1008 #ifdef EDM_ML_DEBUG
1009  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: " << plog.name()
1010  << " number " << idOffset+layer+1
1011  << " positioned in " << glog.name() << " at "
1012  << r2 << " with no rotation";
1013 #endif
1014 
1015  //Constructin the scintillators inside
1016  int copyNo = layer*10 + getLayerType(layer);
1017  name = getModName(mod)+getLayerName(layer)+getPhiName(iphi);
1018  constructScintLayer (plog, getScintT(layer), yh,bl,tl, alp,name,copyNo, cpv);
1019  zo += 0.5*getDzStep();
1020  } // End of loop over phi indices
1021  zi = zo - 0.5*getDzStep();
1022  } // End of loop on layers
1023 }
1024 
1025 
1027  double yh, double bl, double tl,
1028  double alp, const string& nm, int id, DDCompactView& cpv) {
1029 
1031  DDMaterial matter(matname);
1032  string name = idName+"Scintillator"+nm;
1033 
1034  DDSolid solid = DDSolidFactory::trap(DDName(name, idNameSpace), 0.5*dz, 0, 0,
1035  yh, bl, tl, alp, yh, bl, tl, alp);
1036 
1037 #ifdef EDM_ML_DEBUG
1038  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: "
1039  << DDName(name,idNameSpace) << " Trap made of "
1040  << getScintMat() <<" of dimensions " << 0.5*dz
1041  << ", 0, 0, " << yh << ", " << bl << ", " << tl
1042  << ", " << alp/CLHEP::deg << ", " << yh << ", "
1043  << bl << ", " << tl << ", " << alp/CLHEP::deg;
1044 #endif
1045 
1046  DDLogicalPart glog(solid.ddname(), matter, solid);
1047 
1048  cpv.position(glog, detector, id, DDTranslation(0,0,0), DDRotation());
1049 
1050 #ifdef EDM_ML_DEBUG
1051  edm::LogInfo("HCalGeom") << "DDHCalEndcapAlgo test: " << glog.name()
1052  << " number " << id << " positioned in "
1053  << detector.name() << " at (0,0,0) with no rotation";
1054 #endif
1055 }
double getTrim(unsigned int i, unsigned int j) const
std::string getModName(unsigned int i) const
void execute(DDCompactView &cpv) override
double getZmaxBlock(unsigned i) const
double getDrEnd() const
float alpha
Definition: AMPTWrapper.h:95
std::vector< int > layerN2
double getSlope() const
const N & name() const
Definition: DDBase.h:74
std::vector< int > modType
std::string idNameSpace
std::vector< double > zminBlock
double getRinBlock2(unsigned i) const
double getZiKink() const
double getZShift() const
int getNsectortot() const
std::vector< int > layerN0
std::vector< std::string > modMat
int getEndcaps() const
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
std::string getAbsMat() const
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:43
int getPhi() const
double getRoutBlock2(unsigned i) const
int getModType(unsigned int i) const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
void constructInsideSector(const DDLogicalPart &sector, DDCompactView &cpv)
int getNsectors() const
Geom::Theta< T > theta() const
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
std::vector< double > routBlock1
void constructInsideModule(const DDLogicalPart &module, int mod, DDCompactView &cpv)
double getThick(unsigned int i) const
static std::string & ns()
double getRinKink() const
std::vector< double > zmaxBlock
double getTolAbs() const
double getZEnd() const
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
int getSectionModule(unsigned i) const
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
std::string getModMat(unsigned int i) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
std::string getRotMat() const
std::string getRotation() const
const Double_t pi
std::vector< double > routBlock2
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:68
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
double getZ1Beam() const
std::vector< std::string > layerName
double getScintT(unsigned int i) const
void parameterLayer0(int mod, int layer, int iphi, double &yh, double &bl, double &tl, double &alp, double &xpos, double &ypos, double &zcpv)
std::vector< int > layerN1
void constructScintLayer(const DDLogicalPart &glog, double pDz, double yh, double bl, double tl, double alp, const std::string &name, int id, DDCompactView &cpv)
double getAngTop() const
double getRout() const
double getRinBlock1(unsigned i) const
double getAngBot() const
std::string plastMat
std::vector< int > layerN4
T sqrt(T t)
Definition: SSEVec.h:18
std::string scintMat
int equipModule(unsigned int i) const
std::vector< int > sectionModule
double getDzStep() const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
double getZiL0Body() const
std::string getPlastMat() const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
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
std::vector< double > rinBlock1
std::vector< std::string > modName
std::vector< int > layerN5
~DDHCalEndcapAlgo() override
static DDSolid trap(const DDName &name, double pDz, double pTheta, double pPhi, double pDy1, double pDx1, double pDx2, double pAlp1, double pDy2, double pDx3, double pDx4, double pAlp2)
Definition: DDSolid.cc:792
int getLayerN(unsigned int i) const
std::vector< int > eModule
ii
Definition: cuy.py:590
std::vector< int > layerType
int k[5][pyjets_maxn]
std::vector< int > layerN
const double fact
void constructGeneralVolume(DDCompactView &cpv)
int getLayerType(unsigned int i) const
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string &copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
void constructInsideModule0(const DDLogicalPart &module, int mod, DDCompactView &cpv)
double getRinDip() const
std::vector< double > rinBlock2
double getLayerT(unsigned int i) const
double getRoutDip() const
std::vector< double > trimRight
double getDzShift() const
int getLayer(unsigned int i, unsigned int j) const
double getZiDip() const
std::string getPhiName(unsigned int i) const
double getZFront() 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< int > layerN3
double getZiBody() const
std::string getGenMat() const
std::string getScintMat() const
std::vector< std::string > phiName
void parameterLayer(int iphi, double rinF, double routF, double rinB, double routB, double zi, double zo, double &yh1, double &bl1, double &tl1, double &yh2, double &bl2, double &tl2, double &alp, double &theta, double &phi, double &xpos, double &ypos, double &zcpv)
std::string genMaterial
double getZminBlock(unsigned i) const
std::vector< double > thick
std::string rotation
std::string getLayerName(unsigned int i) const
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
std::vector< double > scintT
std::vector< double > layerT
Definition: vlib.h:208
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
double getZShiftHac2() const
double getRoutBlock1(unsigned i) const
int getModules() const
const N & ddname() const
Definition: DDBase.h:76
std::vector< double > trimLeft