Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:45:20

0001 from builtins import range
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 MuonGeometrySanityCheck = cms.EDAnalyzer(
0005     "MuonGeometrySanityCheck",
0006     printout = cms.string("all"),
0007     tolerance = cms.double(1e-6),
0008     prefix = cms.string("CHECK"),
0009     frames = cms.VPSet(),
0010     points = cms.VPSet(),
0011     )
0012 
0013 def detectors(dt=True, csc=True, me42=False, chambers=True, superlayers=False, layers=False):
0014     output = []
0015     if dt:
0016         for wheelName in "-2", "-1", "0", "+1", "+2":
0017             for stationName in "1", "2", "3", "4":
0018                 numSectors = 12
0019                 if stationName == "4": numSectors = 14
0020                 for sectorName in map(str, list(range(1, numSectors+1))):
0021                     name = "MB" + wheelName + "/" + stationName + "/" + sectorName
0022                     if chambers: output.append(name)
0023 
0024                     superlayerNames = "1", "2", "3"
0025                     if stationName == "4": superlayerNames = "1", "3"
0026                     for superlayerName in superlayerNames:
0027                         name = "MB" + wheelName + "/" + stationName + "/" + sectorName + "/" + superlayerName
0028                         if superlayers: output.append(name)
0029 
0030                         for layerName in "1", "2", "3", "4":
0031                             name = "MB" + wheelName + "/" + stationName + "/" + sectorName + "/" + superlayerName + "/" + layerName
0032                             if layers: output.append(name)
0033 
0034     if csc:
0035         for stationName in "-4", "-3", "-2", "-1", "+1", "+2", "+3", "+4":
0036             ringNames = "1", "2"
0037             if stationName in ("-1", "+1"): ringNames = "1", "2", "3", "4"
0038             for ringName in ringNames:
0039                 numChambers = 36
0040                 if stationName + "/" + ringName in ("-4/1", "-3/1", "-2/1", "+2/1", "+3/1", "+4/1"): numChambers = 18
0041                 for chamberName in map(str, list(range(1, numChambers+1))):
0042                     name = "ME" + stationName + "/" + ringName + "/" + chamberName
0043                     if chambers:
0044                         if me42 or stationName + "/" + ringName not in ("-4/2", "+4/2"):
0045                             output.append(name)
0046 
0047                     for layerName in "1", "2", "3", "4", "5", "6":
0048                         name = "ME" + stationName + "/" + ringName + "/" + chamberName + "/" + layerName
0049                         if layers:
0050                             if me42 or stationName + "/" + ringName not in ("-4/2", "+4/2"):
0051                                 output.append(name)
0052 
0053     return output