Logo ROOT  
Reference Guide
TGeoVGShape.cxx
Go to the documentation of this file.
1// Author: Mihaela Gheata 30/03/16
2/*************************************************************************
3 * Copyright (C) 1995-2016, Rene Brun and Fons Rademakers. *
4 * All rights reserved. *
5 * *
6 * For the licensing terms see $ROOTSYS/LICENSE. *
7 * For the list of contributors see $ROOTSYS/README/CREDITS. *
8 *************************************************************************/
9
10/** \class TGeoVGShape
11\ingroup Geometry_classes
12
13Bridge class for using a VecGeom solid as TGeoShape.
14*/
15
16#include "TGeoVGShape.h"
17
18#include "volumes/PlacedVolume.h"
19#include "volumes/UnplacedVolume.h"
20#include "volumes/UnplacedBox.h"
21#include "volumes/UnplacedTube.h"
22#include "volumes/UnplacedCone.h"
23#include "volumes/UnplacedParaboloid.h"
24#include "volumes/UnplacedParallelepiped.h"
25#include "volumes/UnplacedPolyhedron.h"
26#include "volumes/UnplacedTrd.h"
27#include "volumes/UnplacedOrb.h"
28#include "volumes/UnplacedSphere.h"
29#include "volumes/UnplacedBooleanVolume.h"
30#include "volumes/UnplacedTorus2.h"
31#include "volumes/UnplacedTrapezoid.h"
32#include "volumes/UnplacedPolycone.h"
33#include "volumes/UnplacedScaledShape.h"
34#include "volumes/UnplacedGenTrap.h"
35#include "volumes/UnplacedSExtruVolume.h"
36#include "TError.h"
37#include "TGeoManager.h"
38#include "TGeoMaterial.h"
39#include "TGeoMedium.h"
40#include "TGeoVolume.h"
41#include "TGeoArb8.h"
42#include "TGeoTube.h"
43#include "TGeoCone.h"
44#include "TGeoPara.h"
45#include "TGeoParaboloid.h"
46#include "TGeoTrd1.h"
47#include "TGeoTrd2.h"
48#include "TGeoPcon.h"
49#include "TGeoPgon.h"
50#include "TGeoSphere.h"
51#include "TGeoBoolNode.h"
52#include "TGeoCompositeShape.h"
53#include "TGeoScaledShape.h"
54#include "TGeoTorus.h"
55#include "TGeoEltu.h"
56#include "TGeoXtru.h"
57
58////////////////////////////////////////////////////////////////////////////////
59/// Default constructor
60
61TGeoVGShape::TGeoVGShape(TGeoShape *shape, vecgeom::cxx::VPlacedVolume *vgshape)
62 : TGeoBBox(shape->GetName(), 0, 0, 0), fVGShape(vgshape), fShape(shape)
63{
64 // Copy box parameters from the original ROOT shape
65 const TGeoBBox *box = (const TGeoBBox *)shape;
66 TGeoBBox::SetBoxDimensions(box->GetDX(), box->GetDY(), box->GetDZ());
67 memcpy(fOrigin, box->GetOrigin(), 3 * sizeof(Double_t));
68}
69
70////////////////////////////////////////////////////////////////////////////////
71/// Destructor
72
74{
75 // Cleanup only the VecGeom solid, the ROOT shape is cleaned by TGeoManager
76 delete fVGShape;
77}
78
79////////////////////////////////////////////////////////////////////////////////
80/// Factory creating TGeoVGShape from a Root shape. Returns nullptr if the
81/// shape cannot be converted
82
84{
85 vecgeom::cxx::VPlacedVolume *vgshape = TGeoVGShape::CreateVecGeomSolid(shape);
86 if (!vgshape)
87 return nullptr;
88 return (new TGeoVGShape(shape, vgshape));
89}
90
91////////////////////////////////////////////////////////////////////////////////
92/// Conversion method to create VecGeom solid corresponding to TGeoShape
93
94vecgeom::cxx::VPlacedVolume *TGeoVGShape::CreateVecGeomSolid(TGeoShape *shape)
95{
96 // Call VecGeom TGeoShape->UnplacedSolid converter
97 // VUnplacedVolume *unplaced = RootGeoManager::Instance().Convert(shape);
98 vecgeom::cxx::VUnplacedVolume *unplaced = Convert(shape);
99 if (!unplaced)
100 return nullptr;
101 // We have to create a placed volume from the unplaced one to have access
102 // to the navigation interface
103 vecgeom::cxx::LogicalVolume *lvol = new vecgeom::cxx::LogicalVolume("", unplaced);
104 return (lvol->Place());
105}
106
107////////////////////////////////////////////////////////////////////////////////
108/// Convert a TGeoMatrix to a TRansformation3D
109
110vecgeom::cxx::Transformation3D *TGeoVGShape::Convert(TGeoMatrix const *const geomatrix)
111{
112 Double_t const *const t = geomatrix->GetTranslation();
113 Double_t const *const r = geomatrix->GetRotationMatrix();
114 vecgeom::cxx::Transformation3D *const transformation =
115 new vecgeom::cxx::Transformation3D(t[0], t[1], t[2], r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8]);
116 return transformation;
117}
118
119////////////////////////////////////////////////////////////////////////////////
120/// Convert a TGeo shape to VUnplacedVolume, then creates a VPlacedVolume
121
122vecgeom::cxx::VUnplacedVolume *TGeoVGShape::Convert(TGeoShape const *const shape)
123{
124 using namespace vecgeom;
125 VUnplacedVolume *unplaced_volume = nullptr;
126
127 // THE BOX
128 if (shape->IsA() == TGeoBBox::Class()) {
129 TGeoBBox const *const box = static_cast<TGeoBBox const *>(shape);
130 unplaced_volume = GeoManager::MakeInstance<UnplacedBox>(box->GetDX(), box->GetDY(), box->GetDZ());
131 }
132
133 // THE TUBE
134 if (shape->IsA() == TGeoTube::Class()) {
135 TGeoTube const *const tube = static_cast<TGeoTube const *>(shape);
136 unplaced_volume =
137 GeoManager::MakeInstance<UnplacedTube>(tube->GetRmin(), tube->GetRmax(), tube->GetDz(), 0., kTwoPi);
138 }
139
140 // THE TUBESEG
141 if (shape->IsA() == TGeoTubeSeg::Class()) {
142 TGeoTubeSeg const *const tube = static_cast<TGeoTubeSeg const *>(shape);
143 unplaced_volume = GeoManager::MakeInstance<UnplacedTube>(tube->GetRmin(), tube->GetRmax(), tube->GetDz(),
144 kDegToRad * tube->GetPhi1(),
145 kDegToRad * (tube->GetPhi2() - tube->GetPhi1()));
146 }
147
148 // THE CONESEG
149 if (shape->IsA() == TGeoConeSeg::Class()) {
150 TGeoConeSeg const *const cone = static_cast<TGeoConeSeg const *>(shape);
151 unplaced_volume = GeoManager::MakeInstance<UnplacedCone>(
152 cone->GetRmin1(), cone->GetRmax1(), cone->GetRmin2(), cone->GetRmax2(), cone->GetDz(),
153 kDegToRad * cone->GetPhi1(), kDegToRad * (cone->GetPhi2() - cone->GetPhi1()));
154 }
155
156 // THE CONE
157 if (shape->IsA() == TGeoCone::Class()) {
158 TGeoCone const *const cone = static_cast<TGeoCone const *>(shape);
159 unplaced_volume = GeoManager::MakeInstance<UnplacedCone>(cone->GetRmin1(), cone->GetRmax1(), cone->GetRmin2(),
160 cone->GetRmax2(), cone->GetDz(), 0., kTwoPi);
161 }
162
163 // THE PARABOLOID
164 if (shape->IsA() == TGeoParaboloid::Class()) {
165 TGeoParaboloid const *const p = static_cast<TGeoParaboloid const *>(shape);
166 unplaced_volume = GeoManager::MakeInstance<UnplacedParaboloid>(p->GetRlo(), p->GetRhi(), p->GetDz());
167 }
168
169 // THE PARALLELEPIPED
170 if (shape->IsA() == TGeoPara::Class()) {
171 TGeoPara const *const p = static_cast<TGeoPara const *>(shape);
172 unplaced_volume = GeoManager::MakeInstance<UnplacedParallelepiped>(p->GetX(), p->GetY(), p->GetZ(), p->GetAlpha(),
173 p->GetTheta(), p->GetPhi());
174 }
175
176 // Polyhedron/TGeoPgon
177 if (shape->IsA() == TGeoPgon::Class()) {
178 TGeoPgon const *pgon = static_cast<TGeoPgon const *>(shape);
179 unplaced_volume = GeoManager::MakeInstance<UnplacedPolyhedron>(pgon->GetPhi1(), // phiStart
180 pgon->GetDphi(), // phiEnd
181 pgon->GetNedges(), // sideCount
182 pgon->GetNz(), // zPlaneCount
183 pgon->GetZ(), // zPlanes
184 pgon->GetRmin(), // rMin
185 pgon->GetRmax() // rMax
186 );
187 }
188
189 // TRD2
190 if (shape->IsA() == TGeoTrd2::Class()) {
191 TGeoTrd2 const *const p = static_cast<TGeoTrd2 const *>(shape);
192 unplaced_volume =
193 GeoManager::MakeInstance<UnplacedTrd>(p->GetDx1(), p->GetDx2(), p->GetDy1(), p->GetDy2(), p->GetDz());
194 }
195
196 // TRD1
197 if (shape->IsA() == TGeoTrd1::Class()) {
198 TGeoTrd1 const *const p = static_cast<TGeoTrd1 const *>(shape);
199 unplaced_volume = GeoManager::MakeInstance<UnplacedTrd>(p->GetDx1(), p->GetDx2(), p->GetDy(), p->GetDz());
200 }
201
202 // TRAPEZOID
203 if (shape->IsA() == TGeoTrap::Class()) {
204 TGeoTrap const *const p = static_cast<TGeoTrap const *>(shape);
205 unplaced_volume = GeoManager::MakeInstance<UnplacedTrapezoid>(
206 p->GetDz(), p->GetTheta() * kDegToRad, p->GetPhi() * kDegToRad, p->GetH1(), p->GetBl1(), p->GetTl1(),
207 std::tan(p->GetAlpha1() * kDegToRad), p->GetH2(), p->GetBl2(), p->GetTl2(),
208 std::tan(p->GetAlpha2() * kDegToRad));
209 }
210
211 // THE SPHERE | ORB
212 if (shape->IsA() == TGeoSphere::Class()) {
213 // make distinction
214 TGeoSphere const *const p = static_cast<TGeoSphere const *>(shape);
215 if (p->GetRmin() == 0. && p->GetTheta2() - p->GetTheta1() == 180. && p->GetPhi2() - p->GetPhi1() == 360.) {
216 unplaced_volume = GeoManager::MakeInstance<UnplacedOrb>(p->GetRmax());
217 } else {
218 unplaced_volume = GeoManager::MakeInstance<UnplacedSphere>(
219 p->GetRmin(), p->GetRmax(), p->GetPhi1() * kDegToRad, (p->GetPhi2() - p->GetPhi1()) * kDegToRad,
220 p->GetTheta1() * kDegToRad, (p->GetTheta2() - p->GetTheta1()) * kDegToRad);
221 }
222 }
223
224 if (shape->IsA() == TGeoCompositeShape::Class()) {
225 TGeoCompositeShape const *const compshape = static_cast<TGeoCompositeShape const *>(shape);
226 TGeoBoolNode const *const boolnode = compshape->GetBoolNode();
227
228 // need the matrix;
229 Transformation3D const *lefttrans = Convert(boolnode->GetLeftMatrix());
230 Transformation3D const *righttrans = Convert(boolnode->GetRightMatrix());
231 // unplaced shapes
232 VUnplacedVolume const *leftunplaced = Convert(boolnode->GetLeftShape());
233 VUnplacedVolume const *rightunplaced = Convert(boolnode->GetRightShape());
234 if (!leftunplaced || !rightunplaced) {
235 // If one of the components cannot be converted, cleanup & return nullptr
236 delete lefttrans;
237 delete righttrans;
238 delete leftunplaced;
239 delete rightunplaced;
240 return nullptr;
241 }
242
243 assert(leftunplaced != nullptr);
244 assert(rightunplaced != nullptr);
245
246 // the problem is that I can only place logical volumes
247 VPlacedVolume *const leftplaced = (new LogicalVolume("inner_virtual", leftunplaced))->Place(lefttrans);
248
249 VPlacedVolume *const rightplaced = (new LogicalVolume("inner_virtual", rightunplaced))->Place(righttrans);
250
251 // now it depends on concrete type
253 unplaced_volume =
254 GeoManager::MakeInstance<UnplacedBooleanVolume<kSubtraction>>(kSubtraction, leftplaced, rightplaced);
255 } else if (boolnode->GetBooleanOperator() == TGeoBoolNode::kGeoIntersection) {
256 unplaced_volume =
257 GeoManager::MakeInstance<UnplacedBooleanVolume<kIntersection>>(kIntersection, leftplaced, rightplaced);
258 } else if (boolnode->GetBooleanOperator() == TGeoBoolNode::kGeoUnion) {
259 unplaced_volume = GeoManager::MakeInstance<UnplacedBooleanVolume<kUnion>>(kUnion, leftplaced, rightplaced);
260 }
261 }
262
263 // THE TORUS
264 if (shape->IsA() == TGeoTorus::Class()) {
265 // make distinction
266 TGeoTorus const *const p = static_cast<TGeoTorus const *>(shape);
267 unplaced_volume = GeoManager::MakeInstance<UnplacedTorus2>(p->GetRmin(), p->GetRmax(), p->GetR(),
268 p->GetPhi1() * kDegToRad, p->GetDphi() * kDegToRad);
269 }
270
271 // THE POLYCONE
272 if (shape->IsA() == TGeoPcon::Class()) {
273 TGeoPcon const *const p = static_cast<TGeoPcon const *>(shape);
274 unplaced_volume = GeoManager::MakeInstance<UnplacedPolycone>(p->GetPhi1() * kDegToRad, p->GetDphi() * kDegToRad,
275 p->GetNz(), p->GetZ(), p->GetRmin(), p->GetRmax());
276 }
277
278 // THE SCALED SHAPE
279 if (shape->IsA() == TGeoScaledShape::Class()) {
280 TGeoScaledShape const *const p = static_cast<TGeoScaledShape const *>(shape);
281 // First convert the referenced shape
282 VUnplacedVolume *referenced_shape = Convert(p->GetShape());
283 if (!referenced_shape)
284 return nullptr;
285 const double *scale_root = p->GetScale()->GetScale();
286 unplaced_volume =
287 GeoManager::MakeInstance<UnplacedScaledShape>(referenced_shape, scale_root[0], scale_root[1], scale_root[2]);
288 }
289
290 // THE ELLIPTICAL TUBE AS SCALED TUBE
291 if (shape->IsA() == TGeoEltu::Class()) {
292 TGeoEltu const *const p = static_cast<TGeoEltu const *>(shape);
293 // Create the corresponding unplaced tube, with:
294 // rmin=0, rmax=A, dz=dz, which is scaled with (1., A/B, 1.)
295 GenericUnplacedTube *tubeUnplaced = new GenericUnplacedTube(0, p->GetA(), p->GetDZ(), 0, kTwoPi);
296 unplaced_volume = new UnplacedScaledShape(tubeUnplaced, 1., p->GetB() / p->GetA(), 1.);
297 }
298
299 // THE ARB8
300 if (shape->IsA() == TGeoArb8::Class() || shape->IsA() == TGeoGtra::Class()) {
301 TGeoArb8 *p = (TGeoArb8 *)(shape);
302 // Create the corresponding GenTrap
303 std::vector<Vector3D<Precision>> vertexlist;
304 const double *vertices = p->GetVertices();
305 Precision verticesx[8], verticesy[8];
306 for (auto ivert = 0; ivert < 8; ++ivert) {
307 verticesx[ivert] = vertices[2 * ivert];
308 verticesy[ivert] = vertices[2 * ivert + 1];
309 }
310 unplaced_volume = GeoManager::MakeInstance<UnplacedGenTrap>(verticesx, verticesy, p->GetDz());
311 }
312
313 // THE SIMPLE XTRU
314 if (shape->IsA() == TGeoXtru::Class()) {
315 TGeoXtru *p = (TGeoXtru *)(shape);
316 // analyse convertibility
317 if (p->GetNz() == 2) {
318 // add check on scaling and distortions
319 size_t Nvert = (size_t)p->GetNvert();
320 double *x = new double[Nvert];
321 double *y = new double[Nvert];
322 for (size_t i = 0; i < Nvert; ++i) {
323 x[i] = p->GetX(i);
324 y[i] = p->GetY(i);
325 }
326 // check in which orientation the polygon in given
327 if (PlanarPolygon::GetOrientation(x, y, Nvert) > 0.) {
328 // std::cerr << "Points not given in clockwise order ... reordering \n";
329 for (size_t i = 0; i < Nvert; ++i) {
330 x[Nvert - 1 - i] = p->GetX(i);
331 y[Nvert - 1 - i] = p->GetY(i);
332 }
333 }
334 unplaced_volume =
335 GeoManager::MakeInstance<UnplacedSExtruVolume>(p->GetNvert(), x, y, p->GetZ()[0], p->GetZ()[1]);
336 delete[] x;
337 delete[] y;
338 }
339 }
340
341 // New volumes should be implemented here...
342 if (!unplaced_volume) {
343 printf("Unsupported shape for ROOT shape \"%s\" of type %s. "
344 "Using ROOT implementation.\n",
345 shape->GetName(), shape->ClassName());
346 return nullptr;
347 }
348
349 return (unplaced_volume);
350}
351
352////////////////////////////////////////////////////////////////////////////////
353/// Compute bounding box.
354
356{
358}
359
360////////////////////////////////////////////////////////////////////////////////
361/// Returns analytic capacity of the solid
362
364{
365 return fVGShape->Capacity();
366}
367
368////////////////////////////////////////////////////////////////////////////////
369/// Normal computation.
370
371void TGeoVGShape::ComputeNormal(const Double_t *point, const Double_t * /*dir*/, Double_t *norm)
372{
373 vecgeom::cxx::Vector3D<Double_t> vnorm;
374 fVGShape->Normal(vecgeom::cxx::Vector3D<Double_t>(point[0], point[1], point[2]), vnorm);
375 norm[0] = vnorm.x();
376 norm[1] = vnorm.y(), norm[2] = vnorm.z();
377}
378
379////////////////////////////////////////////////////////////////////////////////
380/// Test if point is inside this shape.
381
383{
384 return (fVGShape->Contains(vecgeom::cxx::Vector3D<Double_t>(point[0], point[1], point[2])));
385}
386
387////////////////////////////////////////////////////////////////////////////////
388
389Double_t TGeoVGShape::DistFromInside(const Double_t *point, const Double_t *dir, Int_t /*iact*/, Double_t step,
390 Double_t * /*safe*/) const
391{
392 Double_t dist = fVGShape->DistanceToOut(vecgeom::cxx::Vector3D<Double_t>(point[0], point[1], point[2]),
393 vecgeom::cxx::Vector3D<Double_t>(dir[0], dir[1], dir[2]), step);
394 return ((dist < 0.) ? 0. : dist);
395}
396
397////////////////////////////////////////////////////////////////////////////////
398
399Double_t TGeoVGShape::DistFromOutside(const Double_t *point, const Double_t *dir, Int_t /*iact*/, Double_t step,
400 Double_t * /*safe*/) const
401{
402 Double_t dist = fVGShape->DistanceToIn(vecgeom::cxx::Vector3D<Double_t>(point[0], point[1], point[2]),
403 vecgeom::cxx::Vector3D<Double_t>(dir[0], dir[1], dir[2]), step);
404 return ((dist < 0.) ? 0. : dist);
405}
406
407////////////////////////////////////////////////////////////////////////////////
408
410{
411 Double_t safety = (in) ? fVGShape->SafetyToOut(vecgeom::cxx::Vector3D<Double_t>(point[0], point[1], point[2]))
412 : fVGShape->SafetyToIn(vecgeom::cxx::Vector3D<Double_t>(point[0], point[1], point[2]));
413 return ((safety < 0.) ? 0. : safety);
414}
415
416////////////////////////////////////////////////////////////////////////////////
417/// Print info about the VecGeom solid
418
420{
421 fVGShape->GetUnplacedVolume()->Print();
422 printf("\n");
423}
Py_ssize_t * fShape
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
An arbitrary trapezoid with less than 8 vertices standing on two parallel planes perpendicular to Z a...
Definition: TGeoArb8.h:18
static TClass * Class()
Box class.
Definition: TGeoBBox.h:18
Double_t fOrigin[3]
Definition: TGeoBBox.h:24
static TClass * Class()
void SetBoxDimensions(Double_t dx, Double_t dy, Double_t dz, Double_t *origin=0)
Set parameters of the box.
Definition: TGeoBBox.cxx:926
Base class for Boolean operations between two shapes.
Definition: TGeoBoolNode.h:26
virtual EGeoBoolType GetBooleanOperator() const =0
TGeoMatrix * GetRightMatrix() const
Definition: TGeoBoolNode.h:82
TGeoShape * GetLeftShape() const
Definition: TGeoBoolNode.h:83
TGeoMatrix * GetLeftMatrix() const
Definition: TGeoBoolNode.h:81
TGeoShape * GetRightShape() const
Definition: TGeoBoolNode.h:84
Composite shapes are Boolean combinations of two or more shape components.
static TClass * Class()
TGeoBoolNode * GetBoolNode() const
A cone segment is a cone having a range in phi.
Definition: TGeoCone.h:102
Double_t GetPhi1() const
Definition: TGeoCone.h:163
Double_t GetPhi2() const
Definition: TGeoCone.h:164
static TClass * Class()
The cones are defined by 5 parameters:
Definition: TGeoCone.h:18
virtual Double_t GetRmax2() const
Definition: TGeoCone.h:79
virtual Double_t GetDz() const
Definition: TGeoCone.h:71
virtual Double_t GetRmin2() const
Definition: TGeoCone.h:78
virtual Double_t GetRmin1() const
Definition: TGeoCone.h:76
static TClass * Class()
virtual Double_t GetRmax1() const
Definition: TGeoCone.h:77
An elliptical tube is defined by the two semi-axes A and B.
Definition: TGeoEltu.h:18
static TClass * Class()
static TClass * Class()
Geometrical transformation package.
Definition: TGeoMatrix.h:41
virtual const Double_t * GetTranslation() const =0
virtual const Double_t * GetRotationMatrix() const =0
Parallelepiped class.
Definition: TGeoPara.h:18
static TClass * Class()
A paraboloid is defined by the revolution surface generated by a parabola and is bounded by two plane...
static TClass * Class()
A polycone is represented by a sequence of tubes/cones, glued together at defined Z planes.
Definition: TGeoPcon.h:18
Double_t * GetRmax() const
Definition: TGeoPcon.h:81
Double_t GetDphi() const
Definition: TGeoPcon.h:76
Double_t * GetZ() const
Definition: TGeoPcon.h:83
static TClass * Class()
Int_t GetNz() const
Definition: TGeoPcon.h:77
Double_t * GetRmin() const
Definition: TGeoPcon.h:79
Double_t GetPhi1() const
Definition: TGeoPcon.h:75
Polygons are defined in the same way as polycones, the difference being just that the segments betwee...
Definition: TGeoPgon.h:21
static TClass * Class()
Int_t GetNedges() const
Definition: TGeoPgon.h:86
A shape scaled by a TGeoScale transformation.
static TClass * Class()
Base abstract class for all shapes.
Definition: TGeoShape.h:26
virtual TClass * IsA() const
Definition: TGeoShape.h:167
virtual const char * GetName() const
Get the shape name.
Definition: TGeoShape.cxx:248
virtual void ComputeBBox()=0
TGeoSphere are not just balls having internal and external radii, but sectors of a sphere having defi...
Definition: TGeoSphere.h:18
static TClass * Class()
The torus is defined by its axial radius, its inner and outer radius.
Definition: TGeoTorus.h:18
static TClass * Class()
A general trapezoid.
Definition: TGeoArb8.h:92
static TClass * Class()
A trapezoid with only X varying with Z.
Definition: TGeoTrd1.h:18
static TClass * Class()
A trapezoid with only X varying with Z.
Definition: TGeoTrd2.h:18
static TClass * Class()
A tube segment is a tube having a range in phi.
Definition: TGeoTube.h:92
static TClass * Class()
Double_t GetPhi2() const
Definition: TGeoTube.h:152
Double_t GetPhi1() const
Definition: TGeoTube.h:151
Cylindrical tube class.
Definition: TGeoTube.h:18
virtual Double_t GetRmin() const
Definition: TGeoTube.h:69
static TClass * Class()
virtual Double_t GetDz() const
Definition: TGeoTube.h:71
virtual Double_t GetRmax() const
Definition: TGeoTube.h:70
Bridge class for using a VecGeom solid as TGeoShape.
Definition: TGeoVGShape.h:31
static vecgeom::cxx::VPlacedVolume * CreateVecGeomSolid(TGeoShape *shape)
Conversion method to create VecGeom solid corresponding to TGeoShape.
Definition: TGeoVGShape.cxx:94
static TGeoVGShape * Create(TGeoShape *shape)
Factory creating TGeoVGShape from a Root shape.
Definition: TGeoVGShape.cxx:83
virtual void ComputeBBox()
Compute bounding box.
TGeoShape * fShape
Definition: TGeoVGShape.h:34
virtual Bool_t Contains(const Double_t *point) const
Test if point is inside this shape.
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)
Normal computation.
virtual ~TGeoVGShape()
Destructor.
Definition: TGeoVGShape.cxx:73
virtual Double_t Capacity() const
Returns analytic capacity of the solid.
vecgeom::cxx::VPlacedVolume * fVGShape
Definition: TGeoVGShape.h:33
virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=0) const
Compute distance from outside point to surface of the box.
virtual void InspectShape() const
Print info about the VecGeom solid.
virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const
Computes the closest distance from given point to this shape.
virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=0) const
Compute distance from inside point to surface of the box.
static vecgeom::cxx::Transformation3D * Convert(TGeoMatrix const *const geomatrix)
Convert a TGeoMatrix to a TRansformation3D.
A TGeoXtru shape is represented by the extrusion of an arbitrary polygon with fixed outline between s...
Definition: TGeoXtru.h:23
static TClass * Class()
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition: TObject.cxx:130
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Definition: fillpatterns.C:1
RooCmdArg Precision(double prec)
RVec< PromoteType< T > > tan(const RVec< T > &v)
Definition: RVec.hxx:1760
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
double dist(Rotation3D const &r1, Rotation3D const &r2)
Definition: 3DDistances.cxx:48