20#ifndef ROOT_GM_FACTORY_H
21#define ROOT_GM_FACTORY_H
29class TGeoCompositeShape;
56 const std::string& name,
double hz, std::vector<VGM::TwoVector> vertices);
59 const std::string& name,
double hx,
double hy,
double hz);
62 double rout1,
double rin2,
double rout2,
double hz,
double sphi,
66 double rout,
double hz,
double sphi,
double dphi,
double nxlow,
67 double nylow,
double nzlow,
double nxhigh,
double nyhigh,
double nzhigh);
70 double dy,
double dz,
double zBottomCut,
double zTopCut);
73 const std::string& name,
double dx,
double dy,
double hz);
76 std::vector<VGM::TwoVector> polygon,
77 std::vector<std::vector<double> > zsections);
80 double stereo1,
double stereo2,
double hz);
83 double dz,
double alpha,
double theta,
double phi);
86 const std::string& name,
double r1,
double r2,
double hz);
89 double dphi,
int nofZplanes,
double* z,
double* rin,
double* rout);
92 double dphi,
int nofSides,
int nofZplanes,
double* z,
double* rin,
96 double rout,
double sphi,
double dphi,
double stheta,
double dtheta);
99 std::vector<std::vector<VGM::ThreeVector> > facets);
102 double rout,
double rax,
double sphi,
double dphi);
105 double theta,
double phi,
double dy1,
double dx1,
double dx2,
double alpha1,
106 double dy2,
double dx3,
double dx4,
double alpha2);
109 double hx2,
double hy1,
double hy2,
double hz);
112 double rout,
double hz,
double sphi,
double dphi);
132 std::vector<VGM::ISolid*> constituents,
133 std::vector<VGM::Transform> transforms);
138 const std::string& name,
VGM::ISolid* solid,
const std::string& mediumName);
148 int nofItems,
double width,
double offset,
double halfGap);
152 const std::vector<VGM::Transform>& transforms,
153 const std::vector<VGM::IVolume*>& volumes);
159 TGeoNode*
World()
const;
160 TGeoShape*
Solid()
const;
164 bool Import(TGeoNode* topNode);
165 bool Import(TGeoShape* shape);
173 void ImportConstituentSolid(
int index, TGeoCompositeShape* solid);
176 void ImportDaughters(TGeoVolume* rootVolume);
177 void ImportAssembly(
const TGeoVolume* rootVolume,
VGM::IVolume* volume,
178 const TGeoNode* rootAssemblyNode,
179 std::vector<const TGeoNode*>& assemblyNodes);
180 void ImportPlacements(
const TGeoVolume* rootVolume,
VGM::IVolume* volume);
181 void ImportDivision(
const TGeoVolume* rootVolume,
VGM::IVolume* volume);
182 void ImportPositions();
183 bool IsDivided(
const TGeoVolume* volume)
const;
187 void EmulateReplicatedSlice(
const std::string& name,
VGM::IVolume* volume,
189 double offset,
double halfGap);
193 virtual bool Import(
void* topNode);
194 virtual bool ImportSolid(
void* solid);
The abstract base class to geometry factory.
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)
The VGM interface to positions of volumes.
The VGM interface to solids.
The VGM interface to volumes.
VGM implementation for Root.
std::vector< double > Transform