CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/Geometry/TrackerNumberingBuilder/plugins/CmsTrackerLadderBuilder.cc

Go to the documentation of this file.
00001 #include "Geometry/TrackerNumberingBuilder/plugins/CmsTrackerLadderBuilder.h"
00002 #include "DetectorDescription/Core/interface/DDFilteredView.h"
00003 #include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h"
00004 #include "Geometry/TrackerNumberingBuilder/plugins/ExtractStringFromDDD.h"
00005 #include "DataFormats/DetId/interface/DetId.h"
00006 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00007 #include "Geometry/TrackerNumberingBuilder/plugins/CmsDetConstruction.h"
00008 #include <vector>
00009 
00010 void CmsTrackerLadderBuilder::buildComponent(DDFilteredView& fv, GeometricDet* g, std::string s){
00011 
00012   CmsDetConstruction theCmsDetConstruction;
00013   theCmsDetConstruction.buildComponent(fv,g,s);  
00014 }
00015 
00016 void CmsTrackerLadderBuilder::sortNS(DDFilteredView& fv, GeometricDet* det){
00017   GeometricDet::GeometricDetContainer & comp = det->components();
00018 
00019   if (comp.front()->type()==GeometricDet::DetUnit) 
00020     std::sort(comp.begin(),comp.end(),LessZ());
00021   else
00022    edm::LogError("CmsTrackerLadderBuilder")<<"ERROR - wrong SubDet to sort..... "<<det->components().front()->type(); 
00023   
00024  
00025   for(uint32_t i=0; i<comp.size();i++){
00026     comp[i]->setGeographicalID(i+1);
00027   } 
00028  
00029 
00030 }
00031 
00032 
00033 
00034