CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StripTopologyBuilder.cc
Go to the documentation of this file.
6 
8  : theAPVNumb( 0.0 )
9 {}
10 
12 StripTopologyBuilder::build( const Bounds* bs, double apvnumb, std::string part )
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 }
32 
35 {
36  int nstrip = int( 128 * theAPVNumb );
37  float pitch = width / nstrip;
38 
39  return new RectangularStripTopology( nstrip, pitch, length );
40 }
41 
43 StripTopologyBuilder::constructForward( float length, float width, float widthAtHalf, int yAxOr )
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 }
50 
virtual float widthAtHalfLength() const
Width at half length. Useful for e.g. pitch definition.
Definition: Bounds.h:39
virtual float length() const =0
StripTopology * build(const Bounds *, double, std::string)
StripTopology * constructForward(float, float, float, int)
tuple result
Definition: query.py:137
part
Definition: HCALResponse.h:20
StripTopology * constructBarrel(float, float)
Definition: Bounds.h:22
virtual int yAxisOrientation() const
virtual float width() const =0