DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
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 
25 #ifdef __GNUC__
26 #pragma GCC diagnostic push
27 #pragma GCC diagnostic ignored "-Wdeprecated" // Code that causes warning goes here
28 #endif
29 
30 // ROOT include files
31 #include <TGeoCone.h>
32 #include <TGeoPgon.h>
33 #include <TGeoPcon.h>
34 #include <TGeoArb8.h>
35 #include <TGeoTrd1.h>
36 #include <TGeoTrd2.h>
37 #include <TGeoTube.h>
38 #include <TGeoEltu.h>
39 #include <TGeoXtru.h>
40 #include <TGeoHype.h>
41 #include <TGeoTorus.h>
42 #include <TGeoSphere.h>
43 #include <TGeoHalfSpace.h>
44 #include <TGeoParaboloid.h>
45 #include <TGeoScaledShape.h>
46 #include <TGeoCompositeShape.h>
47 #include <TGeoShapeAssembly.h>
48 #include <TGeoPara.h>
49 #include <TGeoTessellated.h>
50 
51 #ifdef __GNUC__
52 #pragma GCC diagnostic pop
53 #endif
54 
56 namespace dd4hep {
57 
58  class Volume;
59 
61  std::string toStringSolid(const TGeoShape* shape, int precision=2);
63 
65  std::string toStringMesh(const TGeoShape* shape, int precision=2);
66 
68  std::string get_shape_tag(const TGeoShape* shape);
69 
71  std::vector<double> get_shape_dimensions(TGeoShape* shape);
72 
74  void set_shape_dimensions(TGeoShape* shape, const std::vector<double>& params);
75 
77  template <typename SOLID> bool isInstance(const Handle<TGeoShape>& solid);
79  template <typename SOLID> bool isA(const Handle<TGeoShape>& solid);
81  template <typename SOLID> std::vector<double> dimensions(const Handle<TGeoShape>& solid);
83  template <typename SOLID> void set_dimensions(SOLID solid, const std::vector<double>& params);
84 
85  namespace detail {
86  inline std::vector<double> _make_vector(const double* values, size_t length) {
87  return {values, values+length};
88  }
89  template <typename SOLID> std::vector<double> _extract_vector(const SOLID* solid,
90  double (SOLID::*extract)(Int_t) const,
91  Int_t (SOLID::*len)() const) {
92  std::vector<double> result;
93  Int_t count = (solid->*len)();
94  for(Int_t i=0; i<count; ++i) result.emplace_back((solid->*extract)(i));
95  return result;
96  }
97  template <typename SOLID> std::vector<double> zPlaneZ(const SOLID* solid) {
98  const auto* shape = solid->access();
99  return _make_vector(shape->GetZ(), shape->GetNz());
100  }
101  template <typename SOLID> std::vector<double> zPlaneRmin(const SOLID* solid) {
102  const auto* shape = solid->access();
103  return _make_vector(shape->GetRmin(), shape->GetNz());
104  }
105  template <typename SOLID> std::vector<double> zPlaneRmax(const SOLID* solid) {
106  const auto* shape = solid->access();
107  return _make_vector(shape->GetRmax(), shape->GetNz());
108  }
109 
110  }
111 
113 
135  template <typename T> class Solid_type: public Handle<T> {
136  public:
137  template <typename Q> friend void set_dimensions(Q ptr, const std::vector<double>& params);
138 
139  protected:
140  void _setDimensions(double* param) const;
142  void _assign(T* n, const std::string& nam, const std::string& tit, bool cbbox);
143 
144  public:
145 
147  Solid_type() = default;
149  Solid_type(Solid_type&& e) = default;
151  Solid_type(const Solid_type& e) = default;
153  Solid_type(T* p) : Handle<T>(p) { }
155  Solid_type(Handle<T>&& e) : Handle<T>(std::move(e)) { }
157  Solid_type(const Handle<T>& e) : Handle<T>(e) { }
159  template <typename Q> Solid_type(const Handle<Q>& e) : Handle<T>(e) { }
163  Solid_type& operator=(const Solid_type& copy) = default;
164 
166  const char* name() const;
168  Solid_type<T>& setName(const char* value);
170  Solid_type<T>& setName(const std::string& value);
171 
173  const char* title() const;
174 
176  const char* type() const;
178  operator T*() const {
179  return this->m_element;
180  }
182  T* operator->() const {
183  return this->m_element;
184  }
186  std::vector<double> dimensions();
188  Solid_type& setDimensions(const std::vector<double>& params);
190  std::string toString(int precision=2) const {
191  return toStringSolid(this->m_element,precision);
192  }
194  TGeoVolume* divide(const Volume& voldiv, const std::string& divname,
195  int iaxis, int ndiv, double start, double step) const;
196  };
198 
200 
209  class ShapelessSolid: public Solid_type<TGeoShapeAssembly> {
210  public:
212  ShapelessSolid() = default;
216  ShapelessSolid(const ShapelessSolid& e) = default;
218  template <typename Q> ShapelessSolid(const Q* p) : Solid_type<TGeoShapeAssembly>(p) { }
220  template <typename Q> ShapelessSolid(const Handle<Q>& e) : Solid_type<TGeoShapeAssembly>(e) { }
222  ShapelessSolid(const std::string& name);
227  };
228 
230 
239  class Scale : public Solid_type<TGeoScaledShape> {
240  protected:
242  void make(const std::string& name, Solid base_solid, double x_scale, double y_scale, double z_scale);
243 
244  public:
246  Scale() = default;
248  Scale(Scale&& e) = default;
250  Scale(const Scale& e) = default;
252  template <typename Q> Scale(const Q* p) : Solid_type<TGeoScaledShape>(p) { }
254  template <typename Q> Scale(const Handle<Q>& e) : Solid_type<TGeoScaledShape>(e) { }
255 
257  Scale(Solid base_solid, double x_scale, double y_scale, double z_scale)
258  { make("", base_solid, x_scale, y_scale, z_scale); }
260  Scale(const std::string& nam, Solid base_solid, double x_scale, double y_scale, double z_scale)
261  { make(nam.c_str(), base_solid, x_scale, y_scale, z_scale); }
262 
264  template <typename X, typename Y, typename Z>
265  Scale(Solid base_solid, const X& x_scale, const Y& y_scale, const Z& z_scale)
266  { make("", base_solid, _toDouble(x_scale), _toDouble(y_scale), _toDouble(z_scale)); }
268  template <typename X, typename Y, typename Z>
269  Scale(const std::string& nam, Solid base_solid, const X& x_scale, const Y& y_scale, const Z& z_scale)
270  { make(nam.c_str(), base_solid, _toDouble(x_scale), _toDouble(y_scale), _toDouble(z_scale)); }
271 
273  Scale& operator=(Scale&& copy) = default;
275  Scale& operator=(const Scale& copy) = default;
277  double scale_x() const;
279  double scale_y() const;
281  double scale_z() const;
282  };
283 
285 
294  class Box : public Solid_type<TGeoBBox> {
295  protected:
297  void make(const std::string& name, double x_val, double y_val, double z_val);
298 
299  public:
301  Box() = default;
303  Box(Box&& e) = default;
305  Box(const Box& e) = default;
307  template <typename Q> Box(const Q* p) : Solid_type<TGeoBBox>(p) { }
309  template <typename Q> Box(const Handle<Q>& e) : Solid_type<TGeoBBox>(e) { }
310 
312  Box(double x_val, double y_val, double z_val)
313  { make("", x_val, y_val, z_val); }
315  Box(const std::string& nam, double x_val, double y_val, double z_val)
316  { make(nam.c_str(), x_val, y_val, z_val); }
317 
319  template <typename X, typename Y, typename Z>
320  Box(const X& x_val, const Y& y_val, const Z& z_val)
321  { make("", _toDouble(x_val), _toDouble(y_val), _toDouble(z_val)); }
323  template <typename X, typename Y, typename Z>
324  Box(const std::string& nam, const X& x_val, const Y& y_val, const Z& z_val)
325  { make(nam.c_str(), _toDouble(x_val), _toDouble(y_val), _toDouble(z_val)); }
326 
328  Box& operator=(Box&& copy) = default;
330  Box& operator=(const Box& copy) = default;
332  Box& setDimensions(double x_val, double y_val, double z_val);
334  double x() const;
336  double y() const;
338  double z() const;
339  };
340 
342 
351  class HalfSpace : public Solid_type<TGeoHalfSpace> {
352  protected:
354  void make(const std::string& name, const double* const point, const double* const normal);
355 
356  public:
358  HalfSpace() = default;
360  HalfSpace(HalfSpace&& e) = default;
362  HalfSpace(const HalfSpace& e) = default;
364  template <typename Q> HalfSpace(const Q* p) : Solid_type<Object>(p) { }
366  template <typename Q> HalfSpace(const Handle<Q>& e) : Solid_type<Object>(e) { }
367 
369  HalfSpace(const double* const point, const double* const normal)
370  { make("", point, normal); }
371 
373  HalfSpace(const std::string& nam, const double* const point, const double* const normal)
374  { make(nam.c_str(), point, normal); }
375 
379  HalfSpace& operator=(const HalfSpace& copy) = default;
380 
382  Position position() const {
383  const double* pos = access()->GetPoint();
384  return {pos[0], pos[1], pos[2]};
385  }
387  Direction normal() const {
388  const double* n = access()->GetNorm();
389  return {n[0], n[1], n[2]};
390  }
391  };
392 
394 
402  class Cone : public Solid_type<TGeoCone> {
403  protected:
405  void make(const std::string& name, double z, double rmin1, double rmax1, double rmin2, double rmax2);
406  public:
408  Cone() = default;
410  Cone(Cone&& e) = default;
412  Cone(const Cone& e) = default;
414  template <typename Q> Cone(const Q* p) : Solid_type<Object>(p) { }
416  template <typename Q> Cone(const Handle<Q>& e) : Solid_type<Object>(e) { }
417 
419  Cone(double z, double rmin1, double rmax1, double rmin2, double rmax2)
420  { this->make("", z, rmin1, rmax1, rmin2, rmax2); }
422  template <typename Z, typename RMIN1, typename RMAX1, typename RMIN2, typename RMAX2>
423  Cone(const Z& z, const RMIN1& rmin1, const RMAX1& rmax1, const RMIN2& rmin2, const RMAX2& rmax2)
424  { this->make("", _toDouble(z), _toDouble(rmin1), _toDouble(rmax1), _toDouble(rmin2), _toDouble(rmax2)); }
425 
427  Cone(const std::string& nam, double z, double rmin1, double rmax1, double rmin2, double rmax2)
428  { this->make(nam, z, rmin1, rmax1, rmin2, rmax2); }
430  template <typename Z, typename RMIN1, typename RMAX1, typename RMIN2, typename RMAX2>
431  Cone(const std::string& nam, const Z& z, const RMIN1& rmin1, const RMAX1& rmax1, const RMIN2& rmin2, const RMAX2& rmax2)
432  { this->make(nam, _toDouble(z), _toDouble(rmin1), _toDouble(rmax1), _toDouble(rmin2), _toDouble(rmax2)); }
433 
435  Cone& operator=(Cone&& copy) = default;
437  Cone& operator=(const Cone& copy) = default;
439  Cone& setDimensions(double z, double rmin1, double rmax1, double rmin2, double rmax2);
440 
442  double dZ() const { return access()->GetDz(); }
444  double rMin1() const { return access()->GetRmin1(); }
446  double rMin2() const { return access()->GetRmin2(); }
448  double rMax1() const { return access()->GetRmax1(); }
450  double rMax2() const { return access()->GetRmax2(); }
451  };
452 
454 
471  class Polycone : public Solid_type<TGeoPcon> {
472  public:
474  Polycone() = default;
476  Polycone(Polycone&& e) = default;
478  Polycone(const Polycone& e) = default;
480  template <typename Q> Polycone(const Q* p) : Solid_type<Object>(p) { }
482  template <typename Q> Polycone(const Handle<Q>& e) : Solid_type<Object>(e) { }
483 
485  Polycone(double startPhi, double deltaPhi);
487  Polycone(double startPhi, double deltaPhi,
488  const std::vector<double>& r, const std::vector<double>& z);
490  Polycone(double startPhi, double deltaPhi,
491  const std::vector<double>& rmin, const std::vector<double>& rmax, const std::vector<double>& z);
492 
494  Polycone(const std::string& name, double startPhi, double deltaPhi);
496  Polycone(const std::string& name, double startPhi, double deltaPhi,
497  const std::vector<double>& r, const std::vector<double>& z);
499  Polycone(const std::string& name, double startPhi, double deltaPhi,
500  const std::vector<double>& rmin, const std::vector<double>& rmax, const std::vector<double>& z);
501 
505  Polycone& operator=(const Polycone& copy) = default;
506 
508  void addZPlanes(const std::vector<double>& rmin, const std::vector<double>& rmax, const std::vector<double>& z);
509 
511  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
513  double deltaPhi() const { return access()->GetDphi()*dd4hep::deg; }
514 
516  double z(int which) const { return access()->GetZ(which); }
518  double rMin(int which) const { return access()->GetRmin(which); }
520  double rMax(int which) const { return access()->GetRmax(which); }
521 
523  std::vector<double> zPlaneZ() const { return detail::zPlaneZ(this); }
525  std::vector<double> zPlaneRmin() const { return detail::zPlaneRmin(this); }
527  std::vector<double> zPlaneRmax() const { return detail::zPlaneRmax(this); }
528  };
529 
531 
542  class ConeSegment : public Solid_type<TGeoConeSeg> {
543  void make(const std::string& name,
544  double dz,
545  double rmin1, double rmax1,
546  double rmin2, double rmax2,
547  double startPhi, double endPhi);
548  public:
550  ConeSegment() = default;
552  ConeSegment(ConeSegment&& e) = default;
554  ConeSegment(const ConeSegment& e) = default;
556  template <typename Q> ConeSegment(const Q* p) : Solid_type<Object>(p) { }
558  template <typename Q> ConeSegment(const Handle<Q>& e) : Solid_type<Object>(e) { }
559 
561  ConeSegment(double dz, double rmin1, double rmax1,
562  double rmin2, double rmax2, double startPhi = 0.0, double endPhi = 2.0 * M_PI)
563  { make("", dz, rmin1, rmax1, rmin2, rmax2, startPhi, endPhi); }
565  template <typename DZ,
566  typename RMIN1, typename RMAX1,
567  typename RMIN2, typename RMAX2,
568  typename STARTPHI, typename ENDPHI>
569  ConeSegment(DZ dz, RMIN1 rmin1, RMAX1 rmax1, RMIN2 rmin2, RMAX2 rmax2,
570  STARTPHI startPhi = 0.0, ENDPHI endPhi = 2.0 * M_PI)
571  { make("", _toDouble(dz),
572  _toDouble(rmin1), _toDouble(rmax1),
573  _toDouble(rmin2), _toDouble(rmax2),
576  ConeSegment(const std::string& nam, double dz, double rmin1, double rmax1,
577  double rmin2, double rmax2, double startPhi = 0.0, double endPhi = 2.0 * M_PI)
578  { make(nam, dz, rmin1, rmax1, rmin2, rmax2, startPhi, endPhi); }
580  template <typename DZ,
581  typename RMIN1, typename RMAX1,
582  typename RMIN2, typename RMAX2,
583  typename STARTPHI, typename ENDPHI>
584  ConeSegment(const std::string& nam, DZ dz, RMIN1 rmin1, RMAX1 rmax1, RMIN2 rmin2, RMAX2 rmax2,
585  STARTPHI startPhi = 0.0, ENDPHI endPhi = 2.0 * M_PI)
586  { make(nam, _toDouble(dz),
587  _toDouble(rmin1), _toDouble(rmax1),
588  _toDouble(rmin2), _toDouble(rmax2),
590 
594  ConeSegment& operator=(const ConeSegment& copy) = default;
596  ConeSegment& setDimensions(double dz, double rmin1, double rmax1,
597  double rmin2, double rmax2,
598  double startPhi = 0.0, double endPhi = 2.0 * M_PI);
599 
601  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
603  double endPhi() const { return access()->GetPhi2()*dd4hep::deg; }
605  double dZ() const { return access()->GetDz(); }
607  double rMin1() const { return access()->GetRmin1(); }
609  double rMin2() const { return access()->GetRmin2(); }
611  double rMax1() const { return access()->GetRmax1(); }
613  double rMax2() const { return access()->GetRmax2(); }
614  };
615 
617 
628  class Tube : public Solid_type<TGeoTubeSeg> {
629  protected:
631  void make(const std::string& nam, double rmin, double rmax, double z, double startPhi, double endPhi);
632 
633  public:
635  Tube() = default;
637  Tube(Tube&& e) = default;
639  Tube(const Tube& e) = default;
641  template <typename Q> Tube(const Q* p) : Solid_type<Object>(p) { }
643  template <typename Q> Tube(const Handle<Q>& e) : Solid_type<Object>(e) { }
644 
646  Tube(double rmin, double rmax, double dz)
647  { this->make("", rmin, rmax, dz, 0, 2*M_PI); }
649  template <typename RMIN, typename RMAX, typename DZ> Tube(RMIN rmin, RMAX rmax, DZ dz)
650  { this->make("", _toDouble(rmin), _toDouble(rmax), _toDouble(dz), 0, 2*M_PI); }
652  Tube(double rmin, double rmax, double dz, double endPhi)
653  { this->make("", rmin, rmax, dz, 0, endPhi); }
655  template <typename RMIN, typename RMAX, typename DZ, typename ENDPHI>
656  Tube(RMIN rmin, RMAX rmax, DZ dz, ENDPHI endPhi)
657  { this->make("", _toDouble(rmin), _toDouble(rmax), _toDouble(dz), 0, _toDouble(endPhi)); }
659  Tube(double rmin, double rmax, double dz, double startPhi, double endPhi)
660  { this->make("", rmin, rmax, dz, startPhi, endPhi); }
662  template <typename RMIN, typename RMAX, typename DZ, typename STARTPHI, typename ENDPHI>
663  Tube(RMIN rmin, RMAX rmax, DZ dz, STARTPHI startPhi, ENDPHI endPhi)
664  { this->make("", _toDouble(rmin), _toDouble(rmax), _toDouble(dz), _toDouble(startPhi), _toDouble(endPhi)); }
665 
667  Tube(const std::string& nam, double rmin, double rmax, double dz)
668  { this->make(nam, rmin, rmax, dz, 0, 2*M_PI); }
670  template <typename RMIN, typename RMAX, typename DZ>
671  Tube(const std::string& nam, RMIN rmin, RMAX rmax, DZ dz)
672  { this->make(nam, _toDouble(rmin), _toDouble(rmax), _toDouble(dz), 0, 2*M_PI); }
674  Tube(const std::string& nam, double rmin, double rmax, double dz, double endPhi)
675  { this->make(nam, rmin, rmax, dz, 0, endPhi); }
677  template <typename RMIN, typename RMAX, typename DZ, typename ENDPHI>
678  Tube(const std::string& nam, RMIN rmin, RMAX rmax, DZ dz, ENDPHI endPhi)
679  { this->make(nam, _toDouble(rmin), _toDouble(rmax), _toDouble(dz), 0, _toDouble(endPhi)); }
681  Tube(const std::string& nam, double rmin, double rmax, double dz, double startPhi, double endPhi)
682  { this->make(nam, rmin, rmax, dz, startPhi, endPhi); }
684  template <typename RMIN, typename RMAX, typename DZ, typename STARTPHI, typename ENDPHI>
685  Tube(const std::string& nam, RMIN rmin, RMAX rmax, DZ dz, STARTPHI startPhi, ENDPHI endPhi)
686  { this->make(nam, _toDouble(rmin), _toDouble(rmax), _toDouble(dz), _toDouble(startPhi), _toDouble(endPhi)); }
687 
689  Tube& operator=(Tube&& copy) = default;
691  Tube& operator=(const Tube& copy) = default;
693  Tube& setDimensions(double rmin, double rmax, double dz, double startPhi=0.0, double endPhi=2*M_PI);
694 
696  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
698  double endPhi() const { return access()->GetPhi2()*dd4hep::deg; }
700  double dZ() const { return access()->GetDz(); }
702  double rMin() const { return access()->GetRmin(); }
704  double rMax() const { return access()->GetRmax(); }
705  };
706 
708 
716  class CutTube : public Solid_type<TGeoCtub> {
717  protected:
719  void make(const std::string& name,
720  double rmin, double rmax, double dz, double startPhi, double endPhi,
721  double lx, double ly, double lz, double tx, double ty, double tz);
722 
723  public:
725  CutTube() = default;
727  CutTube(CutTube&& e) = default;
729  CutTube(const CutTube& e) = default;
731  template <typename Q> CutTube(const Q* p) : Solid_type<Object>(p) { }
733  template <typename Q> CutTube(const Handle<Q>& e) : Solid_type<Object>(e) { }
734 
736  CutTube(double rmin, double rmax, double dz, double startPhi, double endPhi,
737  double lx, double ly, double lz, double tx, double ty, double tz);
738 
740  CutTube(const std::string& name,
741  double rmin, double rmax, double dz, double startPhi, double endPhi,
742  double lx, double ly, double lz, double tx, double ty, double tz);
743 
745  CutTube& operator=(CutTube&& copy) = default;
747  CutTube& operator=(const CutTube& copy) = default;
748 
750  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
752  double endPhi() const { return access()->GetPhi2()*dd4hep::deg; }
754  double dZ() const { return access()->GetDz(); }
756  double rMin() const { return access()->GetRmin(); }
758  double rMax() const { return access()->GetRmax(); }
760  std::vector<double> lowNormal() const { return detail::_make_vector(access()->GetNlow(), 3); }
762  std::vector<double> highNormal() const { return detail::_make_vector(access()->GetNhigh(), 3); }
763  };
764 
765 
767 
779  class TruncatedTube : public Solid_type<TGeoCompositeShape> {
780  protected:
782  void make(const std::string& name,
783  double dz, double rmin, double rmax, double startPhi, double deltaPhi,
784  double cutAtStart, double cutAtDelta, bool cutInside);
785 
786  public:
788  TruncatedTube() = default;
790  TruncatedTube(TruncatedTube&& e) = default;
792  TruncatedTube(const TruncatedTube& e) = default;
794  template <typename Q> TruncatedTube(const Q* p) : Solid_type<Object>(p) { }
796  template <typename Q> TruncatedTube(const Handle<Q>& e) : Solid_type<Object>(e) { }
797 
799  TruncatedTube(double dz, double rmin, double rmax, double startPhi, double deltaPhi,
800  double cutAtStart, double cutAtDelta, bool cutInside);
801 
803  TruncatedTube(const std::string& name,
804  double dz, double rmin, double rmax, double startPhi, double deltaPhi,
805  double cutAtStart, double cutAtDelta, bool cutInside);
806 
812  double dZ() const;
814  double rMin() const;
816  double rMax() const;
818  double startPhi() const;
820  double deltaPhi() const;
822  double cutAtStart() const;
824  double cutAtDelta() const;
826  bool cutInside() const;
827  };
828 
830 
841  class EllipticalTube : public Solid_type<TGeoEltu> {
842  protected:
844  void make(const std::string& nam, double a, double b, double dz);
845 
846  public:
848  EllipticalTube() = default;
852  EllipticalTube(const EllipticalTube& e) = default;
854  template <typename Q> EllipticalTube(const Q* p) : Solid_type<Object>(p) { }
856  template <typename Q> EllipticalTube(const Handle<Q>& e) : Solid_type<Object>(e) { }
857 
859  EllipticalTube(double a, double b, double dz) { this->make("", a, b, dz); }
861  template <typename A, typename B, typename DZ>
862  EllipticalTube(const A& a, const B& b, const DZ& dz)
863  { this->make("",_toDouble(a), _toDouble(b), _toDouble(dz)); }
864 
866  EllipticalTube(const std::string& nam, double a, double b, double dz)
867  { this->make(nam, a, b, dz); }
869  template <typename A, typename B, typename DZ>
870  EllipticalTube(const std::string& nam, const A& a, const B& b, const DZ& dz)
871  { this->make(nam, _toDouble(a), _toDouble(b), _toDouble(dz)); }
872 
878  EllipticalTube& setDimensions(double a, double b, double dz);
879 
881  double dZ() const { return access()->GetDz(); }
883  double a() const { return access()->GetA(); }
885  double b() const { return access()->GetB(); }
886  };
887 
889 
900  class TwistedTube : public Solid_type<TGeoTubeSeg> {
901  protected:
903  void make(const std::string& nam, double twist_angle, double rmin, double rmax,
904  double zneg, double zpos, int nsegments, double totphi);
905 
906  public:
908  TwistedTube() = default;
910  TwistedTube(TwistedTube&& e) = default;
912  TwistedTube(const TwistedTube& e) = default;
914  template <typename Q> TwistedTube(const Q* p) : Solid_type<Object>(p) { }
916  template <typename Q> TwistedTube(const Handle<Q>& e) : Solid_type<Object>(e) { }
917 
919  TwistedTube(double twist_angle, double rmin, double rmax,
920  double dz, double dphi)
921  { this->make("", twist_angle, rmin, rmax, -dz, dz, 1, dphi); }
923  TwistedTube(double twist_angle, double rmin, double rmax,
924  double dz, int nsegments, double totphi)
925  { this->make("", twist_angle, rmin, rmax, -dz, dz, nsegments, totphi); }
927  TwistedTube(double twist_angle, double rmin, double rmax,
928  double zneg, double zpos, double totphi)
929  { this->make("", twist_angle, rmin, rmax, zneg, zpos, 1, totphi); }
931  TwistedTube(double twist_angle, double rmin, double rmax,
932  double zneg, double zpos, int nsegments, double totphi)
933  { this->make("", twist_angle, rmin, rmax, zneg, zpos, nsegments, totphi); }
934 
936  TwistedTube(const std::string& nam, double twist_angle, double rmin, double rmax,
937  double dz, double dphi)
938  { this->make(nam, twist_angle, rmin, rmax, -dz, dz, 1, dphi); }
940  TwistedTube(const std::string& nam, double twist_angle, double rmin, double rmax,
941  double dz, int nsegments, double totphi)
942  { this->make(nam, twist_angle, rmin, rmax, -dz, dz, nsegments, totphi); }
944  TwistedTube(const std::string& nam, double twist_angle, double rmin, double rmax,
945  double zneg, double zpos, double totphi)
946  { this->make(nam, twist_angle, rmin, rmax, zneg, zpos, 1, totphi); }
948  TwistedTube(const std::string& nam, double twist_angle, double rmin, double rmax,
949  double zneg, double zpos, int nsegments, double totphi)
950  { this->make(nam, twist_angle, rmin, rmax, zneg, zpos, nsegments, totphi); }
951 
953  template <typename A, typename B, typename DZ>
954  TwistedTube(const std::string& nam, const A& a, const B& b, const DZ& dz)
955  { this->make(nam, _toDouble(a), _toDouble(b), _toDouble(dz)); }
956 
960  TwistedTube& operator=(const TwistedTube& copy) = default;
962  TwistedTube& setDimensions(double a, double b, double dz);
963  };
964 
966 
974  class Trap : public Solid_type<TGeoTrap> {
975  private:
977  void make(const std::string& name, double pz, double py, double px, double pLTX);
978  public:
980  Trap() = default;
982  Trap(Trap&& e) = default;
984  Trap(const Trap& e) = default;
986  template <typename Q> Trap(const Q* p) : Solid_type<Object>(p) { }
988  template <typename Q> Trap(const Handle<Q>& e) : Solid_type<Object>(e) { }
989 
991  Trap(double z, double theta, double phi,
992  double h1, double bl1, double tl1, double alpha1,
993  double h2, double bl2, double tl2, double alpha2);
995  Trap(double pz, double py, double px, double pLTX)
996  { this->make("", pz,py,px,pLTX); }
998  template <typename PZ,typename PY,typename PX,typename PLTX> Trap(PZ pz, PY py, PX px, PLTX pLTX)
999  { this->make("", _toDouble(pz),_toDouble(py),_toDouble(px),_toDouble(pLTX)); }
1000 
1002  Trap(const std::string& name,
1003  double z, double theta, double phi,
1004  double h1, double bl1, double tl1, double alpha1,
1005  double h2, double bl2, double tl2, double alpha2);
1007  Trap(const std::string& nam, double pz, double py, double px, double pLTX)
1008  { this->make(nam, pz,py,px,pLTX); }
1010  template <typename PZ,typename PY,typename PX,typename PLTX>
1011  Trap(const std::string& nam, PZ pz, PY py, PX px, PLTX pLTX)
1012  { this->make(nam, _toDouble(pz),_toDouble(py),_toDouble(px),_toDouble(pLTX)); }
1013 
1015  Trap& operator=(Trap&& copy) = default;
1017  Trap& operator=(const Trap& copy) = default;
1019  Trap& setDimensions(double z, double theta, double phi,
1020  double h1, double bl1, double tl1, double alpha1,
1021  double h2, double bl2, double tl2, double alpha2);
1022 
1024  double phi() const { return access()->GetPhi()*dd4hep::deg; }
1026  double theta() const { return access()->GetTheta()*dd4hep::deg; }
1028  double alpha1() const { return access()->GetAlpha1()*dd4hep::deg; }
1030  double alpha2() const { return access()->GetAlpha2()*dd4hep::deg; }
1032  double bottomLow1() const { return access()->GetBl1(); }
1034  double bottomLow2() const { return access()->GetBl2(); }
1036  double topLow1() const { return access()->GetTl1(); }
1038  double topLow2() const { return access()->GetTl2(); }
1040  double high1() const { return access()->GetH1(); }
1042  double high2() const { return access()->GetH2(); }
1044  double dZ() const { return access()->GetDz(); }
1045  };
1046 
1048 
1060  class PseudoTrap : public Solid_type<TGeoCompositeShape> {
1061  private:
1063  void make(const std::string& nam, double x1, double x2, double y1, double y2, double z, double radius, bool minusZ);
1064  public:
1066  PseudoTrap() = default;
1068  PseudoTrap(PseudoTrap&& e) = default;
1070  PseudoTrap(const PseudoTrap& e) = default;
1072  template <typename Q> PseudoTrap(const Q* p) : Solid_type<Object>(p) { }
1074  template <typename Q> PseudoTrap(const Handle<Q>& e) : Solid_type<Object>(e) { }
1075 
1077  PseudoTrap(double x1, double x2, double y1, double y2, double z, double radius, bool minusZ)
1078  { this->make("", x1, x2, y1, y2, z, radius, minusZ); }
1079 
1081  PseudoTrap(const std::string& nam,
1082  double x1, double x2,
1083  double y1, double y2,
1084  double z, double radius, bool minusZ)
1085  { this->make(nam, x1, x2, y1, y2, z, radius, minusZ); }
1086 
1090  PseudoTrap& operator=(const PseudoTrap& copy) = default;
1091  };
1092 
1094 
1103  class Trd1 : public Solid_type<TGeoTrd1> {
1104  private:
1106  void make(const std::string& nam, double x1, double x2, double y, double z);
1107 
1108  public:
1110  Trd1() = default;
1112  Trd1(Trd1&& e) = default;
1114  Trd1(const Trd1& e) = default;
1116  template <typename Q> Trd1(const Q* p) : Solid_type<Object>(p) { }
1118  template <typename Q> Trd1(const Handle<Q>& e) : Solid_type<Object>(e) { }
1119 
1121  Trd1(double x1, double x2, double y, double z)
1122  { this->make("", x1, x2, y, z); }
1124  template <typename X1,typename X2,typename Y,typename Z>
1125  Trd1(X1 x1, X2 x2, Y y, Z z)
1126  { this->make("", _toDouble(x1),_toDouble(x2),_toDouble(y),_toDouble(z)); }
1127 
1129  Trd1(const std::string& nam, double x1, double x2, double y, double z)
1130  { this->make(nam, x1, x2, y, z); }
1132  template <typename X1,typename X2,typename Y,typename Z>
1133  Trd1(const std::string& nam, X1 x1, X2 x2, Y y, Z z)
1134  { this->make(nam, _toDouble(x1),_toDouble(x2),_toDouble(y),_toDouble(z)); }
1135 
1137  Trd1& operator=(Trd1&& copy) = default;
1139  Trd1& operator=(const Trd1& copy) = default;
1141  Trd1& setDimensions(double x1, double x2, double y, double z);
1142 
1144  double dX1() const { return access()->GetDx1(); }
1146  double dX2() const { return access()->GetDx2(); }
1148  double dY() const { return access()->GetDy(); }
1150  double dZ() const { return access()->GetDz(); }
1151  };
1152 
1154 
1163  class Trd2 : public Solid_type<TGeoTrd2> {
1164  private:
1166  void make(const std::string& nam, double x1, double x2, double y1, double y2, double z);
1167 
1168  public:
1170  Trd2() = default;
1172  Trd2(Trd2&& e) = default;
1174  Trd2(const Trd2& e) = default;
1176  template <typename Q> Trd2(const Q* p) : Solid_type<Object>(p) { }
1178  template <typename Q> Trd2(const Handle<Q>& e) : Solid_type<Object>(e) { }
1179 
1181  Trd2(double x1, double x2, double y1, double y2, double z)
1182  { this->make("", x1, x2, y1, y2, z); }
1184  template <typename X1,typename X2,typename Y1,typename Y2,typename Z>
1185  Trd2(X1 x1, X2 x2, Y1 y1, Y2 y2, Z z)
1186  { this->make("", _toDouble(x1),_toDouble(x2),_toDouble(y1),_toDouble(y2),_toDouble(z)); }
1187 
1189  Trd2(const std::string& nam, double x1, double x2, double y1, double y2, double z)
1190  { this->make(nam, x1, x2, y1, y2, z); }
1192  template <typename X1,typename X2,typename Y1,typename Y2,typename Z>
1193  Trd2(const std::string& nam, X1 x1, X2 x2, Y1 y1, Y2 y2, Z z)
1194  { this->make(nam, _toDouble(x1),_toDouble(x2),_toDouble(y1),_toDouble(y2),_toDouble(z)); }
1195 
1197  Trd2& operator=(Trd2&& copy) = default;
1199  Trd2& operator=(const Trd2& copy) = default;
1201  Trd2& setDimensions(double x1, double x2, double y1, double y2, double z);
1202 
1204  double dX1() const { return access()->GetDx1(); }
1206  double dX2() const { return access()->GetDx2(); }
1208  double dY1() const { return access()->GetDy1(); }
1210  double dY2() const { return access()->GetDy2(); }
1212  double dZ() const { return access()->GetDz(); }
1213  };
1215  typedef Trd2 Trapezoid;
1216 
1218 
1226  class Torus : public Solid_type<TGeoTorus> {
1227  private:
1229  void make(const std::string& nam, double r, double rmin, double rmax, double startPhi, double deltaPhi);
1230  public:
1232  Torus() = default;
1234  Torus(Torus&& e) = default;
1236  Torus(const Torus& e) = default;
1238  template <typename Q> Torus(const Q* p) : Solid_type<Object>(p) { }
1240  template <typename Q> Torus(const Handle<Q>& e) : Solid_type<Object>(e) { }
1241 
1243  template<typename R, typename RMIN, typename RMAX, typename STARTPHI, typename DELTAPHI>
1244  Torus(R r, RMIN rmin, RMAX rmax, STARTPHI startPhi=M_PI, DELTAPHI deltaPhi = 2.*M_PI)
1245  { this->make("", _toDouble(r),_toDouble(rmin),_toDouble(rmax),_toDouble(startPhi),_toDouble(deltaPhi)); }
1247  Torus(double r, double rmin, double rmax, double startPhi=M_PI, double deltaPhi = 2.*M_PI)
1248  { this->make("", r, rmin, rmax, startPhi, deltaPhi); }
1249 
1251  template<typename R, typename RMIN, typename RMAX, typename STARTPHI, typename DELTAPHI>
1252  Torus(const std::string& nam, R r, RMIN rmin, RMAX rmax, STARTPHI startPhi=M_PI, DELTAPHI deltaPhi = 2.*M_PI)
1253  { this->make(nam, _toDouble(r),_toDouble(rmin),_toDouble(rmax),_toDouble(startPhi),_toDouble(deltaPhi)); }
1255  Torus(const std::string& nam, double r, double rmin, double rmax, double startPhi=M_PI, double deltaPhi = 2.*M_PI)
1256  { this->make(nam, r, rmin, rmax, startPhi, deltaPhi); }
1257 
1259  Torus& operator=(Torus&& copy) = default;
1261  Torus& operator=(const Torus& copy) = default;
1263  Torus& setDimensions(double r, double rmin, double rmax, double startPhi, double deltaPhi);
1264 
1266  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
1268  double deltaPhi() const { return access()->GetDphi()*dd4hep::deg; }
1269 
1271  double r() const { return access()->GetR(); }
1273  double rMin() const { return access()->GetRmin(); }
1275  double rMax() const { return access()->GetRmax(); }
1276  };
1277 
1279 
1288  class Sphere : public Solid_type<TGeoSphere> {
1289  protected:
1291  void make(const std::string& nam,
1292  double rmin, double rmax,
1293  double startTheta, double endTheta,
1294  double startPhi, double endPhi);
1295  public:
1297  Sphere() = default;
1299  Sphere(Sphere&& e) = default;
1301  Sphere(const Sphere& e) = default;
1303  template <typename Q> Sphere(const Q* p) : Solid_type<Object>(p) { }
1305  template <typename Q> Sphere(const Handle<Q>& e) : Solid_type<Object>(e) { }
1306 
1308  Sphere(double rmin, double rmax,
1309  double startTheta= 0.0, double endTheta = M_PI,
1310  double startPhi = 0.0, double endPhi = 2. * M_PI)
1311  { this->make("", rmin, rmax, startTheta, endTheta, startPhi, endPhi); }
1313  template<typename RMIN, typename RMAX,
1314  typename STARTTHETA=double, typename ENDTHETA=double,
1315  typename STARTPHI=double, typename ENDPHI=double>
1316  Sphere(RMIN rmin, RMAX rmax,
1317  STARTTHETA startTheta = 0.0, ENDTHETA endTheta = M_PI,
1318  STARTPHI startPhi = 0.0, ENDPHI endPhi = 2. * M_PI) {
1319  this->make("",
1320  _toDouble(rmin), _toDouble(rmax),
1323  }
1324 
1326  Sphere(const std::string& nam,
1327  double rmin, double rmax,
1328  double startTheta= 0.0, double endTheta = M_PI,
1329  double startPhi = 0.0, double endPhi = 2. * M_PI)
1330  { this->make(nam, rmin, rmax, startTheta, endTheta, startPhi, endPhi); }
1332  template<typename RMIN, typename RMAX,
1333  typename STARTTHETA=double, typename ENDTHETA=double,
1334  typename STARTPHI=double, typename ENDPHI=double>
1335  Sphere(const std::string& nam,
1336  RMIN rmin, RMAX rmax,
1337  STARTTHETA startTheta = 0.0, ENDTHETA endTheta = M_PI,
1338  STARTPHI startPhi = 0.0, ENDPHI endPhi = 2. * M_PI) {
1339  this->make(nam,
1340  _toDouble(rmin), _toDouble(rmax),
1343  }
1344 
1346  Sphere& operator=(Sphere&& copy) = default;
1348  Sphere& operator=(const Sphere& copy) = default;
1350  Sphere& setDimensions(double rmin, double rmax,
1351  double startTheta, double endTheta,
1352  double startPhi, double endPhi);
1353 
1355  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
1357  double endPhi() const { return access()->GetPhi2()*dd4hep::deg; }
1359  double startTheta() const { return access()->GetTheta1()*dd4hep::deg; }
1361  double endTheta() const { return access()->GetTheta2()*dd4hep::deg; }
1363  double rMin() const { return access()->GetRmin(); }
1365  double rMax() const { return access()->GetRmax(); }
1366  };
1367 
1369 
1378  class Paraboloid : public Solid_type<TGeoParaboloid> {
1380  void make(const std::string& nam, double r_low, double r_high, double delta_z);
1381  public:
1383  Paraboloid() = default;
1385  Paraboloid(Paraboloid&& e) = default;
1387  Paraboloid(const Paraboloid& e) = default;
1389  template <typename Q> Paraboloid(const Q* p) : Solid_type<Object>(p) { }
1391  template <typename Q> Paraboloid(const Handle<Q>& e) : Solid_type<Object>(e) { }
1392 
1394  Paraboloid(double r_low, double r_high, double delta_z)
1395  { this->make("", r_low, r_high, delta_z); }
1397  template<typename R_LOW, typename R_HIGH, typename DELTA_Z>
1398  Paraboloid(R_LOW r_low, R_HIGH r_high, DELTA_Z delta_z)
1399  { this->make("", _toDouble(r_low), _toDouble(r_high), _toDouble(delta_z)); }
1400 
1402  Paraboloid(const std::string& nam, double r_low, double r_high, double delta_z)
1403  { this->make(nam, r_low, r_high, delta_z); }
1405  template<typename R_LOW, typename R_HIGH, typename DELTA_Z>
1406  Paraboloid(const std::string& nam, R_LOW r_low, R_HIGH r_high, DELTA_Z delta_z)
1407  { this->make(nam, _toDouble(r_low), _toDouble(r_high), _toDouble(delta_z)); }
1408 
1412  Paraboloid& operator=(const Paraboloid& copy) = default;
1414  Paraboloid& setDimensions(double r_low, double r_high, double delta_z);
1415 
1417  double dZ() const { return access()->GetDz(); }
1419  double rLow() const { return access()->GetRlo(); }
1421  double rHigh() const { return access()->GetRhi(); }
1422  };
1423 
1425 
1434  class Hyperboloid : public Solid_type<TGeoHype> {
1436  void make(const std::string& nam, double rin, double stin, double rout, double stout, double dz);
1437  public:
1439  Hyperboloid() = default;
1441  Hyperboloid(Hyperboloid&& e) = default;
1443  Hyperboloid(const Hyperboloid& e) = default;
1445  template <typename Q> Hyperboloid(const Q* p) : Solid_type<Object>(p) { }
1447  template <typename Q> Hyperboloid(const Handle<Q>& e) : Solid_type<Object>(e) { }
1448 
1450  Hyperboloid(double rin, double stin, double rout, double stout, double dz)
1451  { make("", rin, stin, rout, stout, dz); }
1453  template <typename RIN, typename STIN, typename ROUT, typename STOUT, typename DZ>
1454  Hyperboloid(RIN rin, STIN stin, ROUT rout, STOUT stout, DZ dz)
1455  { make("", _toDouble(rin), _toDouble(stin), _toDouble(rout), _toDouble(stout), _toDouble(dz)); }
1456 
1458  Hyperboloid(const std::string& nam, double rin, double stin, double rout, double stout, double dz)
1459  { make(nam, rin, stin, rout, stout, dz); }
1461  template <typename RIN, typename STIN, typename ROUT, typename STOUT, typename DZ>
1462  Hyperboloid(const std::string& nam, RIN rin, STIN stin, ROUT rout, STOUT stout, DZ dz)
1463  { make(nam, _toDouble(rin), _toDouble(stin), _toDouble(rout), _toDouble(stout), _toDouble(dz)); }
1464 
1470  Hyperboloid& setDimensions(double rin, double stin, double rout, double stout, double dz);
1471 
1473  double dZ() const { return access()->GetDz(); }
1475  double rMin() const { return access()->GetRmin(); }
1477  double rMax() const { return access()->GetRmax(); }
1479  double stereoInner() const { return access()->GetStIn(); }
1481  double stereoOuter() const { return access()->GetStOut(); }
1482  };
1483 
1485 
1493  class PolyhedraRegular : public Solid_type<TGeoPgon> {
1494  protected:
1496  void make(const std::string& nam, int nsides, double rmin, double rmax, double zpos, double zneg, double start, double delta);
1497  public:
1499  PolyhedraRegular() = default;
1503  PolyhedraRegular(const PolyhedraRegular& e) = default;
1505  template <typename Q> PolyhedraRegular(const Q* p) : Solid_type<Object>(p) { }
1507  template <typename Q> PolyhedraRegular(const Handle<Q>& e) : Solid_type<Object>(e) { }
1508 
1510  PolyhedraRegular(int nsides, double rmin, double rmax, double zlen)
1511  { this->make("", nsides, rmin, rmax, zlen / 2, -zlen / 2, 0, 2.0*M_PI); }
1513  template <typename NSIDES, typename RMIN, typename RMAX, typename ZLEN>
1514  PolyhedraRegular(NSIDES nsides, RMIN rmin, RMAX rmax, ZLEN zlen)
1515  {
1516  this->make("", _toDouble(nsides),
1517  _toDouble(rmin), _toDouble(rmax),
1518  _toDouble(zlen) / 2, -_toDouble(zlen) / 2,
1519  0, 2.0*M_PI);
1520  }
1522  PolyhedraRegular(int nsides, double phi_start, double rmin, double rmax, double zlen)
1523  { this->make("", nsides, rmin, rmax, zlen / 2, -zlen / 2, phi_start, 2.0*M_PI); }
1525  template <typename NSIDES, typename PHI_START, typename RMIN, typename RMAX, typename ZLEN>
1526  PolyhedraRegular(NSIDES nsides, PHI_START phi_start, RMIN rmin, RMAX rmax, ZLEN zlen)
1527  {
1528  this->make("", _toDouble(nsides),
1529  _toDouble(rmin), _toDouble(rmax),
1530  _toDouble(zlen) / 2, -_toDouble(zlen) / 2,
1531  _toDouble(phi_start), 2.0*M_PI);
1532  }
1534  PolyhedraRegular(int nsides, double rmin, double rmax, double zplanes[2])
1535  { this->make("", nsides, rmin, rmax, zplanes[0], zplanes[1], 0, 2.0*M_PI); }
1536 
1538  PolyhedraRegular(const std::string& nam, int nsides, double rmin, double rmax, double zlen)
1539  { this->make(nam, nsides, rmin, rmax, zlen / 2, -zlen / 2, 0, 2.0*M_PI); }
1541  PolyhedraRegular(const std::string& nam, int nsides, double phi_start, double rmin, double rmax, double zlen)
1542  { this->make(nam, nsides, rmin, rmax, zlen / 2, -zlen / 2, phi_start, 2.0*M_PI); }
1544  PolyhedraRegular(const std::string& nam, int nsides, double rmin, double rmax, double zplanes[2])
1545  { this->make(nam, nsides, rmin, rmax, zplanes[0], zplanes[1], 0, 2.0*M_PI); }
1550 
1552  int numEdges() const { return access()->GetNedges(); }
1554  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
1556  double deltaPhi() const { return access()->GetDphi()*dd4hep::deg; }
1557 
1559  double z(int which) const { return access()->GetZ(which); }
1561  double rMin(int which) const { return access()->GetRmin(which); }
1563  double rMax(int which) const { return access()->GetRmax(which); }
1564 
1566  std::vector<double> zPlaneZ() const { return detail::zPlaneZ(this); }
1568  std::vector<double> zPlaneRmin() const { return detail::zPlaneRmin(this); }
1570  std::vector<double> zPlaneRmax() const { return detail::zPlaneRmax(this); }
1571  };
1572 
1574 
1582  class Polyhedra : public Solid_type<TGeoPgon> {
1583  protected:
1585  void make(const std::string& nam, int nsides, double start, double delta,
1586  const std::vector<double>& z,
1587  const std::vector<double>& rmin,
1588  const std::vector<double>& rmax);
1589  public:
1591  Polyhedra() = default;
1593  Polyhedra(Polyhedra&& e) = default;
1595  Polyhedra(const Polyhedra& e) = default;
1597  template <typename Q> Polyhedra(const Q* p) : Solid_type<Object>(p) { }
1599  template <typename Q> Polyhedra(const Handle<Q>& e) : Solid_type<Object>(e) { }
1600 
1602  Polyhedra(int nsides, double start, double delta,
1603  const std::vector<double>& z, const std::vector<double>& r) {
1604  std::vector<double> rmin(r.size(), 0e0);
1605  this->make("", nsides, start, delta, z, rmin, r);
1606  }
1608  Polyhedra(int nsides, double start, double delta,
1609  const std::vector<double>& z, const std::vector<double>& rmin, const std::vector<double>& rmax)
1610  { this->make("", nsides, start, delta, z, rmin, rmax); }
1611 
1613  Polyhedra(const std::string& nam, int nsides, double start, double delta,
1614  const std::vector<double>& z, const std::vector<double>& r) {
1615  std::vector<double> rmin(r.size(), 0e0);
1616  this->make(nam, nsides, start, delta, z, rmin, r);
1617  }
1619  Polyhedra(const std::string& nam, int nsides, double start, double delta,
1620  const std::vector<double>& z, const std::vector<double>& rmin, const std::vector<double>& rmax)
1621  { this->make(nam, nsides, start, delta, z, rmin, rmax); }
1625  Polyhedra& operator=(const Polyhedra& copy) = default;
1626 
1628  int numEdges() const { return access()->GetNedges(); }
1630  double startPhi() const { return access()->GetPhi1()*dd4hep::deg; }
1632  double deltaPhi() const { return access()->GetDphi()*dd4hep::deg; }
1633 
1635  double z(int which) const { return access()->GetZ(which); }
1637  double rMin(int which) const { return access()->GetRmin(which); }
1639  double rMax(int which) const { return access()->GetRmax(which); }
1640 
1642  std::vector<double> zPlaneZ() const { return detail::zPlaneZ(this); }
1644  std::vector<double> zPlaneRmin() const { return detail::zPlaneRmin(this); }
1646  std::vector<double> zPlaneRmax() const { return detail::zPlaneRmax(this); }
1647  };
1648 
1650 
1658  class ExtrudedPolygon : public Solid_type<TGeoXtru> {
1659  protected:
1661  void make(const std::string& nam,
1662  const std::vector<double> & pt_x,
1663  const std::vector<double> & pt_y,
1664  const std::vector<double> & sec_z,
1665  const std::vector<double> & sec_x,
1666  const std::vector<double> & sec_y,
1667  const std::vector<double> & zscale);
1668  public:
1670  ExtrudedPolygon() = default;
1674  ExtrudedPolygon(const ExtrudedPolygon& e) = default;
1676  template <typename Q> ExtrudedPolygon(const Q* p) : Solid_type<Object>(p) { }
1678  template <typename Q> ExtrudedPolygon(const Handle<Q>& e) : Solid_type<Object>(e) { }
1679 
1681  ExtrudedPolygon(const std::vector<double> & pt_x,
1682  const std::vector<double> & pt_y,
1683  const std::vector<double> & sec_z,
1684  const std::vector<double> & sec_x,
1685  const std::vector<double> & sec_y,
1686  const std::vector<double> & zscale)
1687  { this->make("", pt_x, pt_y, sec_z, sec_x, sec_y, zscale); }
1688 
1690  ExtrudedPolygon(const std::string& nam,
1691  const std::vector<double> & pt_x,
1692  const std::vector<double> & pt_y,
1693  const std::vector<double> & sec_z,
1694  const std::vector<double> & sec_x,
1695  const std::vector<double> & sec_y,
1696  const std::vector<double> & zscale)
1697  { this->make(nam, pt_x, pt_y, sec_z, sec_x, sec_y, zscale); }
1702 
1703  std::vector<double> x() const { return detail::_extract_vector(this->access(), &TGeoXtru::GetX, &TGeoXtru::GetNvert); }
1704  std::vector<double> y() const { return detail::_extract_vector(this->access(), &TGeoXtru::GetY, &TGeoXtru::GetNvert); }
1705  std::vector<double> z() const { return detail::zPlaneZ(this); }
1706  std::vector<double> zx() const { return detail::_extract_vector(this->access(), &TGeoXtru::GetXOffset, &TGeoXtru::GetNz); }
1707  std::vector<double> zy() const { return detail::_extract_vector(this->access(), &TGeoXtru::GetYOffset, &TGeoXtru::GetNz); }
1708  std::vector<double> zscale() const { return detail::_extract_vector(this->access(), &TGeoXtru::GetScale, &TGeoXtru::GetNz); }
1709  };
1710 
1712 
1720  class EightPointSolid : public Solid_type<TGeoArb8> {
1721  private:
1723  void make(const std::string& nam, double dz, const double* vtx);
1724  public:
1726  EightPointSolid() = default;
1730  EightPointSolid(const EightPointSolid& e) = default;
1732  template <typename Q> EightPointSolid(const Q* p) : Solid_type<Object>(p) { }
1734  template <typename Q> EightPointSolid(const Handle<Q>& e) : Solid_type<Object>(e) { }
1735 
1737  EightPointSolid(double dz, const double* vertices)
1738  { this->make("", dz, vertices); }
1739 
1741  EightPointSolid(const std::string& nam, double dz, const double* vertices)
1742  { this->make(nam, dz, vertices); }
1743 
1748 
1750  double dZ() const { return access()->GetDz(); }
1752  std::vector<double> vertices() const {
1753  const double* values = access()->GetVertices();
1754  return detail::_make_vector(values, 8*2);
1755  }
1757  std::pair<double, double> vertex(int which) const {
1758  const double* values = access()->GetVertices();
1759  return std::make_pair(values[2*which], values[2*which+1]);
1760  }
1761  };
1762 
1764 
1772  class TessellatedSolid : public Solid_type<TGeoTessellated> {
1773  private:
1775  void make(const std::string& nam, int num_facets);
1777  void make(const std::string& nam, const std::vector<Object::Vertex_t>& vertices);
1778 
1779  public:
1780  typedef Object::Vertex_t Vertex;
1781  typedef TGeoFacet Facet;
1782 
1783  public:
1785  TessellatedSolid() = default;
1789  TessellatedSolid(const TessellatedSolid& e) = default;
1791  template <typename Q> TessellatedSolid(const Q* p) : Solid_type<Object>(p) { }
1793  template <typename Q> TessellatedSolid(const Handle<Q>& e) : Solid_type<Object>(e) { }
1794 
1796  TessellatedSolid(int num_facets)
1797  { this->make("", num_facets); }
1798 
1800  TessellatedSolid(const std::vector<Vertex>& vertices)
1801  { this->make("", vertices); }
1802 
1804  TessellatedSolid(const std::string& nam, int num_facets)
1805  { this->make(nam, num_facets); }
1806 
1808  TessellatedSolid(const std::string& nam, const std::vector<Vertex>& vertices)
1809  { this->make(nam, vertices); }
1810 
1816  bool addFacet(const Vertex& pt0, const Vertex& pt1, const Vertex& pt2) const;
1818  bool addFacet(const Vertex& pt0, const Vertex& pt1, const Vertex& pt2, const Vertex& pt3) const;
1820  bool addFacet(const int pt0, const int pt1, const int pt2) const;
1822  bool addFacet(const int pt0, const int pt1, const int pt2, const int pt3) const;
1823 
1825  int num_facet() const;
1827  const Facet& facet(int index) const;
1829  int num_vertex() const;
1831  const Vertex& vertex(int index) const;
1832  };
1833 
1835 
1843  class BooleanSolid : public Solid_type<TGeoCompositeShape> {
1844  public:
1846  BooleanSolid() = default;
1848  BooleanSolid(BooleanSolid&& b) = default;
1850  BooleanSolid(const BooleanSolid& b) = default;
1852  template <typename Q>
1859  Solid rightShape() const;
1861  Solid leftShape() const;
1863  const TGeoMatrix* rightMatrix() const;
1865  const TGeoMatrix* leftMatrix() const;
1866  };
1867 
1869 
1879  public:
1881  SubtractionSolid() = default;
1885  SubtractionSolid(const SubtractionSolid& e) = default;
1887  template <typename Q> SubtractionSolid(const Handle<Q>& e) : BooleanSolid(e) { }
1888 
1890  SubtractionSolid(const Solid& shape1, const Solid& shape2);
1892  SubtractionSolid(const Solid& shape1, const Solid& shape2, const Position& pos);
1894  SubtractionSolid(const Solid& shape1, const Solid& shape2, const RotationZYX& rot);
1896  SubtractionSolid(const Solid& shape1, const Solid& shape2, const Rotation3D& rot);
1898  SubtractionSolid(const Solid& shape1, const Solid& shape2, const Transform3D& pos);
1899 
1901  SubtractionSolid(const std::string& name, const Solid& shape1, const Solid& shape2);
1903  SubtractionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Position& pos);
1905  SubtractionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const RotationZYX& rot);
1907  SubtractionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Rotation3D& rot);
1909  SubtractionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Transform3D& pos);
1914  };
1915 
1917 
1926  class UnionSolid : public BooleanSolid {
1927  public:
1929  UnionSolid() = default;
1931  UnionSolid(UnionSolid&& e) = default;
1933  UnionSolid(const UnionSolid& e) = default;
1935  template <typename Q> UnionSolid(const Handle<Q>& e) : BooleanSolid(e) { }
1936 
1938  UnionSolid(const Solid& shape1, const Solid& shape2);
1940  UnionSolid(const Solid& shape1, const Solid& shape2, const Position& pos);
1942  UnionSolid(const Solid& shape1, const Solid& shape2, const RotationZYX& rot);
1944  UnionSolid(const Solid& shape1, const Solid& shape2, const Rotation3D& rot);
1946  UnionSolid(const Solid& shape1, const Solid& shape2, const Transform3D& pos);
1947 
1949  UnionSolid(const std::string& name, const Solid& shape1, const Solid& shape2);
1951  UnionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Position& pos);
1953  UnionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const RotationZYX& rot);
1955  UnionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Rotation3D& rot);
1957  UnionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Transform3D& pos);
1961  UnionSolid& operator=(const UnionSolid& copy) = default;
1962  };
1963 
1965 
1975  public:
1977  IntersectionSolid() = default;
1983  template <typename Q> IntersectionSolid(const Handle<Q>& e) : BooleanSolid(e) { }
1984 
1986  IntersectionSolid(const Solid& shape1, const Solid& shape2);
1988  IntersectionSolid(const Solid& shape1, const Solid& shape2, const Position& pos);
1990  IntersectionSolid(const Solid& shape1, const Solid& shape2, const RotationZYX& rot);
1992  IntersectionSolid(const Solid& shape1, const Solid& shape2, const Rotation3D& rot);
1994  IntersectionSolid(const Solid& shape1, const Solid& shape2, const Transform3D& pos);
1995 
1997  IntersectionSolid(const std::string& name, const Solid& shape1, const Solid& shape2);
1999  IntersectionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Position& pos);
2001  IntersectionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const RotationZYX& rot);
2003  IntersectionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Rotation3D& rot);
2005  IntersectionSolid(const std::string& name, const Solid& shape1, const Solid& shape2, const Transform3D& pos);
2010  };
2011 } /* End namespace dd4hep */
2012 #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:427
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:1510
dd4hep::Trap::high1
double high1() const
Half length in y at low z.
Definition: Shapes.h:1040
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:269
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:315
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:603
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:369
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:387
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:1541
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:423
dd4hep::Solid_type::operator->
T * operator->() const
Overloaded operator -> to access underlying object.
Definition: Shapes.h:182
dd4hep::Cone::Cone
Cone(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:416
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:254
dd4hep::Tube::rMin
double rMin() const
Accessor: r-min value.
Definition: Shapes.h:702
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:257
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:1044
dd4hep::TruncatedTube
Class describing a truncated tube shape (CMS'ism)
Definition: Shapes.h:779
dd4hep::PolyhedraRegular::PolyhedraRegular
PolyhedraRegular(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1505
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:265
dd4hep::UnionSolid::UnionSolid
UnionSolid(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1935
dd4hep::Sphere::rMin
double rMin() const
Accessor: r-min value.
Definition: Shapes.h:1363
dd4hep::Cone::Cone
Cone(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:414
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:995
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:1534
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:754
dd4hep::Tube::endPhi
double endPhi() const
Accessor: end-phi value.
Definition: Shapes.h:698
dd4hep::Trap::high2
double high2() const
Half length in y at high z.
Definition: Shapes.h:1042
dd4hep::PolyhedraRegular
Class describing a regular polyhedron shape.
Definition: Shapes.h:1493
dd4hep::Polycone::rMax
double rMax(int which) const
Accessor: r-max value.
Definition: Shapes.h:520
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:1538
dd4hep::Polycone::zPlaneRmax
std::vector< double > zPlaneRmax() const
Accessor: vector of rMax-values for Z-planes value.
Definition: Shapes.h:527
dd4hep::PseudoTrap
Class describing a pseudo trap shape (CMS'ism)
Definition: Shapes.h:1060
dd4hep::Handle< TGeoHalfSpace >::Object
TGeoHalfSpace Object
Extern accessible definition of the contained element type.
Definition: Handle.h:88
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:923
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:1226
dd4hep::HalfSpace
Class describing half-space.
Definition: Shapes.h:351
dd4hep::Cone::Cone
Cone()=default
Default constructor.
dd4hep::CutTube::rMin
double rMin() const
Accessor: r-min value.
Definition: Shapes.h:756
dd4hep::Sphere::Sphere
Sphere(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1303
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:33
dd4hep::ShapelessSolid
Class describing a shape-less solid shape.
Definition: Shapes.h:209
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:1544
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:1454
dd4hep::PolyhedraRegular::rMax
double rMax(int which) const
Accessor: r-max value.
Definition: Shapes.h:1563
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:659
dd4hep::EllipticalTube
Class describing a twisted tube shape.
Definition: Shapes.h:841
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:859
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:556
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:1561
dd4hep::Torus::rMax
double rMax() const
Accessor: r-max value (outer radius)
Definition: Shapes.h:1275
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:1757
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:1077
dd4hep::EightPointSolid::vertices
std::vector< double > vertices() const
Accessor: all vertices as STL vector.
Definition: Shapes.h:1752
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:762
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:1507
dd4hep::Sphere::startTheta
double startTheta() const
Accessor: start-theta value.
Definition: Shapes.h:1359
dd4hep::Hyperboloid
Class describing a Hyperboloid shape.
Definition: Shapes.h:1434
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:998
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:1240
dd4hep::Polyhedra::startPhi
double startPhi() const
Accessor: start-phi value.
Definition: Shapes.h:1630
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:652
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:1204
dd4hep::Handle
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:84
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:681
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:1034
dd4hep::Rotation3D
ROOT::Math::Rotation3D Rotation3D
Definition: Objects.h:113
dd4hep::Polycone::z
double z(int which) const
Accessor: z value.
Definition: Shapes.h:516
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:641
dd4hep::Trap
Class describing a trap shape.
Definition: Shapes.h:974
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:1247
dd4hep::BooleanSolid
Base class describing boolean (=union,intersection,subtraction) solids.
Definition: Shapes.h:1843
dd4hep::Solid_type
Base class for Solid (shape) objects.
Definition: Shapes.h:135
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:446
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:1326
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:159
dd4hep::ConeSegment::rMin2
double rMin2() const
Accessor: r-min-2 value.
Definition: Shapes.h:609
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:309
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:1602
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:1255
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:1208
dd4hep::Hyperboloid::Hyperboloid
Hyperboloid(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1447
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:1705
dd4hep::Paraboloid::Paraboloid
Paraboloid(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1389
dd4hep::TessellatedSolid::Facet
TGeoFacet Facet
Definition: Shapes.h:1781
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:1116
dd4hep::PolyhedraRegular::zPlaneRmin
std::vector< double > zPlaneRmin() const
Accessor: vector of rMin-values for Z-planes value.
Definition: Shapes.h:1568
dd4hep::PolyhedraRegular::numEdges
int numEdges() const
Accessor: Number of edges.
Definition: Shapes.h:1552
dd4hep::ConeSegment::rMax1
double rMax1() const
Accessor: r-max-1 value.
Definition: Shapes.h:611
dd4hep::Tube::rMax
double rMax() const
Accessor: r-max value.
Definition: Shapes.h:704
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:1252
dd4hep::Polyhedra
Class describing a regular polyhedron shape.
Definition: Shapes.h:1582
dd4hep::ExtrudedPolygon::zscale
std::vector< double > zscale() const
Definition: Shapes.h:1708
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:1974
dd4hep::Polycone::rMin
double rMin(int which) const
Accessor: r-min value
Definition: Shapes.h:518
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:576
dd4hep::IntersectionSolid::IntersectionSolid
IntersectionSolid(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1983
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:1398
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:157
dd4hep::Torus::deltaPhi
double deltaPhi() const
Accessor: delta-phi value.
Definition: Shapes.h:1268
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:542
dd4hep::Trd1::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:1150
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:1178
dd4hep::ConeSegment::ConeSegment
ConeSegment(const Handle< Q > &e)
Constructor to be used when reading the already parsed ConeSegment object.
Definition: Shapes.h:558
dd4hep::Sphere::Sphere
Sphere(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1305
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:731
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:794
dd4hep::Trd2
Class describing a Trd2 shape.
Definition: Shapes.h:1163
dd4hep::Polycone::zPlaneZ
std::vector< double > zPlaneZ() const
Accessor: vector of z-values for Z-planes value.
Definition: Shapes.h:523
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:1481
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:1676
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:927
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:1011
dd4hep::TwistedTube::TwistedTube
TwistedTube(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:914
dd4hep::Trd1::dX1
double dX1() const
Accessor: delta-x1 value.
Definition: Shapes.h:1144
dd4hep::ConeSegment::ConeSegment
ConeSegment(ConeSegment &&e)=default
Move Constructor.
dd4hep::HalfSpace::position
Position position() const
Accessor: positioning point.
Definition: Shapes.h:382
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:419
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:1741
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:1185
dd4hep::Trap::Trap
Trap(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:988
dd4hep::Box::Box
Box(Box &&e)=default
Move constructor.
dd4hep::Trapezoid
Trd2 Trapezoid
Shortcut name definition.
Definition: Shapes.h:1215
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:1129
dd4hep::TessellatedSolid::TessellatedSolid
TessellatedSolid(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1791
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:1357
dd4hep::Tube::startPhi
double startPhi() const
Accessor: start-phi value.
Definition: Shapes.h:696
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:320
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:312
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:1681
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:1244
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:1081
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:378
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:1148
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:1266
dd4hep::Scale
Class describing a Scale shape.
Definition: Shapes.h:239
dd4hep::Tube::Tube
Tube(double rmin, double rmax, double dz)
Constructor to create a new anonymous tube object with attribute initialization.
Definition: Shapes.h:646
dd4hep::TessellatedSolid::TessellatedSolid
TessellatedSolid(const std::string &nam, int num_facets)
Constructor to create a new anonymous object with attribute initialization.
Definition: Shapes.h:1804
dd4hep::Polyhedra::zPlaneZ
std::vector< double > zPlaneZ() const
Accessor: vector of z-values for Z-planes value.
Definition: Shapes.h:1642
dd4hep::Sphere::endTheta
double endTheta() const
Accessor: end-theta value.
Definition: Shapes.h:1361
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:948
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:1118
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:1475
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:671
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:1308
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:1335
dd4hep::ShapelessSolid::ShapelessSolid
ShapelessSolid(const Handle< Q > &e)
Constructor to be used with an existing object.
Definition: Shapes.h:220
dd4hep::Trap::theta
double theta() const
Accessor: theta value.
Definition: Shapes.h:1026
dd4hep::EllipticalTube::b
double b() const
Accessor: b value (semi axis along y)
Definition: Shapes.h:885
dd4hep::TwistedTube::TwistedTube
TwistedTube(const Handle< Q > &e)
Constructor to assign an object.
Definition: Shapes.h:916
dd4hep::Polyhedra::z
double z(int which) const
Accessor: z value.
Definition: Shapes.h:1635
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:1450
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:733
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:1514
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:649
dd4hep::Trap::topLow1
double topLow1() const
Half length in x at low z and y high edge.
Definition: Shapes.h:1036
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:569
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:1030
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:1479
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:525
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:584
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:1608
dd4hep::Torus::r
double r() const
Accessor: r value (torus axial radius)
Definition: Shapes.h:1271
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:1737
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:601
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:1394
dd4hep::Cone
Class describing a cone shape.
Definition: Shapes.h:402
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:796
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:678
dd4hep::ConeSegment::rMin1
double rMin1() const
Accessor: r-min-1 value.
Definition: Shapes.h:607
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:155
dd4hep::Handle::m_element
T * m_element
Single and only data member: Reference to the actual element.
Definition: Handle.h:93
dd4hep::EightPointSolid::operator=
EightPointSolid & operator=(EightPointSolid &&copy)=default
Move Assignment operator.
dd4hep::ExtrudedPolygon
Class describing a extruded polygon shape.
Definition: Shapes.h:1658
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:1103
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:862
dd4hep::detail::zPlaneZ
std::vector< double > zPlaneZ(const SOLID *solid)
Definition: Shapes.h:97
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:1462
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:1121
dd4hep::detail::zPlaneRmax
std::vector< double > zPlaneRmax(const SOLID *solid)
Definition: Shapes.h:105
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:866
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:1632
dd4hep::ExtrudedPolygon::zx
std::vector< double > zx() const
Definition: Shapes.h:1706
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:260
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:944
dd4hep::Cone::rMax1
double rMax1() const
Accessor: r-max-1 value.
Definition: Shapes.h:448
dd4hep::Solid_type::Solid_type
Solid_type(T *p)
Direct assignment using the implementation pointer.
Definition: Shapes.h:153
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:1238
dd4hep::Box::Box
Box(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:307
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:663
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:1704
dd4hep::UnionSolid
Class describing boolean union solid.
Definition: Shapes.h:1926
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:954
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:373
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:1273
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:364
dd4hep::Polyhedra::rMax
double rMax(int which) const
Accessor: r-max value.
Definition: Shapes.h:1639
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:1125
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:1210
dd4hep::Trd2::dX2
double dX2() const
Accessor: delta-x2 value.
Definition: Shapes.h:1206
dd4hep::CutTube
Class describing a tube shape of a section of a cut tube segment.
Definition: Shapes.h:716
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:667
dd4hep::Paraboloid::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:1417
dd4hep::Polycone::Polycone
Polycone(const Handle< Q > &e)
Constructor to be used when reading the already parsed polycone object.
Definition: Shapes.h:482
dd4hep::Transform3D
ROOT::Math::Transform3D Transform3D
Definition: Objects.h:117
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:431
dd4hep::TwistedTube
Class describing a twisted tube shape.
Definition: Shapes.h:900
dd4hep::TruncatedTube::TruncatedTube
TruncatedTube(TruncatedTube &&e)=default
Move Constructor.
dd4hep::EightPointSolid
Class describing an arbitray solid defined by 8 vertices.
Definition: Shapes.h:1720
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:101
dd4hep::TessellatedSolid::TessellatedSolid
TessellatedSolid()=default
Default constructor.
dd4hep::Polycone
Class describing a Polycone shape.
Definition: Shapes.h:471
dd4hep::ExtrudedPolygon::ExtrudedPolygon
ExtrudedPolygon(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1678
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:1445
dd4hep::Tube::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:700
dd4hep::EllipticalTube::EllipticalTube
EllipticalTube(const Handle< Q > &e)
Constructor to assign an object.
Definition: Shapes.h:856
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:936
dd4hep::Trap::topLow2
double topLow2() const
Half length in x at high z and y high edge.
Definition: Shapes.h:1038
dd4hep::Position
ROOT::Math::XYZVector Position
Definition: Objects.h:81
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:1732
dd4hep::Hyperboloid::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:1473
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:1570
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:1406
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:674
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:750
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:1637
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:870
dd4hep::Cone::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:442
dd4hep::Tube::Tube
Tube(const Handle< Q > &e)
Constructor to assign an object.
Definition: Shapes.h:643
dd4hep::Box
Class describing a box shape.
Definition: Shapes.h:294
dd4hep::Sphere::startPhi
double startPhi() const
Accessor: start-phi value.
Definition: Shapes.h:1355
dd4hep::Trap::phi
double phi() const
Accessor: phi value.
Definition: Shapes.h:1024
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:1556
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:1690
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:1133
dd4hep::PseudoTrap::PseudoTrap
PseudoTrap(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1074
dd4hep::Polyhedra::Polyhedra
Polyhedra(Polyhedra &&e)=default
Move Constructor.
std
Definition: Plugins.h:30
dd4hep::PolyhedraRegular::z
double z(int which) const
Accessor: r-min value.
Definition: Shapes.h:1559
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:252
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:153
dd4hep::PolyhedraRegular::startPhi
double startPhi() const
Accessor: start-phi value.
Definition: Shapes.h:1554
dd4hep::Cone::rMin1
double rMin1() const
Accessor: r-min-1 value.
Definition: Shapes.h:444
dd4hep::Trd2::Trd2
Trd2(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1176
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:1619
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:685
dd4hep::TessellatedSolid::TessellatedSolid
TessellatedSolid(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1793
dd4hep::Polycone::startPhi
double startPhi() const
Accessor: start-phi value.
Definition: Shapes.h:511
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:1599
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:854
dd4hep::BooleanSolid::BooleanSolid
BooleanSolid(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1853
dd4hep::ExtrudedPolygon::x
std::vector< double > x() const
Definition: Shapes.h:1703
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:1288
dd4hep::Solid_type::toString
std::string toString(int precision=2) const
Conversion to string for pretty print.
Definition: Shapes.h:190
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:656
dd4hep::Solid
Solid_type< TGeoShape > Solid
Definition: Shapes.h:197
dd4hep::Polycone::operator=
Polycone & operator=(const Polycone &copy)=default
Copy Assignment operator.
dd4hep::TessellatedSolid
Class describing a tessellated shape.
Definition: Shapes.h:1772
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:1796
dd4hep::TessellatedSolid::Vertex
Object::Vertex_t Vertex
Definition: Shapes.h:1780
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:883
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:931
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:1522
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:1391
dd4hep::EightPointSolid::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:1750
dd4hep::Trap::bottomLow1
double bottomLow1() const
Half length in x at low z and y low edge.
Definition: Shapes.h:1032
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:1212
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:1800
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:1007
dd4hep::Polycone::deltaPhi
double deltaPhi() const
Accessor: delta-phi value.
Definition: Shapes.h:513
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:1526
dd4hep::Polyhedra::Polyhedra
Polyhedra(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:1597
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:1316
dd4hep::EightPointSolid::EightPointSolid
EightPointSolid(const Handle< Q > &e)
Constructor to be used when passing an already created object.
Definition: Shapes.h:1734
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:105
dd4hep::ExtrudedPolygon::zy
std::vector< double > zy() const
Definition: Shapes.h:1707
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:1181
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:1887
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:1189
dd4hep::ConeSegment::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:605
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:1146
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:760
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:89
dd4hep::CutTube::rMax
double rMax() const
Accessor: r-max value.
Definition: Shapes.h:758
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:628
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:324
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:1458
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:1072
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:86
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:1566
dd4hep::Paraboloid::rHigh
double rHigh() const
Accessor: r-max value.
Definition: Shapes.h:1421
dd4hep::ConeSegment::rMax2
double rMax2() const
Accessor: r-max-2 value.
Definition: Shapes.h:613
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:1402
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:366
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:480
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:986
dd4hep::Cone::rMax2
double rMax2() const
Accessor: r-max-2 value.
Definition: Shapes.h:450
dd4hep::Trap::Trap
Trap()=default
Default constructor.
dd4hep::SubtractionSolid
Class describing boolean subtraction solid.
Definition: Shapes.h:1878
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:919
dd4hep::EllipticalTube::dZ
double dZ() const
Accessor: delta-z value.
Definition: Shapes.h:881
dd4hep::Polyhedra::numEdges
int numEdges() const
Accessor: Number of edges.
Definition: Shapes.h:1628
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:1613
dd4hep::Hyperboloid::rMax
double rMax() const
Accessor: r-max value.
Definition: Shapes.h:1477
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:1646
dd4hep::ShapelessSolid::ShapelessSolid
ShapelessSolid(const Q *p)
Constructor to be used with an existing object.
Definition: Shapes.h:218
dd4hep::Hyperboloid::Hyperboloid
Hyperboloid(Hyperboloid &&e)=default
Move Constructor.
dd4hep::Sphere::rMax
double rMax() const
Accessor: r-max value.
Definition: Shapes.h:1365
dd4hep::CutTube::endPhi
double endPhi() const
Accessor: end-phi value.
Definition: Shapes.h:752
dd4hep::Polyhedra::zPlaneRmin
std::vector< double > zPlaneRmin() const
Accessor: vector of rMin-values for Z-planes value.
Definition: Shapes.h:1644
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:1378
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:1028
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:1193
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:940
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:561
dd4hep::Paraboloid::rLow
double rLow() const
Accessor: r-min value.
Definition: Shapes.h:1419
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:1808
dd4hep::Box::Box
Box(const Box &e)=default
Copy constructor.
dd4hep::ConeSegment::ConeSegment
ConeSegment()=default
Default constructor.