Go to the documentation of this file.00001 #include "TECPetalBuilder.h"
00002 #include "TECWedgeBuilder.h"
00003 #include "CompositeTECPetal.h"
00004
00005 using namespace edm;
00006 using namespace std;
00007
00008 TECPetal* TECPetalBuilder::build(const GeometricDet* aTECPetal,
00009 const TrackerGeometry* theGeomDetGeometry)
00010 {
00011 vector<const GeometricDet*> theGeometricWedges = aTECPetal->components();
00012
00013
00014 vector<const TECWedge*> theInnerWedges;
00015 vector<const TECWedge*> theOuterWedges;
00016
00017 double meanZ = ( theGeometricWedges[0]->positionBounds().z() +
00018 theGeometricWedges[1]->positionBounds().z() )/2;
00019
00020 TECWedgeBuilder myWedgeBuilder;
00021
00022
00023 for(vector<const GeometricDet*>::const_iterator it=theGeometricWedges.begin();
00024 it!=theGeometricWedges.end();it++){
00025 if( fabs((*it)->positionBounds().z()) < fabs(meanZ) )
00026 theInnerWedges.push_back(myWedgeBuilder.build(*it,theGeomDetGeometry));
00027
00028 if( fabs((*it)->positionBounds().z()) > fabs(meanZ) )
00029 theOuterWedges.push_back(myWedgeBuilder.build(*it,theGeomDetGeometry));
00030 }
00031
00032
00033
00034
00035 return new CompositeTECPetal(theInnerWedges,theOuterWedges);
00036 }