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
TECLayerBuilder Class Reference

#include <TECLayerBuilder.h>

Public Member Functions

TECLayerbuild (const GeometricDet *aTECLayer, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
 
 TECLayerBuilder ()
 

Detailed Description

A concrete builder for TECLayer

Definition at line 14 of file TECLayerBuilder.h.

Constructor & Destructor Documentation

TECLayerBuilder::TECLayerBuilder ( )
inline

Definition at line 16 of file TECLayerBuilder.h.

16 {};

Member Function Documentation

TECLayer * TECLayerBuilder::build ( const GeometricDet aTECLayer,
const TrackerGeometry theGeomDetGeometry 
)

Definition at line 7 of file TECLayerBuilder.cc.

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

Referenced by GeometricSearchTrackerBuilder::build().

7  {
8  vector<const GeometricDet*> theGeometricDetPetals = aTECLayer->components();
9  vector<const TECPetal*> theInnerPetals;
10  vector<const TECPetal*> theOuterPetals;
11 
12  //edm::LogInfo(TkDetLayers) << "theGeometricDetPetals.size(): " << theGeometricDetPetals.size() ;
13 
14  double meanZ =
15  (theGeometricDetPetals.front()->positionBounds().z() + theGeometricDetPetals.back()->positionBounds().z()) / 2;
16 
17  TECPetalBuilder myPetalBuilder;
18 
19  for (vector<const GeometricDet*>::const_iterator it = theGeometricDetPetals.begin();
20  it != theGeometricDetPetals.end();
21  it++) {
22  if (std::abs((*it)->positionBounds().z()) < std::abs(meanZ))
23  theInnerPetals.push_back(myPetalBuilder.build(*it, theGeomDetGeometry));
24 
25  if (std::abs((*it)->positionBounds().z()) > std::abs(meanZ))
26  theOuterPetals.push_back(myPetalBuilder.build(*it, theGeomDetGeometry));
27  }
28 
29  return new TECLayer(theInnerPetals, theOuterPetals);
30 }
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:150
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TECPetal * build(const GeometricDet *aTECPetal, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))