1 from builtins
import range
2 import FWCore.ParameterSet.Config
as cms
4 MuonGeometrySanityCheck = cms.EDAnalyzer(
5 "MuonGeometrySanityCheck",
6 printout = cms.string(
"all"),
7 tolerance = cms.double(1e-6),
8 prefix = cms.string(
"CHECK"),
13 def detectors(dt=True, csc=True, me42=False, chambers=True, superlayers=False, layers=False):
16 for wheelName
in "-2",
"-1",
"0",
"+1",
"+2":
17 for stationName
in "1",
"2",
"3",
"4":
19 if stationName ==
"4": numSectors = 14
20 for sectorName
in map(str, list(
range(1, numSectors+1))):
21 name =
"MB" + wheelName +
"/" + stationName +
"/" + sectorName
22 if chambers: output.append(name)
24 superlayerNames =
"1",
"2",
"3"
25 if stationName ==
"4": superlayerNames =
"1",
"3"
26 for superlayerName
in superlayerNames:
27 name =
"MB" + wheelName +
"/" + stationName +
"/" + sectorName +
"/" + superlayerName
28 if superlayers: output.append(name)
30 for layerName
in "1",
"2",
"3",
"4":
31 name =
"MB" + wheelName +
"/" + stationName +
"/" + sectorName +
"/" + superlayerName +
"/" + layerName
32 if layers: output.append(name)
35 for stationName
in "-4",
"-3",
"-2",
"-1",
"+1",
"+2",
"+3",
"+4":
37 if stationName
in (
"-1",
"+1"): ringNames =
"1",
"2",
"3",
"4"
38 for ringName
in ringNames:
40 if stationName +
"/" + ringName
in (
"-4/1",
"-3/1",
"-2/1",
"+2/1",
"+3/1",
"+4/1"): numChambers = 18
41 for chamberName
in map(str, list(
range(1, numChambers+1))):
42 name =
"ME" + stationName +
"/" + ringName +
"/" + chamberName
44 if me42
or stationName +
"/" + ringName
not in (
"-4/2",
"+4/2"):
47 for layerName
in "1",
"2",
"3",
"4",
"5",
"6":
48 name =
"ME" + stationName +
"/" + ringName +
"/" + chamberName +
"/" + layerName
50 if me42
or stationName +
"/" + ringName
not in (
"-4/2",
"+4/2"):
const uint16_t range(const Frame &aFrame)