20#ifndef GEANT4_GM_FACTORY_H
21#define GEANT4_GM_FACTORY_H
25#include "G4ReflectionFactory.hh"
31class G4VPhysicalVolume;
63 const std::string& name,
double hz, std::vector<VGM::TwoVector> vertices);
66 const std::string& name,
double hx,
double hy,
double hz);
69 double rout1,
double rin2,
double rout2,
double hz,
double sphi,
73 double rout,
double hz,
double sphi,
double dphi,
double nxlow,
74 double nylow,
double nzlow,
double nxhigh,
double nyhigh,
double nzhigh);
77 double dy,
double dz,
double zBottomCut,
double zTopCut);
80 const std::string& name,
double dx,
double dy,
double hz);
83 std::vector<VGM::TwoVector> polygon,
84 std::vector<std::vector<double> > zsections);
87 double stereo1,
double stereo2,
double hz);
90 double dz,
double alpha,
double theta,
double phi);
93 const std::string& name,
double r1,
double r2,
double hz);
96 double dphi,
int nofZplanes,
double* z,
double* rin,
double* rout);
99 double dphi,
int nofSides,
int nofZplanes,
double* z,
double* rin,
103 double rout,
double sphi,
double dphi,
double stheta,
double dtheta);
106 std::vector<std::vector<VGM::ThreeVector> > facets);
109 double rout,
double rax,
double sphi,
double dphi);
112 double theta,
double phi,
double dy1,
double dx1,
double dx2,
double alpha1,
113 double dy2,
double dx3,
double dx4,
double alpha2);
116 double hx2,
double hy1,
double hy2,
double hz);
119 double rout,
double hz,
double sphi,
double dphi);
139 std::vector<VGM::ISolid*> constituents,
140 std::vector<VGM::Transform> transforms);
145 const std::string& name,
VGM::ISolid* solid,
const std::string& mediumName);
155 int nofItems,
double width,
double offset,
double halfGap);
159 const std::vector<VGM::Transform>& transforms,
160 const std::vector<VGM::IVolume*>& volumes);
167 G4VPhysicalVolume*
World()
const;
168 G4VSolid*
Solid()
const;
172 bool Import(G4VPhysicalVolume* topVolume);
173 bool Import(G4VSolid* solid);
183 void ImportConstituentSolid(
int index, G4BooleanSolid* solid);
184 void ImportConstituentSolid(
int index, G4MultiUnion* solid);
187 VGM::IVolume* ImportLV(G4LogicalVolume* lv,
const std::string& mediumName);
188 void ImportDaughters(G4LogicalVolume* lv);
189 void ImportPositions();
190 void ImportPositions(G4LogicalVolume* lv);
192 VGM::IVolume* motherVolume, G4PhysicalVolumesPair pvPair);
194 VGM::IVolume* volume, G4LogicalVolume* g4LV, G4LogicalVolume* g4Mother);
199 virtual bool Import(
void* topVolume);
200 virtual bool ImportSolid(
void* solid);
203 static bool fgSurfCheck;
The abstract base class to geometry factory.
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::ISolid * CreateEllipsoid(const std::string &name, double dx, double dy, double dz, double zBottomCut, double zTopCut)
Create the ellipsoid solid.
virtual VGM::ISolid * CreateScaledSolid(const std::string &name, VGM::ISolid *solid, const VGM::Transform &transform)
Create scaled solid.
virtual VGM::ISolid * CreateBox(const std::string &name, double hx, double hy, double hz)
Create the box 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::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.
bool Import(G4VPhysicalVolume *topVolume)
virtual VGM::ISolid * SingleSolid() const
Return solid (if in one solid conversion mode)
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 * CreateEllipticalTube(const std::string &name, double dx, double dy, double hz)
Create the elliptical tube solid.
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 * CreateExtrudedSolid(const std::string &name, std::vector< VGM::TwoVector > polygon, std::vector< std::vector< double > > zsections)
Create the extruded solid.
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 * CreateDisplacedSolid(const std::string &name, VGM::ISolid *solid, const VGM::Transform &transform)
Create displaced 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::IPlacement * Top() const
Return the top volume placement.
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 * 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 * CreateIntersectionSolid(const std::string &name, VGM::ISolid *solidA, VGM::ISolid *solidB, const VGM::Transform &transform)
Create the intersection of two solids.
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 * 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.
static bool GetSurfCheck()
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 * CreateSubtractionSolid(const std::string &name, VGM::ISolid *solidA, VGM::ISolid *solidB, const VGM::Transform &transform)
Create the subtraction of two solids.
virtual void SetSolid(VGM::ISolid *solid)
Set solid (in single mode)
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::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::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 * 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::IVolume * CreateVolume(const std::string &name, VGM::ISolid *solid, const std::string &mediumName)
Create the volume.
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.
static void SetSurfCheck(bool surfCheck)
G4VPhysicalVolume * World() const
virtual VGM::ISolid * CreateParaboloid(const std::string &name, double r1, double r2, double hz)
Create the paraboloid solid.
The VGM interface to positions of volumes.
The VGM interface to solids.
The VGM interface to volumes.
VGM implementation for Geant4.
std::vector< double > Transform