Exemplo n.º 1
0
    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
Exemplo n.º 2
0
 def inputLevel1File(self):
     if not MuonAlignmentIOFiles._inputLevel1File:
         if align.iteration() > 0:
             MuonAlignmentIOFiles._inputLevel1File = MuonAlignmentIOFiles._IOFiles.inputLevel1File(
                 align.fileRootName(), align.iteration(), align.jobIndex())
         elif align.dataType() == 'MC' or align.dataType() == 'simCosmic':
             MuonAlignmentIOFiles._inputLevel1File = MuonAlignmentIOFiles._IOFiles.inputLevel1File(
                 align.fileRootName(), align.iteration())
         else:
             MuonAlignmentIOFiles._inputLevel1File = ""
         print "level1AsciiFile: ", MuonAlignmentIOFiles._inputLevel1File
     return MuonAlignmentIOFiles._inputLevel1File
Exemplo n.º 3
0
 def asztInputFile(self):
     if not MuonAlignmentIOFiles._asztInputFile:
         if align.iteration()>0 or \
                 align.dataType()=='MC' or align.dataType()=='simCosmic' :
             MuonAlignmentIOFiles._asztInputFile = MuonAlignmentIOFiles._IOFiles.asztInputFile(
                 align.fileRootName(), align.iteration(), align.jobIndex())
         else:
             print "setting asztInputFile to ''"
             MuonAlignmentIOFiles._asztInputFile = ""
         print "asztInputFile: ", MuonAlignmentIOFiles._asztInputFile
     return MuonAlignmentIOFiles._asztInputFile
Exemplo n.º 4
0
 def asztOutputFileName(self):
     if not MuonAlignmentIOFiles._asztOutputFileName:
         MuonAlignmentIOFiles._asztOutputFileName = MuonAlignmentIOFiles._IOFiles.asztOutputFileName(
             align.fileRootName(), align.iteration(), align.jobIndex())
     return MuonAlignmentIOFiles._asztOutputFileName
Exemplo n.º 5
0
 def ntupleFile(self):
     if not MuonAlignmentIOFiles._ntupleFile:
         MuonAlignmentIOFiles._ntupleFile = MuonAlignmentIOFiles._IOFiles.ntupleFile(
             align.fileRootName(), align.iteration(), align.jobIndex())
     return MuonAlignmentIOFiles._ntupleFile
Exemplo n.º 6
0
 def rootNameBase(self, append=""):
     if self._rootNameBase == "":
         self._rootNameBase = align.fileRootName()
         if append != "":
             self._rootNameBase = self._rootNameBase + "_" + append
     return self._rootNameBase