#include <StripTopologyBuilder.h>
Public Member Functions | |
StripTopology * | build (const Bounds *, double, std::string) |
StripTopologyBuilder () | |
Private Member Functions | |
StripTopology * | constructBarrel (float, float) |
StripTopology * | constructForward (float, float, float, int) |
Private Attributes | |
double | theAPVNumb |
Called by GeomTopologyBuilder, chooses the right topology for Strips.
Definition at line 13 of file StripTopologyBuilder.h.
StripTopologyBuilder::StripTopologyBuilder | ( | ) |
Definition at line 10 of file StripTopologyBuilder.cc.
{}
StripTopology * StripTopologyBuilder::build | ( | const Bounds * | bs, |
double | apvnumb, | ||
std::string | part | ||
) |
Definition at line 12 of file StripTopologyBuilder.cc.
References constructBarrel(), constructForward(), Bounds::length(), query::result, theAPVNumb, Bounds::width(), and Bounds::widthAtHalfLength().
Referenced by GeomTopologyBuilder::buildStrip().
{ theAPVNumb = apvnumb; StripTopology* result; if (part == "barrel") { result = constructBarrel( bs->length(), bs->width()); } else { int yAx = (dynamic_cast<const TrapezoidalPlaneBounds*>(bs))->yAxisOrientation(); result = constructForward( bs->length(), bs->width(),bs->widthAtHalfLength(),yAx); } return result; }
StripTopology * StripTopologyBuilder::constructBarrel | ( | float | length, |
float | width | ||
) | [private] |
Definition at line 27 of file StripTopologyBuilder.cc.
References theAPVNumb.
Referenced by build().
{ int nstrip = int(128*theAPVNumb); float pitch = width/nstrip; return new RectangularStripTopology(nstrip,pitch,length); }
StripTopology * StripTopologyBuilder::constructForward | ( | float | length, |
float | width, | ||
float | widthAtHalf, | ||
int | yAxOr | ||
) | [private] |
Definition at line 35 of file StripTopologyBuilder.cc.
References theAPVNumb.
Referenced by build().
{ int nstrip = int(128*theAPVNumb); float rCross = widthAtHalf*length/(2*(width-widthAtHalf)); float aw = atan2(widthAtHalf/2., static_cast<double>(rCross))/(nstrip/2); return new RadialStripTopology(nstrip, aw, length, rCross, yAxOr); }
double StripTopologyBuilder::theAPVNumb [private] |
Definition at line 22 of file StripTopologyBuilder.h.
Referenced by build(), constructBarrel(), and constructForward().