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