DD4hep  1.31.0
Detector Description Toolkit for High Energy Physics
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Shapes.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
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 #ifndef DD4HEP_SHAPES_H
15 #define DD4HEP_SHAPES_H
16 
17 // Framework include files
18 #include <DD4hep/Handle.h>
19 #include <DD4hep/Objects.h>
20 #include <DD4hep/DD4hepUnits.h>
21 
22 // C/C++ include files
23 #include <vector>
24 #include <string>
25 
26 #ifdef __GNUC__
27 #pragma GCC diagnostic push
28 #pragma GCC diagnostic ignored "-Wdeprecated" // Code that causes warning goes here
29 #endif
30 
31 // ROOT include files
32 #include <TGeoCone.h>
33 #include <TGeoPgon.h>
34 #include <TGeoPcon.h>
35 #include <TGeoArb8.h>
36 #include <TGeoTrd1.h>
37 #include <TGeoTrd2.h>
38 #include <TGeoTube.h>
39 #include <TGeoEltu.h>
40 #include <TGeoXtru.h>
41 #include <TGeoHype.h>
42 #include <TGeoTorus.h>
43 #include <TGeoSphere.h>
44 #include <TGeoHalfSpace.h>
45 #include <TGeoParaboloid.h>
46 #include <TGeoScaledShape.h>
47 #include <TGeoCompositeShape.h>
48 #include <TGeoShapeAssembly.h>
49 #include <TGeoPara.h>
50 #include <TGeoTessellated.h>
51 
52 #ifdef __GNUC__
53 #pragma GCC diagnostic pop
54 #endif
55 
57 namespace dd4hep {
58 
59  class Volume;
60 
62  std::string toStringSolid(const TGeoShape* shape, int precision=2);
64 
66  std::string toStringMesh(const TGeoShape* shape, int precision=2);
67 
69  std::string get_shape_tag(const TGeoShape* shape);
70 
72  std::vector<double> get_shape_dimensions(TGeoShape* shape);
73 
75  void set_shape_dimensions(TGeoShape* shape, const std::vector<double>& params);
76 
78  template <typename SOLID> bool isInstance(const Handle<TGeoShape>& solid);
80  template <typename SOLID> bool isA(const Handle<TGeoShape>& solid);
82  template <typename SOLID> std::vector<double> dimensions(const Handle<TGeoShape>& solid);
84  template <typename SOLID> void set_dimensions(SOLID solid, const std::vector<double>& params);
85 
86  namespace detail {
87  inline std::vector<double> _make_vector(const double* values, size_t length) {
88  return {values, values+length};
89  }
90  template <typename SOLID> std::vector<double> _extract_vector(const SOLID* solid,
91  double (SOLID::*extract)(Int_t) const,
92  Int_t (SOLID::*len)() const) {
93  std::vector<double> result;
94  Int_t count = (solid->*len)();
95  for(Int_t i=0; i<count; ++i) result.emplace_back((solid->*extract)(i));
96  return result;
97  }
98  template <typename SOLID> std::vector<double> zPlaneZ(const SOLID* solid) {
99  const auto* shape = solid->access();
100  return _make_vector(shape->GetZ(), shape->GetNz());
101  }
102  template <typename SOLID> std::vector<double> zPlaneRmin(const SOLID* solid) {
103  const auto* shape = solid->access();
104  return _make_vector(shape->GetRmin(), shape->GetNz());
105  }
106  template <typename SOLID> std::vector<double> zPlaneRmax(const SOLID* solid) {
107  const auto* shape = solid->access();
108  return _make_vector(shape->GetRmax(), shape->GetNz());
109  }
110 
111  }
112 
114 
136  template <typename T> class Solid_type: public Handle<T> {
137  public:
138  template <typename Q> friend void set_dimensions(Q ptr, const std::vector<double>& params);
139 
140  protected:
141  void _setDimensions(double* param) const;
143  void _assign(T* n, const std::string& nam, const std::string& tit, bool cbbox);
144 
145  public:
146 
148  Solid_type() = default;
150  Solid_type(Solid_type&& e) = default;
152  Solid_type(const Solid_type& e) = default;
154  Solid_type(T* p) : Handle<T>(p) { }
156  Solid_type(Handle<T>&& e) : Handle<T>(std::move(e)) { }
158  Solid_type(const Handle<T>& e) : Handle<T>(e) { }
160  template <typename Q> Solid_type(const Handle<Q>& e) : Handle<T>(e) { }
164  Solid_type& operator=(const Solid_type& copy) = default;
165 
167  const char* name() const;
169  Solid_type<T>& setName(const char* value);
171  Solid_type<T>& setName(const std::string& value);
172 
174  const char* title() const;
175 
177  const char* type() const;
179  operator T*() const {
180  return this->m_element;
181  }
183  T* operator->() const {
184  return this->m_element;
185  }
187  std::vector<double> dimensions();
189  Solid_type& setDimensions(const std::vector<double>& params);
191  std::string toString(int precision=2) const {
192  return toStringSolid(this->m_element,precision);
193  }
195  TGeoVolume* divide(const Volume& voldiv, const std::string& divname,
196  int iaxis, int ndiv, double start, double step) const;
197  };
199 
201 
210  class ShapelessSolid: public Solid_type<TGeoShapeAssembly> {
211  public:
213  ShapelessSolid() = default;
217  ShapelessSolid(const ShapelessSolid& e) = default;
219  template <typename Q> ShapelessSolid(const Q* p) : Solid_type<TGeoShapeAssembly>(p) { }
221  template <typename Q> ShapelessSolid(const Handle<Q>& e) : Solid_type<TGeoShapeAssembly>(e) { }
223  ShapelessSolid(const std::string& name);
228  };
229 
231 
240  class Scale : public Solid_type<TGeoScaledShape> {
241  protected:
243  void make(const std::string& name, Solid base_solid, double x_scale, double y_scale, double z_scale);
244 
245  public:
247  Scale() = default;
249  Scale(Scale&& e) = default;
251  Scale(const Scale& e) = default;
253  template <typename Q> Scale(const Q* p) : Solid_type<TGeoScaledShape>(p) { }
255  template <typename Q> Scale(const Handle<Q>& e) : Solid_type<TGeoScaledShape>(e) { }
256 
258  Scale(Solid base_solid, double x_scale, double y_scale, double z_scale)
259  { make("", base_solid, x_scale, y_scale, z_scale); }
261  Scale(const std::string& nam, Solid base_solid, double x_scale, double y_scale, double z_scale)
262  { make(nam.c_str(), base_solid, x_scale, y_scale, z_scale); }
263 
265  template <typename X, typename Y, typename Z>
266  Scale(Solid base_solid, const X& x_scale, const Y& y_scale, const Z& z_scale)
267  { make("", base_solid, _toDouble(x_scale), _toDouble(y_scale), _toDouble(z_scale)); }
269  template <typename X, typename Y, typename Z>
270  Scale(const std::string& nam, Solid base_solid, const X& x_scale, const Y& y_scale, const Z& z_scale)
271  { make(nam.c_str(), base_solid, _toDouble(x_scale), _toDouble(y_scale), _toDouble(z_scale)); }
272 
274  Scale& operator=(Scale&& copy) = default;
276  Scale& operator=(const Scale& copy) = default;
278  double scale_x() const;
280  double scale_y() const;
282  double scale_z() const;
283  };
284 
286 
295  class Box : public Solid_type<TGeoBBox> {
296  protected:
298  void make(const std::string& name, double x_val, double y_val, double z_val);
299 
300  public:
302  Box() = default;
304  Box(Box&& e) = default;
306  Box(const Box& e) = default;
308  template <typename Q> Box(const Q* p) : Solid_type<TGeoBBox>(p) { }
310  template <typename Q> Box(const Handle<Q>& e) : Solid_type<TGeoBBox>(e) { }
311 
313  Box(double x_val, double y_val, double z_val)
314  { make("", x_val, y_val, z_val); }
316  Box(const std::string& nam, double x_val, double y_val, double z_val)
317  { make(nam.c_str(), x_val, y_val, z_val); }
318 
320  template <typename X, typename Y, typename Z>
321  Box(const X& x_val, const Y& y_val, const Z& z_val)
322  { make("", _toDouble(x_val), _toDouble(y_val), _toDouble(z_val)); }
324  template <typename X, typename Y, typename Z>
325  Box(const std::string& nam, const X& x_val, const Y& y_val, const Z& z_val)
326  { make(nam.c_str(), _toDouble(x_val), _toDouble(y_val), _toDouble(z_val)); }
327 
329  Box& operator=(Box&& copy) = default;
331  Box& operator=(const Box& copy) = default;
333  Box& setDimensions(double x_val, double y_val, double z_val);
335  double x() const;
337  double y() const;
339  double z() const;
340  };
341 
343 
352  class HalfSpace : public Solid_type<TGeoHalfSpace> {
353  protected:
355  void make(const std::string& name, const double* const point, const double* const normal);
356 
357  public:
359  HalfSpace() = default;
361  HalfSpace(HalfSpace&& e) = default;
363  HalfSpace(const HalfSpace& e) = default;
365  template <typename Q> HalfSpace(const Q* p) : Solid_type<Object>(p) { }
367  template <typename Q> HalfSpace(const Handle<Q>& e) : Solid_type<Object>(e) { }
368 
370  HalfSpace(const double* const point, const double* const normal)
371  { make("", point, normal); }
372 
374  HalfSpace(const std::string& nam, const double* const point, const double* const normal)
375  { make(nam.c_str(), point, normal); }
376 
380  HalfSpace& operator=(const HalfSpace& copy) = default;
381 
383  Position position() const {
384  const double* pos = access()->GetPoint();
385  return {pos[0], pos[1], pos[2]};
386  }
388  Direction normal() const {
389  const double* n = access()->GetNorm();
390  return {n[0], n[1], n[2]};
391  }
392  };
393 
395 
403  class Cone : public Solid_type<TGeoCone> {
404  protected:
406  void make(const std::string& name, double z, double rmin1, double rmax1, double rmin2, double rmax2);
407  public:
409  Cone() = default;
411  Cone(Cone&& e) = default;
413  Cone(const Cone& e) = default;
415  template <typename Q> Cone(const Q* p) : Solid_type<Object>(p) { }
417  template <typename Q> Cone(const Handle<Q>& e) : Solid_type<Object>(e) { }
418 
420  Cone(double z, double rmin1, double rmax1, double rmin2, double rmax2)
421  { this->make("", z, rmin1, rmax1, rmin2, rmax2); }
423  template <typename Z, typename RMIN1, typename RMAX1, typename RMIN2, typename RMAX2>
424  Cone(const Z& z, const RMIN1& rmin1, const RMAX1& rmax1, const RMIN2& rmin2, const RMAX2& rmax2)
425  { this->make("", _toDouble(z), _toDouble(rmin1), _toDouble(rmax1), _toDouble(rmin2), _toDouble(rmax2)); }
426 
428  Cone(const std::string& nam, double z, double rmin1, double rmax1, double rmin2, double rmax2)
429  { this->make(nam, z, rmin1, rmax1, rmin2, rmax2); }
431  template <typename Z, typename RMIN1, typename RMAX1, typename RMIN2, typename RMAX2>
432  Cone(const std::string& nam, const Z& z, const RMIN1& rmin1, const RMAX1& rmax1, const RMIN2& rmin2, const RMAX2& rmax2)
433  { this->make(nam, _toDouble(z), _toDouble(rmin1), _toDouble(rmax1), _toDouble(rmin2), _toDouble(rmax2)); }
434 
436  Cone& operator=(Cone&& copy) = default;
438  Cone& operator=(const Cone& copy) = default;
440  Cone& setDimensions(double z, double rmin1, double rmax1, double rmin2, double rmax2);
441 
443  double dZ() const { return access()->GetDz(); }
445  double rMin1() const { return access()->GetRmin1(); }
447  double rMin2() const { return access()->GetRmin2(); }
449  double rMax1() const { return access()->GetRmax1(); }
451  double rMax2() const { return access()->GetRmax2(); }
452  };
453 
455 
472  class Polycone : public Solid_type<TGeoPcon> {
473  public:
475  Polycone() = default;
477  Polycone(Polycone&& e) = default;
479  Polycone(const Polycone& e) = default;
481  template <typename Q> Polycone(const Q* p) : Solid_type<Object>(p) { }
483  template <typename Q> Polycone(const Handle<Q>& e) : Solid_type<Object>(e) { }
484 
486  Polycone(double startPhi, double deltaPhi);
488  Polycone(double startPhi, double deltaPhi,
489  const std::vector<double>& r, const std::vector<double>& z);
491  Polycone(double startPhi, double deltaPhi,
492  const std::vector<double>& rmin, const std::vector<double>& rmax, const std::vector<double>& z);
493 
495  Polycone(const std::string& name, double startPhi, double deltaPhi);
497  Polycone(const std::string& name, double startPhi, double deltaPhi,
498  const std::vector<double>& r, const std::vector<double>& z);
500  Polycone(const std::string& name, double startPhi, double deltaPhi,
501  const std::vector<double>& rmin, const std::vector<double>& rmax, const std::vector<double>& z);
502 
506  Polycone& operator=(const Polycone& copy) = default;
507 
509  void addZPlanes(const std::vector<double>& rmin, const std::vector<double>& rmax, const std::vector<double>& z);
510 
512  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
514  double deltaPhi() const { return access()->GetDphi()*dd4hep::deg; }
515 
517  double z(int which) const { return access()->GetZ(which); }
519  double rMin(int which) const { return access()->GetRmin(which); }
521  double rMax(int which) const { return access()->GetRmax(which); }
522 
524  std::vector<double> zPlaneZ() const { return detail::zPlaneZ(this); }
526  std::vector<double> zPlaneRmin() const { return detail::zPlaneRmin(this); }
528  std::vector<double> zPlaneRmax() const { return detail::zPlaneRmax(this); }
529  };
530 
532 
543  class ConeSegment : public Solid_type<TGeoConeSeg> {
544  void make(const std::string& name,
545  double dz,
546  double rmin1, double rmax1,
547  double rmin2, double rmax2,
548  double startPhi, double endPhi);
549  public:
551  ConeSegment() = default;
553  ConeSegment(ConeSegment&& e) = default;
555  ConeSegment(const ConeSegment& e) = default;
557  template <typename Q> ConeSegment(const Q* p) : Solid_type<Object>(p) { }
559  template <typename Q> ConeSegment(const Handle<Q>& e) : Solid_type<Object>(e) { }
560 
562  ConeSegment(double dz, double rmin1, double rmax1,
563  double rmin2, double rmax2, double startPhi = 0.0, double endPhi = 2.0 * M_PI)
564  { make("", dz, rmin1, rmax1, rmin2, rmax2, startPhi, endPhi); }
566  template <typename DZ,
567  typename RMIN1, typename RMAX1,
568  typename RMIN2, typename RMAX2,
569  typename STARTPHI, typename ENDPHI>
570  ConeSegment(DZ dz, RMIN1 rmin1, RMAX1 rmax1, RMIN2 rmin2, RMAX2 rmax2,
571  STARTPHI startPhi = 0.0, ENDPHI endPhi = 2.0 * M_PI)
572  { make("", _toDouble(dz),
573  _toDouble(rmin1), _toDouble(rmax1),
574  _toDouble(rmin2), _toDouble(rmax2),
577  ConeSegment(const std::string& nam, double dz, double rmin1, double rmax1,
578  double rmin2, double rmax2, double startPhi = 0.0, double endPhi = 2.0 * M_PI)
579  { make(nam, dz, rmin1, rmax1, rmin2, rmax2, startPhi, endPhi); }
581  template <typename DZ,
582  typename RMIN1, typename RMAX1,
583  typename RMIN2, typename RMAX2,
584  typename STARTPHI, typename ENDPHI>
585  ConeSegment(const std::string& nam, DZ dz, RMIN1 rmin1, RMAX1 rmax1, RMIN2 rmin2, RMAX2 rmax2,
586  STARTPHI startPhi = 0.0, ENDPHI endPhi = 2.0 * M_PI)
587  { make(nam, _toDouble(dz),
588  _toDouble(rmin1), _toDouble(rmax1),
589  _toDouble(rmin2), _toDouble(rmax2),
591 
595  ConeSegment& operator=(const ConeSegment& copy) = default;
597  ConeSegment& setDimensions(double dz, double rmin1, double rmax1,
598  double rmin2, double rmax2,
599  double startPhi = 0.0, double endPhi = 2.0 * M_PI);
600 
602  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
604  double endPhi() const { return access()->GetPhi2()*dd4hep::deg; }
606  double dZ() const { return access()->GetDz(); }
608  double rMin1() const { return access()->GetRmin1(); }
610  double rMin2() const { return access()->GetRmin2(); }
612  double rMax1() const { return access()->GetRmax1(); }
614  double rMax2() const { return access()->GetRmax2(); }
615  };
616 
618 
629  class Tube : public Solid_type<TGeoTubeSeg> {
630  protected:
632  void make(const std::string& nam, double rmin, double rmax, double z, double startPhi, double endPhi);
633 
634  public:
636  Tube() = default;
638  Tube(Tube&& e) = default;
640  Tube(const Tube& e) = default;
642  template <typename Q> Tube(const Q* p) : Solid_type<Object>(p) { }
644  template <typename Q> Tube(const Handle<Q>& e) : Solid_type<Object>(e) { }
645 
647  Tube(double rmin, double rmax, double dz)
648  { this->make("", rmin, rmax, dz, 0, 2*M_PI); }
650  template <typename RMIN, typename RMAX, typename DZ> Tube(RMIN rmin, RMAX rmax, DZ dz)
651  { this->make("", _toDouble(rmin), _toDouble(rmax), _toDouble(dz), 0, 2*M_PI); }
653  Tube(double rmin, double rmax, double dz, double endPhi)
654  { this->make("", rmin, rmax, dz, 0, endPhi); }
656  template <typename RMIN, typename RMAX, typename DZ, typename ENDPHI>
657  Tube(RMIN rmin, RMAX rmax, DZ dz, ENDPHI endPhi)
658  { this->make("", _toDouble(rmin), _toDouble(rmax), _toDouble(dz), 0, _toDouble(endPhi)); }
660  Tube(double rmin, double rmax, double dz, double startPhi, double endPhi)
661  { this->make("", rmin, rmax, dz, startPhi, endPhi); }
663  template <typename RMIN, typename RMAX, typename DZ, typename STARTPHI, typename ENDPHI>
664  Tube(RMIN rmin, RMAX rmax, DZ dz, STARTPHI startPhi, ENDPHI endPhi)
665  { this->make("", _toDouble(rmin), _toDouble(rmax), _toDouble(dz), _toDouble(startPhi), _toDouble(endPhi)); }
666 
668  Tube(const std::string& nam, double rmin, double rmax, double dz)
669  { this->make(nam, rmin, rmax, dz, 0, 2*M_PI); }
671  template <typename RMIN, typename RMAX, typename DZ>
672  Tube(const std::string& nam, RMIN rmin, RMAX rmax, DZ dz)
673  { this->make(nam, _toDouble(rmin), _toDouble(rmax), _toDouble(dz), 0, 2*M_PI); }
675  Tube(const std::string& nam, double rmin, double rmax, double dz, double endPhi)
676  { this->make(nam, rmin, rmax, dz, 0, endPhi); }
678  template <typename RMIN, typename RMAX, typename DZ, typename ENDPHI>
679  Tube(const std::string& nam, RMIN rmin, RMAX rmax, DZ dz, ENDPHI endPhi)
680  { this->make(nam, _toDouble(rmin), _toDouble(rmax), _toDouble(dz), 0, _toDouble(endPhi)); }
682  Tube(const std::string& nam, double rmin, double rmax, double dz, double startPhi, double endPhi)
683  { this->make(nam, rmin, rmax, dz, startPhi, endPhi); }
685  template <typename RMIN, typename RMAX, typename DZ, typename STARTPHI, typename ENDPHI>
686  Tube(const std::string& nam, RMIN rmin, RMAX rmax, DZ dz, STARTPHI startPhi, ENDPHI endPhi)
687  { this->make(nam, _toDouble(rmin), _toDouble(rmax), _toDouble(dz), _toDouble(startPhi), _toDouble(endPhi)); }
688 
690  Tube& operator=(Tube&& copy) = default;
692  Tube& operator=(const Tube& copy) = default;
694  Tube& setDimensions(double rmin, double rmax, double dz, double startPhi=0.0, double endPhi=2*M_PI);
695 
697  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
699  double endPhi() const { return access()->GetPhi2()*dd4hep::deg; }
701  double dZ() const { return access()->GetDz(); }
703  double rMin() const { return access()->GetRmin(); }
705  double rMax() const { return access()->GetRmax(); }
706  };
707 
709 
717  class CutTube : public Solid_type<TGeoCtub> {
718  protected:
720  void make(const std::string& name,
721  double rmin, double rmax, double dz, double startPhi, double endPhi,
722  double lx, double ly, double lz, double tx, double ty, double tz);
723 
724  public:
726  CutTube() = default;
728  CutTube(CutTube&& e) = default;
730  CutTube(const CutTube& e) = default;
732  template <typename Q> CutTube(const Q* p) : Solid_type<Object>(p) { }
734  template <typename Q> CutTube(const Handle<Q>& e) : Solid_type<Object>(e) { }
735 
737  CutTube(double rmin, double rmax, double dz, double startPhi, double endPhi,
738  double lx, double ly, double lz, double tx, double ty, double tz);
739 
741  CutTube(const std::string& name,
742  double rmin, double rmax, double dz, double startPhi, double endPhi,
743  double lx, double ly, double lz, double tx, double ty, double tz);
744 
746  CutTube& operator=(CutTube&& copy) = default;
748  CutTube& operator=(const CutTube& copy) = default;
749 
751  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
753  double endPhi() const { return access()->GetPhi2()*dd4hep::deg; }
755  double dZ() const { return access()->GetDz(); }
757  double rMin() const { return access()->GetRmin(); }
759  double rMax() const { return access()->GetRmax(); }
761  std::vector<double> lowNormal() const { return detail::_make_vector(access()->GetNlow(), 3); }
763  std::vector<double> highNormal() const { return detail::_make_vector(access()->GetNhigh(), 3); }
764  };
765 
766 
768 
780  class TruncatedTube : public Solid_type<TGeoCompositeShape> {
781  protected:
783  void make(const std::string& name,
784  double dz, double rmin, double rmax, double startPhi, double deltaPhi,
785  double cutAtStart, double cutAtDelta, bool cutInside);
786 
787  public:
789  TruncatedTube() = default;
791  TruncatedTube(TruncatedTube&& e) = default;
793  TruncatedTube(const TruncatedTube& e) = default;
795  template <typename Q> TruncatedTube(const Q* p) : Solid_type<Object>(p) { }
797  template <typename Q> TruncatedTube(const Handle<Q>& e) : Solid_type<Object>(e) { }
798 
800  TruncatedTube(double dz, double rmin, double rmax, double startPhi, double deltaPhi,
801  double cutAtStart, double cutAtDelta, bool cutInside);
802 
804  TruncatedTube(const std::string& name,
805  double dz, double rmin, double rmax, double startPhi, double deltaPhi,
806  double cutAtStart, double cutAtDelta, bool cutInside);
807 
813  double dZ() const;
815  double rMin() const;
817  double rMax() const;
819  double startPhi() const;
821  double deltaPhi() const;
823  double cutAtStart() const;
825  double cutAtDelta() const;
827  bool cutInside() const;
828  };
829 
831 
842  class EllipticalTube : public Solid_type<TGeoEltu> {
843  protected:
845  void make(const std::string& nam, double a, double b, double dz);
846 
847  public:
849  EllipticalTube() = default;
853  EllipticalTube(const EllipticalTube& e) = default;
855  template <typename Q> EllipticalTube(const Q* p) : Solid_type<Object>(p) { }
857  template <typename Q> EllipticalTube(const Handle<Q>& e) : Solid_type<Object>(e) { }
858 
860  EllipticalTube(double a, double b, double dz) { this->make("", a, b, dz); }
862  template <typename A, typename B, typename DZ>
863  EllipticalTube(const A& a, const B& b, const DZ& dz)
864  { this->make("",_toDouble(a), _toDouble(b), _toDouble(dz)); }
865 
867  EllipticalTube(const std::string& nam, double a, double b, double dz)
868  { this->make(nam, a, b, dz); }
870  template <typename A, typename B, typename DZ>
871  EllipticalTube(const std::string& nam, const A& a, const B& b, const DZ& dz)
872  { this->make(nam, _toDouble(a), _toDouble(b), _toDouble(dz)); }
873 
879  EllipticalTube& setDimensions(double a, double b, double dz);
880 
882  double dZ() const { return access()->GetDz(); }
884  double a() const { return access()->GetA(); }
886  double b() const { return access()->GetB(); }
887  };
888 
890 
901  class TwistedTube : public Solid_type<TGeoTubeSeg> {
902  protected:
904  void make(const std::string& nam, double twist_angle, double rmin, double rmax,
905  double zneg, double zpos, int nsegments, double totphi);
906 
907  public:
909  TwistedTube() = default;
911  TwistedTube(TwistedTube&& e) = default;
913  TwistedTube(const TwistedTube& e) = default;
915  template <typename Q> TwistedTube(const Q* p) : Solid_type<Object>(p) { }
917  template <typename Q> TwistedTube(const Handle<Q>& e) : Solid_type<Object>(e) { }
918 
920  TwistedTube(double twist_angle, double rmin, double rmax,
921  double dz, double dphi)
922  { this->make("", twist_angle, rmin, rmax, -dz, dz, 1, dphi); }
924  TwistedTube(double twist_angle, double rmin, double rmax,
925  double dz, int nsegments, double totphi)
926  { this->make("", twist_angle, rmin, rmax, -dz, dz, nsegments, totphi); }
928  TwistedTube(double twist_angle, double rmin, double rmax,
929  double zneg, double zpos, double totphi)
930  { this->make("", twist_angle, rmin, rmax, zneg, zpos, 1, totphi); }
932  TwistedTube(double twist_angle, double rmin, double rmax,
933  double zneg, double zpos, int nsegments, double totphi)
934  { this->make("", twist_angle, rmin, rmax, zneg, zpos, nsegments, totphi); }
935 
937  TwistedTube(const std::string& nam, double twist_angle, double rmin, double rmax,
938  double dz, double dphi)
939  { this->make(nam, twist_angle, rmin, rmax, -dz, dz, 1, dphi); }
941  TwistedTube(const std::string& nam, double twist_angle, double rmin, double rmax,
942  double dz, int nsegments, double totphi)
943  { this->make(nam, twist_angle, rmin, rmax, -dz, dz, nsegments, totphi); }
945  TwistedTube(const std::string& nam, double twist_angle, double rmin, double rmax,
946  double zneg, double zpos, double totphi)
947  { this->make(nam, twist_angle, rmin, rmax, zneg, zpos, 1, totphi); }
949  TwistedTube(const std::string& nam, double twist_angle, double rmin, double rmax,
950  double zneg, double zpos, int nsegments, double totphi)
951  { this->make(nam, twist_angle, rmin, rmax, zneg, zpos, nsegments, totphi); }
952 
954  template <typename A, typename B, typename DZ>
955  TwistedTube(const std::string& nam, const A& a, const B& b, const DZ& dz)
956  { this->make(nam, _toDouble(a), _toDouble(b), _toDouble(dz)); }
957 
961  TwistedTube& operator=(const TwistedTube& copy) = default;
963  TwistedTube& setDimensions(double a, double b, double dz);
964  };
965 
967 
975  class Trap : public Solid_type<TGeoTrap> {
976  private:
978  void make(const std::string& name, double pz, double py, double px, double pLTX);
979  public:
981  Trap() = default;
983  Trap(Trap&& e) = default;
985  Trap(const Trap& e) = default;
987  template <typename Q> Trap(const Q* p) : Solid_type<Object>(p) { }
989  template <typename Q> Trap(const Handle<Q>& e) : Solid_type<Object>(e) { }
990 
992  Trap(double z, double theta, double phi,
993  double h1, double bl1, double tl1, double alpha1,
994  double h2, double bl2, double tl2, double alpha2);
996  Trap(double pz, double py, double px, double pLTX)
997  { this->make("", pz,py,px,pLTX); }
999  template <typename PZ,typename PY,typename PX,typename PLTX> Trap(PZ pz, PY py, PX px, PLTX pLTX)
1000  { this->make("", _toDouble(pz),_toDouble(py),_toDouble(px),_toDouble(pLTX)); }
1001 
1003  Trap(const std::string& name,
1004  double z, double theta, double phi,
1005  double h1, double bl1, double tl1, double alpha1,
1006  double h2, double bl2, double tl2, double alpha2);
1008  Trap(const std::string& nam, double pz, double py, double px, double pLTX)
1009  { this->make(nam, pz,py,px,pLTX); }
1011  template <typename PZ,typename PY,typename PX,typename PLTX>
1012  Trap(const std::string& nam, PZ pz, PY py, PX px, PLTX pLTX)
1013  { this->make(nam, _toDouble(pz),_toDouble(py),_toDouble(px),_toDouble(pLTX)); }
1014 
1016  Trap& operator=(Trap&& copy) = default;
1018  Trap& operator=(const Trap& copy) = default;
1020  Trap& setDimensions(double z, double theta, double phi,
1021  double h1, double bl1, double tl1, double alpha1,
1022  double h2, double bl2, double tl2, double alpha2);
1023 
1025  double phi() const { return access()->GetPhi()*dd4hep::deg; }
1027  double theta() const { return access()->GetTheta()*dd4hep::deg; }
1029  double alpha1() const { return access()->GetAlpha1()*dd4hep::deg; }
1031  double alpha2() const { return access()->GetAlpha2()*dd4hep::deg; }
1033  double bottomLow1() const { return access()->GetBl1(); }
1035  double bottomLow2() const { return access()->GetBl2(); }
1037  double topLow1() const { return access()->GetTl1(); }
1039  double topLow2() const { return access()->GetTl2(); }
1041  double high1() const { return access()->GetH1(); }
1043  double high2() const { return access()->GetH2(); }
1045  double dZ() const { return access()->GetDz(); }
1046  };
1047 
1049 
1061  class PseudoTrap : public Solid_type<TGeoCompositeShape> {
1062  private:
1064  void make(const std::string& nam, double x1, double x2, double y1, double y2, double z, double radius, bool minusZ);
1065  public:
1067  PseudoTrap() = default;
1069  PseudoTrap(PseudoTrap&& e) = default;
1071  PseudoTrap(const PseudoTrap& e) = default;
1073  template <typename Q> PseudoTrap(const Q* p) : Solid_type<Object>(p) { }
1075  template <typename Q> PseudoTrap(const Handle<Q>& e) : Solid_type<Object>(e) { }
1076 
1078  PseudoTrap(double x1, double x2, double y1, double y2, double z, double radius, bool minusZ)
1079  { this->make("", x1, x2, y1, y2, z, radius, minusZ); }
1080 
1082  PseudoTrap(const std::string& nam,
1083  double x1, double x2,
1084  double y1, double y2,
1085  double z, double radius, bool minusZ)
1086  { this->make(nam, x1, x2, y1, y2, z, radius, minusZ); }
1087 
1091  PseudoTrap& operator=(const PseudoTrap& copy) = default;
1092  };
1093 
1095 
1104  class Trd1 : public Solid_type<TGeoTrd1> {
1105  private:
1107  void make(const std::string& nam, double x1, double x2, double y, double z);
1108 
1109  public:
1111  Trd1() = default;
1113  Trd1(Trd1&& e) = default;
1115  Trd1(const Trd1& e) = default;
1117  template <typename Q> Trd1(const Q* p) : Solid_type<Object>(p) { }
1119  template <typename Q> Trd1(const Handle<Q>& e) : Solid_type<Object>(e) { }
1120 
1122  Trd1(double x1, double x2, double y, double z)
1123  { this->make("", x1, x2, y, z); }
1125  template <typename X1,typename X2,typename Y,typename Z>
1126  Trd1(X1 x1, X2 x2, Y y, Z z)
1127  { this->make("", _toDouble(x1),_toDouble(x2),_toDouble(y),_toDouble(z)); }
1128 
1130  Trd1(const std::string& nam, double x1, double x2, double y, double z)
1131  { this->make(nam, x1, x2, y, z); }
1133  template <typename X1,typename X2,typename Y,typename Z>
1134  Trd1(const std::string& nam, X1 x1, X2 x2, Y y, Z z)
1135  { this->make(nam, _toDouble(x1),_toDouble(x2),_toDouble(y),_toDouble(z)); }
1136 
1138  Trd1& operator=(Trd1&& copy) = default;
1140  Trd1& operator=(const Trd1& copy) = default;
1142  Trd1& setDimensions(double x1, double x2, double y, double z);
1143 
1145  double dX1() const { return access()->GetDx1(); }
1147  double dX2() const { return access()->GetDx2(); }
1149  double dY() const { return access()->GetDy(); }
1151  double dZ() const { return access()->GetDz(); }
1152  };
1153 
1155 
1164  class Trd2 : public Solid_type<TGeoTrd2> {
1165  private:
1167  void make(const std::string& nam, double x1, double x2, double y1, double y2, double z);
1168 
1169  public:
1171  Trd2() = default;
1173  Trd2(Trd2&& e) = default;
1175  Trd2(const Trd2& e) = default;
1177  template <typename Q> Trd2(const Q* p) : Solid_type<Object>(p) { }
1179  template <typename Q> Trd2(const Handle<Q>& e) : Solid_type<Object>(e) { }
1180 
1182  Trd2(double x1, double x2, double y1, double y2, double z)
1183  { this->make("", x1, x2, y1, y2, z); }
1185  template <typename X1,typename X2,typename Y1,typename Y2,typename Z>
1186  Trd2(X1 x1, X2 x2, Y1 y1, Y2 y2, Z z)
1187  { this->make("", _toDouble(x1),_toDouble(x2),_toDouble(y1),_toDouble(y2),_toDouble(z)); }
1188 
1190  Trd2(const std::string& nam, double x1, double x2, double y1, double y2, double z)
1191  { this->make(nam, x1, x2, y1, y2, z); }
1193  template <typename X1,typename X2,typename Y1,typename Y2,typename Z>
1194  Trd2(const std::string& nam, X1 x1, X2 x2, Y1 y1, Y2 y2, Z z)
1195  { this->make(nam, _toDouble(x1),_toDouble(x2),_toDouble(y1),_toDouble(y2),_toDouble(z)); }
1196 
1198  Trd2& operator=(Trd2&& copy) = default;
1200  Trd2& operator=(const Trd2& copy) = default;
1202  Trd2& setDimensions(double x1, double x2, double y1, double y2, double z);
1203 
1205  double dX1() const { return access()->GetDx1(); }
1207  double dX2() const { return access()->GetDx2(); }
1209  double dY1() const { return access()->GetDy1(); }
1211  double dY2() const { return access()->GetDy2(); }
1213  double dZ() const { return access()->GetDz(); }
1214  };
1216  typedef Trd2 Trapezoid;
1217 
1219 
1227  class Torus : public Solid_type<TGeoTorus> {
1228  private:
1230  void make(const std::string& nam, double r, double rmin, double rmax, double startPhi, double deltaPhi);
1231  public:
1233  Torus() = default;
1235  Torus(Torus&& e) = default;
1237  Torus(const Torus& e) = default;
1239  template <typename Q> Torus(const Q* p) : Solid_type<Object>(p) { }
1241  template <typename Q> Torus(const Handle<Q>& e) : Solid_type<Object>(e) { }
1242 
1244  template<typename R, typename RMIN, typename RMAX, typename STARTPHI, typename DELTAPHI>
1245  Torus(R r, RMIN rmin, RMAX rmax, STARTPHI startPhi=M_PI, DELTAPHI deltaPhi = 2.*M_PI)
1246  { this->make("", _toDouble(r),_toDouble(rmin),_toDouble(rmax),_toDouble(startPhi),_toDouble(deltaPhi)); }
1248  Torus(double r, double rmin, double rmax, double startPhi=M_PI, double deltaPhi = 2.*M_PI)
1249  { this->make("", r, rmin, rmax, startPhi, deltaPhi); }
1250 
1252  template<typename R, typename RMIN, typename RMAX, typename STARTPHI, typename DELTAPHI>
1253  Torus(const std::string& nam, R r, RMIN rmin, RMAX rmax, STARTPHI startPhi=M_PI, DELTAPHI deltaPhi = 2.*M_PI)
1254  { this->make(nam, _toDouble(r),_toDouble(rmin),_toDouble(rmax),_toDouble(startPhi),_toDouble(deltaPhi)); }
1256  Torus(const std::string& nam, double r, double rmin, double rmax, double startPhi=M_PI, double deltaPhi = 2.*M_PI)
1257  { this->make(nam, r, rmin, rmax, startPhi, deltaPhi); }
1258 
1260  Torus& operator=(Torus&& copy) = default;
1262  Torus& operator=(const Torus& copy) = default;
1264  Torus& setDimensions(double r, double rmin, double rmax, double startPhi, double deltaPhi);
1265 
1267  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
1269  double deltaPhi() const { return access()->GetDphi()*dd4hep::deg; }
1270 
1272  double r() const { return access()->GetR(); }
1274  double rMin() const { return access()->GetRmin(); }
1276  double rMax() const { return access()->GetRmax(); }
1277  };
1278 
1280 
1289  class Sphere : public Solid_type<TGeoSphere> {
1290  protected:
1292  void make(const std::string& nam,
1293  double rmin, double rmax,
1294  double startTheta, double endTheta,
1295  double startPhi, double endPhi);
1296  public:
1298  Sphere() = default;
1300  Sphere(Sphere&& e) = default;
1302  Sphere(const Sphere& e) = default;
1304  template <typename Q> Sphere(const Q* p) : Solid_type<Object>(p) { }
1306  template <typename Q> Sphere(const Handle<Q>& e) : Solid_type<Object>(e) { }
1307 
1309  Sphere(double rmin, double rmax,
1310  double startTheta= 0.0, double endTheta = M_PI,
1311  double startPhi = 0.0, double endPhi = 2. * M_PI)
1312  { this->make("", rmin, rmax, startTheta, endTheta, startPhi, endPhi); }
1314  template<typename RMIN, typename RMAX,
1315  typename STARTTHETA=double, typename ENDTHETA=double,
1316  typename STARTPHI=double, typename ENDPHI=double>
1317  Sphere(RMIN rmin, RMAX rmax,
1318  STARTTHETA startTheta = 0.0, ENDTHETA endTheta = M_PI,
1319  STARTPHI startPhi = 0.0, ENDPHI endPhi = 2. * M_PI) {
1320  this->make("",
1321  _toDouble(rmin), _toDouble(rmax),
1324  }
1325 
1327  Sphere(const std::string& nam,
1328  double rmin, double rmax,
1329  double startTheta= 0.0, double endTheta = M_PI,
1330  double startPhi = 0.0, double endPhi = 2. * M_PI)
1331  { this->make(nam, rmin, rmax, startTheta, endTheta, startPhi, endPhi); }
1333  template<typename RMIN, typename RMAX,
1334  typename STARTTHETA=double, typename ENDTHETA=double,
1335  typename STARTPHI=double, typename ENDPHI=double>
1336  Sphere(const std::string& nam,
1337  RMIN rmin, RMAX rmax,
1338  STARTTHETA startTheta = 0.0, ENDTHETA endTheta = M_PI,
1339  STARTPHI startPhi = 0.0, ENDPHI endPhi = 2. * M_PI) {
1340  this->make(nam,
1341  _toDouble(rmin), _toDouble(rmax),
1344  }
1345 
1347  Sphere& operator=(Sphere&& copy) = default;
1349  Sphere& operator=(const Sphere& copy) = default;
1351  Sphere& setDimensions(double rmin, double rmax,
1352  double startTheta, double endTheta,
1353  double startPhi, double endPhi);
1354 
1356  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
1358  double endPhi() const { return access()->GetPhi2()*dd4hep::deg; }
1360  double startTheta() const { return access()->GetTheta1()*dd4hep::deg; }
1362  double endTheta() const { return access()->GetTheta2()*dd4hep::deg; }
1364  double rMin() const { return access()->GetRmin(); }
1366  double rMax() const { return access()->GetRmax(); }
1367  };
1368 
1370 
1379  class Paraboloid : public Solid_type<TGeoParaboloid> {
1381  void make(const std::string& nam, double r_low, double r_high, double delta_z);
1382  public:
1384  Paraboloid() = default;
1386  Paraboloid(Paraboloid&& e) = default;
1388  Paraboloid(const Paraboloid& e) = default;
1390  template <typename Q> Paraboloid(const Q* p) : Solid_type<Object>(p) { }
1392  template <typename Q> Paraboloid(const Handle<Q>& e) : Solid_type<Object>(e) { }
1393 
1395  Paraboloid(double r_low, double r_high, double delta_z)
1396  { this->make("", r_low, r_high, delta_z); }
1398  template<typename R_LOW, typename R_HIGH, typename DELTA_Z>
1399  Paraboloid(R_LOW r_low, R_HIGH r_high, DELTA_Z delta_z)
1400  { this->make("", _toDouble(r_low), _toDouble(r_high), _toDouble(delta_z)); }
1401 
1403  Paraboloid(const std::string& nam, double r_low, double r_high, double delta_z)
1404  { this->make(nam, r_low, r_high, delta_z); }
1406  template<typename R_LOW, typename R_HIGH, typename DELTA_Z>
1407  Paraboloid(const std::string& nam, R_LOW r_low, R_HIGH r_high, DELTA_Z delta_z)
1408  { this->make(nam, _toDouble(r_low), _toDouble(r_high), _toDouble(delta_z)); }
1409 
1413  Paraboloid& operator=(const Paraboloid& copy) = default;
1415  Paraboloid& setDimensions(double r_low, double r_high, double delta_z);
1416 
1418  double dZ() const { return access()->GetDz(); }
1420  double rLow() const { return access()->GetRlo(); }
1422  double rHigh() const { return access()->GetRhi(); }
1423  };
1424 
1426 
1435  class Hyperboloid : public Solid_type<TGeoHype> {
1437  void make(const std::string& nam, double rin, double stin, double rout, double stout, double dz);
1438  public:
1440  Hyperboloid() = default;
1442  Hyperboloid(Hyperboloid&& e) = default;
1444  Hyperboloid(const Hyperboloid& e) = default;
1446  template <typename Q> Hyperboloid(const Q* p) : Solid_type<Object>(p) { }
1448  template <typename Q> Hyperboloid(const Handle<Q>& e) : Solid_type<Object>(e) { }
1449 
1451  Hyperboloid(double rin, double stin, double rout, double stout, double dz)
1452  { make("", rin, stin, rout, stout, dz); }
1454  template <typename RIN, typename STIN, typename ROUT, typename STOUT, typename DZ>
1455  Hyperboloid(RIN rin, STIN stin, ROUT rout, STOUT stout, DZ dz)
1456  { make("", _toDouble(rin), _toDouble(stin), _toDouble(rout), _toDouble(stout), _toDouble(dz)); }
1457 
1459  Hyperboloid(const std::string& nam, double rin, double stin, double rout, double stout, double dz)
1460  { make(nam, rin, stin, rout, stout, dz); }
1462  template <typename RIN, typename STIN, typename ROUT, typename STOUT, typename DZ>
1463  Hyperboloid(const std::string& nam, RIN rin, STIN stin, ROUT rout, STOUT stout, DZ dz)
1464  { make(nam, _toDouble(rin), _toDouble(stin), _toDouble(rout), _toDouble(stout), _toDouble(dz)); }
1465 
1471  Hyperboloid& setDimensions(double rin, double stin, double rout, double stout, double dz);
1472 
1474  double dZ() const { return access()->GetDz(); }
1476  double rMin() const { return access()->GetRmin(); }
1478  double rMax() const { return access()->GetRmax(); }
1480  double stereoInner() const { return access()->GetStIn(); }
1482  double stereoOuter() const { return access()->GetStOut(); }
1483  };
1484 
1486 
1494  class PolyhedraRegular : public Solid_type<TGeoPgon> {
1495  protected:
1497  void make(const std::string& nam, int nsides, double rmin, double rmax, double zpos, double zneg, double start, double delta);
1498  public:
1500  PolyhedraRegular() = default;
1504  PolyhedraRegular(const PolyhedraRegular& e) = default;
1506  template <typename Q> PolyhedraRegular(const Q* p) : Solid_type<Object>(p) { }
1508  template <typename Q> PolyhedraRegular(const Handle<Q>& e) : Solid_type<Object>(e) { }
1509 
1511  PolyhedraRegular(int nsides, double rmin, double rmax, double zlen)
1512  { this->make("", nsides, rmin, rmax, zlen / 2, -zlen / 2, 0, 2.0*M_PI); }
1514  template <typename NSIDES, typename RMIN, typename RMAX, typename ZLEN>
1515  PolyhedraRegular(NSIDES nsides, RMIN rmin, RMAX rmax, ZLEN zlen)
1516  {
1517  this->make("", _toDouble(nsides),
1518  _toDouble(rmin), _toDouble(rmax),
1519  _toDouble(zlen) / 2, -_toDouble(zlen) / 2,
1520  0, 2.0*M_PI);
1521  }
1523  PolyhedraRegular(int nsides, double phi_start, double rmin, double rmax, double zlen)
1524  { this->make("", nsides, rmin, rmax, zlen / 2, -zlen / 2, phi_start, 2.0*M_PI); }
1526  template <typename NSIDES, typename PHI_START, typename RMIN, typename RMAX, typename ZLEN>
1527  PolyhedraRegular(NSIDES nsides, PHI_START phi_start, RMIN rmin, RMAX rmax, ZLEN zlen)
1528  {
1529  this->make("", _toDouble(nsides),
1530  _toDouble(rmin), _toDouble(rmax),
1531  _toDouble(zlen) / 2, -_toDouble(zlen) / 2,
1532  _toDouble(phi_start), 2.0*M_PI);
1533  }
1535  PolyhedraRegular(int nsides, double rmin, double rmax, double zplanes[2])
1536  { this->make("", nsides, rmin, rmax, zplanes[0], zplanes[1], 0, 2.0*M_PI); }
1537 
1539  PolyhedraRegular(const std::string& nam, int nsides, double rmin, double rmax, double zlen)
1540  { this->make(nam, nsides, rmin, rmax, zlen / 2, -zlen / 2, 0, 2.0*M_PI); }
1542  PolyhedraRegular(const std::string& nam, int nsides, double phi_start, double rmin, double rmax, double zlen)
1543  { this->make(nam, nsides, rmin, rmax, zlen / 2, -zlen / 2, phi_start, 2.0*M_PI); }
1545  PolyhedraRegular(const std::string& nam, int nsides, double rmin, double rmax, double zplanes[2])
1546  { this->make(nam, nsides, rmin, rmax, zplanes[0], zplanes[1], 0, 2.0*M_PI); }
1551 
1553  int numEdges() const { return access()->GetNedges(); }
1555  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
1557  double deltaPhi() const { return access()->GetDphi()*dd4hep::deg; }
1558 
1560  double z(int which) const { return access()->GetZ(which); }
1562  double rMin(int which) const { return access()->GetRmin(which); }
1564  double rMax(int which) const { return access()->GetRmax(which); }
1565 
1567  std::vector<double> zPlaneZ() const { return detail::zPlaneZ(this); }
1569  std::vector<double> zPlaneRmin() const { return detail::zPlaneRmin(this); }
1571  std::vector<double> zPlaneRmax() const { return detail::zPlaneRmax(this); }
1572  };
1573 
1575 
1583  class Polyhedra : public Solid_type<TGeoPgon> {
1584  protected:
1586  void make(const std::string& nam, int nsides, double start, double delta,
1587  const std::vector<double>& z,
1588  const std::vector<double>& rmin,
1589  const std::vector<double>& rmax);
1590  public:
1592  Polyhedra() = default;
1594  Polyhedra(Polyhedra&& e) = default;
1596  Polyhedra(const Polyhedra& e) = default;
1598  template <typename Q> Polyhedra(const Q* p) : Solid_type<Object>(p) { }
1600  template <typename Q> Polyhedra(const Handle<Q>& e) : Solid_type<Object>(e) { }
1601 
1603  Polyhedra(int nsides, double start, double delta,
1604  const std::vector<double>& z, const std::vector<double>& r) {
1605  std::vector<double> rmin(r.size(), 0e0);
1606  this->make("", nsides, start, delta, z, rmin, r);
1607  }
1609  Polyhedra(int nsides, double start, double delta,
1610  const std::vector<double>& z, const std::vector<double>& rmin, const std::vector<double>& rmax)
1611  { this->make("", nsides, start, delta, z, rmin, rmax); }
1612 
1614  Polyhedra(const std::string& nam, int nsides, double start, double delta,
1615  const std::vector<double>& z, const std::vector<double>& r) {
1616  std::vector<double> rmin(r.size(), 0e0);
1617  this->make(nam, nsides, start, delta, z, rmin, r);
1618  }
1620  Polyhedra(const std::string& nam, int nsides, double start, double delta,
1621  const std::vector<double>& z, const std::vector<double>& rmin, const std::vector<double>& rmax)
1622  { this->make(nam, nsides, start, delta, z, rmin, rmax); }
1626  Polyhedra& operator=(const Polyhedra& copy) = default;
1627 
1629  int numEdges() const { return access()->GetNedges(); }
1631  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
1633  double deltaPhi() const { return access()->GetDphi()*dd4hep::deg; }
1634 
1636  double z(int which) const { return access()->GetZ(which); }
1638  double rMin(int which) const { return access()->GetRmin(which); }
1640  double rMax(int which) const { return access()->GetRmax(which); }
1641 
1643  std::vector<double> zPlaneZ() const { return detail::zPlaneZ(this); }
1645  std::vector<double> zPlaneRmin() const { return detail::zPlaneRmin(this); }
1647  std::vector<double> zPlaneRmax() const { return detail::zPlaneRmax(this); }
1648  };
1649 
1651 
1659  class ExtrudedPolygon : public Solid_type<TGeoXtru> {
1660  protected:
1662  void make(const std::string& nam,
1663  const std::vector<double> & pt_x,
1664  const std::vector<double> & pt_y,
1665  const std::vector<double> & sec_z,
1666  const std::vector<double> & sec_x,
1667  const std::vector<double> & sec_y,
1668  const std::vector<double> & zscale);
1669  public:
1671  ExtrudedPolygon() = default;
1675  ExtrudedPolygon(const ExtrudedPolygon& e) = default;
1677  template <typename Q> ExtrudedPolygon(const Q* p) : Solid_type<Object>(p) { }
1679  template <typename Q> ExtrudedPolygon(const Handle<Q>& e) : Solid_type<Object>(e) { }
1680 
1682  ExtrudedPolygon(const std::vector<double> & pt_x,
1683  const std::vector<double> & pt_y,
1684  const std::vector<double> & sec_z,
1685  const std::vector<double> & sec_x,
1686  const std::vector<double> & sec_y,
1687  const std::vector<double> & zscale)
1688  { this->make("", pt_x, pt_y, sec_z, sec_x, sec_y, zscale); }
1689 
1691  ExtrudedPolygon(const std::string& nam,
1692  const std::vector<double> & pt_x,
1693  const std::vector<double> & pt_y,
1694  const std::vector<double> & sec_z,
1695  const std::vector<double> & sec_x,
1696  const std::vector<double> & sec_y,
1697  const std::vector<double> & zscale)
1698  { this->make(nam, pt_x, pt_y, sec_z, sec_x, sec_y, zscale); }
1703 
1704  std::vector<double> x() const { return detail::_extract_vector(this->access(), &TGeoXtru::GetX, &TGeoXtru::GetNvert); }
1705  std::vector<double> y() const { return detail::_extract_vector(this->access(), &TGeoXtru::GetY, &TGeoXtru::GetNvert); }
1706  std::vector<double> z() const { return detail::zPlaneZ(this); }
1707  std::vector<double> zx() const { return detail::_extract_vector(this->access(), &TGeoXtru::GetXOffset, &TGeoXtru::GetNz); }
1708  std::vector<double> zy() const { return detail::_extract_vector(this->access(), &TGeoXtru::GetYOffset, &TGeoXtru::GetNz); }
1709  std::vector<double> zscale() const { return detail::_extract_vector(this->access(), &TGeoXtru::GetScale, &TGeoXtru::GetNz); }
1710  };
1711 
1713 
1721  class EightPointSolid : public Solid_type<TGeoArb8> {
1722  private:
1724  void make(const std::string& nam, double dz, const double* vtx);
1725  public:
1727  EightPointSolid() = default;
1731  EightPointSolid(const EightPointSolid& e) = default;
1733  template <typename Q> EightPointSolid(const Q* p) : Solid_type<Object>(p) { }
1735  template <typename Q> EightPointSolid(const Handle<Q>& e) : Solid_type<Object>(e) { }
1736 
1738  EightPointSolid(double dz, const double* vertices)
1739  { this->make("", dz, vertices); }
1740 
1742  EightPointSolid(const std::string& nam, double dz, const double* vertices)
1743  { this->make(nam, dz, vertices); }
1744 
1749 
1751  double dZ() const { return access()->GetDz(); }
1753  std::vector<double> vertices() const {
1754  const double* values = access()->GetVertices();
1755  return detail::_make_vector(values, 8*2);
1756  }
1758  std::pair<double, double> vertex(int which) const {
1759  const double* values = access()->GetVertices();
1760  return std::make_pair(values[2*which], values[2*which+1]);
1761  }
1762  };
1763 
1765 
1773  class TessellatedSolid : public Solid_type<TGeoTessellated> {
1774  private:
1776  void make(const std::string& nam, int num_facets);
1778  void make(const std::string& nam, const std::vector<Object::Vertex_t>& vertices);
1779 
1780  public:
1781  typedef Object::Vertex_t Vertex;
1782  typedef TGeoFacet Facet;
1783 
1784  public:
1786  TessellatedSolid() = default;
1790  TessellatedSolid(const TessellatedSolid& e) = default;
1792  template <typename Q> TessellatedSolid(const Q* p) : Solid_type<Object>(p) { }
1794  template <typename Q> TessellatedSolid(const Handle<Q>& e) : Solid_type<Object>(e) { }
1795 
1797  TessellatedSolid(int num_facets)
1798  { this->make("", num_facets); }
1799 
1801  TessellatedSolid(const std::vector<Vertex>& vertices)
1802  { this->make("", vertices); }
1803 
1805  TessellatedSolid(const std::string& nam, int num_facets)
1806  { this->make(nam, num_facets); }
1807 
1809  TessellatedSolid(const std::string& nam, const std::vector<Vertex>& vertices)
1810  { this->make(nam, vertices); }
1811 
1817  bool addFacet(const Vertex& pt0, const Vertex& pt1, const Vertex& pt2) const;
1819  bool addFacet(const Vertex& pt0, const Vertex& pt1, const Vertex& pt2, const Vertex& pt3) const;
1821  bool addFacet(const int pt0, const int pt1, const int pt2) const;
1823  bool addFacet(const int pt0, const int pt1, const int pt2, const int pt3) const;
1824 
1826  int num_facet() const;
1828  const Facet& facet(int index) const;
1830  int num_vertex() const;
1832  const Vertex& vertex(int index) const;
1833  };
1834 
1836 
1844  class BooleanSolid : public Solid_type<TGeoCompositeShape> {
1845  public:
1847  BooleanSolid() = default;
1849  BooleanSolid(BooleanSolid&& b) = default;
1851  BooleanSolid(const BooleanSolid& b) = default;
1853  template <typename Q>
1860  Solid rightShape() const;
1862  Solid leftShape() const;
1864  const TGeoMatrix* rightMatrix() const;
1866  const TGeoMatrix* leftMatrix() const;
1867  };
1868 
1870 
1880  public:
1882  SubtractionSolid() = default;
1886  SubtractionSolid(const SubtractionSolid& e) = default;
1888  template <typename Q> SubtractionSolid(const Handle<Q>& e) : BooleanSolid(e) { }
1889 
1891  SubtractionSolid(const Solid& shape1, const Solid& shape2);
1893  SubtractionSolid(const Solid& shape1, const Solid& shape2, const Position& pos);
1895  SubtractionSolid(const Solid& shape1, const Solid& shape2, const RotationZYX& rot);
1897  SubtractionSolid(const Solid& shape1, const Solid& shape2, const Rotation3D& rot);
1899  SubtractionSolid(const Solid& shape1, const Solid& shape2, const Transform3D& pos);
1900 
1902  SubtractionSolid(const std::string& name, const Solid& shape1, const Solid& shape2);
1904  SubtractionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Position& pos);
1906  SubtractionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const RotationZYX& rot);
1908  SubtractionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Rotation3D& rot);
1910  SubtractionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Transform3D& pos);
1915  };
1916 
1918 
1927  class UnionSolid : public BooleanSolid {
1928  public:
1930  UnionSolid() = default;
1932  UnionSolid(UnionSolid&& e) = default;
1934  UnionSolid(const UnionSolid& e) = default;
1936  template <typename Q> UnionSolid(const Handle<Q>& e) : BooleanSolid(e) { }
1937 
1939  UnionSolid(const Solid& shape1, const Solid& shape2);
1941  UnionSolid(const Solid& shape1, const Solid& shape2, const Position& pos);
1943  UnionSolid(const Solid& shape1, const Solid& shape2, const RotationZYX& rot);
1945  UnionSolid(const Solid& shape1, const Solid& shape2, const Rotation3D& rot);
1947  UnionSolid(const Solid& shape1, const Solid& shape2, const Transform3D& pos);
1948 
1950  UnionSolid(const std::string& name, const Solid& shape1, const Solid& shape2);
1952  UnionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Position& pos);
1954  UnionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const RotationZYX& rot);
1956  UnionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Rotation3D& rot);
1958  UnionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Transform3D& pos);
1962  UnionSolid& operator=(const UnionSolid& copy) = default;
1963  };
1964 
1966 
1976  public:
1978  IntersectionSolid() = default;
1984  template <typename Q> IntersectionSolid(const Handle<Q>& e) : BooleanSolid(e) { }
1985 
1987  IntersectionSolid(const Solid& shape1, const Solid& shape2);
1989  IntersectionSolid(const Solid& shape1, const Solid& shape2, const Position& pos);
1991  IntersectionSolid(const Solid& shape1, const Solid& shape2, const RotationZYX& rot);
1993  IntersectionSolid(const Solid& shape1, const Solid& shape2, const Rotation3D& rot);
1995  IntersectionSolid(const Solid& shape1, const Solid& shape2, const Transform3D& pos);
1996 
1998  IntersectionSolid(const std::string& name, const Solid& shape1, const Solid& shape2);
2000  IntersectionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Position& pos);
2002  IntersectionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const RotationZYX& rot);
2004  IntersectionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Rotation3D& rot);
2006  IntersectionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Transform3D& pos);
2011  };
2012 } /* End namespace dd4hep */
2013 #endif // DD4HEP_SHAPES_H
dd4hep::Cone::Cone
Cone(const std::string &nam, double z, double rmin1, double rmax1, double rmin2, double rmax2)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:428
dd4hep::Polycone::Polycone
Polycone(const Polycone &e)=default
Copy constructor.
dd4hep::Solid_type::_assign
void _assign(T *n, const std::string &nam, const std::string &tit, bool cbbox)
Assign pointrs and register solid to geometry.
Definition: Shapes.cpp:47
dd4hep::PolyhedraRegular::PolyhedraRegular
PolyhedraRegular(int nsides, double rmin, double rmax, double zlen)
Constructor to create a new object. Phi(start)=0, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2.
Definition: Shapes.h:1511
dd4hep::Trap::high1
double high1() const
Half length in y at low z.
Definition: Shapes.h:1041
dd4hep::Scale::Scale
Scale(const std::string &nam, Solid base_solid, const X &x_scale, const Y &y_scale, const Z &z_scale)
Constructor to create a named new Scale object (retrieves name from volume)
Definition: Shapes.h:270
dd4hep::Box::Box
Box(const std::string &nam, double x_val, double y_val, double z_val)
Constructor to create a named new box object (retrieves name from volume)
Definition: Shapes.h:316
dd4hep::Solid_type::operator=
Solid_type & operator=(const Solid_type &copy)=default
Assignment copy operator.
dd4hep::ConeSegment::endPhi
double endPhi() const
Accessor: end-phi value.
Definition: Shapes.h:604
dd4hep::Torus::setDimensions
Torus & setDimensions(double r, double rmin, double rmax, double startPhi, double deltaPhi)
Set the Torus dimensions.
Definition: Shapes.cpp:585
dd4hep::TruncatedTube::rMax
double rMax() const
Accessor: r-max value.
Definition: Shapes.cpp:476
dd4hep::HalfSpace::HalfSpace
HalfSpace(const double *const point, const double *const normal)
Constructor to create an new halfspace object from a point on a plane and the plane normal.
Definition: Shapes.h:370
dd4hep::UnionSolid::UnionSolid
UnionSolid()=default
Default constructor.
dd4hep::IntersectionSolid::IntersectionSolid
IntersectionSolid(IntersectionSolid &&e)=default
Move Constructor.
dd4hep::TruncatedTube::cutInside
bool cutInside() const
Accessor: cut-inside value.
Definition: Shapes.cpp:501
dd4hep::Trd2::Trd2
Trd2()=default
Default constructor.
dd4hep::IntersectionSolid::operator=
IntersectionSolid & operator=(const IntersectionSolid &copy)=default
Copy Assignment operator.
dd4hep::HalfSpace::normal
Direction normal() const
Accessor: normal vector spanning plane at positioning point.
Definition: Shapes.h:388
dd4hep::Paraboloid::make
void make(const std::string &nam, double r_low, double r_high, double delta_z)
Constructor function to create a new anonymous object with attribute initialization.
Definition: Shapes.cpp:542
dd4hep::PolyhedraRegular::PolyhedraRegular
PolyhedraRegular(const std::string &nam, int nsides, double phi_start, double rmin, double rmax, double zlen)
Constructor to create a new object with phi_start, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2.
Definition: Shapes.h:1542
dd4hep::Hyperboloid::operator=
Hyperboloid & operator=(const Hyperboloid &copy)=default
Copy Assignment operator.
dd4hep::Polycone::Polycone
Polycone(Polycone &&e)=default
Move constructor.
dd4hep::TruncatedTube::startPhi
double startPhi() const
Accessor: start-phi value.
Definition: Shapes.cpp:481
dd4hep::Cone::Cone
Cone(const Z &z, const RMIN1 &rmin1, const RMAX1 &rmax1, const RMIN2 &rmin2, const RMAX2 &rmax2)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:424
dd4hep::Solid_type::operator->
T * operator->() const
Overloaded operator -> to access underlying object.
Definition: Shapes.h:183
dd4hep::Cone::Cone
Cone(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:417
dd4hep::TwistedTube::operator=
TwistedTube & operator=(TwistedTube &&copy)=default
Move Assignment operator.
dd4hep::Scale::Scale
Scale(const Handle< Q > &e)
Copy Constructor to be used with an existing object handle.
Definition: Shapes.h:255
dd4hep::Tube::rMin
double rMin() const
Accessor: r-min value.
Definition: Shapes.h:703
Objects.h
dd4hep::Trd2::make
void make(const std::string &nam, double x1, double x2, double y1, double y2, double z)
Internal helper method to support object construction.
Definition: Shapes.cpp:530
dd4hep::Scale::Scale
Scale(Solid base_solid, double x_scale, double y_scale, double z_scale)
Constructor to create an anonymous new Scale object (retrieves name from volume)
Definition: Shapes.h:258
dd4hep::TessellatedSolid::operator=
TessellatedSolid & operator=(TessellatedSolid &&copy)=default
Move Assignment operator.
dd4hep::TruncatedTube::deltaPhi
double deltaPhi() const
Accessor: delta-phi value.
Definition: Shapes.cpp:486
dd4hep::Trap::dZ
double dZ() const
Half length in dZ.
Definition: Shapes.h:1045
dd4hep::TruncatedTube
Class describing a truncated tube shape (CMS'ism)
Definition: Shapes.h:780
dd4hep::PolyhedraRegular::PolyhedraRegular
PolyhedraRegular(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1506
dd4hep::Solid_type::title
const char * title() const
Access to shape title (GetTitle accessor of the TGeoShape)
Definition: Shapes.cpp:62
dd4hep::PseudoTrap::make
void make(const std::string &nam, double x1, double x2, double y1, double y2, double z, double radius, bool minusZ)
Internal helper method to support object construction.
Definition: Shapes.cpp:642
dd4hep::UnionSolid::UnionSolid
UnionSolid(const UnionSolid &e)=default
Copy Constructor.
dd4hep::Sphere::Sphere
Sphere(Sphere &&e)=default
Move Constructor.
dd4hep::ExtrudedPolygon::operator=
ExtrudedPolygon & operator=(ExtrudedPolygon &&copy)=default
Move Assignment operator.
dd4hep::Scale::Scale
Scale(Solid base_solid, const X &x_scale, const Y &y_scale, const Z &z_scale)
Constructor to create an anonymous new Scale object (retrieves name from volume)
Definition: Shapes.h:266
dd4hep::UnionSolid::UnionSolid
UnionSolid(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1936
dd4hep::Sphere::rMin
double rMin() const
Accessor: r-min value.
Definition: Shapes.h:1364
dd4hep::Cone::Cone
Cone(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:415
dd4hep::Trap::setDimensions
Trap & setDimensions(double z, double theta, double phi, double h1, double bl1, double tl1, double alpha1, double h2, double bl2, double tl2, double alpha2)
Set the trap dimensions.
Definition: Shapes.cpp:631
dd4hep::Trap::make
void make(const std::string &name, double pz, double py, double px, double pLTX)
Internal helper method to support object construction.
Definition: Shapes.cpp:611
dd4hep::Trap::Trap
Trap(double pz, double py, double px, double pLTX)
Constructor to create a new anonymous object for right angular wedge from STEP (Se G4 manual for deta...
Definition: Shapes.h:996
dd4hep::PolyhedraRegular::PolyhedraRegular
PolyhedraRegular(int nsides, double rmin, double rmax, double zplanes[2])
Constructor to create a new object. Phi(start)=0, deltaPhi=2PI, Z-planes a zplanes[0] and zplanes[1].
Definition: Shapes.h:1535
dd4hep::TessellatedSolid::num_vertex
int num_vertex() const
Access the number of vertices in the shape.
Definition: Shapes.cpp:841
dd4hep::TruncatedTube::TruncatedTube
TruncatedTube()=default
Default constructor.
dd4hep::CutTube::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:755
dd4hep::Tube::endPhi
double endPhi() const
Accessor: end-phi value.
Definition: Shapes.h:699
dd4hep::Trap::high2
double high2() const
Half length in y at high z.
Definition: Shapes.h:1043
dd4hep::PolyhedraRegular
Class describing a regular polyhedron shape.
Definition: Shapes.h:1494
dd4hep::Polycone::rMax
double rMax(int which) const
Accessor: r-max value.
Definition: Shapes.h:521
dd4hep::PolyhedraRegular::PolyhedraRegular
PolyhedraRegular(const std::string &nam, int nsides, double rmin, double rmax, double zlen)
Constructor to create a new object. Phi(start)=0, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2.
Definition: Shapes.h:1539
dd4hep::Polycone::zPlaneRmax
std::vector< double > zPlaneRmax() const
Accessor: vector of rMax-values for Z-planes value.
Definition: Shapes.h:528
dd4hep::PseudoTrap
Class describing a pseudo trap shape (CMS'ism)
Definition: Shapes.h:1061
dd4hep::Handle< TGeoHalfSpace >::Object
TGeoHalfSpace Object
Extern accessible definition of the contained element type.
Definition: Handle.h:86
dd4hep::TwistedTube::TwistedTube
TwistedTube(double twist_angle, double rmin, double rmax, double dz, int nsegments, double totphi)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:924
dd4hep::BooleanSolid::leftShape
Solid leftShape() const
Access left solid of the boolean.
Definition: Shapes.cpp:856
dd4hep::Torus
Class describing a Torus shape.
Definition: Shapes.h:1227
dd4hep::HalfSpace
Class describing half-space.
Definition: Shapes.h:352
dd4hep::Cone::Cone
Cone()=default
Default constructor.
dd4hep::CutTube::rMin
double rMin() const
Accessor: r-min value.
Definition: Shapes.h:757
dd4hep::Sphere::Sphere
Sphere(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1304
dd4hep::Tube::Tube
Tube(Tube &&e)=default
Move Constructor.
dd4hep::Solid_type::Solid_type
Solid_type(const Solid_type &e)=default
Copy constructor.
M_PI
#define M_PI
Definition: Handle.h:31
dd4hep::ShapelessSolid
Class describing a shape-less solid shape.
Definition: Shapes.h:210
dd4hep::PolyhedraRegular::PolyhedraRegular
PolyhedraRegular(const std::string &nam, int nsides, double rmin, double rmax, double zplanes[2])
Constructor to create a new object. Phi(start)=0, deltaPhi=2PI, Z-planes a zplanes[0] and zplanes[1].
Definition: Shapes.h:1545
dd4hep::UnionSolid::operator=
UnionSolid & operator=(const UnionSolid &copy)=default
Copy Assignment operator.
dd4hep::Hyperboloid::Hyperboloid
Hyperboloid(RIN rin, STIN stin, ROUT rout, STOUT stout, DZ dz)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1455
dd4hep::PolyhedraRegular::rMax
double rMax(int which) const
Accessor: r-max value.
Definition: Shapes.h:1564
dd4hep::Tube::Tube
Tube(double rmin, double rmax, double dz, double startPhi, double endPhi)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:660
dd4hep::EllipticalTube
Class describing a twisted tube shape.
Definition: Shapes.h:842
dd4hep::Box::x
double x() const
Access half "length" of the box.
Definition: Shapes.cpp:155
dd4hep::Trap::operator=
Trap & operator=(Trap &&copy)=default
Move Assignment operator.
dd4hep::EllipticalTube::EllipticalTube
EllipticalTube(double a, double b, double dz)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:860
dd4hep::dimensions
std::vector< double > dimensions(const Handle< TGeoShape > &solid)
Access Shape dimension parameters (As in TGeo, but angles in radians rather than degrees)
Definition: ShapeUtilities.cpp:467
dd4hep::Trd2::operator=
Trd2 & operator=(Trd2 &&copy)=default
Copy Assignment operator.
dd4hep::ConeSegment::ConeSegment
ConeSegment(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:557
dd4hep::Polyhedra::operator=
Polyhedra & operator=(const Polyhedra &copy)=default
Copy Assignment operator.
dd4hep::Scale::Scale
Scale(Scale &&e)=default
Move constructor.
dd4hep::PolyhedraRegular::rMin
double rMin(int which) const
Accessor: r-min value.
Definition: Shapes.h:1562
dd4hep::Torus::rMax
double rMax() const
Accessor: r-max value (outer radius)
Definition: Shapes.h:1276
dd4hep::Polyhedra::Polyhedra
Polyhedra(const Polyhedra &e)=default
Copy Constructor.
dd4hep::EightPointSolid::vertex
std::pair< double, double > vertex(int which) const
Accessor: single vertex.
Definition: Shapes.h:1758
dd4hep::PseudoTrap::PseudoTrap
PseudoTrap(double x1, double x2, double y1, double y2, double z, double radius, bool minusZ)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1078
dd4hep::EightPointSolid::vertices
std::vector< double > vertices() const
Accessor: all vertices as STL vector.
Definition: Shapes.h:1753
dd4hep::Paraboloid::operator=
Paraboloid & operator=(Paraboloid &&copy)=default
Move Assignment operator.
dd4hep::Torus::Torus
Torus()=default
Default constructor.
dd4hep::Cone::Cone
Cone(const Cone &e)=default
Copy Constructor.
delta
const Delta * delta
Definition: AlignmentsCalculator.cpp:67
dd4hep::CutTube::highNormal
std::vector< double > highNormal() const
Accessor: upper normal vector of cut plane.
Definition: Shapes.h:763
dd4hep::Sphere::Sphere
Sphere()=default
Default constructor.
dd4hep::PolyhedraRegular::PolyhedraRegular
PolyhedraRegular(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1508
dd4hep::Sphere::startTheta
double startTheta() const
Accessor: start-theta value.
Definition: Shapes.h:1360
dd4hep::Hyperboloid
Class describing a Hyperboloid shape.
Definition: Shapes.h:1435
dd4hep::SubtractionSolid::operator=
SubtractionSolid & operator=(SubtractionSolid &&copy)=default
Move Assignment operator.
Handle.h
dd4hep::Trap::Trap
Trap(PZ pz, PY py, PX px, PLTX pLTX)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:999
dd4hep::ExtrudedPolygon::ExtrudedPolygon
ExtrudedPolygon(ExtrudedPolygon &&e)=default
Move Constructor.
dd4hep::Torus::Torus
Torus(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1241
dd4hep::Polyhedra::startPhi
double startPhi() const
Accessor: start-phi value.
Definition: Shapes.h:1631
dd4hep::TruncatedTube::dZ
double dZ() const
Accessor: z-half value.
Definition: Shapes.cpp:466
dd4hep::Tube::Tube
Tube(double rmin, double rmax, double dz, double endPhi)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:653
dd4hep::isA
bool isA(const Handle< TGeoShape > &solid)
Type check of various shapes. Do not allow for polymorphism. Types must match exactly.
Definition: ShapeUtilities.cpp:128
dd4hep::Trd2::dX1
double dX1() const
Accessor: delta-x1 value.
Definition: Shapes.h:1205
dd4hep::Handle
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:82
dd4hep::Tube::Tube
Tube(const std::string &nam, double rmin, double rmax, double dz, double startPhi, double endPhi)
Legacy: Constructor to create a new identifiable tube object with attribute initialization.
Definition: Shapes.h:682
dd4hep::Scale::operator=
Scale & operator=(Scale &&copy)=default
Move Assignment operator.
dd4hep::Trap::bottomLow2
double bottomLow2() const
Half length in x at high z and y low edge.
Definition: Shapes.h:1035
dd4hep::Rotation3D
ROOT::Math::Rotation3D Rotation3D
Definition: Objects.h:112
dd4hep::Polycone::z
double z(int which) const
Accessor: z value.
Definition: Shapes.h:517
dd4hep::Tube::operator=
Tube & operator=(Tube &&copy)=default
Move Assignment operator.
dd4hep::Tube::Tube
Tube(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:642
dd4hep::Trap
Class describing a trap shape.
Definition: Shapes.h:975
dd4hep::Torus::Torus
Torus(double r, double rmin, double rmax, double startPhi=M_PI, double deltaPhi=2.*M_PI)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1248
dd4hep::BooleanSolid
Base class describing boolean (=union,intersection,subtraction) solids.
Definition: Shapes.h:1844
dd4hep::Solid_type
Base class for Solid (shape) objects.
Definition: Shapes.h:136
dd4hep::ConeSegment::setDimensions
ConeSegment & setDimensions(double dz, double rmin1, double rmax1, double rmin2, double rmax2, double startPhi=0.0, double endPhi=2.0 *M_PI)
Set the cone segment dimensions.
Definition: Shapes.cpp:302
dd4hep::Cone::rMin2
double rMin2() const
Accessor: r-min-2 value.
Definition: Shapes.h:447
dd4hep::TruncatedTube::operator=
TruncatedTube & operator=(const TruncatedTube &copy)=default
Copy Assignment operator.
dd4hep::Sphere::Sphere
Sphere(const std::string &nam, double rmin, double rmax, double startTheta=0.0, double endTheta=M_PI, double startPhi=0.0, double endPhi=2. *M_PI)
Constructor to create a new identified object with attribute initialization.
Definition: Shapes.h:1327
dd4hep::Solid_type::Solid_type
Solid_type(const Handle< Q > &e)
Constructor to be used when passing an already created object: need to check pointers.
Definition: Shapes.h:160
dd4hep::ConeSegment::rMin2
double rMin2() const
Accessor: r-min-2 value.
Definition: Shapes.h:610
dd4hep::Direction
Position Direction
Definition: Fields.h:28
dd4hep::Box::Box
Box(const Handle< Q > &e)
Copy Constructor to be used with an existing object handle.
Definition: Shapes.h:310
dd4hep::Polyhedra::Polyhedra
Polyhedra()=default
Default constructor.
dd4hep::CutTube::operator=
CutTube & operator=(CutTube &&copy)=default
Move Assignment operator.
dd4hep::PolyhedraRegular::PolyhedraRegular
PolyhedraRegular(const PolyhedraRegular &e)=default
Copy Constructor.
dd4hep::Polyhedra::Polyhedra
Polyhedra(int nsides, double start, double delta, const std::vector< double > &z, const std::vector< double > &r)
Constructor to create a new object. Phi(start), deltaPhi, Z-planes at specified positions.
Definition: Shapes.h:1603
dd4hep::Hyperboloid::Hyperboloid
Hyperboloid(const Hyperboloid &e)=default
Copy Constructor.
dd4hep::EightPointSolid::EightPointSolid
EightPointSolid(EightPointSolid &&e)=default
Move Constructor.
dd4hep::Torus::Torus
Torus(const std::string &nam, double r, double rmin, double rmax, double startPhi=M_PI, double deltaPhi=2.*M_PI)
Constructor to create a new identified object with attribute initialization.
Definition: Shapes.h:1256
dd4hep::SubtractionSolid::SubtractionSolid
SubtractionSolid()=default
Default constructor.
dd4hep::BooleanSolid::BooleanSolid
BooleanSolid(BooleanSolid &&b)=default
Move Constructor.
dd4hep::Trd2::dY1
double dY1() const
Accessor: delta-y1 value.
Definition: Shapes.h:1209
dd4hep::Hyperboloid::Hyperboloid
Hyperboloid(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1448
dd4hep::Solid_type::divide
TGeoVolume * divide(const Volume &voldiv, const std::string &divname, int iaxis, int ndiv, double start, double step) const
Divide volume into subsections (See the ROOT manuloa for details)
Definition: Shapes.cpp:102
dd4hep::ExtrudedPolygon::z
std::vector< double > z() const
Definition: Shapes.h:1706
dd4hep::Paraboloid::Paraboloid
Paraboloid(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1390
dd4hep::TessellatedSolid::Facet
TGeoFacet Facet
Definition: Shapes.h:1782
dd4hep::HalfSpace::make
void make(const std::string &name, const double *const point, const double *const normal)
Internal helper method to support object construction.
Definition: Shapes.cpp:170
dd4hep::Trd1::Trd1
Trd1(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1117
dd4hep::PolyhedraRegular::zPlaneRmin
std::vector< double > zPlaneRmin() const
Accessor: vector of rMin-values for Z-planes value.
Definition: Shapes.h:1569
dd4hep::PolyhedraRegular::numEdges
int numEdges() const
Accessor: Number of edges.
Definition: Shapes.h:1553
dd4hep::ConeSegment::rMax1
double rMax1() const
Accessor: r-max-1 value.
Definition: Shapes.h:612
dd4hep::Tube::rMax
double rMax() const
Accessor: r-max value.
Definition: Shapes.h:705
dd4hep::Box::z
double z() const
Access half "depth" of the box.
Definition: Shapes.cpp:165
dd4hep::Torus::Torus
Torus(const std::string &nam, R r, RMIN rmin, RMAX rmax, STARTPHI startPhi=M_PI, DELTAPHI deltaPhi=2.*M_PI)
Constructor to create a new identified object with attribute initialization.
Definition: Shapes.h:1253
dd4hep::Polyhedra
Class describing a regular polyhedron shape.
Definition: Shapes.h:1583
dd4hep::ExtrudedPolygon::zscale
std::vector< double > zscale() const
Definition: Shapes.h:1709
dd4hep::Box::y
double y() const
Access half "width" of the box.
Definition: Shapes.cpp:160
dd4hep::IntersectionSolid
Class describing boolean intersection solid.
Definition: Shapes.h:1975
dd4hep::Polycone::rMin
double rMin(int which) const
Accessor: r-min value
Definition: Shapes.h:519
dd4hep::ConeSegment::ConeSegment
ConeSegment(const std::string &nam, double dz, double rmin1, double rmax1, double rmin2, double rmax2, double startPhi=0.0, double endPhi=2.0 *M_PI)
Constructor to create a new named ConeSegment object.
Definition: Shapes.h:577
dd4hep::IntersectionSolid::IntersectionSolid
IntersectionSolid(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1984
dd4hep::Paraboloid::Paraboloid
Paraboloid(R_LOW r_low, R_HIGH r_high, DELTA_Z delta_z)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1399
dd4hep::Tube::Tube
Tube()=default
Default constructor.
dd4hep::Scale::operator=
Scale & operator=(const Scale &copy)=default
Copy Assignment operator.
dd4hep::Scale::make
void make(const std::string &name, Solid base_solid, double x_scale, double y_scale, double z_scale)
Internal helper method to support object construction.
Definition: Shapes.cpp:123
dd4hep::Solid_type::Solid_type
Solid_type(const Handle< T > &e)
Copy Constructor from handle.
Definition: Shapes.h:158
dd4hep::Torus::deltaPhi
double deltaPhi() const
Accessor: delta-phi value.
Definition: Shapes.h:1269
dd4hep::TessellatedSolid::TessellatedSolid
TessellatedSolid(const TessellatedSolid &e)=default
Copy Constructor.
dd4hep::ExtrudedPolygon::operator=
ExtrudedPolygon & operator=(const ExtrudedPolygon &copy)=default
Copy Assignment operator.
dd4hep::ConeSegment
Class describing a cone segment shape.
Definition: Shapes.h:543
dd4hep::Trd1::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:1151
dd4hep::Tube::Tube
Tube(const Tube &e)=default
Copy Constructor.
dd4hep::Trd2::Trd2
Trd2(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1179
dd4hep::ConeSegment::ConeSegment
ConeSegment(const Handle< Q > &e)
Constructor to be used when reading the already parsed ConeSegment object.
Definition: Shapes.h:559
dd4hep::Sphere::Sphere
Sphere(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1306
dd4hep::HalfSpace::operator=
HalfSpace & operator=(const HalfSpace &copy)=default
Copy Assignment operator.
dd4hep::CutTube::CutTube
CutTube(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:732
dd4hep::ExtrudedPolygon::ExtrudedPolygon
ExtrudedPolygon()=default
Default constructor.
dd4hep::Torus::Torus
Torus(const Torus &e)=default
Copy Constructor.
dd4hep::TruncatedTube::cutAtStart
double cutAtStart() const
Accessor: cut at start value.
Definition: Shapes.cpp:491
dd4hep::TruncatedTube::TruncatedTube
TruncatedTube(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:795
dd4hep::Trd2
Class describing a Trd2 shape.
Definition: Shapes.h:1164
dd4hep::Polycone::zPlaneZ
std::vector< double > zPlaneZ() const
Accessor: vector of z-values for Z-planes value.
Definition: Shapes.h:524
dd4hep::toStringSolid
std::string toStringSolid(const TGeoShape *shape, int precision=2)
Pretty print of solid attributes.
Definition: ShapeUtilities.cpp:1148
dd4hep::PseudoTrap::PseudoTrap
PseudoTrap(PseudoTrap &&e)=default
Move Constructor.
dd4hep::Hyperboloid::stereoOuter
double stereoOuter() const
Stereo angle for outer surface.
Definition: Shapes.h:1482
dd4hep::TwistedTube::TwistedTube
TwistedTube(const TwistedTube &e)=default
Copy Constructor.
dd4hep::ExtrudedPolygon::ExtrudedPolygon
ExtrudedPolygon(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1677
dd4hep::TwistedTube::TwistedTube
TwistedTube(double twist_angle, double rmin, double rmax, double zneg, double zpos, double totphi)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:928
dd4hep::Trd1::make
void make(const std::string &nam, double x1, double x2, double y, double z)
Internal helper method to support object construction.
Definition: Shapes.cpp:518
dd4hep::EightPointSolid::EightPointSolid
EightPointSolid(const EightPointSolid &e)=default
Copy Constructor.
dd4hep::Trap::Trap
Trap(const std::string &nam, PZ pz, PY py, PX px, PLTX pLTX)
Constructor to create a new identified object with attribute initialization.
Definition: Shapes.h:1012
dd4hep::TwistedTube::TwistedTube
TwistedTube(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:915
dd4hep::Trd1::dX1
double dX1() const
Accessor: delta-x1 value.
Definition: Shapes.h:1145
dd4hep::ConeSegment::ConeSegment
ConeSegment(ConeSegment &&e)=default
Move Constructor.
dd4hep::HalfSpace::position
Position position() const
Accessor: positioning point.
Definition: Shapes.h:383
dd4hep::IntersectionSolid::IntersectionSolid
IntersectionSolid()=default
Default constructor.
dd4hep::Cone::Cone
Cone(double z, double rmin1, double rmax1, double rmin2, double rmax2)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:420
dd4hep::TessellatedSolid::addFacet
bool addFacet(const Vertex &pt0, const Vertex &pt1, const Vertex &pt2) const
Add new facet to the shape.
Definition: Shapes.cpp:811
dd4hep::EightPointSolid::EightPointSolid
EightPointSolid(const std::string &nam, double dz, const double *vertices)
Constructor to create a new identified object with attribute initialization.
Definition: Shapes.h:1742
dd4hep::Trd2::Trd2
Trd2(X1 x1, X2 x2, Y1 y1, Y2 y2, Z z)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1186
dd4hep::Trap::Trap
Trap(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:989
dd4hep::Box::Box
Box(Box &&e)=default
Move constructor.
dd4hep::Trapezoid
Trd2 Trapezoid
Shortcut name definition.
Definition: Shapes.h:1216
dd4hep::Cone::operator=
Cone & operator=(const Cone &copy)=default
Copy Assignment operator.
dd4hep::Trd1::Trd1
Trd1(const std::string &nam, double x1, double x2, double y, double z)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1130
dd4hep::TessellatedSolid::TessellatedSolid
TessellatedSolid(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1792
dd4hep::Box::operator=
Box & operator=(Box &&copy)=default
Move Assignment operator.
dd4hep::Paraboloid::setDimensions
Paraboloid & setDimensions(double r_low, double r_high, double delta_z)
Set the Paraboloid dimensions.
Definition: Shapes.cpp:547
dd4hep::Sphere::endPhi
double endPhi() const
Accessor: end-phi value.
Definition: Shapes.h:1358
dd4hep::Tube::startPhi
double startPhi() const
Accessor: start-phi value.
Definition: Shapes.h:697
dd4hep::BooleanSolid::operator=
BooleanSolid & operator=(const BooleanSolid &copy)=default
Copy Assignment operator.
dd4hep::Box::Box
Box(const X &x_val, const Y &y_val, const Z &z_val)
Constructor to create an anonymous new box object (retrieves name from volume)
Definition: Shapes.h:321
dd4hep::Trd2::Trd2
Trd2(const Trd2 &e)=default
Copy Constructor.
dd4hep::Solid_type::set_dimensions
friend void set_dimensions(Q ptr, const std::vector< double > &params)
dd4hep::CutTube::make
void make(const std::string &name, double rmin, double rmax, double dz, double startPhi, double endPhi, double lx, double ly, double lz, double tx, double ty, double tz)
Internal helper method to support object construction.
Definition: Shapes.cpp:354
dd4hep::Box::Box
Box(double x_val, double y_val, double z_val)
Constructor to create an anonymous new box object (retrieves name from volume)
Definition: Shapes.h:313
dd4hep::ExtrudedPolygon::ExtrudedPolygon
ExtrudedPolygon(const std::vector< double > &pt_x, const std::vector< double > &pt_y, const std::vector< double > &sec_z, const std::vector< double > &sec_x, const std::vector< double > &sec_y, const std::vector< double > &zscale)
Constructor to create a new object.
Definition: Shapes.h:1682
dd4hep::Torus::Torus
Torus(R r, RMIN rmin, RMAX rmax, STARTPHI startPhi=M_PI, DELTAPHI deltaPhi=2.*M_PI)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1245
dd4hep::Hyperboloid::Hyperboloid
Hyperboloid()=default
Default constructor.
dd4hep::PseudoTrap::PseudoTrap
PseudoTrap(const std::string &nam, double x1, double x2, double y1, double y2, double z, double radius, bool minusZ)
Constructor to create a new identified object with attribute initialization.
Definition: Shapes.h:1082
dd4hep::ShapelessSolid::operator=
ShapelessSolid & operator=(ShapelessSolid &&copy)=default
Move Assignment operator.
dd4hep::Volume
Handle class holding a placed volume (also called physical volume)
Definition: Volumes.h:371
dd4hep::TessellatedSolid::make
void make(const std::string &nam, int num_facets)
Internal helper method to support object construction.
Definition: Shapes.cpp:801
dd4hep::Tube::operator=
Tube & operator=(const Tube &copy)=default
Copy Assignment operator.
dd4hep::ConeSegment::operator=
ConeSegment & operator=(ConeSegment &&copy)=default
Move Assignment operator.
dd4hep::Trd1::dY
double dY() const
Accessor: delta-y value.
Definition: Shapes.h:1149
dd4hep::Solid_type::name
const char * name() const
Access to shape name.
Definition: Shapes.cpp:54
dd4hep::EllipticalTube::EllipticalTube
EllipticalTube()=default
Default constructor.
dd4hep::Torus::startPhi
double startPhi() const
Accessor: start-phi value.
Definition: Shapes.h:1267
dd4hep::Scale
Class describing a Scale shape.
Definition: Shapes.h:240
dd4hep::Tube::Tube
Tube(double rmin, double rmax, double dz)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:647
dd4hep::TessellatedSolid::TessellatedSolid
TessellatedSolid(const std::string &nam, int num_facets)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1805
dd4hep::Polyhedra::zPlaneZ
std::vector< double > zPlaneZ() const
Accessor: vector of z-values for Z-planes value.
Definition: Shapes.h:1643
dd4hep::Sphere::endTheta
double endTheta() const
Accessor: end-theta value.
Definition: Shapes.h:1362
dd4hep::TwistedTube::TwistedTube
TwistedTube(const std::string &nam, double twist_angle, double rmin, double rmax, double zneg, double zpos, int nsegments, double totphi)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:949
dd4hep::Cone::setDimensions
Cone & setDimensions(double z, double rmin1, double rmax1, double rmin2, double rmax2)
Set the box dimensions.
Definition: Shapes.cpp:317
dd4hep::Trd1::Trd1
Trd1(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1119
dd4hep::ShapelessSolid::ShapelessSolid
ShapelessSolid(const ShapelessSolid &e)=default
Copy constructor from handle.
dd4hep::Hyperboloid::rMin
double rMin() const
Accessor: r-min value.
Definition: Shapes.h:1476
dd4hep::TwistedTube::TwistedTube
TwistedTube()=default
Default constructor.
dd4hep::Tube::Tube
Tube(const std::string &nam, RMIN rmin, RMAX rmax, DZ dz)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:672
dd4hep::Sphere::Sphere
Sphere(double rmin, double rmax, double startTheta=0.0, double endTheta=M_PI, double startPhi=0.0, double endPhi=2. *M_PI)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1309
dd4hep::Sphere::Sphere
Sphere(const std::string &nam, RMIN rmin, RMAX rmax, STARTTHETA startTheta=0.0, ENDTHETA endTheta=M_PI, STARTPHI startPhi=0.0, ENDPHI endPhi=2. *M_PI)
Constructor to create a new identified object with generic attribute initialization.
Definition: Shapes.h:1336
dd4hep::ShapelessSolid::ShapelessSolid
ShapelessSolid(const Handle< Q > &e)
Constructor to be used with an existing object.
Definition: Shapes.h:221
dd4hep::Trap::theta
double theta() const
Accessor: theta value.
Definition: Shapes.h:1027
dd4hep::EllipticalTube::b
double b() const
Accessor: b value (semi axis along y)
Definition: Shapes.h:886
dd4hep::TwistedTube::TwistedTube
TwistedTube(const Handle< Q > &e)
Constructor to assign an object.
Definition: Shapes.h:917
dd4hep::Polyhedra::z
double z(int which) const
Accessor: z value.
Definition: Shapes.h:1636
dd4hep::HalfSpace::HalfSpace
HalfSpace(HalfSpace &&e)=default
Move Constructor.
dd4hep::Trap::operator=
Trap & operator=(const Trap &copy)=default
Copy Assignment operator.
dd4hep::IntersectionSolid::IntersectionSolid
IntersectionSolid(const IntersectionSolid &e)=default
Copy Constructor.
dd4hep::Hyperboloid::Hyperboloid
Hyperboloid(double rin, double stin, double rout, double stout, double dz)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1451
dd4hep::Hyperboloid::make
void make(const std::string &nam, double rin, double stin, double rout, double stout, double dz)
Constructor function to create a new anonymous object with attribute initialization.
Definition: Shapes.cpp:554
dd4hep::CutTube::CutTube
CutTube(const Handle< Q > &e)
Constructor to assign an object.
Definition: Shapes.h:734
dd4hep::PseudoTrap::PseudoTrap
PseudoTrap()=default
Default constructor.
dd4hep::Cone::Cone
Cone(Cone &&e)=default
Move Constructor.
dd4hep::PolyhedraRegular::operator=
PolyhedraRegular & operator=(PolyhedraRegular &&copy)=default
Move Assignment operator.
dd4hep::PolyhedraRegular::PolyhedraRegular
PolyhedraRegular(NSIDES nsides, RMIN rmin, RMAX rmax, ZLEN zlen)
Constructor to create a new object. Phi(start)=0, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2.
Definition: Shapes.h:1515
dd4hep::Polyhedra::operator=
Polyhedra & operator=(Polyhedra &&copy)=default
Move Assignment operator.
dd4hep::Tube::Tube
Tube(RMIN rmin, RMAX rmax, DZ dz)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:650
dd4hep::Trap::topLow1
double topLow1() const
Half length in x at low z and y high edge.
Definition: Shapes.h:1037
dd4hep::Trd1::setDimensions
Trd1 & setDimensions(double x1, double x2, double y, double z)
Set the Trd1 dimensions.
Definition: Shapes.cpp:523
dd4hep::ConeSegment::ConeSegment
ConeSegment(DZ dz, RMIN1 rmin1, RMAX1 rmax1, RMIN2 rmin2, RMAX2 rmax2, STARTPHI startPhi=0.0, ENDPHI endPhi=2.0 *M_PI)
Constructor to create a new ConeSegment object.
Definition: Shapes.h:570
dd4hep::Trd1::Trd1
Trd1(Trd1 &&e)=default
Move Constructor.
dd4hep::Solid_type::_setDimensions
void _setDimensions(double *param) const
Definition: Shapes.cpp:39
dd4hep::Polycone::operator=
Polycone & operator=(Polycone &&copy)=default
Move Assignment operator.
dd4hep::Paraboloid::Paraboloid
Paraboloid()=default
Default constructor.
dd4hep::CutTube::operator=
CutTube & operator=(const CutTube &copy)=default
Copy Assignment operator.
dd4hep::Sphere::make
void make(const std::string &nam, double rmin, double rmax, double startTheta, double endTheta, double startPhi, double endPhi)
Constructor function to be used when creating a new object with attribute initialization.
Definition: Shapes.cpp:566
dd4hep::TessellatedSolid::TessellatedSolid
TessellatedSolid(TessellatedSolid &&e)=default
Move Constructor.
dd4hep::Trap::alpha2
double alpha2() const
Angle between centers of x edges and y axis at low z.
Definition: Shapes.h:1031
dd4hep::Torus::make
void make(const std::string &nam, double r, double rmin, double rmax, double startPhi, double deltaPhi)
Internal helper method to support object construction.
Definition: Shapes.cpp:580
dd4hep::PolyhedraRegular::operator=
PolyhedraRegular & operator=(const PolyhedraRegular &copy)=default
Copy Assignment operator.
dd4hep::TwistedTube::make
void make(const std::string &nam, double twist_angle, double rmin, double rmax, double zneg, double zpos, int nsegments, double totphi)
Internal helper method to support TwistedTube object construction.
Definition: Shapes.cpp:511
dd4hep::TruncatedTube::rMin
double rMin() const
Accessor: r-min value.
Definition: Shapes.cpp:471
dd4hep::Hyperboloid::stereoInner
double stereoInner() const
Stereo angle for inner surface.
Definition: Shapes.h:1480
dd4hep::SubtractionSolid::SubtractionSolid
SubtractionSolid(SubtractionSolid &&e)=default
Move Constructor.
dd4hep::Polycone::zPlaneRmin
std::vector< double > zPlaneRmin() const
Accessor: vector of rMin-values for Z-planes value.
Definition: Shapes.h:526
dd4hep::ConeSegment::ConeSegment
ConeSegment(const std::string &nam, DZ dz, RMIN1 rmin1, RMAX1 rmax1, RMIN2 rmin2, RMAX2 rmax2, STARTPHI startPhi=0.0, ENDPHI endPhi=2.0 *M_PI)
Constructor to create a new named ConeSegment object.
Definition: Shapes.h:585
dd4hep::Polyhedra::Polyhedra
Polyhedra(int nsides, double start, double delta, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Constructor to create a new object. Phi(start), deltaPhi, Z-planes at specified positions.
Definition: Shapes.h:1609
dd4hep::Torus::r
double r() const
Accessor: r value (torus axial radius)
Definition: Shapes.h:1272
dd4hep::set_shape_dimensions
void set_shape_dimensions(TGeoShape *shape, const std::vector< double > &params)
Set the shape dimensions (As for the TGeo shape, but angles in rad rather than degrees)
Definition: ShapeUtilities.cpp:1139
dd4hep::EightPointSolid::EightPointSolid
EightPointSolid(double dz, const double *vertices)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1738
dd4hep::Sphere::operator=
Sphere & operator=(Sphere &&copy)=default
Move Assignment operator.
dd4hep::BooleanSolid::operator=
BooleanSolid & operator=(BooleanSolid &&copy)=default
Move Assignment operator.
dd4hep::ConeSegment::startPhi
double startPhi() const
Accessor: start-phi value.
Definition: Shapes.h:602
dd4hep::CutTube::CutTube
CutTube(const CutTube &e)=default
Copy Constructor.
dd4hep::Paraboloid::Paraboloid
Paraboloid(double r_low, double r_high, double delta_z)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1395
dd4hep::Cone
Class describing a cone shape.
Definition: Shapes.h:403
dd4hep::Trap::Trap
Trap(const Trap &e)=default
Copy Constructor.
dd4hep::Polycone::Polycone
Polycone()=default
Default constructor.
dd4hep::Polycone::addZPlanes
void addZPlanes(const std::vector< double > &rmin, const std::vector< double > &rmax, const std::vector< double > &z)
Add Z-planes to the Polycone.
Definition: Shapes.cpp:267
dd4hep::Paraboloid::operator=
Paraboloid & operator=(const Paraboloid &copy)=default
Copy Assignment operator.
dd4hep::TruncatedTube::TruncatedTube
TruncatedTube(const Handle< Q > &e)
Constructor to assign an object.
Definition: Shapes.h:797
dd4hep::Tube::Tube
Tube(const std::string &nam, RMIN rmin, RMAX rmax, DZ dz, ENDPHI endPhi)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:679
dd4hep::ConeSegment::rMin1
double rMin1() const
Accessor: r-min-1 value.
Definition: Shapes.h:608
dd4hep::TessellatedSolid::vertex
const Vertex & vertex(int index) const
Access a single vertex from the shape.
Definition: Shapes.cpp:846
dd4hep::Hyperboloid::operator=
Hyperboloid & operator=(Hyperboloid &&copy)=default
Move Assignment operator.
dd4hep::Scale::scale_y
double scale_y() const
Access y-scale factor.
Definition: Shapes.cpp:134
dd4hep::PseudoTrap::operator=
PseudoTrap & operator=(PseudoTrap &&copy)=default
Move Assignment operator.
dd4hep::get_shape_dimensions
std::vector< double > get_shape_dimensions(TGeoShape *shape)
Access Shape dimension parameters (As in TGeo, but angles in radians rather than degrees)
Definition: ShapeUtilities.cpp:607
dd4hep::Trd1::operator=
Trd1 & operator=(const Trd1 &copy)=default
Copy Assignment operator.
dd4hep::Solid_type::Solid_type
Solid_type(Handle< T > &&e)
Move Constructor from handle.
Definition: Shapes.h:156
dd4hep::Handle::m_element
T * m_element
Single and only data member: Reference to the actual element.
Definition: Handle.h:91
dd4hep::EightPointSolid::operator=
EightPointSolid & operator=(EightPointSolid &&copy)=default
Move Assignment operator.
dd4hep::ExtrudedPolygon
Class describing a extruded polygon shape.
Definition: Shapes.h:1659
dd4hep::set_dimensions
void set_dimensions(SOLID solid, const std::vector< double > &params)
Set the shape dimensions. As for the TGeo shape, but angles in rad rather than degrees.
dd4hep::Trd1
Class describing a Trd1 shape.
Definition: Shapes.h:1104
dd4hep::EllipticalTube::EllipticalTube
EllipticalTube(const A &a, const B &b, const DZ &dz)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:863
dd4hep::detail::zPlaneZ
std::vector< double > zPlaneZ(const SOLID *solid)
Definition: Shapes.h:98
dd4hep::Trd2::operator=
Trd2 & operator=(const Trd2 &copy)=default
Move Assignment operator.
dd4hep::Hyperboloid::Hyperboloid
Hyperboloid(const std::string &nam, RIN rin, STIN stin, ROUT rout, STOUT stout, DZ dz)
Constructor to create a new identified object with attribute initialization.
Definition: Shapes.h:1463
dd4hep::Trd2::Trd2
Trd2(Trd2 &&e)=default
Move Constructor.
dd4hep::Trd1::Trd1
Trd1(double x1, double x2, double y, double z)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1122
dd4hep::detail::zPlaneRmax
std::vector< double > zPlaneRmax(const SOLID *solid)
Definition: Shapes.h:106
dd4hep::EllipticalTube::EllipticalTube
EllipticalTube(const std::string &nam, double a, double b, double dz)
Constructor to create a new identified tube object with attribute initialization.
Definition: Shapes.h:867
dd4hep::Cone::make
void make(const std::string &name, double z, double rmin1, double rmax1, double rmin2, double rmax2)
Internal helper method to support object construction.
Definition: Shapes.cpp:312
dd4hep::Polyhedra::deltaPhi
double deltaPhi() const
Accessor: delta-phi value.
Definition: Shapes.h:1633
dd4hep::ExtrudedPolygon::zx
std::vector< double > zx() const
Definition: Shapes.h:1707
dd4hep::Scale::Scale
Scale(const std::string &nam, Solid base_solid, double x_scale, double y_scale, double z_scale)
Constructor to create a named new Scale object (retrieves name from volume)
Definition: Shapes.h:261
dd4hep::TessellatedSolid::facet
const Facet & facet(int index) const
Access a facet from the built shape.
Definition: Shapes.cpp:836
dd4hep::TwistedTube::TwistedTube
TwistedTube(const std::string &nam, double twist_angle, double rmin, double rmax, double zneg, double zpos, double totphi)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:945
dd4hep::Cone::rMax1
double rMax1() const
Accessor: r-max-1 value.
Definition: Shapes.h:449
dd4hep::Solid_type::Solid_type
Solid_type(T *p)
Direct assignment using the implementation pointer.
Definition: Shapes.h:154
dd4hep::Sphere::operator=
Sphere & operator=(const Sphere &copy)=default
Copy Assignment operator.
dd4hep::HalfSpace::HalfSpace
HalfSpace(const HalfSpace &e)=default
Copy Constructor.
dd4hep::Torus::Torus
Torus(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1239
dd4hep::Box::Box
Box(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:308
dd4hep::Tube::Tube
Tube(RMIN rmin, RMAX rmax, DZ dz, STARTPHI startPhi, ENDPHI endPhi)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:664
dd4hep::PolyhedraRegular::make
void make(const std::string &nam, int nsides, double rmin, double rmax, double zpos, double zneg, double start, double delta)
Helper function to create the polyhedron.
Definition: Shapes.cpp:744
dd4hep::ExtrudedPolygon::y
std::vector< double > y() const
Definition: Shapes.h:1705
dd4hep::UnionSolid
Class describing boolean union solid.
Definition: Shapes.h:1927
dd4hep::IntersectionSolid::operator=
IntersectionSolid & operator=(IntersectionSolid &&copy)=default
Move Assignment operator.
dd4hep::EightPointSolid::make
void make(const std::string &nam, double dz, const double *vtx)
Internal helper method to support object construction.
Definition: Shapes.cpp:796
dd4hep::TwistedTube::TwistedTube
TwistedTube(const std::string &nam, const A &a, const B &b, const DZ &dz)
Constructor to create a new identified tube object with attribute initialization.
Definition: Shapes.h:955
dd4hep::HalfSpace::HalfSpace
HalfSpace(const std::string &nam, const double *const point, const double *const normal)
Constructor to create an new named halfspace object from a point on a plane and the plane normal.
Definition: Shapes.h:374
dd4hep::EllipticalTube::operator=
EllipticalTube & operator=(EllipticalTube &&copy)=default
Move Assignment operator.
dd4hep::Torus::rMin
double rMin() const
Accessor: r-min value (inner radius)
Definition: Shapes.h:1274
dd4hep::Trd2::setDimensions
Trd2 & setDimensions(double x1, double x2, double y1, double y2, double z)
Set the Trd2 dimensions.
Definition: Shapes.cpp:535
dd4hep::HalfSpace::HalfSpace
HalfSpace(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:365
dd4hep::Polyhedra::rMax
double rMax(int which) const
Accessor: r-max value.
Definition: Shapes.h:1640
dd4hep::Trd1::Trd1
Trd1(X1 x1, X2 x2, Y y, Z z)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1126
dd4hep::ExtrudedPolygon::make
void make(const std::string &nam, const std::vector< double > &pt_x, const std::vector< double > &pt_y, const std::vector< double > &sec_z, const std::vector< double > &sec_x, const std::vector< double > &sec_y, const std::vector< double > &zscale)
Helper function to create the polygon.
Definition: Shapes.cpp:779
dd4hep::Scale::Scale
Scale()=default
Default constructor.
dd4hep::Trd2::dY2
double dY2() const
Accessor: delta-y2 value.
Definition: Shapes.h:1211
dd4hep::Trd2::dX2
double dX2() const
Accessor: delta-x2 value.
Definition: Shapes.h:1207
dd4hep::CutTube
Class describing a tube shape of a section of a cut tube segment.
Definition: Shapes.h:717
dd4hep::Tube::Tube
Tube(const std::string &nam, double rmin, double rmax, double dz)
Legacy: Constructor to create a new identifiable tube object with attribute initialization.
Definition: Shapes.h:668
dd4hep::Paraboloid::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:1418
dd4hep::Polycone::Polycone
Polycone(const Handle< Q > &e)
Constructor to be used when reading the already parsed polycone object.
Definition: Shapes.h:483
dd4hep::Transform3D
ROOT::Math::Transform3D Transform3D
Definition: Objects.h:116
dd4hep::TruncatedTube::operator=
TruncatedTube & operator=(TruncatedTube &&copy)=default
Move Assignment operator.
dd4hep::Cone::Cone
Cone(const std::string &nam, const Z &z, const RMIN1 &rmin1, const RMAX1 &rmax1, const RMIN2 &rmin2, const RMAX2 &rmax2)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:432
dd4hep::TwistedTube
Class describing a twisted tube shape.
Definition: Shapes.h:901
dd4hep::TruncatedTube::TruncatedTube
TruncatedTube(TruncatedTube &&e)=default
Move Constructor.
dd4hep::EightPointSolid
Class describing an arbitray solid defined by 8 vertices.
Definition: Shapes.h:1721
dd4hep::HalfSpace::HalfSpace
HalfSpace()=default
Default constructor.
dd4hep::UnionSolid::UnionSolid
UnionSolid(UnionSolid &&e)=default
Move Constructor.
dd4hep::detail::zPlaneRmin
std::vector< double > zPlaneRmin(const SOLID *solid)
Definition: Shapes.h:102
dd4hep::TessellatedSolid::TessellatedSolid
TessellatedSolid()=default
Default constructor.
dd4hep::Polycone
Class describing a Polycone shape.
Definition: Shapes.h:472
dd4hep::ExtrudedPolygon::ExtrudedPolygon
ExtrudedPolygon(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1679
dd4hep::ShapelessSolid::ShapelessSolid
ShapelessSolid(ShapelessSolid &&e)=default
Move constructor from handle.
dd4hep::Hyperboloid::Hyperboloid
Hyperboloid(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1446
dd4hep::Tube::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:701
dd4hep::EllipticalTube::EllipticalTube
EllipticalTube(const Handle< Q > &e)
Constructor to assign an object.
Definition: Shapes.h:857
dd4hep::CutTube::CutTube
CutTube()=default
Default constructor.
dd4hep::TwistedTube::TwistedTube
TwistedTube(const std::string &nam, double twist_angle, double rmin, double rmax, double dz, double dphi)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:937
dd4hep::Trap::topLow2
double topLow2() const
Half length in x at high z and y high edge.
Definition: Shapes.h:1039
dd4hep::Position
ROOT::Math::XYZVector Position
Definition: Objects.h:80
dd4hep::TwistedTube::operator=
TwistedTube & operator=(const TwistedTube &copy)=default
Copy Assignment operator.
dd4hep::EightPointSolid::EightPointSolid
EightPointSolid(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1733
dd4hep::Hyperboloid::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:1474
dd4hep::Box::make
void make(const std::string &name, double x_val, double y_val, double z_val)
Internal helper method to support object construction.
Definition: Shapes.cpp:143
dd4hep::PolyhedraRegular::zPlaneRmax
std::vector< double > zPlaneRmax() const
Accessor: vector of rMax-values for Z-planes value.
Definition: Shapes.h:1571
dd4hep::Paraboloid::Paraboloid
Paraboloid(const std::string &nam, R_LOW r_low, R_HIGH r_high, DELTA_Z delta_z)
Constructor to create a new identified object with attribute initialization.
Definition: Shapes.h:1407
dd4hep::CutTube::CutTube
CutTube(CutTube &&e)=default
Move Constructor.
dd4hep::Tube::Tube
Tube(const std::string &nam, double rmin, double rmax, double dz, double endPhi)
Legacy: Constructor to create a new identifiable tube object with attribute initialization.
Definition: Shapes.h:675
dd4hep::_toDouble
double _toDouble(const std::string &value)
String conversions: string to double value.
Definition: Handle.cpp:116
dd4hep::CutTube::startPhi
double startPhi() const
Accessor: start-phi value.
Definition: Shapes.h:751
dd4hep::EllipticalTube::EllipticalTube
EllipticalTube(const EllipticalTube &e)=default
Copy Constructor.
dd4hep::SubtractionSolid::SubtractionSolid
SubtractionSolid(const SubtractionSolid &e)=default
Copy Constructor.
dd4hep::Polyhedra::rMin
double rMin(int which) const
Accessor: r-min value.
Definition: Shapes.h:1638
dd4hep::EllipticalTube::EllipticalTube
EllipticalTube(const std::string &nam, const A &a, const B &b, const DZ &dz)
Constructor to create a new identified tube object with attribute initialization.
Definition: Shapes.h:871
dd4hep::Cone::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:443
dd4hep::Tube::Tube
Tube(const Handle< Q > &e)
Constructor to assign an object.
Definition: Shapes.h:644
dd4hep::Box
Class describing a box shape.
Definition: Shapes.h:295
dd4hep::Sphere::startPhi
double startPhi() const
Accessor: start-phi value.
Definition: Shapes.h:1356
dd4hep::Trap::phi
double phi() const
Accessor: phi value.
Definition: Shapes.h:1025
dd4hep::Handle< TGeoHalfSpace >::access
TGeoHalfSpace * access() const
Checked object access. Throws invalid handle runtime exception if invalid handle.
dd4hep::Scale::scale_x
double scale_x() const
Access x-scale factor.
Definition: Shapes.cpp:129
dd4hep::PolyhedraRegular::deltaPhi
double deltaPhi() const
Accessor: delta-phi value.
Definition: Shapes.h:1557
dd4hep::ExtrudedPolygon::ExtrudedPolygon
ExtrudedPolygon(const std::string &nam, const std::vector< double > &pt_x, const std::vector< double > &pt_y, const std::vector< double > &sec_z, const std::vector< double > &sec_x, const std::vector< double > &sec_y, const std::vector< double > &zscale)
Constructor to create a new identified object.
Definition: Shapes.h:1691
dd4hep::Trap::Trap
Trap(Trap &&e)=default
Move Constructor.
dd4hep::Trd1::Trd1
Trd1(const std::string &nam, X1 x1, X2 x2, Y y, Z z)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1134
dd4hep::PseudoTrap::PseudoTrap
PseudoTrap(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1075
dd4hep::Polyhedra::Polyhedra
Polyhedra(Polyhedra &&e)=default
Move Constructor.
std
Definition: Plugins.h:29
dd4hep::PolyhedraRegular::z
double z(int which) const
Accessor: r-min value.
Definition: Shapes.h:1560
dd4hep::Box::Box
Box()=default
Default constructor.
dd4hep::Scale::Scale
Scale(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:253
dd4hep::Trd1::operator=
Trd1 & operator=(Trd1 &&copy)=default
Move Assignment operator.
dd4hep::EightPointSolid::EightPointSolid
EightPointSolid()=default
Default constructor.
dd4hep::Handle::ptr
T * ptr() const
Access to the held object.
Definition: Handle.h:151
dd4hep::PolyhedraRegular::startPhi
double startPhi() const
Accessor: start-phi value.
Definition: Shapes.h:1555
dd4hep::Cone::rMin1
double rMin1() const
Accessor: r-min-1 value.
Definition: Shapes.h:445
dd4hep::Trd2::Trd2
Trd2(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1177
dd4hep::TruncatedTube::TruncatedTube
TruncatedTube(const TruncatedTube &e)=default
Copy Constructor.
dd4hep::ConeSegment::make
void make(const std::string &name, double dz, double rmin1, double rmax1, double rmin2, double rmax2, double startPhi, double endPhi)
Constructor to be used when creating a new cone segment object.
Definition: Shapes.cpp:291
dd4hep::Polyhedra::Polyhedra
Polyhedra(const std::string &nam, int nsides, double start, double delta, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Constructor to create a new object. Phi(start), deltaPhi, Z-planes at specified positions.
Definition: Shapes.h:1620
dd4hep::Tube::Tube
Tube(const std::string &nam, RMIN rmin, RMAX rmax, DZ dz, STARTPHI startPhi, ENDPHI endPhi)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:686
dd4hep::TessellatedSolid::TessellatedSolid
TessellatedSolid(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1794
dd4hep::Polycone::startPhi
double startPhi() const
Accessor: start-phi value.
Definition: Shapes.h:512
dd4hep::Box::setDimensions
Box & setDimensions(double x_val, double y_val, double z_val)
Set the box dimensions.
Definition: Shapes.cpp:148
dd4hep::Polyhedra::Polyhedra
Polyhedra(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1600
dd4hep::Paraboloid::Paraboloid
Paraboloid(const Paraboloid &e)=default
Copy Constructor.
dd4hep::EllipticalTube::EllipticalTube
EllipticalTube(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:855
dd4hep::BooleanSolid::BooleanSolid
BooleanSolid(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1854
dd4hep::ExtrudedPolygon::x
std::vector< double > x() const
Definition: Shapes.h:1704
dd4hep::TruncatedTube::cutAtDelta
double cutAtDelta() const
Accessor: cut at delta value.
Definition: Shapes.cpp:496
dd4hep::PseudoTrap::operator=
PseudoTrap & operator=(const PseudoTrap &copy)=default
Copy Assignment operator.
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::Sphere
Class describing a sphere shape.
Definition: Shapes.h:1289
dd4hep::Solid_type::toString
std::string toString(int precision=2) const
Conversion to string for pretty print.
Definition: Shapes.h:191
dd4hep::Tube::Tube
Tube(RMIN rmin, RMAX rmax, DZ dz, ENDPHI endPhi)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:657
dd4hep::Solid
Solid_type< TGeoShape > Solid
Definition: Shapes.h:198
dd4hep::Polycone::operator=
Polycone & operator=(const Polycone &copy)=default
Copy Assignment operator.
dd4hep::TessellatedSolid
Class describing a tessellated shape.
Definition: Shapes.h:1773
dd4hep::Solid_type::setDimensions
Solid_type & setDimensions(const std::vector< double > &params)
Set the shape dimensions. As for the TGeo shape, but angles in rad rather than degrees.
Definition: Shapes.cpp:95
dd4hep::Sphere::Sphere
Sphere(const Sphere &e)=default
Copy Constructor.
dd4hep::PseudoTrap::PseudoTrap
PseudoTrap(const PseudoTrap &e)=default
Copy Constructor.
dd4hep::Solid_type::Solid_type
Solid_type()=default
Default constructor for uninitialized object.
dd4hep::Solid_type::type
const char * type() const
Access to shape type (The TClass name of the ROOT implementation)
Definition: Shapes.cpp:82
dd4hep::TessellatedSolid::TessellatedSolid
TessellatedSolid(int num_facets)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1797
dd4hep::TessellatedSolid::Vertex
Object::Vertex_t Vertex
Definition: Shapes.h:1781
dd4hep::TessellatedSolid::operator=
TessellatedSolid & operator=(const TessellatedSolid &copy)=default
Copy Assignment operator.
dd4hep::EllipticalTube::a
double a() const
Accessor: a value (semi axis along x)
Definition: Shapes.h:884
dd4hep::TwistedTube::TwistedTube
TwistedTube(double twist_angle, double rmin, double rmax, double zneg, double zpos, int nsegments, double totphi)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:932
dd4hep::EightPointSolid::operator=
EightPointSolid & operator=(const EightPointSolid &copy)=default
Copy Assignment operator.
dd4hep::PolyhedraRegular::PolyhedraRegular
PolyhedraRegular(int nsides, double phi_start, double rmin, double rmax, double zlen)
Constructor to create a new object with phi_start, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2.
Definition: Shapes.h:1523
dd4hep::Torus::operator=
Torus & operator=(const Torus &copy)=default
Copy Assignment operator.
dd4hep::Paraboloid::Paraboloid
Paraboloid(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1392
dd4hep::EightPointSolid::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:1751
dd4hep::Trap::bottomLow1
double bottomLow1() const
Half length in x at low z and y low edge.
Definition: Shapes.h:1033
dd4hep::Tube::setDimensions
Tube & setDimensions(double rmin, double rmax, double dz, double startPhi=0.0, double endPhi=2 *M_PI)
Set the tube dimensions.
Definition: Shapes.cpp:334
dd4hep::UnionSolid::operator=
UnionSolid & operator=(UnionSolid &&copy)=default
Move Assignment operator.
dd4hep::Trd2::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:1213
dd4hep::Torus::Torus
Torus(Torus &&e)=default
Move Constructor.
dd4hep::TessellatedSolid::TessellatedSolid
TessellatedSolid(const std::vector< Vertex > &vertices)
Constructor to create a new identified object with attribute initialization.
Definition: Shapes.h:1801
TGeoConeSeg
Class of the ROOT toolkit. See http://root.cern.ch/root/htmldoc/ClassIndex.html.
Definition: ROOTClasses.h:17
dd4hep::Trap::Trap
Trap(const std::string &nam, double pz, double py, double px, double pLTX)
Constructor to create a new identified object for right angular wedge from STEP (Se G4 manual for det...
Definition: Shapes.h:1008
dd4hep::Polycone::deltaPhi
double deltaPhi() const
Accessor: delta-phi value.
Definition: Shapes.h:514
dd4hep::isInstance
bool isInstance(const Handle< TGeoShape > &solid)
Type check of various shapes. Result like dynamic_cast. Compare with python's isinstance(obj,...
Definition: ShapeUtilities.cpp:59
dd4hep::PolyhedraRegular::PolyhedraRegular
PolyhedraRegular(NSIDES nsides, PHI_START phi_start, RMIN rmin, RMAX rmax, ZLEN zlen)
Constructor to create a new object with phi_start, deltaPhi=2PI, Z-planes at -zlen/2 and +zlen/2.
Definition: Shapes.h:1527
dd4hep::Polyhedra::Polyhedra
Polyhedra(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1598
dd4hep::BooleanSolid::BooleanSolid
BooleanSolid()=default
Default constructor.
dd4hep::BooleanSolid::rightMatrix
const TGeoMatrix * rightMatrix() const
Access right positioning matrix of the boolean.
Definition: Shapes.cpp:861
dd4hep::SubtractionSolid::operator=
SubtractionSolid & operator=(const SubtractionSolid &copy)=default
Copy Assignment operator.
dd4hep::Cone::operator=
Cone & operator=(Cone &&copy)=default
Move Assignment operator.
dd4hep::detail::tools::copy
void copy(Alignment from, Alignment to)
Copy alignment object from source object.
Definition: AlignmentTools.cpp:43
dd4hep::EllipticalTube::make
void make(const std::string &nam, double a, double b, double dz)
Internal helper method to support object construction.
Definition: Shapes.cpp:506
dd4hep::Sphere::Sphere
Sphere(RMIN rmin, RMAX rmax, STARTTHETA startTheta=0.0, ENDTHETA endTheta=M_PI, STARTPHI startPhi=0.0, ENDPHI endPhi=2. *M_PI)
Constructor to create a new anonymous object with generic attribute initialization.
Definition: Shapes.h:1317
dd4hep::EightPointSolid::EightPointSolid
EightPointSolid(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1735
dd4hep::PolyhedraRegular::PolyhedraRegular
PolyhedraRegular()=default
Default constructor.
dd4hep::ShapelessSolid::ShapelessSolid
ShapelessSolid()=default
Default constructor.
dd4hep::BooleanSolid::rightShape
Solid rightShape() const
Access right solid of the boolean.
Definition: Shapes.cpp:851
dd4hep::RotationZYX
ROOT::Math::RotationZYX RotationZYX
Definition: Objects.h:104
dd4hep::ExtrudedPolygon::zy
std::vector< double > zy() const
Definition: Shapes.h:1708
dd4hep::Hyperboloid::setDimensions
Hyperboloid & setDimensions(double rin, double stin, double rout, double stout, double dz)
Set the Hyperboloid dimensions.
Definition: Shapes.cpp:559
dd4hep::PolyhedraRegular::PolyhedraRegular
PolyhedraRegular(PolyhedraRegular &&e)=default
Move Constructor.
dd4hep::ConeSegment::operator=
ConeSegment & operator=(const ConeSegment &copy)=default
Copy Assignment operator.
dd4hep::Trd2::Trd2
Trd2(double x1, double x2, double y1, double y2, double z)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1182
dd4hep::EllipticalTube::EllipticalTube
EllipticalTube(EllipticalTube &&e)=default
Move Constructor.
dd4hep::SubtractionSolid::SubtractionSolid
SubtractionSolid(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1888
dd4hep::Trd2::Trd2
Trd2(const std::string &nam, double x1, double x2, double y1, double y2, double z)
Constructor to create a new identified object with attribute initialization.
Definition: Shapes.h:1190
dd4hep::ConeSegment::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:606
dd4hep::Tube::make
void make(const std::string &nam, double rmin, double rmax, double z, double startPhi, double endPhi)
Internal helper method to support object construction.
Definition: Shapes.cpp:324
dd4hep::Trd1::dX2
double dX2() const
Accessor: delta-x2 value.
Definition: Shapes.h:1147
dd4hep::ShapelessSolid::operator=
ShapelessSolid & operator=(const ShapelessSolid &copy)=default
Copy Assignment operator.
dd4hep::CutTube::lowNormal
std::vector< double > lowNormal() const
Accessor: lower normal vector of cut plane.
Definition: Shapes.h:761
dd4hep::Polyhedra::make
void make(const std::string &nam, int nsides, double start, double delta, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Helper function to create the polyhedron.
Definition: Shapes.cpp:756
dd4hep::detail::_extract_vector
std::vector< double > _extract_vector(const SOLID *solid, double(SOLID::*extract)(Int_t) const, Int_t(SOLID::*len)() const)
Definition: Shapes.h:90
dd4hep::CutTube::rMax
double rMax() const
Accessor: r-max value.
Definition: Shapes.h:759
dd4hep::Solid_type::setName
Solid_type< T > & setName(const char *value)
Set new shape name.
Definition: Shapes.cpp:70
DD4hepUnits.h
dd4hep::EllipticalTube::operator=
EllipticalTube & operator=(const EllipticalTube &copy)=default
Copy Assignment operator.
dd4hep::Tube
Class describing a tube shape of a section of a tube.
Definition: Shapes.h:629
dd4hep::TwistedTube::setDimensions
TwistedTube & setDimensions(double a, double b, double dz)
Set the tube dimensions.
dd4hep::TessellatedSolid::num_facet
int num_facet() const
Access the number of facets in the shape.
Definition: Shapes.cpp:831
dd4hep::Box::Box
Box(const std::string &nam, const X &x_val, const Y &y_val, const Z &z_val)
Constructor to create a named new box object (retrieves name from volume)
Definition: Shapes.h:325
dd4hep::TwistedTube::TwistedTube
TwistedTube(TwistedTube &&e)=default
Move Constructor.
dd4hep::Solid_type::dimensions
std::vector< double > dimensions()
Access the dimensions of the shape: inverse of the setDimensions member function.
Definition: Shapes.cpp:90
dd4hep::Box::operator=
Box & operator=(const Box &copy)=default
Copy Assignment operator.
dd4hep::Hyperboloid::Hyperboloid
Hyperboloid(const std::string &nam, double rin, double stin, double rout, double stout, double dz)
Constructor to create a new identified object with attribute initialization.
Definition: Shapes.h:1459
dd4hep::Solid_type::operator=
Solid_type & operator=(Solid_type &&copy)=default
Assignment move operator.
dd4hep::PseudoTrap::PseudoTrap
PseudoTrap(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1073
dd4hep::get_shape_tag
std::string get_shape_tag(const TGeoShape *shape)
Retrieve tag name from shape type.
Definition: ShapeUtilities.cpp:185
dd4hep::detail::_make_vector
std::vector< double > _make_vector(const double *values, size_t length)
Definition: Shapes.h:87
dd4hep::BooleanSolid::BooleanSolid
BooleanSolid(const BooleanSolid &b)=default
Copy Constructor.
dd4hep::Scale::Scale
Scale(const Scale &e)=default
Copy constructor.
dd4hep::PolyhedraRegular::zPlaneZ
std::vector< double > zPlaneZ() const
Accessor: vector of z-values for Z-planes value.
Definition: Shapes.h:1567
dd4hep::Paraboloid::rHigh
double rHigh() const
Accessor: r-max value.
Definition: Shapes.h:1422
dd4hep::ConeSegment::rMax2
double rMax2() const
Accessor: r-max-2 value.
Definition: Shapes.h:614
dd4hep::Paraboloid::Paraboloid
Paraboloid(const std::string &nam, double r_low, double r_high, double delta_z)
Constructor to create a new identified object with attribute initialization.
Definition: Shapes.h:1403
dd4hep::Scale::scale_z
double scale_z() const
Access z-scale factor.
Definition: Shapes.cpp:139
dd4hep::HalfSpace::operator=
HalfSpace & operator=(HalfSpace &&copy)=default
Move Assignment operator.
dd4hep::HalfSpace::HalfSpace
HalfSpace(const Handle< Q > &e)
Constructor to be used with an existing object.
Definition: Shapes.h:367
dd4hep::toStringMesh
std::string toStringMesh(const TGeoShape *shape, int precision=2)
Output mesh vertices to string.
Definition: ShapeUtilities.cpp:1295
dd4hep::ExtrudedPolygon::ExtrudedPolygon
ExtrudedPolygon(const ExtrudedPolygon &e)=default
Copy Constructor.
dd4hep::Sphere::setDimensions
Sphere & setDimensions(double rmin, double rmax, double startTheta, double endTheta, double startPhi, double endPhi)
Set the Sphere dimensions.
Definition: Shapes.cpp:573
dd4hep::Polycone::Polycone
Polycone(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:481
dd4hep::ConeSegment::ConeSegment
ConeSegment(const ConeSegment &e)=default
Copy Constructor.
dd4hep::Trap::Trap
Trap(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:987
dd4hep::Cone::rMax2
double rMax2() const
Accessor: r-max-2 value.
Definition: Shapes.h:451
dd4hep::Trap::Trap
Trap()=default
Default constructor.
dd4hep::SubtractionSolid
Class describing boolean subtraction solid.
Definition: Shapes.h:1879
dd4hep::TwistedTube::TwistedTube
TwistedTube(double twist_angle, double rmin, double rmax, double dz, double dphi)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:920
dd4hep::EllipticalTube::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:882
dd4hep::Polyhedra::numEdges
int numEdges() const
Accessor: Number of edges.
Definition: Shapes.h:1629
dd4hep::Polyhedra::Polyhedra
Polyhedra(const std::string &nam, int nsides, double start, double delta, const std::vector< double > &z, const std::vector< double > &r)
Constructor to create a new object. Phi(start), deltaPhi, Z-planes at specified positions.
Definition: Shapes.h:1614
dd4hep::Hyperboloid::rMax
double rMax() const
Accessor: r-max value.
Definition: Shapes.h:1478
dd4hep::Solid_type::Solid_type
Solid_type(Solid_type &&e)=default
Move constructor.
dd4hep::Polyhedra::zPlaneRmax
std::vector< double > zPlaneRmax() const
Accessor: vector of rMax-values for Z-planes value.
Definition: Shapes.h:1647
dd4hep::ShapelessSolid::ShapelessSolid
ShapelessSolid(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:219
dd4hep::Hyperboloid::Hyperboloid
Hyperboloid(Hyperboloid &&e)=default
Move Constructor.
dd4hep::Sphere::rMax
double rMax() const
Accessor: r-max value.
Definition: Shapes.h:1366
dd4hep::CutTube::endPhi
double endPhi() const
Accessor: end-phi value.
Definition: Shapes.h:753
dd4hep::Polyhedra::zPlaneRmin
std::vector< double > zPlaneRmin() const
Accessor: vector of rMin-values for Z-planes value.
Definition: Shapes.h:1645
dd4hep::Paraboloid::Paraboloid
Paraboloid(Paraboloid &&e)=default
Move Constructor.
dd4hep::TruncatedTube::make
void make(const std::string &name, double dz, double rmin, double rmax, double startPhi, double deltaPhi, double cutAtStart, double cutAtDelta, bool cutInside)
Internal helper method to support object construction.
Definition: Shapes.cpp:371
dd4hep::Torus::operator=
Torus & operator=(Torus &&copy)=default
Move Assignment operator.
dd4hep::Paraboloid
Class describing a Paraboloid shape.
Definition: Shapes.h:1379
dd4hep::Trd1::Trd1
Trd1()=default
Default constructor.
dd4hep::BooleanSolid::leftMatrix
const TGeoMatrix * leftMatrix() const
Access left positioning matrix of the boolean.
Definition: Shapes.cpp:866
dd4hep::Trap::alpha1
double alpha1() const
Angle between centers of x edges and y axis at low z.
Definition: Shapes.h:1029
dd4hep::Trd2::Trd2
Trd2(const std::string &nam, X1 x1, X2 x2, Y1 y1, Y2 y2, Z z)
Constructor to create a new identified object with attribute initialization.
Definition: Shapes.h:1194
dd4hep::Trd1::Trd1
Trd1(const Trd1 &e)=default
Copy Constructor.
dd4hep::TwistedTube::TwistedTube
TwistedTube(const std::string &nam, double twist_angle, double rmin, double rmax, double dz, int nsegments, double totphi)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:941
dd4hep::EllipticalTube::setDimensions
EllipticalTube & setDimensions(double a, double b, double dz)
Set the tube dimensions.
dd4hep::ConeSegment::ConeSegment
ConeSegment(double dz, double rmin1, double rmax1, double rmin2, double rmax2, double startPhi=0.0, double endPhi=2.0 *M_PI)
Constructor to create a new ConeSegment object.
Definition: Shapes.h:562
dd4hep::Paraboloid::rLow
double rLow() const
Accessor: r-min value.
Definition: Shapes.h:1420
dd4hep::TessellatedSolid::TessellatedSolid
TessellatedSolid(const std::string &nam, const std::vector< Vertex > &vertices)
Constructor to create a new identified object with attribute initialization.
Definition: Shapes.h:1809
dd4hep::Box::Box
Box(const Box &e)=default
Copy constructor.
dd4hep::ConeSegment::ConeSegment
ConeSegment()=default
Default constructor.