def __init__(self): # set defaults for muon alignment align.alignmentType = 'GlobalChi2' align.useSLFitter = True align.runOutlierRemoval = False if not align.fileRootName.is_locked(): self.setFileRootName() if not align.outputPath.is_locked(): align.outputPath = align.fileRootName() if not mualign.asztFilePath.is_locked(): mualign.asztFilePath = align.fileRootName() #self.muonIO = MuonAlignmentIOFiles() #self.muonIO.setInitialAsztFilePath(mualign.initialAsztFilePath()) #self.muonIO.setAsztFilePath(mualign.asztFilePath()) if align.alignmentLevel() == 1: self.setL1() elif align.alignmentLevel() == 23: self.setL23() elif align.alignmentLevel() == 3: self.setL3() else: print "only L1, L2 and L3 implemented" exit
def alignModuleListType(self): if align.alignmentLevel() == 0: return 0 elif align.alignmentLevel() == 1: return 1 elif align.alignmentLevel() == 23: return 2 elif align.alignmentLevel() == 3: return 3 else: print "bad option" return -1
def configure ( self ) : mlog = logging.getLogger( self._name+'::configure :' ) # create tool instance from MuonAlignGenTools.MuonAlignGenToolsConf import Muon__MuonGeometryManagerTool, Muon__MdtGeometryManagerTool, Muon__CscGeometryManagerTool, Muon__TgcGeometryManagerTool # MDT mdtGeometryManagerTool = Muon__MdtGeometryManagerTool(OutputLevel = align.OutputLevel(), AlignLevel = align.alignmentLevel(), AlignTraX=mualign.mdtAlignTraX(), AlignTraY=mualign.mdtAlignTraY(), AlignTraZ=mualign.mdtAlignTraZ(), AlignRotX=mualign.mdtAlignRotX(), AlignRotY=mualign.mdtAlignRotY(), AlignRotZ=mualign.mdtAlignRotZ()) self._MdtGeometryManagerToolHandle = mdtGeometryManagerTool # CSC cscGeometryManagerTool = Muon__CscGeometryManagerTool(OutputLevel = align.OutputLevel(), AlignLevel = align.alignmentLevel()) self._CscGeometryManagerToolHandle = cscGeometryManagerTool # TGC tgcGeometryManagerTool = Muon__TgcGeometryManagerTool(OutputLevel = align.OutputLevel(), AlignLevel = align.alignmentLevel()) self._TgcGeometryManagerToolHandle = tgcGeometryManagerTool mlog.info(" now adding geometryManagerTools to ToolSvc" ) from __main__ import ToolSvc ToolSvc += self.MdtGeometryManagerToolHandle() ToolSvc += self.CscGeometryManagerToolHandle() ToolSvc += self.TgcGeometryManagerToolHandle() muonGeometryManagerTool = Muon__MuonGeometryManagerTool(OutputLevel = align.OutputLevel(), AlignLevel = align.alignmentLevel(), MdtGeometryManager = mdtGeometryManagerTool, CscGeometryManager = cscGeometryManagerTool, TgcGeometryManager = tgcGeometryManagerTool, doModuleSelection = mualign.doModuleSelection(), AlignMdt = mualign.alignMDT(), AlignTgc = False, #mualign.alignTGC(), AlignCsc = False, #mualign.alignCSC(), ModuleSelection = mualign.modulesToAlign()) self._MuonGeometryManagerToolHandle = muonGeometryManagerTool mlog.info(" now adding MuonGeometryManagerTool to ToolSvc" ) ToolSvc += self.MuonGeometryManagerToolHandle() mlog.info(" leaving configure" ) return True
def doMultiLevelAlignment(self): doMultiLevelAlignment = False if align.alignmentLevel() != 3: if align.iteration() > 0 or mualign.jobType() == 'misal': doMultiLevelAlignment = True mualign.doMultiLevelAlignment = doMultiLevelAlignment return doMultiLevelAlignment
def __init__(self): # set defaults for muon alignment align.alignmentType = 'GlobalChi2' align.useSLFitter = True align.runOutlierRemoval = False self.setFileRootName() self.muonIO = MuonAlignmentIOFiles() if align.alignmentLevel() == 1: self.setL1() elif align.alignmentLevel() == 3: self.setL3() else: print "only L1 and L3 implemented" exit
def setFileRootName(self): fileroot = str(align.alignmentLevel()) + "_" + align.dataType() if mualign.jobType() != "": fileroot = fileroot + "_" + mualign.jobType() align.fileRootName = fileroot print "in ConfigMuonAlignment, fileroot=", fileroot