Skip to content
Snippets Groups Projects
Commit 8cb026ef authored by Christian Sander's avatar Christian Sander Committed by Edward Moyse
Browse files

Some improvements and fixes:

parent a932a6a1
No related branches found
No related tags found
7 merge requests!69091Fix correlated smearing bug in JER in JetUncertainties in 22.0,!58791DataQualityConfigurations: Modify L1Calo config for web display,!51674Fixing hotSpotInHIST for Run3 HIST,!50012RecExConfig: Adjust log message levels from GetRunNumber and GetLBNumber,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!46567Some improvements and fixes:
......@@ -36,7 +36,7 @@ def main( runNum = None, procType = None, forceSkipQueue = 0, Stream = None ):
runQuery = 'AtlRunQuery.py '
runQuery += '--run \"' + str(Run0) + '\" '
if 'cos' not in Stream:
if 'cos' not in Stream and 'idcomm' not in Stream:
runQuery += '--lhc \"stablebeams TRUE\" '
runQuery += '--partition \"ATLAS\" '
......@@ -47,12 +47,10 @@ def main( runNum = None, procType = None, forceSkipQueue = 0, Stream = None ):
runQuery += '--projecttag \"data*_*eV\" '
elif 'hi' in Stream:
runQuery += '--projecttag \"data*_hi\" '
else:
elif 'cos' in Stream:
runQuery += '--projecttag \"data*_cos\" '
# if 'cos' not in Stream:
# runQuery += '--projecttag \"data*_*eV\" '
# else:
# runQuery += '--projecttag \"data*_cos\" '
else:
runQuery += '--projecttag \"data*_idcom\" '
if pType == 'doNoisyStrip':
runQuery += '--streams \"*calibration_SCTNoise 10000+\" '
......@@ -77,7 +75,7 @@ def main( runNum = None, procType = None, forceSkipQueue = 0, Stream = None ):
print(Run0)
# --- Check stable beam flag if stream _is not_ cosmics
if 'cos' not in Stream:
if 'cos' not in Stream and 'idcomm' not in Stream:
StableBeam = False
if os.path.exists('./data/MyLBCollection.xml'):
......@@ -127,7 +125,7 @@ def main( runNum = None, procType = None, forceSkipQueue = 0, Stream = None ):
runQuery += '--run \"' + str(RunLast[:-1]) + '+\" '
# if 'cos' not in Stream:
if 'cos' not in Stream:
if 'cos' not in Stream and 'idcomm' not in Stream:
runQuery += '--lhc \"stablebeams TRUE\" '
runQuery += '--partition \"ATLAS\" '
runQuery += '--detmaskin \"240A\" '
......@@ -136,8 +134,10 @@ def main( runNum = None, procType = None, forceSkipQueue = 0, Stream = None ):
runQuery += '--projecttag \"data*_*eV\" '
elif 'hi' in Stream:
runQuery += '--projecttag \"data*_hi\" '
else:
elif 'cos' in Stream:
runQuery += '--projecttag \"data*_cos\" '
else:
runQuery += '--projecttag \"data*_idcomm\" '
# if 'cos' not in Stream:
# runQuery += '--projecttag \"data*_*eV\" '
# else:
......
......@@ -29,7 +29,7 @@ def openDatabase(dbstring):
return db
def formIov(runNumber):
s,u=((runNumber-1 ) << 32), ((runNumber + 1) << 32) - 1
s,u=((runNumber) << 32), ((runNumber + 1) << 32) - 1
print ("formIOV: ", s, u)
return s,u
......@@ -47,9 +47,9 @@ def getRunNumberStart(runNumber, k):
content_list = [line for line in content_list if line.strip()]
integer_int_list = list(map(int, content_list))
if (runNumber >= integer_int_list[-1]):
RNS = integer_int_list[len(integer_int_list)-k]
RNS = integer_int_list[len(integer_int_list)-(k+5)]
else:
RNS = integer_int_list[integer_int_list.index(runNumber)-k]
RNS = integer_int_list[integer_int_list.index(runNumber)-(k+5)]
return RNS
#############################################################################################
......@@ -82,11 +82,16 @@ def GetRunList(dbstring, folder, tag, runNumber, k):
Temp=sorted(temp)
#print('GetRunList: array is', Temp)
ls=[]
runtmp = -999
if ( Temp[0] != runNumber ):
ls.append(Temp[0])
runtmp = Temp[0]
for i in range(len(Temp)-1):
if (Temp[i] != Temp[i+1]):
ls.append(Temp[i])
if (Temp[i] != runtmp):
if ( Temp[i] != runNumber ):
ls.append(Temp[i])
runtmp = Temp[i]
#ls.append(Temp[len(Temp)-1])
print(ls)
mylist=[]
......
......@@ -94,8 +94,8 @@ NoisyModuleAverageInDB = -1.
NoisyStripLastRunInDB = -999
NoisyStripAverageInDB = -999.
NoisyModuleList = 5000
NoisyModuleDiff = 0.500
NoisyStripDiff = 5120
NoisyModuleDiff = 0.300
NoisyStripDiff = 0.300
#--- Dead strips/chips
DeadStripMinStat = 5000
......
......@@ -585,6 +585,7 @@ SCTCalib.NoisyWaferThrECC = NoisyWaferThrECC
SCTCalib.NoisyWaferFraction = NoisyWaferFraction
SCTCalib.NoisyChipFraction = NoisyChipFraction
SCTCalib.NoisyUploadTest = NoisyUploadTest
SCTCalib.NoisyStripAverageInDB = NoisyStripAverageInDB
SCTCalib.NoisyModuleAverageInDB = NoisyModuleAverageInDB
SCTCalib.NoisyStripLastRunInDB = NoisyStripLastRunInDB
SCTCalib.NoisyModuleList = NoisyModuleList
......
......@@ -520,7 +520,7 @@ void SCTCalib::doHVPrintXML(const std::pair<int, int>& timeInterval, const std::
///////////////////////////////////////////////////////////////////////////////////
StatusCode SCTCalib::getNoisyStrip ATLAS_NOT_THREAD_SAFE () { // Thread unsafe writeModuleListToCool method is used.
enum Categories {ALL, NEW, REF, N_CATEGORIES};
ATH_MSG_INFO("----- in getNoisyStrip() ----- ");
......@@ -2767,7 +2767,7 @@ SCTCalib::writeModuleListToCool ATLAS_NOT_THREAD_SAFE // Thread unsafe SCTCalibW
ATH_MSG_ERROR("Could not create defect strip entry in the CalibWriteTool.");
}
nDefects++;
};
};
} else {
if (m_noisyStripAll) { //--- ALL noisy strips
if (!defectStripsAll.empty() || m_noisyWriteAllModules) {
......@@ -3058,7 +3058,7 @@ StatusCode SCTCalib::noisyStripsToSummaryXml(const std::map<Identifier, std::set
isNoisyMinStat = m_numberOfEvents > m_noisyMinStat;
isNoisyModuleList = numModulesAll < m_noisyModuleList;
isNoisyModuleDiff = ((static_cast<float>(numModulesAll) - m_noisyModuleAverageInDB)/m_noisyModuleAverageInDB) < m_noisyModuleDiff;
isNoisyStripDiff = (numStripsAll - m_noisyStripAverageInDB) < m_noisyStripDiff;
isNoisyStripDiff = ((static_cast<float>(numStripsAll) - m_noisyStripAverageInDB)/m_noisyStripAverageInDB) < m_noisyStripDiff;
if (!isNoisyMinStat or !isNoisyModuleList) {
strUploadFlag = "R";
} else {
......@@ -3078,7 +3078,7 @@ StatusCode SCTCalib::noisyStripsToSummaryXml(const std::map<Identifier, std::set
osNoisyMinStat << "#events more than " << m_noisyMinStat.value();
osNoisyModuleList << "#(modules w/ at least 1 noisy strip) less than " << m_noisyModuleList.value();
osNoisyModuleDiff << "Increase of #(modules w/ at least 1 noisy strip) from average of recent runs less than " << m_noisyModuleDiff*100 << "%";
osNoisyStripDiff << "Increase of #(noisy strips) from average of recent runs less than " << m_noisyStripDiff.value();
osNoisyStripDiff << "Increase of #(noisy strips) from average of recent runs less than " << m_noisyStripDiff*100 << "%";
std::ostringstream osFlagReason;
if (!isNoisyMinStat) osFlagReason << "FAILED in " << osNoisyMinStat.str() << "; ";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment