From 865dd7344dc1ec8a9f3cb5ef623b74b68e968d70 Mon Sep 17 00:00:00 2001 From: Christian Sander <christian.sander@cern.ch> Date: Mon, 23 Oct 2017 17:04:27 +0200 Subject: [PATCH] - fixed getBSError - modified runSelector.py to run with expected data17 project tag Former-commit-id: 17c4aebd4f5d7a565be8d8fde83b9f7d04adf277 --- .../SCT_CalibAlgs/python/runSelector.py | 2 +- .../InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/python/runSelector.py b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/python/runSelector.py index 8fc48db9efb..dc2aa23b93c 100755 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/python/runSelector.py +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/python/runSelector.py @@ -168,7 +168,7 @@ def main( runNum = None, procType = None, forceSkipQueue = 0, Stream = None ): if 'Project tag:' in line and runPro=='': runPro = line.split('\'')[1] if runNum!='' and runPro!='': - if 'data17_cos' in runPro or 'data17_13TeV' in runPro or 'data17_hi' in runPro: + if 'data17_cos' in runPro or 'data17_13TeV' in runPro or 'data17_5TeV' in runPro or 'data17_900GeV' in runPro or 'data17_hi' in runPro: runList.append(runNum) runDict[runNum] = runPro runNum='' diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx index 9f3395d3284..52502fcb9d5 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx @@ -1925,23 +1925,32 @@ StatusCode SCTCalib::getBSErrors() { unsigned long long n_errors = 0; if ( iType == errItr->first ) { ostringstream streamHist; + ostringstream streamHistAlt; //temporal fix: folder and histogram names should be Preamble - //streamHist << "T" << errItr->second << "Errs" << detector_part << "_" << iDisk << "_" << iSide; streamHist << errItr->second << "Errs" << "_" << iDisk << "_" << iSide; + streamHistAlt << "T" << errItr->second << "Errs" << detector_part << "_" << iDisk << "_" << iSide; std::string folder = errItr->second+std::string("/"); //histogram might or might not be inside a folder with the same name std::string profname = detectorStems[stemIndex] + folder +streamHist.str(); std::string profnameShort = detectorStems[stemIndex] + streamHist.str(); - + std::string profnameAlt = detectorStems[stemIndex] + folder +streamHistAlt.str(); + std::string profnameAltShort = detectorStems[stemIndex] + streamHistAlt.str(); + TProfile2D* prof_tmp = (TProfile2D*) m_inputHist->Get( profname.c_str() ); if(prof_tmp ==NULL) { prof_tmp = (TProfile2D*) m_inputHist->Get( profnameShort.c_str() ); } + if(prof_tmp ==NULL) { + prof_tmp = (TProfile2D*) m_inputHist->Get( profnameAlt.c_str() ); + } + if(prof_tmp ==NULL) { + prof_tmp = (TProfile2D*) m_inputHist->Get( profnameAltShort.c_str() ); + } if(prof_tmp ==NULL) { msg( MSG::ERROR ) << "Unable to get profile for BSErrorsDB : " << profname << endmsg; return StatusCode::FAILURE; } - + n_errors = (unsigned long long)prof_tmp->GetBinContent( iEta+1, iPhi+1 ); // unsigned long long n_errors = (unsigned long long)prof_tmp->GetBinContent( iEta+1, iPhi+1 ); if(n_errors!=0) { -- GitLab