CMS 3D CMS Logo

List of all members | Public Member Functions
TECPetalBuilder Class Reference

#include <TECPetalBuilder.h>

Public Member Functions

TECPetalbuild (const GeometricDet *aTECPetal, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
 
 TECPetalBuilder ()
 

Detailed Description

A concrete builder for TECPetal

Definition at line 14 of file TECPetalBuilder.h.

Constructor & Destructor Documentation

◆ TECPetalBuilder()

TECPetalBuilder::TECPetalBuilder ( )
inline

Definition at line 16 of file TECPetalBuilder.h.

16 {};

Member Function Documentation

◆ build()

TECPetal * TECPetalBuilder::build ( const GeometricDet aTECPetal,
const TrackerGeometry theGeomDetGeometry 
)

Definition at line 8 of file TECPetalBuilder.cc.

References funct::abs(), TECWedgeBuilder::build(), and GeometricDet::components().

Referenced by TECLayerBuilder::build().

8  {
9  vector<const GeometricDet*> theGeometricWedges = aTECPetal->components();
10  //edm::LogInfo(TkDetLayers) << "theGeometricWedges.size(): " << theGeometricWedges.size() ;
11 
12  vector<const TECWedge*> theInnerWedges;
13  vector<const TECWedge*> theOuterWedges;
14 
15  double meanZ = (theGeometricWedges[0]->positionBounds().z() + theGeometricWedges[1]->positionBounds().z()) / 2;
16 
17  TECWedgeBuilder myWedgeBuilder;
18 
19  for (vector<const GeometricDet*>::const_iterator it = theGeometricWedges.begin(); it != theGeometricWedges.end();
20  it++) {
21  if (std::abs((*it)->positionBounds().z()) < std::abs(meanZ))
22  theInnerWedges.push_back(myWedgeBuilder.build(*it, theGeomDetGeometry));
23 
24  if (std::abs((*it)->positionBounds().z()) > std::abs(meanZ))
25  theOuterWedges.push_back(myWedgeBuilder.build(*it, theGeomDetGeometry));
26  }
27 
28  //edm::LogInfo(TkDetLayers) << "theInnerWededges.size(): " << theInnerWedges.size() ;
29  //edm::LogInfo(TkDetLayers) << "theOuterWededges.size(): " << theOuterWedges.size() ;
30 
31  return new CompositeTECPetal(theInnerWedges, theOuterWedges);
32 }
TECWedge * build(const GeometricDet *aTECWedge, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:151
Abs< T >::type abs(const T &t)
Definition: Abs.h:22