CMS 3D CMS Logo

PixelForwardLayerBuilder.h
Go to the documentation of this file.
1 #ifndef TkDetLayers_PixelForwardLayerBuilder_h
2 #define TkDetLayers_PixelForwardLayerBuilder_h
3 
4 #include "PixelForwardLayer.h"
5 
9 
11 #include "PixelForwardLayer.h"
12 #include "PixelBladeBuilder.h"
13 
17 #pragma GCC visibility push(hidden)
18 
19 template <class T1, class T2>
21 public:
23  ForwardDetLayer* build(const GeometricDet* aPixelForwardLayer, const TrackerGeometry* theGeomDetGeometry)
24  __attribute__((cold));
25 };
26 
27 template <class T1, class T2>
29  const TrackerGeometry* theGeomDetGeometry) {
30  std::vector<const GeometricDet*> theGeometricPanels = aPixelForwardLayer->components();
31  int panelsSize = theGeometricPanels.size();
32 
33  /*
34  int num = 0;
35  for(std::vector<const GeometricDet*>::const_iterator it= theGeometricPanels.begin();
36  it!=theGeometricPanels.end(); it++, ++num) {
37  edm::LogInfo("TkDetLayers") << "PanelsSize: " << panelsSize << " , "
38  << "PanelNum: " << num << " , "
39  << "panel.phi(): " << (*it)->positionBounds().phi() << " , "
40  << "panel.z(): " << (*it)->positionBounds().z() << " , "
41  << "panel.y(): " << (*it)->positionBounds().y() << " , "
42  << "panel.x(): " << (*it)->positionBounds().x() << " , "
43  << "panel.r(): " << (*it)->positionBounds().perp() << " , "
44  << "panel.rmax(): " << (*it)->bounds()->rSpan().second << " , "
45  << "comp.size(): " << (*it)->components().size();
46  }
47  */
48 
49  //edm::LogInfo(TkDetLayers) << "pixelFwdLayer.panels().size(): " << panelsSize ;
50 
51  std::vector<const T1*> theBlades;
52  PixelBladeBuilder<T1> myBladeBuilder;
53 
54  theBlades.reserve((panelsSize / 2));
55  for (int i = 0; i < (panelsSize / 2); i++) {
56  theBlades.push_back(
57  myBladeBuilder.build(theGeometricPanels[i], theGeometricPanels[i + (panelsSize / 2)], theGeomDetGeometry));
58  }
59 
60  return new T2(theBlades);
61 }
62 
63 #pragma GCC visibility pop
64 #endif
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:151
float __attribute__((vector_size(8))) cms_float32x2_t
Definition: ExtVec.h:12
ForwardDetLayer * build(const GeometricDet *aPixelForwardLayer, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
T * build(const GeometricDet *geometricDetFrontPanel, const GeometricDet *geometricDetBackPanel, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))