Skip to content
Snippets Groups Projects
Commit 30bd35ec authored by Eric Torrence's avatar Eric Torrence Committed by Graeme Stewart
Browse files

Change handling of muToLumi ERROR (LumiBlockComps-01-00-31)

	* Fix compliation errors in getLumi.cxx
	* Fix ERROR in LuminosityTool for muToLumi when lumi is invalid inayways
	* Tag as LumiBlockComps-01-00-31

2016-06-10 Will Buttinger <Will@cern.ch>
	* cmt/requirements: remove dependency of getLumi on GoodRunsLists (not needed)
	* Tag as LumiBlockComps-01-00-30

2016-05-30 Eric Torrence <torrence@cern.ch>
	* Change warning to error is muToLumi can't be found
	* Tag as LumiBlockComps-01-00-29

2016-05-26 Eric Torrence <torrence@cern.ch>
	* Change warning to error is muToLumi can't be found
	* Tag as LumiBlockComps-01-00-28


Former-commit-id: 800d18cbfa3937992816ca7b7968478c5665e143
parent 606d5369
No related merge requests found
......@@ -58,3 +58,4 @@ atlas_add_executable( getLumi
atlas_install_python_modules( python/*.py )
atlas_install_joboptions( share/*.py )
......@@ -50,6 +50,6 @@ end_private
use_if tag=AthAnalysisBase pkg=xAODRootAccess ver=xAODRootAccess-* root=Control
application getLumi ../util/getLumi.cxx
macro_append getLumi_dependencies " GoodRunsLists LumiBlockCompsLib "
macro_append getLumi_dependencies " LumiBlockCompsLib "
......@@ -143,7 +143,7 @@ def LuminosityToolOfflineRun2(name="LuminosityTool"):
folder = "/TRIGGER/LUMI/LBLB"
if not conddb.folderRequested( folder ):
conddb.addFolder('TRIGGER', folder)
mlog.info("LuminosityToolOfflineRun1 requested %s", folder)
mlog.info("LuminosityToolOfflineRun2 requested %s", folder)
lumiTool.LBLBFolderName = folder
......
......@@ -430,7 +430,21 @@ LuminosityTool::recalculatePerBCIDLumi()
// Clear the calibrated luminosity data
m_LBInstLumi.assign(TOTAL_LHC_BCIDS, 0.);
// Update muToLumi
// Set some default values
m_MuToLumi = 0.;
// Make some sanity checks that we have everyting we need
if (m_lumiFolderName.empty()) {
ATH_MSG_INFO( "LumiFolderName is empty in recalculatePerBCIDLumi()!");
return;
}
if (m_LBAvInstLumi <= 0.) {
ATH_MSG_INFO( "LBAvInstLumi is zero or negative in recalculatePerBCIDLumi():" << m_LBAvInstLumi);
return;
}
// Update muToLumi (check value later)
if (!m_onlineLumiCalibrationTool.empty()) {
// This is the only correct way to do this!
// The division below gives average mu (over all bunches) to total lumi
......@@ -440,37 +454,40 @@ LuminosityTool::recalculatePerBCIDLumi()
if (m_MuToLumi < 0.) {
ATH_MSG_INFO(" Found muToLumi = " << m_MuToLumi << " for channel " << m_calibChannel << ". Try backup channel..." );
m_MuToLumi = m_onlineLumiCalibrationTool->getMuToLumi(m_calibBackupChannel);
ATH_MSG_INFO(" Found muToLumi = " << m_MuToLumi << " for channel " << m_calibBackupChannel);
if (m_MuToLumi < 0.) {
ATH_MSG_WARNING(" Found invalid muToLumi = " << m_MuToLumi << " for backup channel " << m_calibBackupChannel << "!");
m_MuToLumi = 0.;
}
ATH_MSG_INFO(" Found muToLumi = " << m_MuToLumi << " for backup channel " << m_calibBackupChannel);
}
//} else if (m_LBAvEvtsPerBX > 0.) {
//m_MuToLumi = m_LBAvInstLumi / m_LBAvEvtsPerBX;
} else {
m_MuToLumi = 0.;
}
ATH_MSG_DEBUG(" Found muToLumi = " << m_MuToLumi << " for channel " << m_calibChannel );
// Make some sanity checks that we have everyting we need
if (m_lumiFolderName.empty()) {
ATH_MSG_INFO( "LumiFolderName is empty in recalculatePerBCIDLumi()!");
return;
ATH_MSG_WARNING(" No onlineCalibrationTool found, can't set muToLumi!");
}
// Check validity
bool isValid = true;
int perBcidValid = (m_Valid/10) % 10;
if ((m_Valid & 0x03) || (perBcidValid > 0)) { // Skip if either per-BCID or LBAv is invalid
ATH_MSG_WARNING( " Invalid per-BCID luminosity found: " << m_Valid << "!" );
return;
isValid = false;
if (m_skipInvalid) {
ATH_MSG_WARNING( " Invalid per-BCID luminosity found: " << m_Valid << "!" );
return;
} else {
ATH_MSG_WARNING( " Invalid per-BCID luminosity found: " << m_Valid << " continuing because skipInvalid == FALSE" );
}
}
if (m_LBAvInstLumi <= 0.) {
ATH_MSG_INFO( "LBAvInstLumi is zero or negative in recalculatePerBCIDLumi():" << m_LBAvInstLumi);
return;
// Now check muToLumi and report depending upon whether lumi is valid or not
if (m_MuToLumi < 0.) {
if (isValid) {
ATH_MSG_ERROR(" Found invalid muToLumi = " << m_MuToLumi << " for backup channel " << m_calibBackupChannel << "!");
} else {
ATH_MSG_WARNING(" Found invalid muToLumi = " << m_MuToLumi << " for backup channel " << m_calibBackupChannel << "!");
}
// Don't keep negative values
m_MuToLumi = 0.;
}
ATH_MSG_DEBUG(" Found muToLumi = " << m_MuToLumi << " for channel " << m_calibChannel );
// Check here if we want to do this the Run1 way (hard) or the Run2 way (easy)
......
......@@ -16,7 +16,8 @@
#include <iostream>
#ifndef XAOD_ANALYSIS
int main(int argc, char* argv[]) {
//int main(int argc, char* argv[]) {
int main( int, char** ) {
std::cout << " This application is currently only available in the analysis releases \n \
Please setup an AthAnalysisBase release to use this application." << std::endl;
return 0;
......
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