CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/Alignment/MuonAlignment/python/MuonGeometrySanityCheck_cfi.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 MuonGeometrySanityCheck = cms.EDAnalyzer(
00004     "MuonGeometrySanityCheck",
00005     printout = cms.string("all"),
00006     tolerance = cms.double(1e-6),
00007     prefix = cms.string("CHECK"),
00008     frames = cms.VPSet(),
00009     points = cms.VPSet(),
00010     )
00011 
00012 def detectors(dt=True, csc=True, me42=False, chambers=True, superlayers=False, layers=False):
00013     output = []
00014     if dt:
00015         for wheelName in "-2", "-1", "0", "+1", "+2":
00016             for stationName in "1", "2", "3", "4":
00017                 numSectors = 12
00018                 if stationName == "4": numSectors = 14
00019                 for sectorName in map(str, range(1, numSectors+1)):
00020                     name = "MB" + wheelName + "/" + stationName + "/" + sectorName
00021                     if chambers: output.append(name)
00022 
00023                     superlayerNames = "1", "2", "3"
00024                     if stationName == "4": superlayerNames = "1", "3"
00025                     for superlayerName in superlayerNames:
00026                         name = "MB" + wheelName + "/" + stationName + "/" + sectorName + "/" + superlayerName
00027                         if superlayers: output.append(name)
00028 
00029                         for layerName in "1", "2", "3", "4":
00030                             name = "MB" + wheelName + "/" + stationName + "/" + sectorName + "/" + superlayerName + "/" + layerName
00031                             if layers: output.append(name)
00032 
00033     if csc:
00034         for stationName in "-4", "-3", "-2", "-1", "+1", "+2", "+3", "+4":
00035             ringNames = "1", "2"
00036             if stationName in ("-1", "+1"): ringNames = "1", "2", "3", "4"
00037             for ringName in ringNames:
00038                 numChambers = 36
00039                 if stationName + "/" + ringName in ("-4/1", "-3/1", "-2/1", "+2/1", "+3/1", "+4/1"): numChambers = 18
00040                 for chamberName in map(str, range(1, numChambers+1)):
00041                     name = "ME" + stationName + "/" + ringName + "/" + chamberName
00042                     if chambers:
00043                         if me42 or stationName + "/" + ringName not in ("-4/2", "+4/2"):
00044                             output.append(name)
00045 
00046                     for layerName in "1", "2", "3", "4", "5", "6":
00047                         name = "ME" + stationName + "/" + ringName + "/" + chamberName + "/" + layerName
00048                         if layers:
00049                             if me42 or stationName + "/" + ringName not in ("-4/2", "+4/2"):
00050                                 output.append(name)
00051 
00052     return output