CMS 3D CMS Logo

MTDTopologyMode.h
Go to the documentation of this file.
1 #ifndef Geometry_MTDCommonData_MTDTopologyMode_H
2 #define Geometry_MTDCommonData_MTDTopologyMode_H
3 
5 #include <map>
6 #include <string>
7 #include <algorithm>
8 
11 
12 namespace MTDTopologyMode {
13 
14  enum class Mode {
15  undefined = 0,
16  tile = 1,
17  bar = 2,
18  barzflat = 3,
19  barphiflat = 4,
20  btlv1etlv4 = 5,
21  btlv1etlv5 = 6,
22  btlv2etlv5 = 7,
23  btlv3etlv8 = 8
24  };
25 
27 
30  inline BTLDetId::CrysLayout crysLayoutFromTopoMode(const int& topoMode) {
31  if (topoMode < 0 || topoMode > static_cast<int>(Mode::btlv3etlv8)) {
32  throw cms::Exception("UnknownMTDtopoMode") << "Unknown MTD topology mode :( " << topoMode;
33  } else if (topoMode <= static_cast<int>(BTLDetId::CrysLayout::barphiflat)) {
34  return static_cast<BTLDetId::CrysLayout>(topoMode);
35  } else if (topoMode < static_cast<int>(Mode::btlv2etlv5)) {
37  } else if (topoMode == static_cast<int>(Mode::btlv2etlv5)) {
39  } else {
41  }
42  }
43 
46  inline ETLDetId::EtlLayout etlLayoutFromTopoMode(const int& topoMode) {
47  if (topoMode < 0 || topoMode > static_cast<int>(Mode::btlv3etlv8)) {
48  throw cms::Exception("UnknownMTDtopoMode") << "Unknown MTD topology mode :( " << topoMode;
49  } else if (topoMode <= static_cast<int>(BTLDetId::CrysLayout::barphiflat)) {
51  } else if (topoMode == static_cast<int>(Mode::btlv1etlv4)) {
53  } else if (topoMode == static_cast<int>(Mode::btlv1etlv5) or topoMode == static_cast<int>(Mode::btlv2etlv5)) {
55  } else {
57  }
58  }
59 
60 } // namespace MTDTopologyMode
61 
62 #endif // Geometry_MTDCommonData_MTDTopologyMode_H
CrysLayout
Definition: BTLDetId.h:46
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
Mode MTDStringToEnumParser(const std::string &)
ETLDetId::EtlLayout etlLayoutFromTopoMode(const int &topoMode)
BTLDetId::CrysLayout crysLayoutFromTopoMode(const int &topoMode)