Skip to content
Snippets Groups Projects
Commit e7ad4faa authored by Tadej Novak's avatar Tadej Novak Committed by Atlas Nightlybuild
Browse files

Merge branch 'egamma_calib_nosys' into 'master'

allow disabling systematics for EgammaCalibrationAndSmearingAlg (for ATLASG-2358)

See merge request !57320

(cherry picked from commit 3ce6fa19)

5cc968e5 allow disabling systematics for EgammaCalibrationAndSmearingAlg (for ATLASG-2358)
parent 9b2d7cb9
5 merge requests!76035Updated rel21 number,!63304adding missing electron iso WPs (Tight_VarRad, Loose_VarRad, TightTrackOnly_VarRad),!61521fix maxPVrefit,!59663fixed a typo in HIGG8D1 format (followup of https://gitlab.cern.ch/atlas/athena/-/merge_requests/59575),!57435Sweeping !57320 from master to 21.2. allow disabling systematics for EgammaCalibrationAndSmearingAlg (for ATLASG-2358)
Pipeline #4606699 passed
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#define EGAMMA_ANALYSIS_ALGORITHMS__EGAMMA_CALIBRATION_AND_SMEARING_ALG_H #define EGAMMA_ANALYSIS_ALGORITHMS__EGAMMA_CALIBRATION_AND_SMEARING_ALG_H
#include <AnaAlgorithm/AnaAlgorithm.h> #include <AnaAlgorithm/AnaAlgorithm.h>
#include <AsgTools/PropertyWrapper.h>
#include <EgammaAnalysisInterfaces/IEgammaCalibrationAndSmearingTool.h> #include <EgammaAnalysisInterfaces/IEgammaCalibrationAndSmearingTool.h>
#include <EgammaAnalysisAlgorithms/CopyHelpers.h> #include <EgammaAnalysisAlgorithms/CopyHelpers.h>
#include <SelectionHelpers/SysReadSelectionHandle.h> #include <SelectionHelpers/SysReadSelectionHandle.h>
...@@ -42,6 +43,19 @@ namespace CP ...@@ -42,6 +43,19 @@ namespace CP
private: private:
ToolHandle<CP::IEgammaCalibrationAndSmearingTool> m_calibrationAndSmearingTool; ToolHandle<CP::IEgammaCalibrationAndSmearingTool> m_calibrationAndSmearingTool;
/// \brief whether to ignore all tool systematics
///
/// The tool can be configured only to run the non-systematics or
/// only the systematics part of the corrections. That means this
/// algorithm needs to be scheduled twice, once without
/// systematics and once with. Besides configuring the tools for
/// their respective roles the first algorithm should have this
/// property set to avoid reporting any systematics or trying to
/// request any systematics.
private:
Gaudi::Property<bool> m_noToolSystematics {
this, "noToolSystematics", false, "whether to ignore all tool systematics"};
/// \brief the systematics list we run /// \brief the systematics list we run
private: private:
SysListHandle m_systematicsList {this}; SysListHandle m_systematicsList {this};
......
...@@ -35,7 +35,8 @@ namespace CP ...@@ -35,7 +35,8 @@ namespace CP
ANA_CHECK (m_calibrationAndSmearingTool.retrieve()); ANA_CHECK (m_calibrationAndSmearingTool.retrieve());
ANA_CHECK (m_egammaHandle.initialize (m_systematicsList)); ANA_CHECK (m_egammaHandle.initialize (m_systematicsList));
ANA_CHECK (m_preselection.initialize (m_systematicsList, m_egammaHandle, SG::AllowEmpty)); ANA_CHECK (m_preselection.initialize (m_systematicsList, m_egammaHandle, SG::AllowEmpty));
ANA_CHECK (m_systematicsList.addSystematics (*m_calibrationAndSmearingTool)); if (!m_noToolSystematics.value())
ANA_CHECK (m_systematicsList.addSystematics (*m_calibrationAndSmearingTool));
ANA_CHECK (m_systematicsList.initialize()); ANA_CHECK (m_systematicsList.initialize());
ANA_CHECK (m_outOfValidity.initialize()); ANA_CHECK (m_outOfValidity.initialize());
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
...@@ -48,7 +49,8 @@ namespace CP ...@@ -48,7 +49,8 @@ namespace CP
{ {
for (const auto& sys : m_systematicsList.systematicsVector()) for (const auto& sys : m_systematicsList.systematicsVector())
{ {
ANA_CHECK (m_calibrationAndSmearingTool->applySystematicVariation (sys)); if (!m_noToolSystematics.value())
ANA_CHECK (m_calibrationAndSmearingTool->applySystematicVariation (sys));
xAOD::EgammaContainer *egammas = nullptr; xAOD::EgammaContainer *egammas = nullptr;
ANA_CHECK (m_egammaHandle.getCopy (egammas, sys)); ANA_CHECK (m_egammaHandle.getCopy (egammas, sys));
for (xAOD::Egamma *egamma : *egammas) for (xAOD::Egamma *egamma : *egammas)
......
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