CMS 3D CMS Logo

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 15 of file TECLayerBuilder.h.

Constructor & Destructor Documentation

TECLayerBuilder::TECLayerBuilder ( )
inline

Definition at line 17 of file TECLayerBuilder.h.

References build().

17 {};

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(), and TECLayerBuilder().

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