#include <StripTopologyBuilder.h>
Public Member Functions | |
StripTopology * | build (const Bounds *, double, std::string) |
StripTopologyBuilder (void) | |
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 | ( | void | ) |
Definition at line 7 of file StripTopologyBuilder.cc.
: theAPVNumb( 0.0 ) {}
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(), Bounds::widthAtHalfLength(), and TrapezoidalPlaneBounds::yAxisOrientation().
Referenced by GeomTopologyBuilder::buildStrip().
{ theAPVNumb = apvnumb; StripTopology* result = 0; if( part == "barrel" ) { result = constructBarrel( bs->length(), bs->width()); } else { const TrapezoidalPlaneBounds* topo = dynamic_cast<const TrapezoidalPlaneBounds*>( bs ); if( topo ) { int yAx = topo->yAxisOrientation(); result = constructForward( bs->length(), bs->width(), bs->widthAtHalfLength(), yAx ); } } return result; }
StripTopology * StripTopologyBuilder::constructBarrel | ( | float | length, |
float | width | ||
) | [private] |
Definition at line 34 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 43 of file StripTopologyBuilder.cc.
References lumiQTWidget::aw, and 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 23 of file StripTopologyBuilder.h.
Referenced by build(), constructBarrel(), and constructForward().