From c98906b270ec3b23497c4d92b2db0be67900087a Mon Sep 17 00:00:00 2001 From: tmadlener Date: Fri, 10 Nov 2023 12:19:29 +0100 Subject: [PATCH] Add a non-linearity correction plugin for the ECAL --- include/DDPandoraPFANewProcessor.h | 3 +++ src/DDPandoraPFANewProcessor.cc | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/DDPandoraPFANewProcessor.h b/include/DDPandoraPFANewProcessor.h index b7b27f3..4f2d73d 100644 --- a/include/DDPandoraPFANewProcessor.h +++ b/include/DDPandoraPFANewProcessor.h @@ -54,6 +54,9 @@ class DDPandoraPFANewProcessor : public marlin::Processor FloatVector m_inputEnergyCorrectionPoints{}; ///< The input energy points for non-linearity energy correction FloatVector m_outputEnergyCorrectionPoints{}; ///< The output energy points for non-linearity energy correction + + FloatVector m_ecalInputEnergyCorrectionPoints{}; ///< The input energy points for non-linearity energy correction in the ECAL + FloatVector m_ecalOutputEnergyCorrectionPoints{}; ///< The input energy points for non-linearity energy correction in the ECAL // Software compensation parameters FloatVector m_softCompParameters{}; diff --git a/src/DDPandoraPFANewProcessor.cc b/src/DDPandoraPFANewProcessor.cc index 4b261a0..498c27b 100644 --- a/src/DDPandoraPFANewProcessor.cc +++ b/src/DDPandoraPFANewProcessor.cc @@ -313,6 +313,9 @@ pandora::StatusCode DDPandoraPFANewProcessor::RegisterUserComponents() const PANDORA_RETURN_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, LCContent::RegisterNonLinearityEnergyCorrection(*m_pPandora, "NonLinearity", pandora::HADRONIC, m_settings.m_inputEnergyCorrectionPoints, m_settings.m_outputEnergyCorrectionPoints)); + PANDORA_RETURN_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, LCContent::RegisterNonLinearityEnergyCorrection(*m_pPandora, + "ECALClusterCorrection", pandora::ELECTROMAGNETIC, m_settings.m_ecalInputEnergyCorrectionPoints, m_settings.m_ecalOutputEnergyCorrectionPoints)); + PANDORA_RETURN_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::RegisterAlgorithmFactory(*m_pPandora, "ExternalClustering", new DDExternalClusteringAlgorithm::Factory)); @@ -795,6 +798,17 @@ void DDPandoraPFANewProcessor::ProcessSteeringFile() m_settings.m_outputEnergyCorrectionPoints, FloatVector()); + // ECAL energy non-linearity correction + registerProcessorParameter("ECALInputEnergyCorrectionPoints", + "The input energy points for electromagnetic energy correction", + m_settings.m_ecalInputEnergyCorrectionPoints, + FloatVector()); + + registerProcessorParameter("ECALOutputEnergyCorrectionPoints", + "The output energy points for electromagnetic energy correction", + m_settings.m_ecalOutputEnergyCorrectionPoints, + FloatVector()); + ///EXTRA PARAMETERS FROM NIKIFOROS registerProcessorParameter("TrackCreatorName",