56#include "TGeoCompositeShape.h"
59#include "TGeoHalfSpace.h"
61#include "TGeoManager.h"
63#include "TGeoParaboloid.h"
66#include "TGeoScaledShape.h"
68#include "TGeoShapeAssembly.h"
69#include "TGeoSphere.h"
70#include "TGeoTessellated.h"
74#include "TGeoVolume.h"
89 if (!gGeoManager)
new TGeoManager(
"VGM Root geometry",
"VGM Root geometry");
91#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 22, 8)
93 TGeoManager::LockDefaultUnits(
false);
94 TGeoManager::SetDefaultUnits(TGeoManager::kRootUnits);
95 TGeoManager::LockDefaultUnits(
true);
125void RootGM::Factory::ImportConstituentSolid(
126 int index, TGeoCompositeShape* solid)
130 TGeoShape* consSolid =
138 std::cout <<
" Imported solid: " << *vgmSolid << std::endl;
140 std::cout <<
" Imported solid: "
141 <<
"0x0" << std::endl;
147VGM::ISolid* RootGM::Factory::ImportSolid(TGeoShape* shape)
154 if (importedSolid)
return importedSolid;
158 std::cout <<
"Importing shape: ";
159 if (Debug() > 1) std::cout << shape <<
" ";
160 std::cout << shape->GetName() << std::endl;
163 TGeoBBox* box =
dynamic_cast<TGeoBBox*
>(shape);
164 if (box && std::string(shape->ClassName()) == std::string(
"TGeoBBox")) {
167 const Double_t* origin = box->GetOrigin();
168 if (!origin || (origin[0] == 0.0 && origin[1] == 0.0 && origin[2] == 0.0)) {
178 TGeoConeSeg* cons =
dynamic_cast<TGeoConeSeg*
>(shape);
183 TGeoEltu* eltu =
dynamic_cast<TGeoEltu*
>(shape);
188 TGeoCone* cone =
dynamic_cast<TGeoCone*
>(shape);
193 TGeoHalfSpace* halfSpace =
dynamic_cast<TGeoHalfSpace*
>(shape);
198 TGeoHype* hype =
dynamic_cast<TGeoHype*
>(shape);
203 TGeoPara* para =
dynamic_cast<TGeoPara*
>(shape);
208 TGeoParaboloid* paraboloid =
dynamic_cast<TGeoParaboloid*
>(shape);
213 TGeoPgon* polyhedra =
dynamic_cast<TGeoPgon*
>(shape);
218 TGeoPcon* polycone =
dynamic_cast<TGeoPcon*
>(shape);
223 TGeoSphere* sphere =
dynamic_cast<TGeoSphere*
>(shape);
228 TGeoTorus* torus =
dynamic_cast<TGeoTorus*
>(shape);
233 TGeoTrap* trap =
dynamic_cast<TGeoTrap*
>(shape);
238 TGeoTrd1* trd1 =
dynamic_cast<TGeoTrd1*
>(shape);
243 TGeoTrd2* trd2 =
dynamic_cast<TGeoTrd2*
>(shape);
248 TGeoArb8* arb8 =
dynamic_cast<TGeoArb8*
>(shape);
253 TGeoCtub* ctubs =
dynamic_cast<TGeoCtub*
>(shape);
258 TGeoTubeSeg* tubs =
dynamic_cast<TGeoTubeSeg*
>(shape);
263 TGeoTube* tube =
dynamic_cast<TGeoTube*
>(shape);
268 TGeoXtru* xtru =
dynamic_cast<TGeoXtru*
>(shape);
273 TGeoTessellated* tessellated =
dynamic_cast<TGeoTessellated*
>(shape);
278 TGeoShapeAssembly* assembly =
dynamic_cast<TGeoShapeAssembly*
>(shape);
283 TGeoScaledShape* scaled =
dynamic_cast<TGeoScaledShape*
>(shape);
285 ImportSolid(scaled->GetShape());
289 TGeoCompositeShape* composite =
dynamic_cast<TGeoCompositeShape*
>(shape);
291 ImportConstituentSolid(0, composite);
292 ImportConstituentSolid(1, composite);
294 Register(vgmBoolean);
298 std::cout <<
"Imported Boolean solid: ";
299 if (Debug() > 1) std::cout << vgmBoolean;
300 std::cout << std::endl;
302 std::cout << *vgmBoolean << std::endl;
307 std::cerr <<
" RootGM::Factory::ImportSolid: " << std::endl;
308 std::cerr <<
" Unsupported solid type (solid \"" << shape->GetName()
310 <<
" type \"" << shape->ClassName() <<
"\")" << std::endl;
313 std::cerr <<
"*** Warning: Using a box instead ***" << std::endl;
320 std::cerr <<
"*** Error: Aborting execution ***" << std::endl;
326VGM::IVolume* RootGM::Factory::ImportVolume(TGeoVolume* rootVolume)
330 std::cout <<
"Importing volume: " << rootVolume->GetName() << std::endl;
334 VGM::ISolid* solid = ImportSolid(rootVolume->GetShape());
339 std::cout <<
" Imported solid: " << *solid << std::endl;
341 std::cout <<
" Imported solid: "
342 <<
"0x0" << std::endl;
346 if (
dynamic_cast<TGeoVolumeAssembly*
>(rootVolume))
return 0;
355void RootGM::Factory::ImportDaughters(TGeoVolume* rootVolume)
361 std::cout <<
"ImportDaughters for " << rootVolume->GetName() << std::endl;
364 for (
int i = 0; i < rootVolume->GetNdaughters(); i++) {
366 TGeoVolume* rootDVolume = rootVolume->GetNode(i)->GetVolume();
373 dVolume = ImportVolume(rootDVolume);
376 ImportDaughters(rootDVolume);
382void RootGM::Factory::ImportAssembly(
const TGeoVolume* rootVolume,
384 std::vector<const TGeoNode*>& assemblyNodes)
389 TGeoVolume* rootAssemblyVolume = rootAssemblyNode->GetVolume();
391 if (!rootAssemblyVolume->IsAssembly())
return;
393 assemblyNodes.push_back(rootAssemblyNode);
395 for (
int i = 0; i < rootAssemblyVolume->GetNdaughters(); i++) {
397 TGeoNode* dNode = rootAssemblyVolume->GetNode(i);
398 TGeoVolume* dRootVolume = dNode->GetVolume();
400 if (!dRootVolume->IsAssembly()) {
406 std::cout <<
" " << i <<
"th assembly daughter rtVol = ";
407 if (Debug() > 1) std::cout << dRootVolume <<
" ";
408 std::cout << dRootVolume->GetName() <<
" vgmVol = ";
409 if (Debug() > 1) std::cout << dVolume <<
" ";
410 std::cout << dVolume->
Name() << std::endl;
416 std::vector<const TGeoNode*> assemblyNodes2(assemblyNodes.size());
417 copy(assemblyNodes.begin(), assemblyNodes.end(), assemblyNodes2.begin());
419 ImportAssembly(rootVolume, volume, dNode, assemblyNodes2);
425void RootGM::Factory::ImportPlacements(
430 for (
int i = 0; i < rootVolume->GetNdaughters(); i++) {
432 TGeoNode* dNode = rootVolume->GetNode(i);
433 TGeoVolume* dRootVolume = dNode->GetVolume();
437 std::cout <<
" " << i <<
"th daughter rtNode = ";
438 if (Debug() > 1) std::cout << dNode <<
" ";
439 std::cout << dNode->GetName() <<
" rtVol = ";
440 if (Debug() > 1) std::cout << dRootVolume <<
" ";
441 std::cout << dRootVolume->GetName();
444 if (!dRootVolume->IsAssembly()) {
454 std::cout <<
" vgmPl = ";
455 if (Debug() > 1) std::cout << dPlacement <<
" ";
456 std::cout << dPlacement->
Name() <<
" vgmVol = ";
457 if (Debug() > 1) std::cout << dVolume <<
" ";
458 std::cout << dVolume->
Name() << std::endl;
462 std::vector<const TGeoNode*> assemblyNodes;
463 ImportAssembly(rootVolume, volume, dNode, assemblyNodes);
469void RootGM::Factory::ImportDivision(
475 TGeoPatternFinder* finderNonConst = rootVolume->GetFinder();
478 TGeoNode* dNode = finderNonConst->GetNodeOffset(0);
479 TGeoVolume* dRootVolume = dNode->GetVolume();
485 <<
"0th daughter (division) rtNode = ";
486 if (Debug() > 1) std::cout << dNode <<
" ";
487 std::cout << dNode->GetName() <<
" rtVol = ";
488 if (Debug() > 1) std::cout << dRootVolume <<
" ";
489 std::cout << dRootVolume->GetName();
496 std::cout <<
" vgmPl = ";
497 if (Debug() > 1) std::cout << placement <<
" ";
498 std::cout << placement->
Name() <<
" vgmVol = ";
499 if (Debug() > 1) std::cout << volume <<
" ";
500 std::cout << volume->
Name() << std::endl;
505void RootGM::Factory::ImportPositions()
511 std::cout <<
"Import positions: " << std::endl;
514 TObjArray* rootVolumes = gGeoManager->GetListOfVolumes();
516 for (
int i = 0; i < rootVolumes->GetEntriesFast(); i++) {
518 TGeoVolume* rootVolume = (TGeoVolume*)rootVolumes->At(i);
519 if (rootVolume->IsAssembly())
continue;
523 if (!volume)
continue;
530 std::cout << i <<
"th volume: " << rootVolume->GetName() <<
" ";
532 std::cout <<
" rt : " << rootVolume <<
" "
533 <<
" vgm: " << volume;
534 std::cout << std::endl;
537 if (IsDivided(rootVolume))
538 ImportDivision(rootVolume, volume);
540 ImportPlacements(rootVolume, volume);
548 TGeoNode* rootNode =
static_cast<TGeoNode*
>(topNode);
550 return Import(rootNode);
554bool RootGM::Factory::ImportSolid(
void* solid)
557 TGeoShape* rootSolid =
static_cast<TGeoShape*
>(solid);
559 return Import(rootSolid);
563bool RootGM::Factory::IsDivided(
const TGeoVolume* volume)
const
569 const TGeoPatternFinder* finder = volume->GetFinder();
570 if (!finder)
return false;
590void RootGM::Factory::EmulateReplicatedSlice(
const std::string& name,
592 int nofItems,
double width,
double offset,
double halfGap)
596 std::cerr <<
" RootGM::Factory:::EmulateReplicatedSlice " << std::endl;
597 std::cerr <<
" Unsupported solid type \""
599 <<
"mother volume: \"" << motherVolume->
Name() <<
"\""
611 hx = (width - 2. * halfGap) / 2.;
614 hy = (width - 2. * halfGap) / 2.;
617 hz = (width - 2. * halfGap) / 2.;
628 std::cerr <<
" RootGM::Factory:::EmulateReplicatedSlice " << std::endl;
629 std::cerr <<
" Slice solid dimensions do not respect multiple placement "
632 std::cerr <<
" Solid dimensions: " << sliceBox->
XHalfLength() <<
","
635 std::cerr <<
" Expected: " << hx <<
"," << hy <<
"," << hz <<
","
637 std::cerr <<
" New solid and volume will be created." << std::endl;
640 sliceVolume = CreateVolume(volume->
Name(), newSolid, volume->
MediumName());
645 std::vector<double> start = { 0., 0., 0. };
646 std::vector<double> delta = { 0., 0., 0. };
650 start[0] = -motherBox->
XHalfLength() + offset + width / 2.;
654 start[1] = -motherBox->
YHalfLength() + offset + width / 2.;
658 start[2] = -motherBox->
ZHalfLength() + offset + width / 2.;
662 for (
int i = 0; i < nofItems; ++i) {
664 std::cout << i <<
"th position: " << start[0] + i * delta[0] <<
",";
665 std::cout << start[1] + i * delta[1] <<
",";
666 std::cout << start[2] + i * delta[2] << std::endl;
669 start[1] + i * delta[1], start[2] + i * delta[2], 0., 0., 0., 0. };
671 CreatePlacement(name, i, sliceVolume, motherVolume, transform);
677 std::string nameBis = name +
"bis";
683 nameBis, volumeBis, motherVolume, axis, nofItems, width, offset);
688 TGeoVolume* rootVolume = node->GetVolume();
689 rootVolume->SetName(volumeBis->
Name().data());
690 (
dynamic_cast<RootGM::Volume*
>(volumeBis))->ResetVolume(rootVolume);
694 CreatePlacement(name, 0, sliceVolume, volumeBis, transform);
716 const std::string& name,
double hz, std::vector<VGM::TwoVector> vertices)
724 const std::string& name,
double hx,
double hy,
double hz)
727 return Register(
new RootGM::Box(name, hx, hy, hz));
732 double rout1,
double rin2,
double rout2,
double hz,
double sphi,
double dphi)
736 new RootGM::Cons(name, rin1, rout1, rin2, rout2, hz, sphi, dphi));
741 double rout,
double hz,
double sphi,
double dphi,
double nxlow,
double nylow,
742 double nzlow,
double nxhigh,
double nyhigh,
double nzhigh)
745 return Register(
new RootGM::Ctubs(name, rin, rout, hz, sphi, dphi, nxlow,
746 nylow, nzlow, nxhigh, nyhigh, nzhigh));
751 double dx,
double dy,
double dz,
double zBottomCut,
double zTopCut)
759 const std::string& name,
double dx,
double dy,
double hz)
767 double r2,
double stereo1,
double stereo2,
double hz)
770 return Register(
new RootGM::Hype(name, r1, r2, stereo1, stereo2, hz));
775 double dy,
double dz,
double alpha,
double theta,
double phi)
778 return Register(
new RootGM::Para(name, dx, dy, dz, alpha, theta, phi));
783 const std::string& name,
double r1,
double r2,
double hz)
791 double sphi,
double dphi,
int nofZplanes,
double* z,
double* rin,
801 double sphi,
double dphi,
int nofSides,
int nofZplanes,
double* z,
802 double* rin,
double* rout)
806 name, sphi, dphi, nofSides, nofZplanes, z, rin, rout));
811 double rout,
double sphi,
double dphi,
double stheta,
double dtheta)
820 const std::string& name, std::vector<std::vector<VGM::ThreeVector> > facets)
828 double rout,
double rax,
double sphi,
double dphi)
831 return Register(
new RootGM::Torus(name, rin, rout, rax, sphi, dphi));
836 double theta,
double phi,
double dy1,
double dx1,
double dx2,
double alpha1,
837 double dy2,
double dx3,
double dx4,
double alpha2)
841 name, hz, theta, phi, dy1, dx1, dx2, alpha1, dy2, dx3, dx4, alpha2));
846 double hx2,
double hy1,
double hy2,
double hz)
849 return Register(
new RootGM::Trd(name, hx1, hx2, hy1, hy2, hz));
854 double rout,
double hz,
double sphi,
double dphi)
857 return Register(
new RootGM::Tubs(name, rin, rout, hz, sphi, dphi));
862 std::vector<VGM::TwoVector> polygon,
863 std::vector<std::vector<double> > zsections)
915 std::vector<VGM::ISolid*> constituents,
916 std::vector<VGM::Transform> transforms)
919 std::vector<TGeoMatrix*> rootTransforms;
920 for (
auto transform : transforms) {
929 const std::string& name,
VGM::ISolid* solid,
const std::string& mediumName)
934 VolumeStore().push_back(volume);
952 std::cerr <<
" RootGM::Factory::CreatePlacement:" << std::endl;
953 std::cerr <<
" Top volume defided twice!" << std::endl;
954 std::cerr <<
"*** Error: Aborting execution ***" << std::endl;
965 VGM::Axis axis,
int nofItems,
double width,
double offset,
double halfGap)
970 std::cerr <<
" RootGM::Factory::CreateMultiplePlacement:" << std::endl;
971 std::cerr <<
" Mother volume not defined!" << std::endl;
972 std::cerr <<
"*** Error: Aborting execution ***" << std::endl;
977 EmulateReplicatedSlice(
978 name, volume, motherVolume, axis, nofItems, width, offset, halfGap);
985 name, volume, motherVolume, axis, nofItems, width, offset);
990 TGeoVolume* rootVolume = node->GetVolume();
991 rootVolume->SetName(volume->
Name().data());
997 oldVolume->SetName(
"volumeNotPlacedInGeometry");
998 if (oldVolume->GetNdaughters() > 0) {
999 std::cerr <<
"*** Limitation ***" << std::endl;
1000 std::cerr <<
" RootGM::Factory::CreateMultiplePlacement: "
1002 std::cerr <<
" Daughters of divided volume can be set " << std::endl
1003 <<
" only after multiple placement definition." << std::endl
1004 <<
" Geometry would be incomplete." << std::endl;
1008 (
dynamic_cast<RootGM::Volume*
>(volume))->ResetVolume(rootVolume);
1017 const std::vector<VGM::Transform>& transforms,
1018 const std::vector<VGM::IVolume*>& volumes)
1022 if (!motherVolume) {
1023 std::cerr <<
" RootGM::Factory::CreateParameterisedPlacement:"
1025 std::cerr <<
" Mother volume not defined!" << std::endl;
1026 std::cerr <<
"*** Error: Aborting execution ***" << std::endl;
1031 if (transforms.size() != volumes.size()) {
1032 std::cerr <<
" RootGM::Factory::CreateParameterisedPlacement:"
1034 std::cerr <<
" Transformations and Volumes vector sizes cannot be different!"
1036 std::cerr <<
"*** Error: Aborting execution ***" << std::endl;
1040 for (
size_t i = 0; i < transforms.size(); ++i) {
1041 CreatePlacement(name, i, volumes[i], motherVolume, transforms[i]);
1086 std::cout <<
"RootGM::Factory::Import started ...";
1087 if (Debug() > 1) std::cout << topNode;
1088 std::cout << std::endl;
1093 SetSingleMode(
false);
1100 TGeoVolume* topVolume = topNode->GetVolume();
1106 ImportDaughters(topVolume);
1113 std::cout << std::endl;
1124 std::cout <<
"RootGM::Factory::Import finished." << std::endl;
1138 std::cout <<
"RootGM::Factory::Import of one solid started ...";
1139 if (Debug() > 1) std::cout << shape;
1140 std::cout << std::endl;
1145 SolidStore().clear();
1149 SetSingleMode(
true);
1152 fSolid = ImportSolid(shape);
1156 std::cout <<
"RootGM::Factory::Import of one solid finished." << std::endl;
1159 return (fSolid != 0);
The abstract base class to positions of volumes.
VGM implementation for Root Arb8 solid.
VGM implementation for Root Boolean solid.
static TGeoShape * GetConstituentSolid(int index, TGeoCompositeShape *compositeShape)
VGM implementation for Root box solid.
VGM implementation for Root cons solid.
VGM implementation for Root cut tubs solid.
VGM implementation for Root displaced solid.
VGM implementation for Root ellipsoid solid.
VGM implementation for Root elliptical tube solid.
VGM implementation for Root extruded solid.
virtual VGM::ISolid * CreateTubs(const std::string &name, double rin, double rout, double hz, double sphi, double dphi)
Create the trd solid = phi segment of a tube.
virtual VGM::ISolid * CreatePara(const std::string &name, double dx, double dy, double dz, double alpha, double theta, double phi)
Create the para solid = parallelepiped.
virtual VGM::ISolid * CreateCons(const std::string &name, double rin1, double rout1, double rin2, double rout2, double hz, double sphi, double dphi)
Create the cons solid = phi segment of a conical tube.
virtual VGM::ISolid * CreateMultiUnion(const std::string &name, std::vector< VGM::ISolid * > constituents, std::vector< VGM::Transform > transforms)
Create the multi union of solids.
virtual VGM::ISolid * CreateHype(const std::string &name, double r1, double r2, double stereo1, double stereo2, double hz)
Create the hyperboloid solid.
virtual VGM::ISolid * CreateSubtractionSolid(const std::string &name, VGM::ISolid *solidA, VGM::ISolid *solidB, const VGM::Transform &transform)
Create the subtraction of two solids.
virtual VGM::IPlacement * Top() const
Return the top volume placement.
virtual VGM::IPlacement * CreateMultiplePlacement(const std::string &name, VGM::IVolume *volume, VGM::IVolume *motherVolume, VGM::Axis axis, int nofItems, double width, double offset, double halfGap)
Create the multiple volume placement.
virtual VGM::IPlacement * CreatePlacement(const std::string &name, int copyNo, VGM::IVolume *volume, VGM::IVolume *motherVolume, const VGM::Transform &transform)
Create the simple volume placement.
virtual VGM::ISolid * CreateEllipsoid(const std::string &name, double dx, double dy, double dz, double zBottomCut, double zTopCut)
Create the ellipsoid solid.
virtual VGM::ISolid * CreateTrd(const std::string &name, double hx1, double hx2, double hy1, double hy2, double hz)
Create the trd solid = a trapezoid with the x and y dimensions varying along z.
virtual VGM::ISolid * CreatePolycone(const std::string &name, double sphi, double dphi, int nofZplanes, double *z, double *rin, double *rout)
Create the polycone solid = phi segment of a polycone.
virtual VGM::ISolid * CreateScaledSolid(const std::string &name, VGM::ISolid *solid, const VGM::Transform &transform)
Create scaled solid.
virtual VGM::ISolid * CreateEllipticalTube(const std::string &name, double dx, double dy, double hz)
Create the elliptical tube solid.
virtual VGM::ISolid * CreateBox(const std::string &name, double hx, double hy, double hz)
Create the box solid.
virtual VGM::IVolume * CreateVolume(const std::string &name, VGM::ISolid *solid, const std::string &mediumName)
Create the volume.
TGeoShape * Solid() const
virtual VGM::ISolid * CreateTrap(const std::string &name, double hz, double theta, double phi, double dy1, double dx1, double dx2, double alpha1, double dy2, double dx3, double dx4, double alpha2)
Create the trap solid = general trapezoid ( Note that of the 11 parameters described below,...
virtual VGM::IPlacement * CreateParameterisedPlacement(const std::string &name, VGM::IVolume *motherVolume, const std::vector< VGM::Transform > &transforms, const std::vector< VGM::IVolume * > &volumes)
Create the parameterised volume placement.
virtual VGM::ISolid * CreateArb8(const std::string &name, double hz, std::vector< VGM::TwoVector > vertices)
Create the arbitrary trapezoid with 8 vertices standing on two paralel planes perpendicular to Z axis...
virtual VGM::ISolid * CreateTessellatedSolid(const std::string &name, std::vector< std::vector< VGM::ThreeVector > > facets)
Create tessellated solid = solid composed from triangular and rectangular facets.
virtual VGM::ISolid * CreateTorus(const std::string &name, double rin, double rout, double rax, double sphi, double dphi)
Create the torus solid = phi segment of a torus.
virtual VGM::ISolid * CreateCtubs(const std::string &name, double rin, double rout, double hz, double sphi, double dphi, double nxlow, double nylow, double nzlow, double nxhigh, double nyhigh, double nzhigh)
Create the cut tubs solid = phi segment of a tube cut with two planes.
virtual VGM::ISolid * CreateParaboloid(const std::string &name, double r1, double r2, double hz)
Create the paraboloid solid.
virtual VGM::ISolid * CreatePolyhedra(const std::string &name, double sphi, double dphi, int nofSides, int nofZplanes, double *z, double *rin, double *rout)
Create the polyhedra solid = phi segment of a polyhedra (polygone)
virtual VGM::ISolid * SingleSolid() const
Return solid (if in one solid conversion mode)
virtual void SetSolid(VGM::ISolid *solid)
Set solid (in single mode)
virtual VGM::ISolid * CreateIntersectionSolid(const std::string &name, VGM::ISolid *solidA, VGM::ISolid *solidB, const VGM::Transform &transform)
Create the intersection of two solids.
virtual VGM::ISolid * CreateExtrudedSolid(const std::string &name, std::vector< VGM::TwoVector > polygon, std::vector< std::vector< double > > zsections)
Create the extruded solid.
virtual VGM::ISolid * CreateUnionSolid(const std::string &name, VGM::ISolid *solidA, VGM::ISolid *solidB, const VGM::Transform &transform)
Create the union of two solids.
virtual VGM::ISolid * CreateSphere(const std::string &name, double rin, double rout, double sphi, double dphi, double stheta, double dtheta)
Create the sphere solid = phi segment of a spherical shell.
virtual VGM::ISolid * CreateDisplacedSolid(const std::string &name, VGM::ISolid *solid, const VGM::Transform &transform)
Create displaced solid.
bool Import(TGeoNode *topNode)
VGM implementation for Root hyperboloid solid.
VGM material factory for Root.
virtual bool Import()
Import native materials.
VGM implementation for Root Boolean solid.
VGM implementation for Root para solid.
VGM implementation for Root paraboloid solid.
TGeoNode * GetPlacement(VGM::IPlacement *iPlacement) const
static PlacementMap * Instance()
VGM implementation for Root positions of volumes.
VGM implementation for Root polycone solid.
VGM implementation for Root polyhedra solid.
VGM implementation for Root Scaled solid.
TGeoShape * GetSolid(VGM::ISolid *iSolid) const
static SolidMap * Instance()
VGM implementation for Root sphere solid.
VGM implementation for Root tessellated solid.
VGM implementation for Root torus solid.
VGM implementation for Root trap solid.
VGM implementation for Root trd solid.
VGM implementation for Root tubs solid.
static double Length()
Return Root length unit in VGM units.
static VolumeMap * Instance()
TGeoVolume * GetVolume(VGM::IVolume *iVolume) const
VGM implementation for Root volume.
The VGM interface to Boolean solids.
The VGM interface to box solids.
virtual double ZHalfLength() const =0
Return the half-length along the z axis in mm.
virtual double YHalfLength() const =0
Return the half-length along the y axis in mm.
virtual double XHalfLength() const =0
Return the half-length along the x axis in mm.
The VGM interface to positions of volumes.
virtual std::string Name() const =0
Return the name of this placement.
The VGM interface to solids.
virtual SolidType Type() const =0
Return the type of this solid.
virtual std::string Name() const =0
Return the name of this solid.
The VGM interface to volumes.
virtual ISolid * Solid() const =0
Return the associated solid.
virtual std::string Name() const =0
Return the name of this volume.
virtual std::string MediumName() const =0
Return the name of the associated medium.
void DebugInfo()
Debug printing.
VGM implementation for Root.
TGeoScale * CreateScale(const VGM::Transform &transform)
TGeoMatrix * CreateTransform(const VGM::Transform &transform)
VGM::Axis Axis(const TGeoPatternFinder *finder)
std::vector< double > Transform
std::string SolidTypeName(VGM::SolidType typeId)
std::vector< IVolume * > VolumeStore
std::vector< ISolid * > SolidStore