CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

StripTopologyBuilder Class Reference

#include <StripTopologyBuilder.h>

List of all members.

Public Member Functions

StripTopologybuild (const Bounds *, double, std::string)
 StripTopologyBuilder (void)

Private Member Functions

StripTopologyconstructBarrel (float, float)
StripTopologyconstructForward (float, float, float, int)

Private Attributes

double theAPVNumb

Detailed Description

Called by GeomTopologyBuilder, chooses the right topology for Strips.

Definition at line 13 of file StripTopologyBuilder.h.


Constructor & Destructor Documentation

StripTopologyBuilder::StripTopologyBuilder ( void  )

Definition at line 7 of file StripTopologyBuilder.cc.

  : theAPVNumb( 0.0 )
{}

Member Function Documentation

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 TrackerGeomBuilderFromGeometricDet::buildSilicon().

{
  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 TkRadialStripTopology( nstrip, aw, length, rCross, yAxOr );
}

Member Data Documentation

Definition at line 23 of file StripTopologyBuilder.h.

Referenced by build(), constructBarrel(), and constructForward().