9 const TrapezoidalPlaneBounds* trapezoidalBounds( dynamic_cast<const TrapezoidalPlaneBounds*>(&(plane.bounds())));
10 const RectangularPlaneBounds* rectangularBounds( dynamic_cast<const RectangularPlaneBounds*>(&(plane.bounds())));
14 if (trapezoidalBounds) {
15 std::array<const float, 4>
const &
parameters = (*trapezoidalBounds).parameters();
17 float hbotedge = parameters[0];
18 float htopedge = parameters[1];
19 float hapothem = parameters[3];
20 float thickness = (*trapezoidalBounds).thickness();
22 corners[0] = plane.toGlobal(
LocalPoint( -htopedge, hapothem, thickness/2));
23 corners[1] = plane.toGlobal(
LocalPoint( htopedge, hapothem, thickness/2));
24 corners[2] = plane.toGlobal(
LocalPoint( hbotedge, -hapothem, thickness/2));
25 corners[3] = plane.toGlobal(
LocalPoint( -hbotedge, -hapothem, thickness/2));
26 corners[4] = plane.toGlobal(
LocalPoint( -htopedge, hapothem, -thickness/2));
27 corners[5] = plane.toGlobal(
LocalPoint( htopedge, hapothem, -thickness/2));
28 corners[6] = plane.toGlobal(
LocalPoint( hbotedge, -hapothem, -thickness/2));
29 corners[7] = plane.toGlobal(
LocalPoint( -hbotedge, -hapothem, -thickness/2));
31 }
else if(rectangularBounds) {
32 float length = rectangularBounds->length();
33 float width = rectangularBounds->width();
34 float thickness = (*rectangularBounds).thickness();
36 corners[0] = plane.toGlobal(
LocalPoint( -width/2, -length/2, thickness/2));
37 corners[1] = plane.toGlobal(
LocalPoint( -width/2, +length/2, thickness/2));
38 corners[2] = plane.toGlobal(
LocalPoint( +width/2, -length/2, thickness/2));
39 corners[3] = plane.toGlobal(
LocalPoint( +width/2, +length/2, thickness/2));
40 corners[4] = plane.toGlobal(
LocalPoint( -width/2, -length/2, -thickness/2));
41 corners[5] = plane.toGlobal(
LocalPoint( -width/2, +length/2, -thickness/2));
42 corners[6] = plane.toGlobal(
LocalPoint( +width/2, -length/2, -thickness/2));
43 corners[7] = plane.toGlobal(
LocalPoint( +width/2, +length/2, -thickness/2));
50 for (
int i = 1;
i < 8;
i++ ) {
51 float cPhi = corners[
i].barePhi();
54 float z = corners[
i].z();
55 if ( z < zmin) zmin =
z;
56 if ( z > zmax) zmax =
z;
std::pair< float, float > m_zSpan
bool phiLess(float phi1, float phi2)
std::pair< float, float > m_phiSpan