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 ()
 

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 ( )

Definition at line 10 of file StripTopologyBuilder.cc.

10 {}

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(), and Bounds::widthAtHalfLength().

Referenced by GeomTopologyBuilder::buildStrip().

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

Definition at line 27 of file StripTopologyBuilder.cc.

References theAPVNumb.

Referenced by build().

28 {
29  int nstrip = int(128*theAPVNumb);
30  float pitch = width/nstrip;
31 
32  return new RectangularStripTopology(nstrip,pitch,length);
33 }
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().

36 {
37  int nstrip = int(128*theAPVNumb);
38  float rCross = widthAtHalf*length/(2*(width-widthAtHalf));
39  float aw = atan2(widthAtHalf/2., static_cast<double>(rCross))/(nstrip/2);
40  return new RadialStripTopology(nstrip, aw, length, rCross, yAxOr);
41 }

Member Data Documentation

double StripTopologyBuilder::theAPVNumb
private

Definition at line 22 of file StripTopologyBuilder.h.

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