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 
9 using namespace std;
10 const vector<double> * DDG4SolidConverter::par_ = 0;
11 
13 {
14  // could also be done 'dynamically' from outside
15  // would then need to have a 'register' method ...
16  par_=0;
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 = 0;
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  return new G4Polycone(s.name().name(), (*par_)[0], (*par_)[1], // start,delta-phi
133  count, // numRZ
134  &(r[0]),
135  &(z[0]));
136 }
137 
138 
140 {
141  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: pcon_rrz = " << s ;
142  vector<double> z_p;
143  vector<double> rmin_p;
144  vector<double> rmax_p;
145  vector<double>::const_iterator i = par_->begin()+2;
146  int count = 0;
147  for (; i!=par_->end(); ++i) {
148  LogDebug("SimG4CoreGeometry") << "z=" << *i ;
149  z_p.push_back(*i); ++i;
150  LogDebug("SimG4CoreGeometry") << "rmin=" << *i ;
151  rmin_p.push_back(*i); ++i;
152  LogDebug("SimG4CoreGeometry") << "rmax=" << *i ;
153  rmax_p.push_back(*i);
154  count++;
155  }
156  LogDebug("SimG4CoreGeometry") << "sp=" << (*par_)[0]/deg << " ep=" << (*par_)[1]/deg ;
157  return new G4Polycone(s.name().name(), (*par_)[0], (*par_)[1], // start,delta-phi
158  count, // sections
159  &(z_p[0]),
160  &(rmin_p[0]),
161  &(rmax_p[0]));
162 
163 }
164 
165 
166 #include "G4Polyhedra.hh"
168 {
169  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: phed_rz = " << s ;
170  vector<double> r;
171  vector<double> z;
172  vector<double>::const_iterator i = par_->begin()+3;
173  int count=0;
174 
175  for(; i!=par_->end(); ++i) {
176  z.push_back(*i); ++i;
177  r.push_back(*i);
178  count++;
179  }
180 
181  return new G4Polyhedra(s.name().name(), (*par_)[1], (*par_)[2], int((*par_)[0]),// start,delta-phi;sides
182  count, // numRZ
183  &(r[0]),
184  &(z[0]));
185 }
186 
187 
189 {
190  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: phed_rrz = " << s ;
191  vector<double> z_p;
192  vector<double> rmin_p;
193  vector<double> rmax_p;
194  vector<double>::const_iterator i = par_->begin()+3;
195  int count = 0;
196  for (; i!=par_->end(); ++i) {
197  LogDebug("SimG4CoreGeometry") << "z=" << *i ;
198  z_p.push_back(*i); ++i;
199  LogDebug("SimG4CoreGeometry") << "rmin=" << *i ;
200  rmin_p.push_back(*i); ++i;
201  LogDebug("SimG4CoreGeometry") << "rmax=" << *i ;
202  rmax_p.push_back(*i);
203  count++;
204  }
205  LogDebug("SimG4CoreGeometry") << "sp=" << (*par_)[0]/deg << " ep=" << (*par_)[1]/deg ;
206  return new G4Polyhedra(s.name().name(), (*par_)[1], (*par_)[2], int((*par_)[0]), // start,delta-phi,sides
207  count, // sections
208  &(z_p[0]),
209  &(rmin_p[0]),
210  &(rmax_p[0]));
211 }
212 
213 #include "G4Torus.hh"
215 {
216  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: torus = " << s ;
217  return new G4Torus(s.name().name(), (*par_)[0], // rmin
218  (*par_)[1], // rmax
219  (*par_)[2], // Rtor
220  (*par_)[3], // phiStart
221  (*par_)[4]);// deltaPhi
222 }
223 
224 
225 #include "G4ReflectedSolid.hh"
227 {
228  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: reflected = " << s ;
229  G4ReflectedSolid * rs = 0;
230  DDReflectionSolid rfs(s);
231  if (rfs) {
232  static /* G4Transform3D */ HepGeom::ReflectZ3D z_reflection; // = HepGeom::ReflectZ3D;
233  rs = new G4ReflectedSolid(s.name().name(),
235  z_reflection);
236 
237  } // else ?
238  return rs;
239 }
240 
241 
242 #include "G4UnionSolid.hh"
244 {
245  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: unionsolid = " << s.name() ;
246  G4UnionSolid * us = 0;
247  DDBooleanSolid bs(s);
248  if (bs) {
249  LogDebug("SimG4CoreGeometry") << "SolidA=" << bs.solidA();
250  G4VSolid * sa = DDG4SolidConverter().convert(bs.solidA());
251  LogDebug("SimG4CoreGeometry") << "SolidB=" << bs.solidB();
252  G4VSolid * sb = DDG4SolidConverter().convert(bs.solidB());
253  LogDebug("SimG4CoreGeometry") << " name:" << s.name() << " t=" << bs.translation() << flush;
254  LogDebug("SimG4CoreGeometry") << " " << bs.rotation().rotation()->Inverse() << flush;
255  std::vector<double> tdbl(9);
256  bs.rotation().rotation()->Inverse().GetComponents(tdbl.begin(), tdbl.end());
257  CLHEP::HepRep3x3 temprep(tdbl[0], tdbl[1], tdbl[2], tdbl[3], tdbl[4], tdbl[5], tdbl[6], tdbl[7], tdbl[8]);
258  CLHEP::Hep3Vector temphvec(bs.translation().X(), bs.translation().Y(), bs.translation().Z());
259  us = new G4UnionSolid(s.name().name(),
260  sa,
261  sb,
262  new CLHEP::HepRotation(temprep),
263  temphvec);
264 
265  } // else?
266  return us;
267 }
268 
269 
270 #include "G4SubtractionSolid.hh"
271 #include <sstream>
273 {
274  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: subtraction = " << s ;
275  G4SubtractionSolid * us = 0;
276  DDBooleanSolid bs(s);
277  if (bs) {
278  G4VSolid * sa = DDG4SolidConverter().convert(bs.solidA());
279  G4VSolid * sb = DDG4SolidConverter().convert(bs.solidB());
280  LogDebug("SimG4CoreGeometry") << " name:" << s.name() << " t=" << bs.translation() << flush;
281  // stringstream sst;
282  // bs.rotation().rotation()->inverse().print(sst);
283  // LogDebug("SimG4CoreGeometry") << " " << sst.str() << flush;
284  LogDebug("SimG4CoreGeometry") << " " << bs.rotation().rotation()->Inverse() << flush;
285  std::vector<double> tdbl(9);
286  bs.rotation().rotation()->Inverse().GetComponents(tdbl.begin(), tdbl.end());
287  CLHEP::HepRep3x3 temprep(tdbl[0], tdbl[1], tdbl[2], tdbl[3], tdbl[4], tdbl[5], tdbl[6], tdbl[7], tdbl[8]);
288  CLHEP::Hep3Vector temphvec(bs.translation().X(), bs.translation().Y(), bs.translation().Z());
289  us = new G4SubtractionSolid(s.name().name(),
290  sa,
291  sb,
292  new CLHEP::HepRotation(temprep),
293  temphvec);
294  }
295  return us;
296 }
297 
298 
299 #include "G4IntersectionSolid.hh"
301 {
302  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: intersection = " << s ;
303  G4IntersectionSolid * us = 0;
304  DDBooleanSolid bs(s);
305  if (bs) {
306  G4VSolid * sa = DDG4SolidConverter().convert(bs.solidA());
307  G4VSolid * sb = DDG4SolidConverter().convert(bs.solidB());
308  LogDebug("SimG4CoreGeometry") << " name:" << s.name() << " t=" << bs.translation() << flush;
309  LogDebug("SimG4CoreGeometry") << " " << bs.rotation().rotation()->Inverse() << flush;
310  std::vector<double> tdbl(9);
311  bs.rotation().rotation()->Inverse().GetComponents(tdbl.begin(), tdbl.end());
312  CLHEP::HepRep3x3 temprep(tdbl[0], tdbl[1], tdbl[2], tdbl[3], tdbl[4], tdbl[5], tdbl[6], tdbl[7], tdbl[8]);
313  CLHEP::Hep3Vector temphvec(bs.translation().X(), bs.translation().Y(), bs.translation().Z());
314  us = new G4IntersectionSolid(s.name().name(),
315  sa,
316  sb,
317  new CLHEP::HepRotation(temprep),
318  temphvec);
319  }
320  return us;
321 }
322 
323 
324 #include "G4Trd.hh"
326 {
327  static G4RotationMatrix * rot = 0;
328  static bool firstTime=true;
329  if (firstTime) {
330  firstTime=false;
331  rot = new G4RotationMatrix;
332  rot->rotateX(90.*deg);
333 
334  }
335  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: pseudoTrap = " << s ;
336  G4Trd * trap = 0;
337  G4Tubs * tubs = 0;
338  G4VSolid * result = 0;
339  DDPseudoTrap pt(s); // pt...PseudoTrap
340  double r = pt.radius();
341  bool atMinusZ = pt.atMinusZ();
342  double x = 0;
343  double h = 0;
344  bool intersec = false; // union or intersection solid
345  if (pt.atMinusZ()) {
346  x = pt.x1(); // tubs radius
347  }
348  else {
349  x = pt.x2(); // tubs radius
350  }
351  double openingAngle = 2.*asin(x/abs(r));
352  //trap = new G4Trd(s.name().name(),
353  double displacement=0;
354  double startPhi=0;
355  /* calculate the displacement of the tubs w.r.t. to the trap,
356  determine the opening angle of the tubs */
357  double delta = sqrt(r*r-x*x);
358  if (r < 0 && abs(r) >= x) {
359  intersec = true; // intersection solid
360  h = pt.y1() < pt.y2() ? pt.y2() : pt.y1(); // tubs half height
361  h += h/20.; // enlarge a bit - for subtraction solid
362  if (atMinusZ) {
363  displacement = - pt.halfZ() - delta;
364  startPhi = 270.*deg - openingAngle/2.;
365  }
366  else {
367  displacement = pt.halfZ() + delta;
368  startPhi = 90.*deg - openingAngle/2.;
369  }
370  }
371  else if ( r > 0 && abs(r) >= x )
372  {
373  if (atMinusZ) {
374  displacement = - pt.halfZ() + delta;
375  startPhi = 90.*deg - openingAngle/2.;
376  h = pt.y1();
377  }
378  else {
379  displacement = pt.halfZ() - delta;
380  startPhi = 270.*deg - openingAngle/2.;
381  h = pt.y2();
382  }
383  }
384  else {
385  throw cms::Exception("DetectorDescriptionFault", "Check parameters of the PseudoTrap! name=" + pt.name().name());
386  }
387  G4ThreeVector displ(0.,0.,displacement); // displacement of the tubs w.r.t. trap
388  LogDebug("SimG4CoreGeometry") << "DDSolidConverter::pseudotrap(): displacement=" << displacement
389  << " openingAngle=" << openingAngle/deg << " x=" << x << " h=" << h;
390 
391  // Now create two solids (trd & tubs), and a boolean solid out of them
392  string name=pt.name().name();
393  trap = new G4Trd(name, pt.x1(), pt.x2(), pt.y1(), pt.y2(), pt.halfZ());
394  tubs = new G4Tubs(name,
395  0., // rMin
396  abs(r), // rMax
397  h, // half height
398  startPhi, // start angle
399  openingAngle);
400  if (intersec) {
401  result = new G4SubtractionSolid(name, trap, tubs, rot, displ);
402  }
403  else {
405  G4VSolid * tubicCap = new G4SubtractionSolid(name,
406  tubs,
407  new G4Box(name, 1.1*x, sqrt(r*r-x*x), 1.1*h),
408  0,
409  G4ThreeVector());
410  result = new G4UnionSolid(name, trap, tubicCap, rot, displ);
411 
412  // approximative implementation - also fails to visualize due to G4/Iguana limitations
413  /*
414  delete tubs;
415  tubs = new G4Tubs(name,
416  sqrt(r*r-x*x), // rMin-approximation!
417  abs(r), // rMax
418  h, // half height
419  startPhi, // start angle
420  openingAngle);
421  result = new G4UnionSolid(name, trap, tubs, rot, displ);
422  */
423  }
424  return result;
425 }
426 
427 
429 {
430  // truncated tube-section: a boolean subtraction solid:
431  // from a tube-section a box is subtracted according to the
432  // given parameters
433  LogDebug("SimG4CoreGeometry") << "MantisConverter: solidshape=" << DDSolidShapesName::name(s.shape()) << " " << s;
434  LogDebug("SimG4CoreGeometry") << "before";
435  DDTruncTubs tt(s);
436  LogDebug("SimG4CoreGeometry") << "after";
437  double rIn(tt.rIn()), rOut(tt.rOut()), zHalf(tt.zHalf()),
438  startPhi(tt.startPhi()), deltaPhi(tt.deltaPhi()),
439  cutAtStart(tt.cutAtStart()), cutAtDelta(tt.cutAtDelta());
440  bool cutInside(bool(tt.cutInside()));
441  string name=tt.name().name();
442 
443  // check the parameters
444  if (rIn <= 0 || rOut <=0 || cutAtStart <=0 || cutAtDelta <= 0) {
445  throw cms::Exception("DetectorDescriptionFault", "TruncTubs " + string(tt.name().fullname()) + ": 0 <= rIn,cutAtStart,rOut,cutAtDelta,rOut violated!");
446  }
447  if (rIn >= rOut) {
448  throw cms::Exception("DetectorDescriptionFault", "TruncTubs " + string(tt.name().fullname()) + ": rIn<rOut violated!");
449  }
450  if (startPhi != 0.) {
451  throw cms::Exception("DetectorDescriptionFault", "TruncTubs " + string(tt.name().fullname()) + ": startPhi != 0 not supported!");
452  }
453  // if (cutInside != false) {
454  // throw cms::Exception("DetectorDescriptionFault", "TruncTubs " + string(tt.name()) + " cutInside == true not supported!");
455  // }
456 
457  startPhi=0.;
458  double r(cutAtStart), R(cutAtDelta);
459  G4VSolid * result(0);
460  G4VSolid * tubs = new G4Tubs(name,rIn,rOut,zHalf,startPhi,deltaPhi);
461  LogDebug("SimG4CoreGeometry") << "G4Tubs: " << rIn << ' ' << rOut << ' ' << zHalf << ' ' << startPhi/deg << ' ' << deltaPhi/deg;
462  LogDebug("SimG4CoreGeometry") << s;
463  // length & hight of the box
464  double boxX(30.*rOut), boxY(20.*rOut); // exaggerate dimensions - does not matter, it's subtracted!
465 
466  // width of the box > width of the tubs
467  double boxZ(1.1*zHalf);
468 
469  // angle of the box w.r.t. tubs
470  double cath = r-R*cos(deltaPhi);
471  double hypo = sqrt(r*r+R*R-2.*r*R*cos(deltaPhi));
472  double cos_alpha = cath/hypo;
473 
474  double alpha = -acos(cos_alpha);
475  LogDebug("SimG4CoreGeometry") << "cath=" << cath/m;
476  LogDebug("SimG4CoreGeometry") << "hypo=" << hypo/m;
477  LogDebug("SimG4CoreGeometry") << "al=" << acos(cath/hypo)/deg;
478  LogDebug("SimG4CoreGeometry") << "deltaPhi=" << deltaPhi/deg << "\n"
479  << "r=" << r/m << "\n"
480  << "R=" << R/m;
481 
482  LogDebug("SimG4CoreGeometry") << "alpha=" << alpha/deg;
483 
484  // rotationmatrix of box w.r.t. tubs
485  G4RotationMatrix * rot = new G4RotationMatrix;
486  rot->rotateZ(-alpha);
487  LogDebug("SimG4CoreGeometry") << (*rot);
488 
489  // center point of the box
490  double xBox;
491  if (!cutInside) {
492  xBox = r+boxY/sin(abs(alpha));
493  } else {
494  xBox = -(boxY/sin(abs(alpha))-r);
495  }
496 
497  G4ThreeVector trans(xBox,0.,0.);
498  LogDebug("SimG4CoreGeometry") << "trans=" << trans;
499 
500  G4VSolid * box = new G4Box(name,boxX,boxY,boxZ);
501  result = new G4SubtractionSolid(name,tubs,box,rot,trans);
502 
503  return result;
504 
505 }
506 
507 #include "G4Sphere.hh"
509 {
510  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: sphere = " << s ;
511  DDSphere sp(s);
512  return new G4Sphere(s.name().name(), sp.innerRadius(),
513  sp.outerRadius(),
514  sp.startPhi(),
515  sp.deltaPhi(),
516  sp.startTheta(),
517  sp.deltaTheta());
518 }
519 
520 #include "G4Orb.hh"
521 G4VSolid * DDG4SolidConverter::orb(const DDSolid & s)
522 {
523  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: orb = " << s ;
524  DDOrb sp(s);
525  return new G4Orb(s.name().name(), sp.radius());
526 }
527 
528 #include "G4EllipticalTube.hh"
530 {
531  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: ellipticaltube = " << s ;
532  DDEllipticalTube sp(s);
533  return new G4EllipticalTube(s.name().name(),
534  sp.xSemiAxis(),
535  sp.ySemiAxis(),
536  sp.zHeight());
537 }
538 
539 #include "G4Ellipsoid.hh"
541 {
542  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: ellipsoid = " << s ;
543  DDEllipsoid sp(s);
544  return new G4Ellipsoid(s.name().name(),
545  sp.xSemiAxis(),
546  sp.ySemiAxis(),
547  sp.zSemiAxis(),
548  sp.zBottomCut(),
549  sp.zTopCut());
550 }
551 
552 #include "G4Para.hh"
553 G4VSolid * DDG4SolidConverter::para(const DDSolid & s)
554 {
555  LogDebug("SimG4CoreGeometry") << "DDG4SolidConverter: parallelepiped = " << s ;
556  DDParallelepiped sp(s);
557  return new G4Para(s.name().name(),
558  sp.xHalf(),
559  sp.yHalf(),
560  sp.zHalf(),
561  sp.alpha(),
562  sp.theta(),
563  sp.phi());
564 }
565 
#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:82
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 &)
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
#define abs(x)
Definition: mlp_lapack.h:159
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
float float float z
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
double outerRadius(void) const
Definition: DDSolid.cc:568
DDSolid unreflected(void) const
Definition: DDSolid.cc:272
static G4VSolid * reflected(const DDSolid &)
DDRotation rotation(void) const
Definition: DDSolid.cc:535
bool firstTime
Definition: QTestHandle.cc:18
static const char * name(DDSolidShape s)
Definition: DDSolidShapes.h:21
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:48
double xSemiAxis(void) const
Definition: DDSolid.cc:602
tuple result
Definition: query.py:137
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
const std::string fullname() const
Definition: DDName.h:56
double startPhi(void) const
Definition: DDSolid.cc:570
double alpha(void) const
Definition: DDSolid.cc:646
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:144
double deltaTheta(void) const
Definition: DDSolid.cc:576
static G4VSolid * pseudotrap(const DDSolid &)
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:86
static G4VSolid * ellipticaltube(const DDSolid &)
static G4VSolid * polycone_rz(const DDSolid &)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
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: DDAxes.h:10
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