diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/scripts/sct_calib_tf.py b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/scripts/sct_calib_tf.py index 7ebfdb34f5b56fcdace88fc762428aa5016c4fce..c62475c9a8871ced16addf2b17d408f526af1a35 100755 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/scripts/sct_calib_tf.py +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/scripts/sct_calib_tf.py @@ -221,16 +221,16 @@ def addOutputArgs(parser,dict): if 'doDeadChip' in checkPart and checkSplit == 1: parser.add_argument('--outputHITMapFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'HitMap output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTHitMaps.root'],runarg=True)) - parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), - help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) + #parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), + # help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) parser.add_argument('--outputBSErrorsFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'BS Errors file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTBSErrors.root'],runarg=True)) if 'doDeadChip' in checkPart and checkSplit != 1: parser.add_argument('--outputHITMapFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'HitMap output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTHitMaps.root'],runarg=True)) - parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), - help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) + #parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), + # help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) parser.add_argument('--outputBSErrorsFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'BS Errors file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTBSErrors.root'],runarg=True)) parser.add_argument('--outputDeadChipFile', type=trfArgClasses.argFactory(trfArgClasses.argFile, runarg=True,io='output'), @@ -242,16 +242,16 @@ def addOutputArgs(parser,dict): if 'doDeadStrip' in checkPart and checkSplit == 1: parser.add_argument('--outputHITMapFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'HitMap output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTHitMaps.root'],runarg=True)) - parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), - help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) + #parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), + # help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) parser.add_argument('--outputBSErrorsFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'BS Errors file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTBSErrors.root'],runarg=True)) if 'doDeadStrip' in checkPart and checkSplit != 1: parser.add_argument('--outputHITMapFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'HitMap output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTHitMaps.root'],runarg=True)) - parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), - help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) + #parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), + # help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) parser.add_argument('--outputBSErrorsFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'BS Errors file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTBSErrors.root'],runarg=True)) parser.add_argument('--outputDeadStripFile', type=trfArgClasses.argFactory(trfArgClasses.argFile, runarg=True,io='output'), @@ -263,16 +263,16 @@ def addOutputArgs(parser,dict): if 'doQuietChip' in checkPart and checkSplit == 1: parser.add_argument('--outputHITMapFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'HitMap output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTHitMaps.root'],runarg=True)) - parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), - help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) + #parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), + # help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) parser.add_argument('--outputBSErrorsFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'BS Errors file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTBSErrors.root'],runarg=True)) if 'doQuietChip' in checkPart and checkSplit != 1: parser.add_argument('--outputHITMapFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'HitMap output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTHitMaps.root'],runarg=True)) - parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), - help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) + #parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), + # help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) parser.add_argument('--outputBSErrorsFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'BS Errors file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTBSErrors.root'],runarg=True)) parser.add_argument('--outputDeadChipFile', type=trfArgClasses.argFactory(trfArgClasses.argFile, runarg=True,io='output'), @@ -284,16 +284,16 @@ def addOutputArgs(parser,dict): if 'doQuietStrip' in checkPart and checkSplit == 1: parser.add_argument('--outputHITMapFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'HitMap output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTHitMaps.root'],runarg=True)) - parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), - help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) + #parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), + # help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) parser.add_argument('--outputBSErrorsFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'BS Errors file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTBSErrors.root'],runarg=True)) if 'doQuietStrip' in checkPart and checkSplit != 1: parser.add_argument('--outputHITMapFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'HitMap output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTHitMaps.root'],runarg=True)) - parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), - help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) + #parser.add_argument('--outputLBFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), + # help = 'LB output file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTLB.root'],runarg=True)) parser.add_argument('--outputBSErrorsFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile, runarg=True,io='output'), help = 'BS Errors file',group='Calibration',default=trfArgClasses.argNTUPFile([checkPrefix+'SCTBSErrors.root'],runarg=True)) parser.add_argument('--outputDeadStripFile', type=trfArgClasses.argFactory(trfArgClasses.argFile, runarg=True,io='output'), @@ -618,11 +618,11 @@ class SCTCalibExecutor( athenaExecutor ): outNentries1 = int(outTFile1.Get('GENERAL/events').GetEntries()) outInstance1._setMetadata(outInstance1._value,{'nentries': outNentries1}) - outInstance2 = self.conf.dataDictionary[list(self._output)[2]] - outTFile2 = TFile(outInstance2._value[0]) - print (outTFile2.GetName()) - outNentries2 = int(outTFile2.Get('GENERAL/events').GetEntries()) - outInstance2._setMetadata(outInstance2._value,{'nentries': outNentries2}) + #outInstance2 = self.conf.dataDictionary[list(self._output)[2]] + #outTFile2 = TFile(outInstance2._value[0]) + #print (outTFile2.GetName()) + #outNentries2 = int(outTFile2.Get('GENERAL/events').GetEntries()) + #outInstance2._setMetadata(outInstance2._value,{'nentries': outNentries2}) if 'doDeadStrip' in runArgs['part']._value and runArgs['splitHitMap']._value != 1: pwd=os.getcwd() @@ -736,7 +736,7 @@ class SCTCalibExecutor( athenaExecutor ): if prefix != '': try: - if runArgs['splitHitMap']._value !=1: + if runArgs['splitHitMap']._value !=1 and 'COOL' in listOfKeys: os.rename('mycool.db',prefix+'.mycool.db') if jobnb != '': prefixTmp = prefix + "."+ jobnb @@ -745,7 +745,7 @@ class SCTCalibExecutor( athenaExecutor ): if runArgs['splitHitMap']._value == 2: os.rename('SCTHitMaps.root',prefix+'.SCTHitMaps.root') if 'doNoisyStrip' in runArgs['part']._value: - os.rename('SCTLB.root',prefix+'.SCTLB.root') + os.rename('SCTLB.root',prefix+'.SCTLB.root') if ('doDeadStrip' in runArgs['part']._value or 'doDeadChip' in runArgs['part']._value or 'doQuietStrip' in runArgs['part']._value or 'doQuietChip' in runArgs['part']._value ): os.rename('SCTBSErrors.root',prefix+'.SCTBSErrors.root') except: diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/ReadCoolUPD4.py b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/ReadCoolUPD4.py index 1885baca87feefb53fe66454ed11e55da12ced31..b31459ffa919c0960a258fe11713cf57599bfae5 100755 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/ReadCoolUPD4.py +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/ReadCoolUPD4.py @@ -40,7 +40,7 @@ def formIovFromTo(runNumberStart, runNumber): #CS this modification checks which was the k-last run before the processed one def getRunNumberStart(runNumber, k): - runlistfile = open("/afs/cern.ch/user/s/sctcalib/public/runlist.txt", "r") + runlistfile = open("/afs/cern.ch/user/s/sctcalib/scratch0/lastRuns.txt", "r") content = runlistfile.read() runlistfile.close() content_list = content.split("\n") diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx index c0c7b160b82c5944f11fa15c4590dff9be713573..af4827cbe59fb227e479e8adf8a33752be82d779 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx @@ -263,7 +263,9 @@ StatusCode SCTCalib::initialize() { m_calibEvtInfoTool->setTimeStamp(m_runStartTime, m_runEndTime); m_calibEvtInfoTool->setRunNumber(m_runNumber); m_calibEvtInfoTool->setEventNumber(m_eventNumber); - m_calibLbTool->read("./SCTLB.root"); + if (m_doNoisyStrip) { + m_calibLbTool->read("./SCTLB.root"); + } if (m_doBSErrors) { m_calibBsErrTool->read("./SCTBSErrors.root"); }