Skip to content
Snippets Groups Projects
Commit 1cd585ce authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'master-EMPIDToolLumi' into 'master'

Initialize m_lumiBlockMuTool with a default value in EMPIDTools.

See merge request atlas/athena!6941
parents 78cef5c9 ab62fac6
No related branches found
No related tags found
No related merge requests found
...@@ -84,10 +84,15 @@ StatusCode EMPIDBuilder::initialize() ...@@ -84,10 +84,15 @@ StatusCode EMPIDBuilder::initialize()
if (m_UselumiBlockMuTool) { if (m_UselumiBlockMuTool) {
// retrieve the lumi tool // retrieve the lumi tool
if (m_lumiBlockMuTool.retrieve().isFailure()) { if (m_lumiBlockMuTool.retrieve().isFailure()) {
ATH_MSG_DEBUG("Unable to retrieve Luminosity Tool"); ATH_MSG_FATAL("Unable to retrieve Luminosity Tool");
return StatusCode::FAILURE;
} else { } else {
ATH_MSG_DEBUG("Successfully retrieved Luminosity Tool"); ATH_MSG_DEBUG("Successfully retrieved Luminosity Tool");
} }
} else {
// Switch to using disable when supported by Gaudi version
m_lumiBlockMuTool = nullptr;
// m_lumiBlockMuTool.disable();
} }
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
...@@ -141,7 +146,7 @@ StatusCode EMPIDBuilder::execute(xAOD::Egamma* eg) ...@@ -141,7 +146,7 @@ StatusCode EMPIDBuilder::execute(xAOD::Egamma* eg)
//negative mu means the default behaviour --> retrieve the one in xAOD //negative mu means the default behaviour --> retrieve the one in xAOD
double mu = -99.; double mu = -99.;
double avg_mu = -99.; double avg_mu = -99.;
if(m_UselumiBlockMuTool && m_lumiBlockMuTool){ // if(m_UselumiBlockMuTool){ //
mu = m_lumiBlockMuTool->actualInteractionsPerCrossing(); // (retrieve mu for the current BCID) mu = m_lumiBlockMuTool->actualInteractionsPerCrossing(); // (retrieve mu for the current BCID)
avg_mu = m_lumiBlockMuTool->averageInteractionsPerCrossing(); avg_mu = m_lumiBlockMuTool->averageInteractionsPerCrossing();
ATH_MSG_DEBUG("REGTEST: Retrieved Mu Value : " << mu); ATH_MSG_DEBUG("REGTEST: Retrieved Mu Value : " << mu);
......
...@@ -72,7 +72,7 @@ protected: ...@@ -72,7 +72,7 @@ protected:
"photonIsEMselectorResultNames", {}, "The selector result names"}; "photonIsEMselectorResultNames", {}, "The selector result names"};
ToolHandle<ILumiBlockMuTool> m_lumiBlockMuTool {this, ToolHandle<ILumiBlockMuTool> m_lumiBlockMuTool {this,
"LuminosityTool", "", "Luminosity Tool"}; "LuminosityTool", "LumiBlockMuTool/LumiBlockMuTool", "Luminosity Tool"};
Gaudi::Property<std::string> m_LHValueName {this, Gaudi::Property<std::string> m_LHValueName {this,
"LHValueName", "LHValue", "The LH Value name"}; "LHValueName", "LHValue", "The LH Value name"};
......
...@@ -33,8 +33,6 @@ from TrigEgammaHypo.TrigEgammaPidTools import ElectronPidTools ...@@ -33,8 +33,6 @@ from TrigEgammaHypo.TrigEgammaPidTools import ElectronPidTools
from TrigEgammaHypo.TrigEgammaPidTools import PhotonPidTools from TrigEgammaHypo.TrigEgammaPidTools import PhotonPidTools
ElectronPidTools() ElectronPidTools()
PhotonPidTools() PhotonPidTools()
from LumiBlockComps.LuminosityToolDefault import LuminosityToolOnline
lumiTool = LuminosityToolOnline()
# Following tools have TrigEgamma factories # Following tools have TrigEgamma factories
from egammaTools.egammaToolsFactories import EMTrackMatchBuilder, EMFourMomBuilder, EMShowerBuilder from egammaTools.egammaToolsFactories import EMTrackMatchBuilder, EMFourMomBuilder, EMShowerBuilder
...@@ -97,7 +95,6 @@ TrigElectronPIDBuilder = PublicToolFactory( EMPIDBuilder, name = "TrigElectronPI ...@@ -97,7 +95,6 @@ TrigElectronPIDBuilder = PublicToolFactory( EMPIDBuilder, name = "TrigElectronPI
ToolSvc.AsgElectronLHTightSelector], ToolSvc.AsgElectronLHTightSelector],
electronLHselectorResultNames= ["LHVLoose","LHLoose","LHMedium","LHTight"], electronLHselectorResultNames= ["LHVLoose","LHLoose","LHMedium","LHTight"],
UseLuminosityTool = True, UseLuminosityTool = True,
LuminosityTool = lumiTool
) )
TrigElectronCaloPIDBuilder = PublicToolFactory( EMPIDBuilder, name = "TrigElectronCaloPIDBuilder", TrigElectronCaloPIDBuilder = PublicToolFactory( EMPIDBuilder, name = "TrigElectronCaloPIDBuilder",
...@@ -108,7 +105,6 @@ TrigElectronCaloPIDBuilder = PublicToolFactory( EMPIDBuilder, name = "TrigElectr ...@@ -108,7 +105,6 @@ TrigElectronCaloPIDBuilder = PublicToolFactory( EMPIDBuilder, name = "TrigElectr
electronLHselectorResultNames= ["LHCaloVLoose","LHCaloLoose","LHCaloMedium","LHCaloTight"], electronLHselectorResultNames= ["LHCaloVLoose","LHCaloLoose","LHCaloMedium","LHCaloTight"],
LHValueName = "LHCaloValue", LHValueName = "LHCaloValue",
UseLuminosityTool = True, UseLuminosityTool = True,
LuminosityTool = lumiTool
) )
TrigPhotonPIDBuilder = PublicToolFactory( EMPIDBuilder, name = "TrigPhotonPIDBuilder", TrigPhotonPIDBuilder = PublicToolFactory( EMPIDBuilder, name = "TrigPhotonPIDBuilder",
......
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