Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:49:11

0001 #include "Geometry/TrackerNumberingBuilder/plugins/CmsTrackerRodBuilder.h"
0002 #include "DetectorDescription/Core/interface/DDFilteredView.h"
0003 #include "DetectorDescription/DDCMS/interface/DDFilteredView.h"
0004 #include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h"
0005 #include "Geometry/TrackerNumberingBuilder/plugins/ExtractStringFromDDD.h"
0006 #include "DataFormats/DetId/interface/DetId.h"
0007 #include "Geometry/TrackerNumberingBuilder/plugins/CmsDetConstruction.h"
0008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0009 #include <vector>
0010 
0011 template <class FilteredView>
0012 void CmsTrackerRodBuilder<FilteredView>::buildComponent(FilteredView& fv, GeometricDet* g, const std::string& s) {
0013   CmsDetConstruction<FilteredView> theCmsDetConstruction;
0014   theCmsDetConstruction.buildComponent(fv, g, s);
0015 }
0016 
0017 template <class FilteredView>
0018 void CmsTrackerRodBuilder<FilteredView>::sortNS(FilteredView& fv, GeometricDet* det) {
0019   GeometricDet::ConstGeometricDetContainer& comp = det->components();
0020 
0021   std::stable_sort(comp.begin(), comp.end(), CmsTrackerLevelBuilderHelper::isLessModZ);
0022 
0023   for (uint32_t i = 0; i < comp.size(); i++) {
0024     det->component(i)->setGeographicalID(i + 1);
0025   }
0026 
0027   if (comp.empty()) {
0028     edm::LogError("CmsTrackerRodBuilder") << "Where are the Rod's modules?";
0029   }
0030 }
0031 
0032 template class CmsTrackerRodBuilder<DDFilteredView>;
0033 template class CmsTrackerRodBuilder<cms::DDFilteredView>;