CMS 3D CMS Logo

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