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