CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDG4SolidConverter.cc
Go to the documentation of this file.
2 #include "G4VSolid.hh"
3 
5 
8 #include "G4SystemOfUnits.hh"
9 
10 using namespace std;
11 const vector<double> * DDG4SolidConverter::par_ = nullptr;
12 
14 {
15  // could also be done 'dynamically' from outside
16  // would then need to have a 'register' method ...
17  convDispatch_[ddbox] = DDG4SolidConverter::box;
18  convDispatch_[ddtubs] = DDG4SolidConverter::tubs;
19  convDispatch_[ddtrap] = DDG4SolidConverter::trap;
20  convDispatch_[ddcons] = DDG4SolidConverter::cons;
25  convDispatch_[ddtorus] = DDG4SolidConverter::torus;
27  convDispatch_[ddunion] = DDG4SolidConverter::unionsolid;
32  convDispatch_[ddsphere] = DDG4SolidConverter::sphere;
33  convDispatch_[ddorb] = DDG4SolidConverter::orb;
37 }
38 
39 
41 
43 {
44  if ( !s ) {
45  edm::LogError("SimG4CoreGeometry") <<" DDG4SolidConverter::convert(..) found an undefined DDSolid " << s.toString();
46  throw cms::Exception("SimG4CoreGeometry", "DDG4SolidConverter::convert(..) found an undefined DDSolid " + s.toString());
47  }
48  G4VSolid * result = nullptr;
49  par_ = &(s.parameters());
50  map<DDSolidShape,FNPTR>::iterator it = convDispatch_.find(s.shape());
51  if (it != convDispatch_.end()) {
52  result = it->second(s);
53  }
54  else {
55  throw cms::Exception("DetectorDescriptionFault")
56  << "DDG4SolidConverter::convert: conversion failed for s=" << s
57  << "\n solid.shape()=" << s.shape()
58  << std::endl;
59  }
60  return result;
61 }
62 
63 
64 #include "G4Box.hh"
65 G4VSolid * DDG4SolidConverter::box(const DDSolid & s)
66 {
67  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: box = " << s ;
68  return new G4Box(s.name().name(), (*par_)[0],(*par_)[1],(*par_)[2]);
69 }
70 
71 
72 #include "G4Tubs.hh"
73 G4VSolid * DDG4SolidConverter::tubs(const DDSolid & s)
74 {
75  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: tubs = " << s ;
76  return new G4Tubs(s.name().name(), (*par_)[1], // rmin
77  (*par_)[2], // rmax
78  (*par_)[0], // dzHalf
79  (*par_)[3], // phiStart
80  (*par_)[4]);// deltaPhi
81 }
82 
83 
84 #include "G4Trap.hh"
85 G4VSolid * DDG4SolidConverter::trap(const DDSolid & s)
86 {
87  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: trap = " << s ;
88  return new G4Trap(s.name().name(), (*par_)[0], // pDz
89  (*par_)[1], // theta
90  (*par_)[2], // phi
91  (*par_)[3], // y1
92  (*par_)[4], // x1
93  (*par_)[5], // x2
94  (*par_)[6], // alpha1
95  (*par_)[7], // y2
96  (*par_)[8], // x3
97  (*par_)[9], // x4
98  (*par_)[10]);// alpha2
99 }
100 
101 
102 #include "G4Cons.hh"
103 G4VSolid * DDG4SolidConverter::cons(const DDSolid & s)
104 {
105  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: cons = " << s ;
106  return new G4Cons(s.name().name(), (*par_)[1], // rmin -z
107  (*par_)[2], // rmax -z
108  (*par_)[3], // rmin +z
109  (*par_)[4], // rmax +z
110  (*par_)[0], // zHalf
111  (*par_)[5], // phistart
112  (*par_)[6]); // deltaphi
113 }
114 
115 
116 #include "G4Polycone.hh"
118 {
119  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: pcon_rz = " << s ;
120  vector<double> r;
121  vector<double> z;
122  vector<double>::const_iterator i = (*par_).begin()+2;
123  int count=0;
124  for(; i!=(*par_).end(); ++i) {
125  LogDebug("SimG4CoreGeometry") << "z=" << *i ;
126  z.push_back(*i); ++i;
127  LogDebug("SimG4CoreGeometry") << " r=" << *i ;
128  r.push_back(*i);
129  count++;
130  }
131  LogDebug("SimG4CoreGeometry") << "sp=" << (*par_)[0]/deg << " ep=" << (*par_)[1]/deg ;
132  /*
133  std::cout << "### Polycone_RZ: " << "sp=" << (*par_)[0]/deg
134  << " ep=" << (*par_)[1]/deg
135  << " N= " << count << std::endl;
136  for(int i=0; i<count; ++i) {
137  std::cout << " R= " << r[i] << " Z= " << z[i] << std::endl;
138  }
139  */
140  return new G4Polycone(s.name().name(), (*par_)[0], (*par_)[1], // start,delta-phi
141  count, // numRZ
142  &(r[0]),
143  &(z[0]));
144 }
145 
146 
148 {
149  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: pcon_rrz = " << s ;
150  vector<double> z_p;
151  vector<double> rmin_p;
152  vector<double> rmax_p;
153  vector<double>::const_iterator i = par_->begin()+2;
154  int count = 0;
155  for (; i!=par_->end(); ++i) {
156  LogDebug("SimG4CoreGeometry") << "z=" << *i ;
157  z_p.push_back(*i); ++i;
158  LogDebug("SimG4CoreGeometry") << "rmin=" << *i ;
159  rmin_p.push_back(*i); ++i;
160  LogDebug("SimG4CoreGeometry") << "rmax=" << *i ;
161  rmax_p.push_back(*i);
162  count++;
163  }
164  LogDebug("SimG4CoreGeometry") << "sp=" << (*par_)[0]/deg << " ep=" << (*par_)[1]/deg ;
165  /*
166  std::cout << "### Polycone_RRZ: " << "sp=" << (*par_)[0]/deg
167  << " ep=" << (*par_)[1]/deg
168  << " N= " << count << std::endl;
169  for(int i=0; i<count; ++i) {
170  std::cout << " R1= " << rmin_p[i] << " R1= " << rmax_p[i] << " Z= " << z_p[i] << std::endl;
171  }
172  */
173  return new G4Polycone(s.name().name(), (*par_)[0], (*par_)[1], // start,delta-phi
174  count, // sections
175  &(z_p[0]),
176  &(rmin_p[0]),
177  &(rmax_p[0]));
178 
179 }
180 
181 
182 #include "G4Polyhedra.hh"
184 {
185  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: phed_rz = " << s ;
186  vector<double> r;
187  vector<double> z;
188  vector<double>::const_iterator i = par_->begin()+3;
189  int count=0;
190 
191  for(; i!=par_->end(); ++i) {
192  z.push_back(*i); ++i;
193  r.push_back(*i);
194  count++;
195  }
196 
197  return new G4Polyhedra(s.name().name(), (*par_)[1], (*par_)[2], int((*par_)[0]),// start,delta-phi;sides
198  count, // numRZ
199  &(r[0]),
200  &(z[0]));
201 }
202 
203 
205 {
206  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: phed_rrz = " << s ;
207  vector<double> z_p;
208  vector<double> rmin_p;
209  vector<double> rmax_p;
210  vector<double>::const_iterator i = par_->begin()+3;
211  int count = 0;
212  for (; i!=par_->end(); ++i) {
213  LogDebug("SimG4CoreGeometry") << "z=" << *i ;
214  z_p.push_back(*i); ++i;
215  LogDebug("SimG4CoreGeometry") << "rmin=" << *i ;
216  rmin_p.push_back(*i); ++i;
217  LogDebug("SimG4CoreGeometry") << "rmax=" << *i ;
218  rmax_p.push_back(*i);
219  count++;
220  }
221  LogDebug("SimG4CoreGeometry") << "sp=" << (*par_)[0]/deg << " ep=" << (*par_)[1]/deg ;
222  return new G4Polyhedra(s.name().name(), (*par_)[1], (*par_)[2], int((*par_)[0]), // start,delta-phi,sides
223  count, // sections
224  &(z_p[0]),
225  &(rmin_p[0]),
226  &(rmax_p[0]));
227 }
228 
229 #include "G4Torus.hh"
231 {
232  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: torus = " << s ;
233  return new G4Torus(s.name().name(), (*par_)[0], // rmin
234  (*par_)[1], // rmax
235  (*par_)[2], // Rtor
236  (*par_)[3], // phiStart
237  (*par_)[4]);// deltaPhi
238 }
239 
240 
241 #include "G4ReflectedSolid.hh"
242 
243 namespace {
244  static const HepGeom::ReflectZ3D z_reflection;
245 }
246 
248 {
249  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: reflected = " << s ;
250  G4ReflectedSolid * rs = 0;
251  DDReflectionSolid rfs(s);
252  if (rfs) {
253  rs = new G4ReflectedSolid(s.name().name(),
255  z_reflection);
256 
257  } // else ?
258  return rs;
259 }
260 
261 
262 #include "G4UnionSolid.hh"
264 {
265  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: unionsolid = " << s.name() ;
266  G4UnionSolid * us = 0;
267  DDBooleanSolid bs(s);
268  if (bs) {
269  LogDebug("SimG4CoreGeometry") << "SolidA=" << bs.solidA();
270  G4VSolid * sa = DDG4SolidConverter().convert(bs.solidA());
271  LogDebug("SimG4CoreGeometry") << "SolidB=" << bs.solidB();
272  G4VSolid * sb = DDG4SolidConverter().convert(bs.solidB());
273  LogDebug("SimG4CoreGeometry") << " name:" << s.name() << " t=" << bs.translation() << flush;
274  LogDebug("SimG4CoreGeometry") << " " << bs.rotation().rotation()->Inverse() << flush;
275  std::vector<double> tdbl(9);
276  bs.rotation().rotation()->Inverse().GetComponents(tdbl.begin(), tdbl.end());
277  CLHEP::HepRep3x3 temprep(tdbl[0], tdbl[1], tdbl[2], tdbl[3], tdbl[4], tdbl[5], tdbl[6], tdbl[7], tdbl[8]);
278  CLHEP::Hep3Vector temphvec(bs.translation().X(), bs.translation().Y(), bs.translation().Z());
279  us = new G4UnionSolid(s.name().name(),
280  sa,
281  sb,
282  new CLHEP::HepRotation(temprep),
283  temphvec);
284 
285  } // else?
286  return us;
287 }
288 
289 
290 #include "G4SubtractionSolid.hh"
291 #include <sstream>
293 {
294  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: subtraction = " << s ;
295  G4SubtractionSolid * us = 0;
296  DDBooleanSolid bs(s);
297  if (bs) {
298  G4VSolid * sa = DDG4SolidConverter().convert(bs.solidA());
299  G4VSolid * sb = DDG4SolidConverter().convert(bs.solidB());
300  LogDebug("SimG4CoreGeometry") << " name:" << s.name() << " t=" << bs.translation() << flush;
301  // stringstream sst;
302  // bs.rotation().rotation()->inverse().print(sst);
303  // LogDebug("SimG4CoreGeometry") << " " << sst.str() << flush;
304  LogDebug("SimG4CoreGeometry") << " " << bs.rotation().rotation()->Inverse() << flush;
305  std::vector<double> tdbl(9);
306  bs.rotation().rotation()->Inverse().GetComponents(tdbl.begin(), tdbl.end());
307  CLHEP::HepRep3x3 temprep(tdbl[0], tdbl[1], tdbl[2], tdbl[3], tdbl[4], tdbl[5], tdbl[6], tdbl[7], tdbl[8]);
308  CLHEP::Hep3Vector temphvec(bs.translation().X(), bs.translation().Y(), bs.translation().Z());
309  us = new G4SubtractionSolid(s.name().name(),
310  sa,
311  sb,
312  new CLHEP::HepRotation(temprep),
313  temphvec);
314  }
315  return us;
316 }
317 
318 
319 #include "G4IntersectionSolid.hh"
321 {
322  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: intersection = " << s ;
323  G4IntersectionSolid * us = 0;
324  DDBooleanSolid bs(s);
325  if (bs) {
326  G4VSolid * sa = DDG4SolidConverter().convert(bs.solidA());
327  G4VSolid * sb = DDG4SolidConverter().convert(bs.solidB());
328  LogDebug("SimG4CoreGeometry") << " name:" << s.name() << " t=" << bs.translation() << flush;
329  LogDebug("SimG4CoreGeometry") << " " << bs.rotation().rotation()->Inverse() << flush;
330  std::vector<double> tdbl(9);
331  bs.rotation().rotation()->Inverse().GetComponents(tdbl.begin(), tdbl.end());
332  CLHEP::HepRep3x3 temprep(tdbl[0], tdbl[1], tdbl[2], tdbl[3], tdbl[4], tdbl[5], tdbl[6], tdbl[7], tdbl[8]);
333  CLHEP::Hep3Vector temphvec(bs.translation().X(), bs.translation().Y(), bs.translation().Z());
334  us = new G4IntersectionSolid(s.name().name(),
335  sa,
336  sb,
337  new CLHEP::HepRotation(temprep),
338  temphvec);
339  }
340  return us;
341 }
342 
343 
344 #include "G4Trd.hh"
346 {
347  static G4RotationMatrix * rot = 0;
348  static bool firstTime=true;
349  if (firstTime) {
350  firstTime=false;
351  rot = new G4RotationMatrix;
352  rot->rotateX(90.*deg);
353 
354  }
355  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: pseudoTrap = " << s ;
356  G4Trd * trap = 0;
357  G4Tubs * tubs = 0;
358  G4VSolid * result = 0;
359  DDPseudoTrap pt(s); // pt...PseudoTrap
360  double r = pt.radius();
361  bool atMinusZ = pt.atMinusZ();
362  double x = 0;
363  double h = 0;
364  bool intersec = false; // union or intersection solid
365  if (pt.atMinusZ()) {
366  x = pt.x1(); // tubs radius
367  }
368  else {
369  x = pt.x2(); // tubs radius
370  }
371  double openingAngle = 2.*asin(x/abs(r));
372  //trap = new G4Trd(s.name().name(),
373  double displacement=0;
374  double startPhi=0;
375  /* calculate the displacement of the tubs w.r.t. to the trap,
376  determine the opening angle of the tubs */
377  double delta = sqrt(r*r-x*x);
378  if (r < 0 && abs(r) >= x) {
379  intersec = true; // intersection solid
380  h = pt.y1() < pt.y2() ? pt.y2() : pt.y1(); // tubs half height
381  h += h/20.; // enlarge a bit - for subtraction solid
382  if (atMinusZ) {
383  displacement = - pt.halfZ() - delta;
384  startPhi = 270.*deg - openingAngle/2.;
385  }
386  else {
387  displacement = pt.halfZ() + delta;
388  startPhi = 90.*deg - openingAngle/2.;
389  }
390  }
391  else if ( r > 0 && abs(r) >= x )
392  {
393  if (atMinusZ) {
394  displacement = - pt.halfZ() + delta;
395  startPhi = 90.*deg - openingAngle/2.;
396  h = pt.y1();
397  }
398  else {
399  displacement = pt.halfZ() - delta;
400  startPhi = 270.*deg - openingAngle/2.;
401  h = pt.y2();
402  }
403  }
404  else {
405  throw cms::Exception("DetectorDescriptionFault", "Check parameters of the PseudoTrap! name=" + pt.name().name());
406  }
407  G4ThreeVector displ(0.,0.,displacement); // displacement of the tubs w.r.t. trap
408  LogDebug("SimG4CoreGeometry") << "DDSolidConverter::pseudotrap(): displacement=" << displacement
409  << " openingAngle=" << openingAngle/deg << " x=" << x << " h=" << h;
410 
411  // Now create two solids (trd & tubs), and a boolean solid out of them
412  string name=pt.name().name();
413  trap = new G4Trd(name, pt.x1(), pt.x2(), pt.y1(), pt.y2(), pt.halfZ());
414  tubs = new G4Tubs(name,
415  0., // rMin
416  abs(r), // rMax
417  h, // half height
418  startPhi, // start angle
419  openingAngle);
420  if (intersec) {
421  result = new G4SubtractionSolid(name, trap, tubs, rot, displ);
422  }
423  else {
425  G4VSolid * tubicCap = new G4SubtractionSolid(name,
426  tubs,
427  new G4Box(name, 1.1*x, sqrt(r*r-x*x), 1.1*h),
428  0,
429  G4ThreeVector());
430  result = new G4UnionSolid(name, trap, tubicCap, rot, displ);
431 
432  // approximative implementation - also fails to visualize due to G4/Iguana limitations
433  /*
434  delete tubs;
435  tubs = new G4Tubs(name,
436  sqrt(r*r-x*x), // rMin-approximation!
437  abs(r), // rMax
438  h, // half height
439  startPhi, // start angle
440  openingAngle);
441  result = new G4UnionSolid(name, trap, tubs, rot, displ);
442  */
443  }
444  return result;
445 }
446 
447 
449 {
450  // truncated tube-section: a boolean subtraction solid:
451  // from a tube-section a box is subtracted according to the
452  // given parameters
453  LogDebug("SimG4CoreGeometry") << "MantisConverter: solidshape=" << DDSolidShapesName::name(s.shape()) << " " << s;
454  LogDebug("SimG4CoreGeometry") << "before";
455  DDTruncTubs tt(s);
456  LogDebug("SimG4CoreGeometry") << "after";
457  double rIn(tt.rIn()), rOut(tt.rOut()), zHalf(tt.zHalf()),
458  startPhi(tt.startPhi()), deltaPhi(tt.deltaPhi()),
459  cutAtStart(tt.cutAtStart()), cutAtDelta(tt.cutAtDelta());
460  bool cutInside(bool(tt.cutInside()));
461  string name=tt.name().name();
462 
463  // check the parameters
464  if (rIn <= 0 || rOut <=0 || cutAtStart <=0 || cutAtDelta <= 0) {
465  throw cms::Exception("DetectorDescriptionFault", "TruncTubs " + string(tt.name().fullname()) + ": 0 <= rIn,cutAtStart,rOut,cutAtDelta,rOut violated!");
466  }
467  if (rIn >= rOut) {
468  throw cms::Exception("DetectorDescriptionFault", "TruncTubs " + string(tt.name().fullname()) + ": rIn<rOut violated!");
469  }
470  if (startPhi != 0.) {
471  throw cms::Exception("DetectorDescriptionFault", "TruncTubs " + string(tt.name().fullname()) + ": startPhi != 0 not supported!");
472  }
473  // if (cutInside != false) {
474  // throw cms::Exception("DetectorDescriptionFault", "TruncTubs " + string(tt.name()) + " cutInside == true not supported!");
475  // }
476 
477  startPhi=0.;
478  double r(cutAtStart), R(cutAtDelta);
479  G4VSolid * result(0);
480  G4VSolid * tubs = new G4Tubs(name,rIn,rOut,zHalf,startPhi,deltaPhi);
481  LogDebug("SimG4CoreGeometry") << "G4Tubs: " << rIn << ' ' << rOut << ' ' << zHalf << ' ' << startPhi/deg << ' ' << deltaPhi/deg;
482  LogDebug("SimG4CoreGeometry") << s;
483  // length & hight of the box
484  double boxX(30.*rOut), boxY(20.*rOut); // exaggerate dimensions - does not matter, it's subtracted!
485 
486  // width of the box > width of the tubs
487  double boxZ(1.1*zHalf);
488 
489  // angle of the box w.r.t. tubs
490  double cath = r-R*cos(deltaPhi);
491  double hypo = sqrt(r*r+R*R-2.*r*R*cos(deltaPhi));
492  double cos_alpha = cath/hypo;
493 
494  double alpha = -acos(cos_alpha);
495  LogDebug("SimG4CoreGeometry") << "cath=" << cath/m;
496  LogDebug("SimG4CoreGeometry") << "hypo=" << hypo/m;
497  LogDebug("SimG4CoreGeometry") << "al=" << acos(cath/hypo)/deg;
498  LogDebug("SimG4CoreGeometry") << "deltaPhi=" << deltaPhi/deg << "\n"
499  << "r=" << r/m << "\n"
500  << "R=" << R/m;
501 
502  LogDebug("SimG4CoreGeometry") << "alpha=" << alpha/deg;
503 
504  // rotationmatrix of box w.r.t. tubs
505  G4RotationMatrix * rot = new G4RotationMatrix;
506  rot->rotateZ(-alpha);
507  LogDebug("SimG4CoreGeometry") << (*rot);
508 
509  // center point of the box
510  double xBox;
511  if (!cutInside) {
512  xBox = r+boxY/sin(abs(alpha));
513  } else {
514  xBox = -(boxY/sin(abs(alpha))-r);
515  }
516 
517  G4ThreeVector trans(xBox,0.,0.);
518  LogDebug("SimG4CoreGeometry") << "trans=" << trans;
519 
520  G4VSolid * box = new G4Box(name,boxX,boxY,boxZ);
521  result = new G4SubtractionSolid(name,tubs,box,rot,trans);
522 
523  return result;
524 
525 }
526 
527 #include "G4Sphere.hh"
529 {
530  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: sphere = " << s ;
531  DDSphere sp(s);
532  return new G4Sphere(s.name().name(), sp.innerRadius(),
533  sp.outerRadius(),
534  sp.startPhi(),
535  sp.deltaPhi(),
536  sp.startTheta(),
537  sp.deltaTheta());
538 }
539 
540 #include "G4Orb.hh"
541 G4VSolid * DDG4SolidConverter::orb(const DDSolid & s)
542 {
543  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: orb = " << s ;
544  DDOrb sp(s);
545  return new G4Orb(s.name().name(), sp.radius());
546 }
547 
548 #include "G4EllipticalTube.hh"
550 {
551  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: ellipticaltube = " << s ;
552  DDEllipticalTube sp(s);
553  return new G4EllipticalTube(s.name().name(),
554  sp.xSemiAxis(),
555  sp.ySemiAxis(),
556  sp.zHeight());
557 }
558 
559 #include "G4Ellipsoid.hh"
561 {
562  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: ellipsoid = " << s ;
563  DDEllipsoid sp(s);
564  return new G4Ellipsoid(s.name().name(),
565  sp.xSemiAxis(),
566  sp.ySemiAxis(),
567  sp.zSemiAxis(),
568  sp.zBottomCut(),
569  sp.zTopCut());
570 }
571 
572 #include "G4Para.hh"
573 G4VSolid * DDG4SolidConverter::para(const DDSolid & s)
574 {
575  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: parallelepiped = " << s ;
576  DDParallelepiped sp(s);
577  return new G4Para(s.name().name(),
578  sp.xHalf(),
579  sp.yHalf(),
580  sp.zHalf(),
581  sp.alpha(),
582  sp.theta(),
583  sp.phi());
584 }
585 
#define LogDebug(id)
dbl * delta
Definition: mlp_gen.cc:36
double cutAtStart(void) const
truncation at begin of the tube-section
Definition: DDSolid.cc:211
const DDRotationMatrix * rotation() const
Returns the read-only rotation-matrix.
Definition: DDTransform.h:90
static G4VSolid * polyhedra_rrz(const DDSolid &)
int i
Definition: DBlmapReader.cc:9
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Definition: DDSolid.cc:150
static const std::vector< double > * par_
double xHalf(void) const
Definition: DDSolid.cc:640
double xSemiAxis(void) const
Definition: DDSolid.cc:619
float alpha
Definition: AMPTWrapper.h:95
double phi(void) const
Definition: DDSolid.cc:650
bool cutInside(void) const
true, if truncation is on the inner side of the tube-section
Definition: DDSolid.cc:215
static G4VSolid * orb(const DDSolid &)
A truncated tube section.
Definition: DDSolid.h:132
double theta(void) const
Definition: DDSolid.cc:648
const N & name() const
Definition: DDBase.h:78
double zHalf(void) const
half of the z-Axis
Definition: DDSolid.cc:201
double y2(void) const
half length along y on +z
Definition: DDSolid.cc:236
static G4VSolid * ellipsoid(const DDSolid &)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
double startTheta(void) const
Definition: DDSolid.cc:574
double deltaPhi(void) const
angular span of the tube-section
Definition: DDSolid.cc:209
double deltaPhi(void) const
Definition: DDSolid.cc:572
static G4VSolid * trap(const DDSolid &)
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
static G4VSolid * cons(const DDSolid &)
double cutAtDelta(void) const
truncation at end of the tube-section
Definition: DDSolid.cc:213
static G4VSolid * tubs(const DDSolid &)
double zTopCut(void) const
Definition: DDSolid.cc:627
double radius(void) const
Definition: DDSolid.cc:589
double rIn(void) const
inner radius
Definition: DDSolid.cc:203
static G4VSolid * sphere(const DDSolid &)
DDTranslation translation(void) const
Definition: DDSolid.cc:540
double ySemiAxis(void) const
Definition: DDSolid.cc:621
double innerRadius(void) const
Definition: DDSolid.cc:566
A DDSolid represents the shape of a part.
Definition: DDSolid.h:35
double y1(void) const
half length along y on -z
Definition: DDSolid.cc:234
DDSolid solidB(void) const
Definition: DDSolid.cc:550
tuple result
Definition: mps_fire.py:95
T x() const
Cartesian x coordinate.
double outerRadius(void) const
Definition: DDSolid.cc:568
static const char *const name(DDSolidShape s)
Definition: DDSolidShapes.h:21
DDSolid unreflected(void) const
Definition: DDSolid.cc:272
static G4VSolid * pseudotrap(const DDSolid &s)
static G4VSolid * reflected(const DDSolid &)
DDRotation rotation(void) const
Definition: DDSolid.cc:535
bool firstTime
Definition: QTestHandle.cc:16
static G4VSolid * para(const DDSolid &)
double yHalf(void) const
Definition: DDSolid.cc:642
bool atMinusZ(void) const
true, if cut-out or rounding is on the -z side
Definition: DDSolid.cc:240
double halfZ(void) const
half of the z-Axis
Definition: DDSolid.cc:228
T sqrt(T t)
Definition: SSEVec.h:18
double xSemiAxis(void) const
Definition: DDSolid.cc:602
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
const std::string fullname() const
Definition: DDName.h:51
double startPhi(void) const
Definition: DDSolid.cc:570
double alpha(void) const
Definition: DDSolid.cc:646
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:144
double deltaTheta(void) const
Definition: DDSolid.cc:576
static G4VSolid * box(const DDSolid &)
double ySemiAxis(void) const
Definition: DDSolid.cc:604
DDSolid solidA(void) const
Definition: DDSolid.cc:545
std::string toString() const
Definition: DDBase.h:82
static G4VSolid * ellipticaltube(const DDSolid &)
static G4VSolid * polycone_rz(const DDSolid &)
static G4VSolid * intersection(const DDSolid &)
G4VSolid * convert(const DDSolid &)
double startPhi(void) const
angular start of the tube-section
Definition: DDSolid.cc:207
double zBottomCut(void) const
Definition: DDSolid.cc:625
static G4VSolid * unionsolid(const DDSolid &)
Definition: DDSolid.h:338
static G4VSolid * trunctubs(const DDSolid &)
double zHeight(void) const
Definition: DDSolid.cc:606
double zSemiAxis(void) const
Definition: DDSolid.cc:623
static G4VSolid * torus(const DDSolid &)
static G4VSolid * polyhedra_rz(const DDSolid &)
double zHalf(void) const
Definition: DDSolid.cc:644
Definition: sp.h:21
static G4VSolid * polycone_rrz(const DDSolid &)
double x2(void) const
half length along x on +z
Definition: DDSolid.cc:232
double rOut(void) const
outer radius
Definition: DDSolid.cc:205
const std::string & name() const
Returns the name.
Definition: DDName.cc:87
double x1(void) const
half length along x on -z
Definition: DDSolid.cc:230
static G4VSolid * subtraction(const DDSolid &)
double radius(void) const
radius of the cut-out (neg.) or rounding (pos.)
Definition: DDSolid.cc:238