CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
StripTopologyBuilder Class Reference

#include <StripTopologyBuilder.h>

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.

8  : theAPVNumb( 0.0 )
9 {}

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(), mps_fire::result, theAPVNumb, Bounds::width(), Bounds::widthAtHalfLength(), and TrapezoidalPlaneBounds::yAxisOrientation().

Referenced by TrackerGeomBuilderFromGeometricDet::buildSilicon().

13 {
14  theAPVNumb = apvnumb;
15 
16  StripTopology* result = 0;
17  if( part == "barrel" )
18  {
19  result = constructBarrel( bs->length(), bs->width());
20  }
21  else
22  {
23  const TrapezoidalPlaneBounds* topo = dynamic_cast<const TrapezoidalPlaneBounds*>( bs );
24  if( topo )
25  {
26  int yAx = topo->yAxisOrientation();
27  result = constructForward( bs->length(), bs->width(), bs->widthAtHalfLength(), yAx );
28  }
29  }
30  return result;
31 }
virtual float widthAtHalfLength() const
Width at half length. Useful for e.g. pitch definition.
Definition: Bounds.h:39
virtual float length() const =0
StripTopology * constructForward(float, float, float, int)
tuple result
Definition: mps_fire.py:84
part
Definition: HCALResponse.h:20
StripTopology * constructBarrel(float, float)
virtual int yAxisOrientation() const
virtual float width() const =0
StripTopology * StripTopologyBuilder::constructBarrel ( float  length,
float  width 
)
private

Definition at line 34 of file StripTopologyBuilder.cc.

References theAPVNumb.

Referenced by build().

35 {
36  int nstrip = int( 128 * theAPVNumb );
37  float pitch = width / nstrip;
38 
39  return new RectangularStripTopology( nstrip, pitch, length );
40 }
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().

44 {
45  int nstrip = int( 128 * theAPVNumb );
46  float rCross = widthAtHalf * length / ( 2 * ( width - widthAtHalf ));
47  float aw = atan2( widthAtHalf / 2., static_cast<double>( rCross )) / ( nstrip / 2 );
48  return new TkRadialStripTopology( nstrip, aw, length, rCross, yAxOr );
49 }

Member Data Documentation

double StripTopologyBuilder::theAPVNumb
private

Definition at line 23 of file StripTopologyBuilder.h.

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