CMS 3D CMS Logo

Public Member Functions

TECPetalBuilder Class Reference

#include <TECPetalBuilder.h>

List of all members.

Public Member Functions

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

Detailed Description

A concrete builder for TECPetal

Definition at line 15 of file TECPetalBuilder.h.


Constructor & Destructor Documentation

TECPetalBuilder::TECPetalBuilder ( ) [inline]

Definition at line 17 of file TECPetalBuilder.h.

{};

Member Function Documentation

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

Definition at line 8 of file TECPetalBuilder.cc.

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

Referenced by TECLayerBuilder::build().

{
  vector<const GeometricDet*>  theGeometricWedges = aTECPetal->components();
  //edm::LogInfo(TkDetLayers) << "theGeometricWedges.size(): " << theGeometricWedges.size() ;
  
  vector<const TECWedge*> theInnerWedges;
  vector<const TECWedge*> theOuterWedges;

  double meanZ = ( theGeometricWedges[0]->positionBounds().z() + 
                   theGeometricWedges[1]->positionBounds().z() )/2;

  TECWedgeBuilder myWedgeBuilder;
   

  for(vector<const GeometricDet*>::const_iterator it=theGeometricWedges.begin();
      it!=theGeometricWedges.end();it++){
    if( fabs((*it)->positionBounds().z()) < fabs(meanZ) ) 
      theInnerWedges.push_back(myWedgeBuilder.build(*it,theGeomDetGeometry));
    
    if( fabs((*it)->positionBounds().z()) > fabs(meanZ) ) 
      theOuterWedges.push_back(myWedgeBuilder.build(*it,theGeomDetGeometry));
  }
  
  //edm::LogInfo(TkDetLayers) << "theInnerWededges.size(): " << theInnerWedges.size() ;
  //edm::LogInfo(TkDetLayers) << "theOuterWededges.size(): " << theOuterWedges.size() ;
   
  return new CompositeTECPetal(theInnerWedges,theOuterWedges);
}