Skip to content

Commit

Permalink
Allowing electron trigger efficiency tool map to be overwritten separ…
Browse files Browse the repository at this point in the history
…ately from other tools
  • Loading branch information
Michael Hank committed Oct 18, 2024
1 parent ffb4cb2 commit 2e0baec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Root/ElectronEfficiencyCorrector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,10 @@ EL::StatusCode ElectronEfficiencyCorrector :: initialize ()
} else {
m_asgElEffCorrTool_elSF_Trig = new AsgElectronEfficiencyCorrectionTool(m_TrigEffSF_tool_name);
m_asgElEffCorrTool_elSF_Trig->msg().setLevel( MSG::ERROR ); // DEBUG, VERBOSE, INFO
if ( !m_overrideMapFilePath.empty() ) {
if ( !m_overrideMapFilePathTrig.empty() ) {
ANA_MSG_WARNING( "Overriding MapFilePath for trigger SF only to " << m_overrideMapFilePathTrig );
ANA_CHECK( m_asgElEffCorrTool_elSF_Trig->setProperty("MapFilePath", m_overrideMapFilePathTrig));
} else if ( !m_overrideMapFilePath.empty() ) {
ANA_MSG_WARNING( "Overriding MapFilePath to " << m_overrideMapFilePath );
ANA_CHECK( m_asgElEffCorrTool_elSF_Trig->setProperty("MapFilePath", m_overrideMapFilePath));
}
Expand All @@ -334,7 +337,10 @@ EL::StatusCode ElectronEfficiencyCorrector :: initialize ()
} else {
m_asgElEffCorrTool_elSF_TrigMCEff = new AsgElectronEfficiencyCorrectionTool(m_TrigMCEff_tool_name);
m_asgElEffCorrTool_elSF_TrigMCEff->msg().setLevel( MSG::ERROR ); // DEBUG, VERBOSE, INFO
if ( !m_overrideMapFilePath.empty() ) {
if ( !m_overrideMapFilePathTrig.empty() ) {
ANA_MSG_WARNING( "Overriding MapFilePath for trigger SF only to " << m_overrideMapFilePathTrig );
ANA_CHECK( m_asgElEffCorrTool_elSF_TrigMCEff->setProperty("MapFilePath", m_overrideMapFilePathTrig));
} else if ( !m_overrideMapFilePath.empty() ) {
ANA_MSG_WARNING( "Overriding MapFilePath to " << m_overrideMapFilePath );
ANA_CHECK( m_asgElEffCorrTool_elSF_TrigMCEff->setProperty("MapFilePath", m_overrideMapFilePath));
}
Expand Down
3 changes: 3 additions & 0 deletions xAODAnaHelpers/ElectronEfficiencyCorrector.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ class ElectronEfficiencyCorrector : public xAH::Algorithm
/// @brief Override corrections map file (not recommended)
std::string m_overrideMapFilePath = "";

/// @brief Override corrections map file for trigger (needed as Run2 R22 Trigger SF use R21 values)
std::string m_overrideMapFilePathTrig = "";

private:
int m_numEvent; //!
int m_numObject; //!
Expand Down

0 comments on commit 2e0baec

Please sign in to comment.