VGM Version 5.3
|
#include <Factory.h>
Public Member Functions | |
Factory () | |
virtual | ~Factory () |
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 * | CreateBox (const std::string &name, double hx, double hy, double hz) |
Create the box solid. | |
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 * | 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 * | CreateEllipsoid (const std::string &name, double dx, double dy, double dz, double zBottomCut, double zTopCut) |
Create the ellipsoid solid. | |
virtual VGM::ISolid * | CreateEllipticalTube (const std::string &name, double dx, double dy, double hz) |
Create the elliptical tube solid. | |
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 * | CreateHype (const std::string &name, double r1, double r2, double stereo1, double stereo2, double hz) |
Create the hyperboloid solid. | |
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 * | CreateParaboloid (const std::string &name, double r1, double r2, double hz) |
Create the paraboloid solid. | |
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 * | 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 * | 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 * | 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 * | 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, only 9 are really independent) | |
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 * | 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 * | CreateIntersectionSolid (const std::string &name, VGM::ISolid *solidA, VGM::ISolid *solidB, const VGM::Transform &transform) |
Create the intersection of two solids. | |
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::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 * | CreateDisplacedSolid (const std::string &name, VGM::ISolid *solid, const VGM::Transform &transform) |
Create displaced solid. | |
virtual VGM::ISolid * | CreateScaledSolid (const std::string &name, VGM::ISolid *solid, const VGM::Transform &transform) |
Create scaled solid. | |
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::IVolume * | CreateVolume (const std::string &name, VGM::ISolid *solid, const std::string &mediumName) |
Create the volume. | |
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::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 * | 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::IPlacement * | Top () const |
Return the top volume placement. | |
virtual VGM::ISolid * | SingleSolid () const |
Return solid (if in one solid conversion mode) | |
TGeoNode * | World () const |
TGeoShape * | Solid () const |
bool | Import (TGeoNode *topNode) |
bool | Import (TGeoShape *shape) |
Public Member Functions inherited from BaseVGM::VFactory | |
VFactory (const std::string &name, VGM::IMaterialFactory *materialFactory) | |
virtual | ~VFactory () |
virtual std::string | Name () const |
Return the name of this factory. | |
virtual const VGM::SolidStore & | Solids () const |
Return the store of solids. | |
virtual const VGM::VolumeStore & | Volumes () const |
Return the store of volumes. | |
virtual VGM::IMaterialFactory * | MaterialFactory () const |
Return the associated material factory. | |
virtual bool | Export (VGM::IFactory *factory) const |
Export geometry to the specified factory. | |
virtual void | PrintSolids () const |
Print all solids. | |
virtual void | PrintVolumes () const |
Print all volumes. | |
virtual void | SetDebug (int debug) |
Set the debug level. | |
virtual int | Debug () const |
Return the debug level. | |
virtual void | SetIgnore (bool ignore, double dummyBoxDimensions=VGM::kDefaultDummyBoxDimensions) |
Set ignoring of unsupported features. | |
virtual bool | Ignore () const |
Return the ignore option. | |
virtual void | SetDummyBoxDimensions (double value) |
Set the dimensions in mm of a dummy box replacing the unsupported shapes if the 'ignore' option is activated. | |
virtual double | DummyBoxDimensions () const |
Return the ignore option. | |
virtual void | SetBestMatch (bool value) |
Set best match option. | |
virtual bool | BestMatch () const |
Return the single mode option. | |
Public Member Functions inherited from VGM::IFactory | |
virtual | ~IFactory () |
Protected Member Functions | |
Factory (const Factory &rhs) | |
virtual void | SetSolid (VGM::ISolid *solid) |
Set solid (in single mode) | |
Protected Member Functions inherited from BaseVGM::VFactory | |
VFactory () | |
VFactory (const VFactory &rhs) | |
virtual void | SetSingleMode (bool singleMode) |
Set single mode option. | |
virtual bool | SingleMode () const |
Return the single mode option. | |
virtual VGM::SolidStore & | SolidStore () |
virtual VGM::VolumeStore & | VolumeStore () |
RootGM::Factory::Factory | ( | ) |
Standard default constructor
Definition at line 81 of file Factory.cxx.
|
virtual |
Definition at line 107 of file Factory.cxx.
|
protected |
Protected copy constructor
Definition at line 100 of file Factory.cxx.
|
virtual |
Create the arbitrary trapezoid with 8 vertices standing on two paralel planes perpendicular to Z axis.
hz | half-length along the z axis in mm |
vertices | vector of (x,y) coordinates of vertices
|
The order of defining the vertices of an arb8 is the following:
Points can be identical in order to create shapes with less than vertices.
Implements VGM::IFactory.
Definition at line 715 of file Factory.cxx.
|
virtual |
Create the box solid.
hx | half-length along the x axis in mm |
hy | half-length along the y axis in mm |
hz | half-length along the z axis in mm |
Implements VGM::IFactory.
Definition at line 723 of file Factory.cxx.
|
virtual |
Create the cons solid = phi segment of a conical tube.
rin1 | inside radius at -hz in mm |
rin2 | inside radius at +hz in mm |
rout1 | outside radius at -hz in mm |
rout2 | outside radius at +hz in mm |
hz | half-length along the z axis in mm |
sphi | starting angle of the segment in deg |
dphi | opening angle of the segment in deg |
Implements VGM::IFactory.
Definition at line 731 of file Factory.cxx.
|
virtual |
Create the cut tubs solid = phi segment of a tube cut with two planes.
rin | inside radius in mm |
rout | outside radius in mm |
hz | half-length along the z axis in mm |
sphi | starting angle of the segment in deg |
dphi | opening angle of the segment in deg |
nxlow | X-component of the normal unit vector to the cut plane in -z |
nylow | Y-component of the normal unit vector to the cut plane in -z |
nzlow | Z-component of the normal unit vector to the cut plane in -z |
nxhigh | X-component of the normal unit vector to the cut plane in +z |
nyhigh | Y-component of the normal unit vector to the cut plane in +z |
nzhigh | Z-component of the normal unit vector to the cut plane in +z |
Implements VGM::IFactory.
Definition at line 740 of file Factory.cxx.
|
virtual |
Create the ellipsoid solid.
dx | the semi-axis of the ellipse along x in mm |
dy | the semi-axis of the ellipse along y in mm |
dz | the semi-axis of the ellipse along z in mm |
zBottomCut | the bottom cut along the z axis in mm |
zTopCut | the top cut along the z axis in mm |
Implements VGM::IFactory.
Definition at line 750 of file Factory.cxx.
|
virtual |
Create the elliptical tube solid.
dx | the semi-axis of the ellipse along x in mm |
dy | the semi-axis of the ellipse along y in mm |
hz | half-length along the z axis in mm |
Implements VGM::IFactory.
Definition at line 758 of file Factory.cxx.
|
virtual |
Create the extruded solid.
polygon | the outline polygon defined by its vertices |
zsections | the z-sections defined by z positions, polygon offset in x, y and scale |
Implements VGM::IFactory.
Definition at line 861 of file Factory.cxx.
|
virtual |
Create the hyperboloid solid.
r1 | radius of the inner hyperbolic surface in mm |
r2 | radius of the outer hyperbolic surface in mm |
stereo1 | stereo angle for the inner hyperbolic surface in deg |
stereo2 | stereo angle for the outer hyperbolic surface in deg |
hz | half-length along the z axis in mm |
Implements VGM::IFactory.
Definition at line 766 of file Factory.cxx.
|
virtual |
Create the para solid = parallelepiped.
hx | half-length along the x axis in mm |
hy | half-length along the y axis in mm |
hz | half-length along the z axis in mm |
alpha | angle formed by the y axis and by the plane joining the centre of the faces parallel to the z-x plane at -hy and +hy in deg |
theta | polar angle of the line joining the centres of the faces at -hz and +hz in deg |
phi | azimuthal angle of the line joining the centres of the faces at -hz and +hz in deg |
Implements VGM::IFactory.
Definition at line 774 of file Factory.cxx.
|
virtual |
Create the paraboloid solid.
r1 | radius at -hz in mm |
r2 | radius at +hz in mm |
hz | half-length along the z axis in mm |
Implements VGM::IFactory.
Definition at line 782 of file Factory.cxx.
|
virtual |
Create the polycone solid = phi segment of a polycone.
sphi | starting angle of the segment in deg |
dphi | opening angle of the segment in deg |
nofZplanes | number of planes perpendicular to the z axis (has to be >= 2) |
z | array of z positions of the planes in mm |
rin | array of inside radius of the planes in mm |
rout | array of outside radius of the planes in mm |
Implements VGM::IFactory.
Definition at line 790 of file Factory.cxx.
|
virtual |
Create the polyhedra solid = phi segment of a polyhedra (polygone)
sphi | starting angle of the segment in deg |
dphi | opening angle of the segment in deg |
nofSides | number of sides of the cross section between the given phi limits |
nofZplanes | number of planes perpendicular to the z axis (has to be >= 2) |
z | array of z positions of the planes in mm |
rin | array of inside radius of the planes in mm |
rout | array of outside radius of the planes in mm |
Implements VGM::IFactory.
Definition at line 800 of file Factory.cxx.
|
virtual |
Create the sphere solid = phi segment of a spherical shell.
rin | inside radius of the shell in mm |
rout | outside radius of the shell in mm |
sphi | starting azimuthal angle of the segment in deg |
dphi | opening azimuthal angle of the segment in deg |
stheta | starting polar angle of the segment in deg |
dtheta | opening polar angle of the segment in deg |
Implements VGM::IFactory.
Definition at line 810 of file Factory.cxx.
|
virtual |
Create tessellated solid = solid composed from triangular and rectangular facets.
facets | the vector of facets defined as a vector of three vectors representing the facet points in mm |
Implements VGM::IFactory.
Definition at line 819 of file Factory.cxx.
|
virtual |
Create the torus solid = phi segment of a torus.
rin | inside radius of the torus in mm |
rout | outside radius of the torus in mm |
rax | axial (swept) radius of the torus in mm |
sphi | starting angle of the segment in deg (with 0 being the +x axis) |
dphi | opening angle of the segment in deg |
Implements VGM::IFactory.
Definition at line 827 of file Factory.cxx.
|
virtual |
Create the trap solid = general trapezoid ( Note that of the 11 parameters described below, only 9 are really independent)
hz | half-length along the z axis in mm |
theta | polar angle of the line joining the centres of the faces at -hz and +hz in deg |
phi | azimuthal angle of the line joining the centres of the faces at -hz and +hz in deg |
dy1 | half-length along y of the face at -hz in mm |
dx1 | half-length along x of the side at -hy of the face at -hz in mm |
dx2 | half-length along x of the side at +hy of the face at +hz in mm |
alpha1 | angle with respect to the y axis from the centre of the side at -hy to the centre at +hy of the face at -hz |
dy2 | half-length along y of the face at +hz in mm |
dx3 | half-length along x of the side at -hy of the face at +hz in mm |
dx4 | half-length along x of the side at +hy of the face at +hz in mm |
alpha2 | angle with respect to the y axis from the centre of the side at -hy to the centre at +hy of the face at +hz |
Implements VGM::IFactory.
Definition at line 835 of file Factory.cxx.
|
virtual |
Create the trd solid = a trapezoid with the x and y dimensions varying along z.
hx1 | half-length along x at the surface positioned at -hz in mm |
hx2 | half-length along x at the surface positioned at +hz in mm |
hy1 | half-length along y at the surface positioned at -hz in mm |
hy2 | half-length along y at the surface positioned at +hz in mm |
hz | half-length along the z axis in mm |
Implements VGM::IFactory.
Definition at line 845 of file Factory.cxx.
|
virtual |
Create the trd solid = phi segment of a tube.
rin | inside radius in mm |
rout | outside radius in mm |
hz | half-length along the z axis in mm |
sphi | starting angle of the segment in deg |
dphi | opening angle of the segment in deg |
Implements VGM::IFactory.
Definition at line 853 of file Factory.cxx.
|
virtual |
Create the intersection of two solids.
solidA,solidB | constituent solids |
transform | 3D displacement of the solidB with respect to solid A |
Implements VGM::IFactory.
Definition at line 870 of file Factory.cxx.
|
virtual |
Create the subtraction of two solids.
solidA,solidB | constituent solids |
transform | 3D displacement of the solidB with respect to solid A |
Implements VGM::IFactory.
Definition at line 879 of file Factory.cxx.
|
virtual |
Create the union of two solids.
solidA,solidB | constituent solids |
transform | 3D displacement of the solidB with respect to solid A |
Implements VGM::IFactory.
Definition at line 888 of file Factory.cxx.
|
virtual |
Create displaced solid.
solid | constituent solids |
transform | 3D displacement of the solidB with respect to solid A |
Implements VGM::IFactory.
Definition at line 897 of file Factory.cxx.
|
virtual |
Create scaled solid.
solid | constituent solids |
transform | scale transformation (sx, sy, sz) |
Implements VGM::IFactory.
Definition at line 906 of file Factory.cxx.
|
virtual |
Create the multi union of solids.
constituents | constituent solids |
transforms | 3D displacement of the constituent solids |
Implements VGM::IFactory.
Definition at line 914 of file Factory.cxx.
|
virtual |
Create the volume.
solid | the associated solid |
mediumName | the name of the associated medium |
Implements VGM::IFactory.
Definition at line 928 of file Factory.cxx.
|
virtual |
Create the simple volume placement.
copyNo | the copy number of this placement |
volume | the associated volume |
motherVolume | the associated mother volume |
transform | 3D transformation |
Implements VGM::IFactory.
Definition at line 939 of file Factory.cxx.
|
virtual |
Create the multiple volume placement.
volume | the associated volume which will be replicated |
motherVolume | the associated mother volume |
axis | the replication axis |
nofItems | number of replications |
width | the replication width (the unit depends on the axis; can be mm or deg) |
offset | the replication offset (the unit depends on the axis; can be mm or deg) |
halfGap | the half with of the gap between replications (can be mm or deg) |
Implements VGM::IFactory.
Definition at line 963 of file Factory.cxx.
|
virtual |
Create the parameterised volume placement.
motherVolume | the associated mother volume |
transforms | transformations for every replicated element |
volumes | volumes for every replicated element |
Implements VGM::IFactory.
Definition at line 1015 of file Factory.cxx.
|
virtual |
Return the top volume placement.
Returns the top volume (VGM placement)
Implements VGM::IFactory.
Definition at line 1048 of file Factory.cxx.
|
virtual |
Return solid (if in one solid conversion mode)
Returns the solid (if in one solid conversion mode)
Implements VGM::IFactory.
Definition at line 1056 of file Factory.cxx.
TGeoNode * RootGM::Factory::World | ( | ) | const |
Returns the world volume (Root node)
Definition at line 1064 of file Factory.cxx.
TGeoShape * RootGM::Factory::Solid | ( | ) | const |
Returns the solid (if in one solid conversion mode)
Definition at line 1072 of file Factory.cxx.
bool RootGM::Factory::Import | ( | TGeoNode * | topNode | ) |
Import Root native geometry
Definition at line 1080 of file Factory.cxx.
bool RootGM::Factory::Import | ( | TGeoShape * | shape | ) |
Import one Root shape. This call automatically activates a special single mode
Definition at line 1131 of file Factory.cxx.
|
protectedvirtual |
Set solid (in single mode)
Set solid (in single mode)
Implements VGM::IFactory.
Definition at line 703 of file Factory.cxx.