CMS 3D CMS Logo

Public Member Functions

TECLayerBuilder Class Reference

#include <TECLayerBuilder.h>

List of all members.

Public Member Functions

TECLayerbuild (const GeometricDet *aTECLayer, const TrackerGeometry *theGeomDetGeometry)
 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.

{};

Member Function Documentation

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

Definition at line 7 of file TECLayerBuilder.cc.

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

Referenced by GeometricSearchTrackerBuilder::build().

{
  vector<const GeometricDet*>  theGeometricDetPetals = aTECLayer->components();
  vector<const TECPetal*> theInnerPetals;
  vector<const TECPetal*> theOuterPetals;

  //edm::LogInfo(TkDetLayers) << "theGeometricDetPetals.size(): " << theGeometricDetPetals.size() ;
  
  double meanZ = ( theGeometricDetPetals.front()->positionBounds().z() + 
                   theGeometricDetPetals.back()->positionBounds().z() )/2;

  TECPetalBuilder myPetalBuilder;


  for(vector<const GeometricDet*>::const_iterator it=theGeometricDetPetals.begin();
      it!=theGeometricDetPetals.end();it++){

    if( fabs((*it)->positionBounds().z()) < fabs(meanZ) ) 
      theInnerPetals.push_back(myPetalBuilder.build(*it,theGeomDetGeometry));

    if( fabs((*it)->positionBounds().z()) > fabs(meanZ) ) 
      theOuterPetals.push_back(myPetalBuilder.build(*it,theGeomDetGeometry));
  }
  
  return new TECLayer(theInnerPetals,theOuterPetals);
}