Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:48:53

0001 #ifndef Geometry_MTDCommonData_MTDTopologyMode_H
0002 #define Geometry_MTDCommonData_MTDTopologyMode_H
0003 
0004 #include "FWCore/Utilities/interface/Exception.h"
0005 #include <map>
0006 #include <string>
0007 #include <algorithm>
0008 
0009 #include "DataFormats/ForwardDetId/interface/BTLDetId.h"
0010 
0011 namespace MTDTopologyMode {
0012 
0013   enum class Mode { undefined = 0, tile = 1, bar = 2, barzflat = 3, barphiflat = 4, btlv1etlv4 = 5, btlv1etlv5 = 6 };
0014 
0015   Mode MTDStringToEnumParser(const std::string&);
0016 
0017   /** Returns BTLDetId::CrysLayout as a function of topology mode (to accomodate TDR/post TDR ETL scenarios). **/
0018 
0019   inline BTLDetId::CrysLayout crysLayoutFromTopoMode(const int& topoMode) {
0020     return (topoMode <= static_cast<int>(BTLDetId::CrysLayout::barphiflat) ? static_cast<BTLDetId::CrysLayout>(topoMode)
0021                                                                            : BTLDetId::CrysLayout::barphiflat);
0022   }
0023 
0024 }  // namespace MTDTopologyMode
0025 
0026 #endif  // Geometry_MTDCommonData_MTDTopologyMode_H