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