102{
103 const Trk::RectangleBounds* crecbo =
dynamic_cast<const Trk::RectangleBounds*
>(&(psf.
bounds()));
104 if (crecbo){
105 SoGenericBox * gb = new SoGenericBox;
108 return gb;
109 }
110
111 const Trk::TrapezoidBounds* ctrabo =
dynamic_cast<const Trk::TrapezoidBounds*
>(&(psf.
bounds()));
112 if (ctrabo){
113 SoGenericBox * gb = new SoGenericBox;
118 hminphi, hmaxphi, heta, hminphi,
119 hmaxphi, 0, 0 );
121 return gb;
122 }
123 const Trk::RotatedTrapezoidBounds* crottrabo =
dynamic_cast<const Trk::RotatedTrapezoidBounds*
>(&(psf.
bounds()));
124 if (crottrabo){
125 SoGenericBox * gb = new SoGenericBox;
130 hminphi, hmaxphi, heta, hminphi,
131 hmaxphi, 0, 0 );
133 return gb;
134 }
135 const Trk::DiamondBounds* cdiabo =
dynamic_cast<const Trk::DiamondBounds*
>(&(psf.
bounds()));
136 if (cdiabo){
137 double dz=0.25;
138 std::vector<double>
x,
y;
144 }
147
148 SbPolyhedronPolygonXSect sbPoly(
x,
y,dz);
149 return new SoPolyhedron(sbPoly);
150 }
151
152 const Trk::AnnulusBounds* cannulus =
dynamic_cast<const Trk::AnnulusBounds*
>(&(psf.
bounds()));
153 if (cannulus){
154 SoGenericBox * gb = new SoGenericBox;
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,
160 hmaxphi, 0, 0 );
162 return gb;
163 }
164 const Trk::NoBounds* nobo =
dynamic_cast<const Trk::NoBounds*
>(&(psf.
bounds()));
165 if (nobo){
166 SoGenericBox * gb = new SoGenericBox;
169 return gb;
170 }
171
172 return 0;
173}
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)
static const double surfaceThickness
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.
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
virtual const SurfaceBounds & bounds() const override final
This method returns the bounds by reference, static NoBounds in case of no boundaries.
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)
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)
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)