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