DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Shapes.cpp
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation for LCD
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 
14 #define _USE_MATH_DEFINES
15 
16 // Framework include files
17 #include "DD4hep/LCDD.h"
18 #include "DD4hep/MatrixHelpers.h"
19 #include "DD4hep/DD4hepUnits.h"
20 
21 // C/C++ include files
22 #include <stdexcept>
23 
24 // ROOT includes
25 #include "TClass.h"
26 #include "TGeoShape.h"
27 #include "TGeoHype.h"
28 #include "TGeoPcon.h"
29 #include "TGeoPgon.h"
30 #include "TGeoTube.h"
31 #include "TGeoEltu.h"
32 #include "TGeoTrd1.h"
33 #include "TGeoTrd2.h"
34 #include "TGeoArb8.h"
35 #include "TGeoCone.h"
36 #include "TGeoParaboloid.h"
37 #include "TGeoSphere.h"
38 #include "TGeoTorus.h"
39 #include "TGeoMatrix.h"
40 #include "TGeoHalfSpace.h"
41 #include "TGeoBoolNode.h"
42 #include "TGeoCompositeShape.h"
43 
44 using namespace std;
45 using namespace DD4hep::Geometry;
46 
48 std::string DD4hep::Geometry::toStringSolid(const TGeoShape* shape, int precision) {
49  stringstream log;
50 
51  if ( !shape ) {
52  return "[Invalid shape]";
53  }
54 
55  TClass* cl = shape->IsA();
56  int prec = log.precision();
57  log.setf(ios::fixed,ios::floatfield);
58  log << setprecision(precision);
59  log << cl->GetName();
60  if ( cl == TGeoBBox::Class() ) {
61  TGeoBBox* s = (TGeoBBox*) shape;
62  log << " x:" << s->GetDX()
63  << " y:" << s->GetDY()
64  << " z:" << s->GetDZ();
65  }
66  else if (cl == TGeoHalfSpace::Class()) {
67  TGeoHalfSpace* s = (TGeoHalfSpace*)(const_cast<TGeoShape*>(shape));
68  log << " Point: (" << s->GetPoint()[0] << ", " << s->GetPoint()[1] << ", " << s->GetPoint()[2] << ") "
69  << " Normal: (" << s->GetNorm()[0] << ", " << s->GetNorm()[1] << ", " << s->GetNorm()[2] << ") ";
70  }
71  else if (cl == TGeoTube::Class()) {
72  const TGeoTube* s = (const TGeoTube*) shape;
73  log << " rmin:" << s->GetRmin() << " rmax:" << s->GetRmax() << " dz:" << s->GetDz();
74  }
75  else if (cl == TGeoTubeSeg::Class()) {
76  const TGeoTubeSeg* s = (const TGeoTubeSeg*) shape;
77  log << " rmin:" << s->GetRmin() << " rmax:" << s->GetRmax() << " dz:" << s->GetDz()
78  << " Phi1:" << s->GetPhi1() << " Phi2:" << s->GetPhi2();
79  }
80  else if (cl == TGeoTrd1::Class()) {
81  const TGeoTrd1* s = (const TGeoTrd1*) shape;
82  log << " x1:" << s->GetDx1() << " x2:" << s->GetDx2() << " y:" << s->GetDy() << " z:" << s->GetDz();
83  }
84  else if (cl == TGeoTrd2::Class()) {
85  const TGeoTrd2* s = (const TGeoTrd2*) shape;
86  log << " x1:" << s->GetDx1() << " x2:" << s->GetDx2()
87  << " y1:" << s->GetDy1() << " y2:" << s->GetDy2() << " z:" << s->GetDz();
88  }
89  else if (cl == TGeoHype::Class()) {
90  const TGeoHype* s = (const TGeoHype*) shape;
91  log << " rmin:" << s->GetRmin() << " rmax:" << s->GetRmax() << " dz:" << s->GetDz()
92  << " StIn:" << s->GetStIn() << " StOut:" << s->GetStOut();
93  }
94  else if (cl == TGeoPgon::Class()) {
95  const TGeoPgon* s = (const TGeoPgon*) shape;
96  log << " Phi1:" << s->GetPhi1() << " dPhi:" << s->GetDphi()
97  << " NEdges:" << s->GetNedges() << " Nz:" << s->GetNz();
98  for(int i=0, n=s->GetNz(); i<n; ++i) {
99  log << " i=" << i << " z:" << s->GetZ(i)
100  << " r:[" << s->GetRmin(i) << "," << s->GetRmax(i) << "]";
101  }
102  }
103  else if (cl == TGeoPcon::Class()) {
104  const TGeoPcon* s = (const TGeoPcon*) shape;
105  log << " Phi1:" << s->GetPhi1() << " dPhi:" << s->GetDphi() << " Nz:" << s->GetNz();
106  for(int i=0, n=s->GetNz(); i<n; ++i) {
107  log << " i=" << i << " z:" << s->GetZ(i)
108  << " r:[" << s->GetRmin(i) << "," << s->GetRmax(i) << "]";
109  }
110  }
111  else if (cl == TGeoConeSeg::Class()) {
112  const TGeoConeSeg* s = (const TGeoConeSeg*) shape;
113  log << " rmin1:" << s->GetRmin1() << " rmax1:" << s->GetRmax1()
114  << " rmin2:" << s->GetRmin2() << " rmax2:" << s->GetRmax2()
115  << " dz:" << s->GetDz()
116  << " Phi1:" << s->GetPhi1() << " Phi2:" << s->GetPhi2();
117  }
118  else if (cl == TGeoParaboloid::Class()) {
119  const TGeoParaboloid* s = (const TGeoParaboloid*) shape;
120  log << " dz:" << s->GetDz() << " RLo:" << s->GetRlo() << " Rhi:" << s->GetRhi();
121  }
122  else if (cl == TGeoSphere::Class()) {
123  const TGeoSphere* s = (const TGeoSphere*) shape;
124  log << " rmin:" << s->GetRmin() << " rmax:" << s->GetRmax()
125  << " Phi1:" << s->GetPhi1() << " Phi2:" << s->GetPhi2()
126  << " Theta1:" << s->GetTheta1() << " Theta2:" << s->GetTheta2();
127  }
128  else if (cl == TGeoTorus::Class()) {
129  const TGeoTorus* s = (const TGeoTorus*) shape;
130  log << " rmin:" << s->GetRmin() << " rmax:" << s->GetRmax() << " r:" << s->GetR()
131  << " Phi1:" << s->GetPhi1() << " dPhi:" << s->GetDphi();
132  }
133  else if (cl == TGeoTrap::Class()) {
134  const TGeoTrap* s = (const TGeoTrap*) shape;
135  log << " dz:" << s->GetDz() << " Theta:" << s->GetTheta() << " Phi:" << s->GetPhi()
136  << " H1:" << s->GetH1() << " Bl1:" << s->GetBl1() << " Tl1:" << s->GetTl1() << " Alpha1:" << s->GetAlpha1()
137  << " H2:" << s->GetH2() << " Bl2:" << s->GetBl2() << " Tl2:" << s->GetTl2() << " Alpha2:" << s->GetAlpha2();
138  }
139  else if (shape->IsA() == TGeoCompositeShape::Class()) {
140  const TGeoCompositeShape* s = (const TGeoCompositeShape*) shape;
141  const TGeoBoolNode* boolean = s->GetBoolNode();
142  const TGeoShape* left = boolean->GetLeftShape();
143  const TGeoShape* right = boolean->GetRightShape();
144  TGeoBoolNode::EGeoBoolType oper = boolean->GetBooleanOperator();
145  if (oper == TGeoBoolNode::kGeoSubtraction)
146  log << "Subtraction: ";
147  else if (oper == TGeoBoolNode::kGeoUnion)
148  log << "Union: ";
149  else if (oper == TGeoBoolNode::kGeoIntersection)
150  log << "Intersection: ";
151  log << " Left:" << toStringSolid(left) << " Right:" << toStringSolid(right);
152  }
153  log << setprecision(prec);
154  return log.str();
155 }
156 
157 template <typename T> void Solid_type<T>::_setDimensions(double* param) {
158  this->ptr()->SetDimensions(param);
159  this->ptr()->ComputeBBox();
160 }
161 
163 template <typename T>
164 void Solid_type<T>::_assign(T* n, const string& nam, const string& tit, bool cbbox) {
165  this->assign(n, nam, tit);
166  if (cbbox)
167  n->ComputeBBox();
168 }
169 
171 template <typename T> const char* Solid_type<T>::name() const {
172  return this->ptr()->GetName();
173 }
174 
176 template <typename T> const char* Solid_type<T>::type() const {
177  if ( this->ptr() ) {
178  return this->ptr()->IsA()->GetName();
179  }
180  return "";
181 }
182 
183 void Box::make(double x_val, double y_val, double z_val) {
184  _assign(new TGeoBBox(x_val, y_val, z_val), "", "box", true);
185 }
186 
188 Box& Box::setDimensions(double x_val, double y_val, double z_val) {
189  double params[] = { x_val, y_val, z_val};
190  _setDimensions(params);
191  return *this;
192 }
193 
195 double Box::x() const {
196  return this->ptr()->GetDX();
197 }
198 
200 double Box::y() const {
201  return this->ptr()->GetDY();
202 }
203 
205 double Box::z() const {
206  return this->ptr()->GetDZ();
207 }
208 
210 void HalfSpace::make(const double* const point, const double* const normal) {
211  _assign(new TGeoHalfSpace("",(Double_t*)point, (Double_t*)normal), "", "halfspace",true);
212 }
213 
215 Polycone::Polycone(double start, double delta) {
216  _assign(new TGeoPcon(start/dd4hep::deg, delta/dd4hep::deg, 0), "", "polycone", false);
217 }
218 
220 Polycone::Polycone(double start, double delta, const vector<double>& rmin, const vector<double>& rmax,
221  const vector<double>& z) {
222  vector<double> params;
223  if (rmin.size() < 2) {
224  throw runtime_error("DD4hep: PolyCone::addZPlanes> Not enough Z planes. minimum is 2!");
225  }
226  params.push_back(start/dd4hep::deg);
227  params.push_back(delta/dd4hep::deg);
228  params.push_back(rmin.size());
229  for (size_t i = 0; i < rmin.size(); ++i) {
230  params.push_back(z[i] );
231  params.push_back(rmin[i] );
232  params.push_back(rmax[i] );
233  }
234  _assign(new TGeoPcon(&params[0]), "", "polycone", true);
235 }
236 
238 void Polycone::addZPlanes(const vector<double>& rmin, const vector<double>& rmax, const vector<double>& z) {
239  TGeoPcon* s = *this;
240  vector<double> params;
241  size_t num = s->GetNz();
242  if (rmin.size() < 2) {
243  throw runtime_error("DD4hep: PolyCone::addZPlanes> Not enough Z planes. minimum is 2!");
244  }
245  params.push_back(s->GetPhi1());
246  params.push_back(s->GetDphi());
247  params.push_back(num + rmin.size());
248  for (size_t i = 0; i < num; ++i) {
249  params.push_back(s->GetZ(i));
250  params.push_back(s->GetRmin(i));
251  params.push_back(s->GetRmax(i));
252  }
253  for (size_t i = 0; i < rmin.size(); ++i) {
254  params.push_back(z[i] );
255  params.push_back(rmin[i] );
256  params.push_back(rmax[i] );
257  }
258  _setDimensions(&params[0]);
259 }
260 
262 ConeSegment::ConeSegment(double dz,
263  double rmin1, double rmax1,
264  double rmin2, double rmax2,
265  double phi1, double phi2) {
266  _assign(new TGeoConeSeg(dz, rmin1, rmax1, rmin2, rmax2, phi1/dd4hep::deg, phi2/dd4hep::deg), "", "cone_segment", true);
267 }
268 
270 ConeSegment& ConeSegment::setDimensions(double dz,
271  double rmin1, double rmax1,
272  double rmin2, double rmax2,
273  double phi1, double phi2) {
274  double params[] = { dz, rmin1, rmax1, rmin2, rmax2, phi1/dd4hep::deg, phi2/dd4hep::deg };
275  _setDimensions(params);
276  return *this;
277 }
278 
280 void Tube::make(const string& nam, double rmin, double rmax, double z, double startPhi, double deltaPhi) {
281  //_assign(new TGeoTubeSeg(rmin,rmax,z,startPhi/dd4hep::deg,deltaPhi/dd4hep::deg),name,"tube",true);
282  _assign(new MyConeSeg(), nam, "tube", true);
283  setDimensions(rmin, rmax, z, startPhi, deltaPhi);
284 }
285 
287 Tube& Tube::setDimensions(double rmin, double rmax, double z, double startPhi, double deltaPhi) {
288  //double params[] = {rmin,rmax,z,startPhi,deltaPhi};
289  double params[] = { z, rmin, rmax, rmin, rmax, startPhi/dd4hep::deg,deltaPhi/dd4hep::deg };
290  _setDimensions(params);
291  return *this;
292 }
293 
295 void EllipticalTube::make(double a, double b, double dz) {
296  _assign(new TGeoEltu(), "", "elliptic_tube", true);
297  setDimensions(a, b, dz);
298 }
299 
301 EllipticalTube& EllipticalTube::setDimensions(double a, double b, double dz) {
302  double params[] = { a, b, dz };
303  _setDimensions(params);
304  return *this;
305 }
306 
308 void Cone::make(double z, double rmin1, double rmax1, double rmin2, double rmax2) {
309  _assign(new TGeoCone(z, rmin1, rmax1, rmin2, rmax2 ), "", "cone", true);
310 }
311 
312 Cone& Cone::setDimensions(double z, double rmin1, double rmax1, double rmin2, double rmax2) {
313  double params[] = { z, rmin1, rmax1, rmin2, rmax2 };
314  _setDimensions(params);
315  return *this;
316 }
317 
319 Trapezoid::Trapezoid(double x1, double x2, double y1, double y2, double z) {
320  make(x1,x2,y1,y2,z);
321 }
322 
324 void Trapezoid::make(double x1, double x2, double y1, double y2, double z) {
325  _assign(new TGeoTrd2(x1, x2, y1, y2, z ), "", "trd2", true);
326 }
327 
329 Trapezoid& Trapezoid::setDimensions(double x1, double x2, double y1, double y2, double z) {
330  double params[] = { x1, x2, y1, y2, z };
331  _setDimensions(params);
332  return *this;
333 }
334 
336 Paraboloid::Paraboloid(double r_low, double r_high, double delta_z) {
337  _assign(new TGeoParaboloid(r_low, r_high, delta_z ), "", "paraboloid", true);
338 }
339 
341 Paraboloid& Paraboloid::setDimensions(double r_low, double r_high, double delta_z) {
342  double params[] = { r_low, r_high, delta_z };
343  _setDimensions(params);
344  return *this;
345 }
346 
348 Hyperboloid::Hyperboloid(double rin, double stin, double rout, double stout, double dz) {
349  _assign(new TGeoHype(rin, stin/dd4hep::deg, rout, stout/dd4hep::deg, dz), "", "hyperboloid", true);
350 }
351 
353 Hyperboloid& Hyperboloid::setDimensions(double rin, double stin, double rout, double stout, double dz) {
354  double params[] = { rin, stin/dd4hep::deg, rout, stout/dd4hep::deg, dz};
355  _setDimensions(params);
356  return *this;
357 }
358 
360 Sphere::Sphere(double rmin, double rmax, double theta, double delta_theta, double phi, double delta_phi) {
361  _assign(new TGeoSphere(rmin, rmax, theta/dd4hep::deg, delta_theta/dd4hep::deg, phi/dd4hep::deg, delta_phi/dd4hep::deg), "", "sphere", true);
362 }
363 
365 Sphere& Sphere::setDimensions(double rmin, double rmax, double theta, double delta_theta, double phi, double delta_phi) {
366  double params[] = { rmin, rmax, theta, delta_theta/dd4hep::deg, phi/dd4hep::deg, delta_phi/dd4hep::deg };
367  _setDimensions(params);
368  return *this;
369 }
370 
372 void Torus::make(double r, double rmin, double rmax, double phi, double delta_phi) {
373  _assign(new TGeoTorus(r, rmin, rmax, phi/dd4hep::deg, delta_phi/dd4hep::deg), "", "torus", true);
374 }
375 
377 Torus& Torus::setDimensions(double r, double rmin, double rmax, double phi, double delta_phi) {
378  double params[] = { r, rmin, rmax, phi/dd4hep::deg, delta_phi/dd4hep::deg };
379  _setDimensions(params);
380  return *this;
381 }
382 
384 Trap::Trap(double z, double theta, double phi, double y1, double x1, double x2, double alpha1, double y2, double x3, double x4,
385  double alpha2) {
386  _assign(new TGeoTrap(z, theta, phi, y1, x1, x2, alpha1/dd4hep::deg, y2, x3, x4, alpha2/dd4hep::deg), "", "trap", true);
387 }
388 
390 void Trap::make(double pz, double py, double px, double pLTX) {
391  double z = pz / 2e0;
392  double theta = 0e0;
393  double phi = 0e0;
394  double y1 = py / 2e0;
395  double x1 = px / 2e0;
396  double x2 = pLTX / 2e0;
397  double alpha1 = (pLTX - px) / py;
398  _assign(new TGeoTrap(z, theta, phi, y1, x1, x2, alpha1/dd4hep::deg, y1, x1, x2, alpha1/dd4hep::deg), "", "trap", true);
399 }
400 
402 Trap& Trap::setDimensions(double z, double theta, double phi, double y1, double x1, double x2, double alpha1, double y2,
403  double x3, double x4, double alpha2) {
404  double params[] = { z, theta, phi, y1, x1, x2, alpha1/dd4hep::deg, y2, x3, x4, alpha2/dd4hep::deg };
405  _setDimensions(params);
406  return *this;
407 }
408 
410 void PolyhedraRegular::_create(int nsides, double rmin, double rmax, double zpos, double zneg, double start, double delta) {
411  if (rmin < 0e0 || rmin > rmax)
412  throw runtime_error("DD4hep: PolyhedraRegular: Illegal argument rmin:<" + _toString(rmin) + "> is invalid!");
413  else if (rmax < 0e0)
414  throw runtime_error("DD4hep: PolyhedraRegular: Illegal argument rmax:<" + _toString(rmax) + "> is invalid!");
415  _assign(new TGeoPgon(), "", "polyhedra", false);
416  double params[] = { start, delta, double(nsides), 2e0, zpos, rmin, rmax, zneg, rmin, rmax };
417  _setDimensions(&params[0]);
418 }
419 
421 PolyhedraRegular::PolyhedraRegular(int nsides, double rmin, double rmax, double zlen) {
422  _create(nsides, rmin, rmax, zlen / 2, -zlen / 2, 0, 360.);
423 }
424 
426 PolyhedraRegular::PolyhedraRegular(int nsides, double phistart, double rmin, double rmax, double zlen) {
427  _create(nsides, rmin, rmax, zlen / 2, -zlen / 2, phistart/dd4hep::deg, 360.);
428 }
429 
431 PolyhedraRegular::PolyhedraRegular(int nsides, double rmin, double rmax, double zplanes[2]) {
432  _create(nsides, rmin, rmax, zplanes[0], zplanes[1], 0, 360.);
433 }
434 
436 void EightPointSolid::make(double dz, const double* vtx) {
437  _assign(new TGeoArb8(dz, (double*)vtx), "", "Arb8", true);
438 }
439 
441 SubtractionSolid::SubtractionSolid(const Solid& shape1, const Solid& shape2) {
442  TGeoSubtraction* sub = new TGeoSubtraction(shape1, shape2, identityTransform(), identityTransform());
443  _assign(new TGeoCompositeShape("", sub), "", "subtraction", true);
444 }
445 
447 SubtractionSolid::SubtractionSolid(const Solid& shape1, const Solid& shape2, const Transform3D& trans) {
448  TGeoSubtraction* sub = new TGeoSubtraction(shape1, shape2, identityTransform(), _transform(trans));
449  _assign(new TGeoCompositeShape("", sub), "", "subtraction", true);
450 }
451 
453 SubtractionSolid::SubtractionSolid(const Solid& shape1, const Solid& shape2, const Position& pos) {
454  TGeoSubtraction* sub = new TGeoSubtraction(shape1, shape2, identityTransform(), _translation(pos));
455  _assign(new TGeoCompositeShape("", sub), "", "subtraction", true);
456 }
457 
459 SubtractionSolid::SubtractionSolid(const Solid& shape1, const Solid& shape2, const RotationZYX& rot) {
460  TGeoSubtraction* sub = new TGeoSubtraction(shape1, shape2, identityTransform(), _rotationZYX(rot));
461  _assign(new TGeoCompositeShape("", sub), "", "subtraction", true);
462 }
463 
465 SubtractionSolid::SubtractionSolid(const Solid& shape1, const Solid& shape2, const Rotation3D& rot) {
466  TGeoSubtraction* sub = new TGeoSubtraction(shape1, shape2, identityTransform(), _rotation3D(rot));
467  _assign(new TGeoCompositeShape("", sub), "", "subtraction", true);
468 }
469 
471 UnionSolid::UnionSolid(const Solid& shape1, const Solid& shape2) {
472  TGeoUnion* uni = new TGeoUnion(shape1, shape2, identityTransform(), identityTransform());
473  _assign(new TGeoCompositeShape("", uni), "", "union", true);
474 }
475 
477 UnionSolid::UnionSolid(const Solid& shape1, const Solid& shape2, const Transform3D& trans) {
478  TGeoUnion* uni = new TGeoUnion(shape1, shape2, identityTransform(), _transform(trans));
479  _assign(new TGeoCompositeShape("", uni), "", "union", true);
480 }
481 
483 UnionSolid::UnionSolid(const Solid& shape1, const Solid& shape2, const Position& pos) {
484  TGeoUnion* uni = new TGeoUnion(shape1, shape2, identityTransform(), _translation(pos));
485  _assign(new TGeoCompositeShape("", uni), "", "union", true);
486 }
487 
489 UnionSolid::UnionSolid(const Solid& shape1, const Solid& shape2, const RotationZYX& rot) {
490  TGeoUnion *uni = new TGeoUnion(shape1, shape2, identityTransform(), _rotationZYX(rot));
491  _assign(new TGeoCompositeShape("", uni), "", "union", true);
492 }
493 
495 UnionSolid::UnionSolid(const Solid& shape1, const Solid& shape2, const Rotation3D& rot) {
496  TGeoUnion *uni = new TGeoUnion(shape1, shape2, identityTransform(), _rotation3D(rot));
497  _assign(new TGeoCompositeShape("", uni), "", "union", true);
498 }
499 
501 IntersectionSolid::IntersectionSolid(const Solid& shape1, const Solid& shape2) {
502  TGeoIntersection* inter = new TGeoIntersection(shape1, shape2, identityTransform(), identityTransform());
503  _assign(new TGeoCompositeShape("", inter), "", "intersection", true);
504 }
505 
507 IntersectionSolid::IntersectionSolid(const Solid& shape1, const Solid& shape2, const Transform3D& trans) {
508  TGeoIntersection* inter = new TGeoIntersection(shape1, shape2, identityTransform(), _transform(trans));
509  _assign(new TGeoCompositeShape("", inter), "", "intersection", true);
510 }
511 
513 IntersectionSolid::IntersectionSolid(const Solid& shape1, const Solid& shape2, const Position& pos) {
514  TGeoIntersection* inter = new TGeoIntersection(shape1, shape2, identityTransform(), _translation(pos));
515  _assign(new TGeoCompositeShape("", inter), "", "intersection", true);
516 }
517 
519 IntersectionSolid::IntersectionSolid(const Solid& shape1, const Solid& shape2, const RotationZYX& rot) {
520  TGeoIntersection* inter = new TGeoIntersection(shape1, shape2, identityTransform(), _rotationZYX(rot));
521  _assign(new TGeoCompositeShape("", inter), "", "intersection", true);
522 }
523 
525 IntersectionSolid::IntersectionSolid(const Solid& shape1, const Solid& shape2, const Rotation3D& rot) {
526  TGeoIntersection* inter = new TGeoIntersection(shape1, shape2, identityTransform(), _rotation3D(rot));
527  _assign(new TGeoCompositeShape("", inter), "", "intersection", true);
528 }
529 
530 #define INSTANTIATE(X) template class DD4hep::Geometry::Solid_type<X>
531 
532 INSTANTIATE(TGeoShape);
533 INSTANTIATE(TGeoBBox);
534 INSTANTIATE(TGeoHalfSpace);
535 INSTANTIATE(TGeoCone);
537 INSTANTIATE(TGeoParaboloid);
538 INSTANTIATE(TGeoPcon);
539 INSTANTIATE(TGeoPgon);
540 INSTANTIATE(TGeoSphere);
541 INSTANTIATE(TGeoTorus);
542 INSTANTIATE(TGeoTube);
543 INSTANTIATE(TGeoTubeSeg);
544 INSTANTIATE(TGeoEltu);
545 INSTANTIATE(TGeoHype);
546 INSTANTIATE(TGeoTrap);
547 INSTANTIATE(TGeoTrd1);
548 INSTANTIATE(TGeoTrd2);
549 INSTANTIATE(TGeoCompositeShape);
Class of the ROOT toolkit. See http://root.cern.ch/root/htmldoc/ClassIndex.html.
Definition: ROOTClasses.h:14
#define INSTANTIATE(X)
Definition: Shapes.cpp:530
Class describing a Torus shape.
Definition: Shapes.h:472
Class describing a Hyperboloid shape.
Definition: Shapes.h:564
TGeoTranslation * _translation(const Geometry::Position &pos)
Convert a Position object to a TGeoTranslation
Class describing a cone segment shape.
Definition: Shapes.h:236
static const double deg
Definition: DD4hepUnits.h:106
Class describing a elliptical tube shape of a section of a tube.
Definition: Shapes.h:328
TGeoRotation * _rotationZYX(const Geometry::RotationZYX &rot)
Convert a RotationZYX object to a TGeoRotation
TGeoShape * s
Definition: Volumes.cpp:294
Class describing a box shape.
Definition: Shapes.h:120
Class describing a trap shape.
Definition: Shapes.h:397
ROOT::Math::RotationZYX RotationZYX
Definition: Objects.h:98
TGeoIdentity * identityTransform()
Access the TGeo identity transformation
ROOT::Math::Rotation3D Rotation3D
Definition: Objects.h:106
Class describing a Paraboloid shape.
Definition: Shapes.h:536
TGeoRotation * _rotation3D(const Geometry::Rotation3D &rot)
Convert a Rotation3D object to a TGeoRotation
Base class for Solid (shape) objects.
Definition: Shapes.h:69
TGeoHMatrix * _transform(const Geometry::Transform3D &trans)
Convert a Transform3D object to a TGeoHMatrix
ROOT::Math::XYZVector Position
Definition: Objects.h:75
Intermediate class to overcome drawing probles with the TGeoTubeSeg.
Definition: Shapes.h:257
Class describing a sphere shape.
Definition: Shapes.h:508
Class describing a cone shape.
Definition: Shapes.h:363
std::string toStringSolid(const TGeoShape *shape, int precision=2)
Pretty print of solid attributes.
Definition: Shapes.cpp:48
ROOT::Math::Transform3D Transform3D
Definition: Objects.h:110
Class describing a Trapezoid shape.
Definition: Shapes.h:437
static void * _create(const char *)
static std::string _toString(const DD4hep::XML::XmlChar *value)
std::string conversion of XML strings (e.g. Unicode for Xerces-C)
Class describing a tube shape of a section of a tube.
Definition: Shapes.h:277