21#ifndef VGM_I_FACTORY_H
22#define VGM_I_FACTORY_H
39class IMaterialFactory;
81 std::vector<VGM::TwoVector> vertices) = 0;
89 const std::string& name,
double hx,
double hy,
double hz) = 0;
101 double rin2,
double rout2,
double hz,
double sphi,
double dphi) = 0;
124 double hz,
double sphi,
double dphi,
double nxlow,
double nylow,
125 double nzlow,
double nxhigh,
double nyhigh,
double nzhigh) = 0;
135 double dz,
double zBottomCut,
double zTopCut) = 0;
143 const std::string& name,
double dx,
double dy,
double hz) = 0;
152 std::vector<TwoVector> polygon,
153 std::vector<std::vector<double> > zsections) = 0;
163 double stereo1,
double stereo2,
double hz) = 0;
178 double hz,
double alpha,
double theta,
double phi) = 0;
186 const std::string& name,
double r1,
double r2,
double hz) = 0;
198 double dphi,
int nofZplanes,
double* z,
double* rin,
double* rout) = 0;
213 double dphi,
int nofSides,
int nofZplanes,
double* z,
double* rin,
226 double sphi,
double dphi,
double stheta,
double dtheta) = 0;
234 std::vector<std::vector<VGM::ThreeVector> > facets) = 0;
245 double rax,
double sphi,
double dphi) = 0;
273 double phi,
double dy1,
double dx1,
double dx2,
double alpha1,
double dy2,
274 double dx3,
double dx4,
double alpha2) = 0;
289 double hy1,
double hy2,
double hz) = 0;
299 double hz,
double sphi,
double dphi) = 0;
345 std::vector<VGM::ISolid*> constituents,
346 std::vector<VGM::Transform> transforms) = 0;
357 const std::string& mediumName) = 0;
387 int nofItems,
double width,
double offset,
double halfGap) = 0;
403 const std::vector<VGM::Transform>& transforms,
404 const std::vector<VGM::IVolume*>& volumes) = 0;
420 virtual std::string
Name()
const = 0;
519 virtual bool Import(
void* ) = 0;
521 virtual bool ImportSolid(
void* ) = 0;
The VGM interface to geometry factory providing functions for geometry construction and conversions.
virtual IVolume * CreateVolume(const std::string &name, VGM::ISolid *solid, const std::string &mediumName)=0
Create the volume.
virtual ISolid * CreateTessellatedSolid(const std::string &name, std::vector< std::vector< VGM::ThreeVector > > facets)=0
Create tessellated solid = solid composed from triangular and rectangular facets.
virtual int Debug() const =0
Return the debug level.
virtual void SetIgnore(bool value, double dummyBoxDimensions=kDefaultDummyBoxDimensions)=0
Set ignoring of unsupported features.
virtual bool SingleMode() const =0
Return the single mode option.
virtual IMaterialFactory * MaterialFactory() const =0
Return the associated material factory.
virtual IPlacement * CreateMultiplePlacement(const std::string &name, VGM::IVolume *volume, VGM::IVolume *motherVolume, VGM::Axis axis, int nofItems, double width, double offset, double halfGap)=0
Create the multiple volume placement.
virtual ISolid * CreateScaledSolid(const std::string &name, VGM::ISolid *solid, const VGM::Transform &transform)=0
Create scaled solid.
virtual ISolid * CreateExtrudedSolid(const std::string &name, std::vector< TwoVector > polygon, std::vector< std::vector< double > > zsections)=0
Create the extruded solid.
virtual bool Export(IFactory *factory) const =0
Export geometry to the specified factory.
virtual void PrintVolumes() const =0
Print all volumes.
virtual ISolid * CreateEllipsoid(const std::string &name, double dx, double dy, double dz, double zBottomCut, double zTopCut)=0
Create the ellipsoid solid.
virtual void SetSolid(VGM::ISolid *solid)=0
Set solid (in single mode)
virtual ISolid * CreateParaboloid(const std::string &name, double r1, double r2, double hz)=0
Create the paraboloid solid.
virtual const VolumeStore & Volumes() const =0
Return the store of volumes.
virtual IPlacement * CreatePlacement(const std::string &name, int copyNo, VGM::IVolume *volume, VGM::IVolume *motherVolume, const VGM::Transform &transform)=0
Create the simple volume placement.
virtual ISolid * CreateTorus(const std::string &name, double rin, double rout, double rax, double sphi, double dphi)=0
Create the torus solid = phi segment of a torus.
virtual 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)=0
Create the cut tubs solid = phi segment of a tube cut with two planes.
virtual IPlacement * Top() const =0
Return the top volume placement.
virtual ISolid * CreateSphere(const std::string &name, double rin, double rout, double sphi, double dphi, double stheta, double dtheta)=0
Create the sphere solid = phi segment of a spherical shell.
virtual ISolid * CreatePolycone(const std::string &name, double sphi, double dphi, int nofZplanes, double *z, double *rin, double *rout)=0
Create the polycone solid = phi segment of a polycone.
virtual ISolid * CreateSubtractionSolid(const std::string &name, VGM::ISolid *solidA, VGM::ISolid *solidB, const VGM::Transform &transform)=0
Create the subtraction of two solids.
virtual ISolid * CreatePara(const std::string &name, double hx, double hy, double hz, double alpha, double theta, double phi)=0
Create the para solid = parallelepiped.
virtual ISolid * CreateTubs(const std::string &name, double rin, double rout, double hz, double sphi, double dphi)=0
Create the trd solid = phi segment of a tube.
virtual void SetDummyBoxDimensions(double value)=0
Set the dimensions in mm of a dummy box replacing the unsupported shapes if the 'ignore' option is ac...
virtual ISolid * CreateIntersectionSolid(const std::string &name, VGM::ISolid *solidA, VGM::ISolid *solidB, const VGM::Transform &transform)=0
Create the intersection of two solids.
virtual ISolid * CreatePolyhedra(const std::string &name, double sphi, double dphi, int nofSides, int nofZplanes, double *z, double *rin, double *rout)=0
Create the polyhedra solid = phi segment of a polyhedra (polygone)
virtual VGM::IPlacement * CreateParameterisedPlacement(const std::string &name, VGM::IVolume *motherVolume, const std::vector< VGM::Transform > &transforms, const std::vector< VGM::IVolume * > &volumes)=0
Create the parameterised volume placement.
virtual ISolid * CreateTrd(const std::string &name, double hx1, double hx2, double hy1, double hy2, double hz)=0
Create the trd solid = a trapezoid with the x and y dimensions varying along z.
virtual void PrintSolids() const =0
Print all solids.
virtual void SetSingleMode(bool value)=0
Set single mode option.
virtual const SolidStore & Solids() const =0
Return the store of solids.
virtual double DummyBoxDimensions() const =0
Return the ignore option.
virtual 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)=0
Create the trap solid = general trapezoid ( Note that of the 11 parameters described below,...
virtual ISolid * CreateUnionSolid(const std::string &name, VGM::ISolid *solidA, VGM::ISolid *solidB, const VGM::Transform &transform)=0
Create the union of two solids.
virtual void SetDebug(int value)=0
Set the debug level.
virtual ISolid * SingleSolid() const =0
Return solid (if in one solid conversion mode)
virtual bool Ignore() const =0
Return the ignore option.
virtual ISolid * CreateMultiUnion(const std::string &name, std::vector< VGM::ISolid * > constituents, std::vector< VGM::Transform > transforms)=0
Create the multi union of solids.
virtual std::string Name() const =0
Return the name of this factory.
virtual ISolid * CreateDisplacedSolid(const std::string &name, VGM::ISolid *solid, const VGM::Transform &transform)=0
Create displaced solid.
virtual bool BestMatch() const =0
Return the single mode option.
virtual ISolid * CreateBox(const std::string &name, double hx, double hy, double hz)=0
Create the box solid.
virtual ISolid * CreateEllipticalTube(const std::string &name, double dx, double dy, double hz)=0
Create the elliptical tube solid.
virtual void SetBestMatch(bool value)=0
Set best match option.
virtual ISolid * CreateArb8(const std::string &name, double hz, std::vector< VGM::TwoVector > vertices)=0
Create the arbitrary trapezoid with 8 vertices standing on two paralel planes perpendicular to Z axis...
virtual ISolid * CreateHype(const std::string &name, double r1, double r2, double stereo1, double stereo2, double hz)=0
Create the hyperboloid solid.
virtual ISolid * CreateCons(const std::string &name, double rin1, double rout1, double rin2, double rout2, double hz, double sphi, double dphi)=0
Create the cons solid = phi segment of a conical tube.
The VGM interface to material factory providing functions for material conversions.
The VGM interface to positions of volumes.
The VGM interface to solids.
The VGM interface to volumes.
std::vector< double > Transform
constexpr double kDefaultDummyBoxDimensions
The default value for the dimensions in mm of a dummy box replacing the unsupported shapes if the 'ig...
std::vector< IVolume * > VolumeStore
std::vector< ISolid * > SolidStore