CMS 3D CMS Logo

StripTopologyBuilder.cc
Go to the documentation of this file.
6 
8 
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 }
24 
26  int nstrip = int(128 * theAPVNumb);
27  float pitch = width / nstrip;
28 
29  return new RectangularStripTopology(nstrip, pitch, length);
30 }
31 
32 StripTopology* StripTopologyBuilder::constructForward(float length, float width, float widthAtHalf, int yAxOr) {
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 }
StripTopology * constructForward(float, float, float, int)
virtual int yAxisOrientation() const
part
Definition: HCALResponse.h:20
StripTopology * constructBarrel(float, float)
Definition: Bounds.h:18
StripTopology * build(const Bounds *, double, const std::string &)