Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #include "Geometry/TrackerNumberingBuilder/plugins/CmsTrackerLadderBuilder.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 "FWCore/MessageLogger/interface/MessageLogger.h"
0008 #include "Geometry/TrackerNumberingBuilder/plugins/CmsDetConstruction.h"
0009 #include <vector>
0010 
0011 template <class FilteredView>
0012 void CmsTrackerLadderBuilder<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 CmsTrackerLadderBuilder<FilteredView>::sortNS(FilteredView& fv, GeometricDet* det) {
0019   GeometricDet::ConstGeometricDetContainer& comp = det->components();
0020 
0021   //sorting for PhaseI & PhaseII pixel ladder modules
0022   //sorting also for PhaseII outer tracker rod modules
0023   std::sort(comp.begin(), comp.end(), CmsTrackerLevelBuilderHelper::isLessZ);
0024 
0025   for (uint32_t i = 0; i < comp.size(); i++) {
0026     det->component(i)->setGeographicalID(i + 1);
0027   }
0028 
0029   if (comp.empty()) {
0030     edm::LogError("CmsTrackerLadderBuilder") << "Where are the OT Phase2/ pixel barrel modules modules?";
0031   }
0032 }
0033 
0034 template class CmsTrackerLadderBuilder<DDFilteredView>;
0035 template class CmsTrackerLadderBuilder<cms::DDFilteredView>;