CMS 3D CMS Logo

Enumerations | Functions
MTDTopologyMode Namespace Reference

Enumerations

enum  Mode {
  Mode::undefined = 0, Mode::tile = 1, Mode::bar = 2, Mode::barzflat = 3,
  Mode::barphiflat = 4, Mode::btlv1etlv4 = 5, Mode::btlv1etlv5 = 6, Mode::btlv2etlv5 = 7
}
 

Functions

BTLDetId::CrysLayout crysLayoutFromTopoMode (const int &topoMode)
 
ETLDetId::EtlLayout etlLayoutFromTopoMode (const int &topoMode)
 
Mode MTDStringToEnumParser (const std::string &)
 

Enumeration Type Documentation

◆ Mode

enum MTDTopologyMode::Mode
strong
Enumerator
undefined 
tile 
bar 
barzflat 
barphiflat 
btlv1etlv4 
btlv1etlv5 
btlv2etlv5 

Definition at line 14 of file MTDTopologyMode.h.

Function Documentation

◆ crysLayoutFromTopoMode()

BTLDetId::CrysLayout MTDTopologyMode::crysLayoutFromTopoMode ( const int &  topoMode)
inline

Returns BTLDetId::CrysLayout as a function of topology mode (to accomodate TDR/post TDR ETL scenarios).

Definition at line 29 of file MTDTopologyMode.h.

References BTLDetId::barphiflat, btlv2etlv5, Exception, and BTLDetId::v2.

Referenced by BtlDigiHitsValidation::analyze(), BtlSimHitsValidation::analyze(), BtlLocalRecoValidation::analyze(), BTLDetLayerGeometryBuilder::buildLayers(), MtdTracksValidation::checkAcceptance(), MTDThresholdClusterizer::clusterize(), MTDThresholdClusterizer::copy_to_buffer(), BTLDeviceSim::getHitsResponse(), MTDTimeCalib::getTimeCalib(), mtd::MTDGeomUtil::globalPosition(), mtd::MTDGeomUtil::pixelInModule(), and mtd::MTDGeomUtil::position().

29  {
30  if (topoMode < 0 || topoMode > static_cast<int>(Mode::btlv2etlv5)) {
31  throw cms::Exception("UnknownMTDtopoMode") << "Unknown MTD topology mode " << topoMode;
32  } else if (topoMode <= static_cast<int>(BTLDetId::CrysLayout::barphiflat)) {
33  return static_cast<BTLDetId::CrysLayout>(topoMode);
34  } else if (topoMode < static_cast<int>(Mode::btlv2etlv5)) {
36  } else {
38  }
39  }
CrysLayout
Definition: BTLDetId.h:46

◆ etlLayoutFromTopoMode()

ETLDetId::EtlLayout MTDTopologyMode::etlLayoutFromTopoMode ( const int &  topoMode)
inline

Returns ETLDetId::EtlLayout as a function of topology mode

Definition at line 43 of file MTDTopologyMode.h.

References BTLDetId::barphiflat, btlv1etlv4, btlv2etlv5, Exception, ETLDetId::tp, ETLDetId::v4, and ETLDetId::v5.

Referenced by EtlDigiHitsValidation::analyze(), EtlSimHitsValidation::analyze(), EtlLocalRecoValidation::analyze(), MTDParametersFromDD::build(), and ETLDetLayerGeometryBuilder::buildLayers().

43  {
44  if (topoMode < 0 || topoMode > static_cast<int>(Mode::btlv2etlv5)) {
45  throw cms::Exception("UnknownMTDtopoMode") << "Unknown MTD topology mode " << topoMode;
46  } else if (topoMode <= static_cast<int>(BTLDetId::CrysLayout::barphiflat)) {
48  } else if (topoMode == static_cast<int>(Mode::btlv1etlv4)) {
50  } else {
52  }
53  }

◆ MTDStringToEnumParser()

Mode MTDTopologyMode::MTDStringToEnumParser ( const std::string &  value)

Definition at line 7 of file MTDTopologyMode.cc.

References bar, barphiflat, barzflat, btlv1etlv4, btlv1etlv5, btlv2etlv5, Exception, convertSQLitetoXML_cfg::output, hcallasereventfilter2012_cfi::prefix, AlCaHLTBitMon_QueryRunRegistry::string, tile, and undefined.

Referenced by MTDParametersFromDD::build().

7  {
8  std::string prefix("MTDTopologyMode::");
10  if (value == prefix + "tile") {
11  output = Mode::tile;
12  } else if (value == prefix + "bar") {
13  output = Mode::bar;
14  } else if (value == prefix + "barzflat") {
15  output = Mode::barzflat;
16  } else if (value == prefix + "barphiflat") {
17  output = Mode::barphiflat;
18  } else if (value == prefix + "btlv1etlv4") {
19  output = Mode::btlv1etlv4;
20  } else if (value == prefix + "btlv1etlv5") {
21  output = Mode::btlv1etlv5;
22  } else if (value == prefix + "btlv2etlv5") {
23  output = Mode::btlv2etlv5;
24  } else {
25  throw cms::Exception("MTDTopologyModeError") << "the value " << value << " is not defined.";
26  }
27  return output;
28  }
Definition: value.py:1