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