19#include <Inventor/C/errors/debugerror.h>
21#include <Inventor/nodes/SoSeparator.h>
22#include <Inventor/nodes/SoTransform.h>
23#include <Inventor/nodes/SoVertexProperty.h>
24#include <Inventor/nodes/SoLineSet.h>
45#include "GeoModelKernel/GeoSimplePolygonBrep.h"
77 std::cout<<
"ERROR! Surface unknown!"<<std::endl;
82 SoSeparator* sosep =
new SoSeparator();
90 transform.translate(
vec);
95 sosep->addChild(sotra);
96 sosep->addChild(sono);
118 hminphi, hmaxphi, heta, hminphi,
130 hminphi, hmaxphi, heta, hminphi,
138 std::vector<double>
x,
y;
155 const double hminphi = 0.5*cannulus->
minR()*cannulus->
phi();
156 const double hmaxphi = 0.5*cannulus->
maxR()*cannulus->
phi();
157 const double heta = 0.5 * (cannulus->
maxR() - cannulus->
minR());
159 hminphi, hmaxphi, heta, hminphi,
179 double radius = csf.
bounds().
r();
183 (*cylinderSurface).pRMin = radius-0.25;
184 (*cylinderSurface).pRMax = radius+0.25;
185 (*cylinderSurface).pDz = hlength;
187 return cylinderSurface;
196 double iradius = cdbo->
rMin();
197 double oradius = cdbo->
rMax();
201 (*discSurface).pRMin = iradius;
202 (*discSurface).pRMax = oradius;
203 (*discSurface).pDz = 0.25;
205 if (fabs(halfphisec-
M_PI)>10e-5){
207 (*discSurface).pSPhi = -halfphisec;
208 (*discSurface).pDPhi = 2.* halfphisec;
224 SoVertexProperty * scatVtxProperty =
new SoVertexProperty();
225 scatVtxProperty->vertex.set1Value(0, 0.0,0.0,-hlength);
226 scatVtxProperty->vertex.set1Value(1, 0.0,0.0, hlength);
227 SoLineSet * lineSurface =
new SoLineSet();
228 lineSurface->numVertices = 2;
229 lineSurface->vertexProperty = scatVtxProperty;
233 double radius = ccbo->
r();
235 (*lineSurface).pRMin = 0.;
236 (*lineSurface).pRMax = radius;
237 (*lineSurface).pDz = hlength;
248 (*perigeeSurface).pRMin = 0.;
249 (*perigeeSurface).pRMax = 5.;
250 (*perigeeSurface).pDz = 4000.;
251 return perigeeSurface;
std::vector< size_t > vec
void setParametersForBox(float dx, float dy, float dz, float xcenter=0.0, float ycenter=0.0, float zcenter=0.0)
void setParametersForTrapezoid(float dz, float theta, float phi, float dy1, float dx1, float dx2, float dy2, float dx3, float dx4, float alp1, float alp2)
SoPolyhedron is an Inventor encapsulation of the HepPolyedron class written by E.Chernyaev.
SoTubs - Inventor version of the G4Tubs Geant Geometry entity.
static void initClass()
Class Initializer, required.
SoNode * translateCylinderSurface(const Trk::CylinderSurface &csf) const
SoNode * translatePerigeeSurface(const Trk::PerigeeSurface &persf) const
SoNode * translateStraightLineSurface(const Trk::StraightLineSurface &slsf, const bool &simple=false) const
SoNode * translatePlaneSurface(const Trk::PlaneSurface &psf) const
SoNode * translateDiscSurface(const Trk::DiscSurface &dsf) const
virtual ~SurfaceToSoNode()
static const double surfaceThickness
SoNode * translateSurface(const Trk::Surface &sf, const bool &simple=false) const
Bounds for a annulus-like, planar Surface.
double minR() const
This method returns the smaller radius.
double maxR() const
This method returns the bigger radius.
double phi() const
This method returns the opening angle.
Bounds for a cylindrical Surface.
virtual double r() const override final
This method returns the radius.
double halflengthZ() const
This method returns the halflengthZ.
Class for a CylinderSurface in the ATLAS detector.
virtual const CylinderBounds & bounds() const override final
This method returns the CylinderBounds by reference (NoBounds is not possible for cylinder)
Bounds for a double trapezoidal ("diamond"), planar Surface.
double minHalflengthX() const
This method returns the halflength in X at minimal Y (first coordinate of local surface frame)
double maxHalflengthX() const
This method returns the halflength in X at maximal Y (first coordinate of local surface frame)
double medHalflengthX() const
This method returns the (maximal) halflength in X (first coordinate of local surface frame)
double halflengthY1() const
This method returns the halflength in Y of trapezoid at negative/positive Y (second coordinate)
double halflengthY2() const
Class to describe the bounds for a planar DiscSurface.
double rMax() const
This method returns outer radius.
double rMin() const
This method returns inner radius.
double halfPhiSector() const
This method returns the halfPhiSector which is covered by the disc.
Class for a DiscSurface in the ATLAS detector.
const SurfaceBounds & bounds() const override final
This method returns the bounds by reference.
Bounds object for a boundless surface (...)
Class describing the Line to which the Perigee refers to.
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
virtual const SurfaceBounds & bounds() const override final
This method returns the bounds by reference, static NoBounds in case of no boundaries.
Bounds for a rectangular, planar surface.
double halflengthPhi() const
This method returns the halflength in phi (first coordinate of local surface frame)
double halflengthEta() const
This method returns the halflength in Eta (second coordinate of local surface frame)
Bounds for a rotated trapezoidal, planar Surface.
double halflengthX() const
This method returns the minimal halflength in X (first coordinate of local surface frame)
double maxHalflengthY() const
This method returns the halflength in Y (second coordinate of local surface frame)
double minHalflengthY() const
This method returns the maximal halflength in X (first coordinate of local surface frame)
Class for a StraightLineSurface in the ATLAS detector to describe dirft tube and straw like detectors...
virtual const SurfaceBounds & bounds() const override final
This method returns the bounds of the Surface by reference.
Abstract Base Class for tracking surfaces.
Bounds for a trapezoidal, planar Surface.
double maxHalflengthPhi() const
This method returns the maximal halflength in phi (first coordinate of local surface frame)
double minHalflengthPhi() const
This method returns the minimal halflength in phi (first coordinate of local surface frame)
double halflengthEta() const
This method returns the halflength in eta (second coordinate of local surface frame)
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D