CMS 3D CMS Logo

TECLayerBuilder.cc

Go to the documentation of this file.
00001 #include "RecoTracker/TkDetLayers/interface/TECLayerBuilder.h"
00002 #include "RecoTracker/TkDetLayers/interface/TECPetalBuilder.h"
00003 
00004 using namespace edm;
00005 using namespace std;
00006 
00007 TECLayer* TECLayerBuilder::build(const GeometricDet* aTECLayer,
00008                                  const TrackerGeometry* theGeomDetGeometry)
00009 {
00010   vector<const GeometricDet*>  theGeometricDetPetals = aTECLayer->components();
00011   vector<const TECPetal*> theInnerPetals;
00012   vector<const TECPetal*> theOuterPetals;
00013 
00014   //edm::LogInfo(TkDetLayers) << "theGeometricDetPetals.size(): " << theGeometricDetPetals.size() ;
00015   
00016   double meanZ = ( theGeometricDetPetals.front()->positionBounds().z() + 
00017                    theGeometricDetPetals.back()->positionBounds().z() )/2;
00018 
00019   TECPetalBuilder myPetalBuilder;
00020 
00021 
00022   for(vector<const GeometricDet*>::const_iterator it=theGeometricDetPetals.begin();
00023       it!=theGeometricDetPetals.end();it++){
00024 
00025     if( fabs((*it)->positionBounds().z()) < fabs(meanZ) ) 
00026       theInnerPetals.push_back(myPetalBuilder.build(*it,theGeomDetGeometry));
00027 
00028     if( fabs((*it)->positionBounds().z()) > fabs(meanZ) ) 
00029       theOuterPetals.push_back(myPetalBuilder.build(*it,theGeomDetGeometry));
00030   }
00031   
00032   return new TECLayer(theInnerPetals,theOuterPetals);
00033 }

Generated on Tue Jun 9 17:45:47 2009 for CMSSW by  doxygen 1.5.4