Skip to content
Snippets Groups Projects
Commit 3ce6fa19 authored by Tadej Novak's avatar Tadej Novak
Browse files

Merge branch 'egamma_calib_nosys' into 'master'

allow disabling systematics for EgammaCalibrationAndSmearingAlg (for ATLASG-2358)

See merge request !57320
parents c27ddabe 5cc968e5
No related branches found
No related tags found
14 merge requests!59674InDetPerformanceMonitoring with LumiBlock selection,!59383cppcheck in trigger code: Prefer prefix ++/-- operators for non-primitive types.,!58990Draft:Fixing bug in FTF config when running with Reco_tf,!58835DataQualityConfigurations: Modify L1Calo config for web display,!58791DataQualityConfigurations: Modify L1Calo config for web display,!58373Modification of V2.3 processing to work well with all clients,!58289New NVSI calibration,!58286New NVSI calibration,!58106Update NVSI example algorithm,!57937Draft: New nighlty test for trigger with a Run 4 single muon RDO,!57841Edits to ZDC signal processing in preparation for analysis of data from LHCf run,!57590Fixing LAr DT dumper,!57584Draft: LAr DB fixes,!57320allow disabling systematics for EgammaCalibrationAndSmearingAlg (for ATLASG-2358)
......@@ -10,6 +10,7 @@
#define EGAMMA_ANALYSIS_ALGORITHMS__EGAMMA_CALIBRATION_AND_SMEARING_ALG_H
#include <AnaAlgorithm/AnaAlgorithm.h>
#include <AsgTools/PropertyWrapper.h>
#include <EgammaAnalysisInterfaces/IEgammaCalibrationAndSmearingTool.h>
#include <EgammaAnalysisAlgorithms/CopyHelpers.h>
#include <SelectionHelpers/SysReadSelectionHandle.h>
......@@ -42,6 +43,19 @@ namespace CP
private:
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
private:
SysListHandle m_systematicsList {this};
......
......@@ -35,7 +35,8 @@ namespace CP
ANA_CHECK (m_calibrationAndSmearingTool.retrieve());
ANA_CHECK (m_egammaHandle.initialize (m_systematicsList));
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_outOfValidity.initialize());
return StatusCode::SUCCESS;
......@@ -48,7 +49,8 @@ namespace CP
{
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;
ANA_CHECK (m_egammaHandle.getCopy (egammas, sys));
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