CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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, const 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.

7 : theAPVNumb(0.0) {}

Member Function Documentation

StripTopology * StripTopologyBuilder::build ( const Bounds bs,
double  apvnumb,
const std::string &  part 
)

Definition at line 9 of file StripTopologyBuilder.cc.

References cms::cuda::bs, constructBarrel(), constructForward(), Bounds::length(), mps_fire::result, theAPVNumb, Bounds::width(), Bounds::widthAtHalfLength(), and TrapezoidalPlaneBounds::yAxisOrientation().

Referenced by TrackerGeomBuilderFromGeometricDet::buildSilicon().

9  {
10  theAPVNumb = apvnumb;
11 
12  StripTopology* result = nullptr;
13  if (part == "barrel") {
14  result = constructBarrel(bs->length(), bs->width());
15  } else {
16  const TrapezoidalPlaneBounds* topo = dynamic_cast<const TrapezoidalPlaneBounds*>(bs);
17  if (topo) {
18  int yAx = topo->yAxisOrientation();
19  result = constructForward(bs->length(), bs->width(), bs->widthAtHalfLength(), yAx);
20  }
21  }
22  return result;
23 }
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: mps_fire.py:311
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 25 of file StripTopologyBuilder.cc.

References theAPVNumb.

Referenced by build().

25  {
26  int nstrip = int(128 * theAPVNumb);
27  float pitch = width / nstrip;
28 
29  return new RectangularStripTopology(nstrip, pitch, length);
30 }
StripTopology * StripTopologyBuilder::constructForward ( float  length,
float  width,
float  widthAtHalf,
int  yAxOr 
)
private

Definition at line 32 of file StripTopologyBuilder.cc.

References theAPVNumb.

Referenced by build().

32  {
33  int nstrip = int(128 * theAPVNumb);
34  float rCross = widthAtHalf * length / (2 * (width - widthAtHalf));
35  float aw = atan2(widthAtHalf / 2., static_cast<double>(rCross)) / (nstrip / 2);
36  return new TkRadialStripTopology(nstrip, aw, length, rCross, yAxOr);
37 }

Member Data Documentation

double StripTopologyBuilder::theAPVNumb
private

Definition at line 20 of file StripTopologyBuilder.h.

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