From 202163b8a0a79cfa0fc0d8687b14ff7108de35c3 Mon Sep 17 00:00:00 2001 From: asligonulacar <67739979+asligonulacar@users.noreply.github.com> Date: Tue, 23 Jan 2024 10:06:27 -0500 Subject: [PATCH 01/18] Create FT_Energy_Corr.cc FT Energy Correction Function --- .../algorithms/clas12/FT_Energy_Corr.cc | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/iguana/algorithms/clas12/FT_Energy_Corr.cc diff --git a/src/iguana/algorithms/clas12/FT_Energy_Corr.cc b/src/iguana/algorithms/clas12/FT_Energy_Corr.cc new file mode 100644 index 00000000..02dbfe7f --- /dev/null +++ b/src/iguana/algorithms/clas12/FT_Energy_Corr.cc @@ -0,0 +1,41 @@ +#include "FT_Energy_Corr.h" +namespace iguana::clas12 { +REGISTER_IGUANA_ALGORITHM(FT_Energy_Corr); + +void FT_Energy_Corr::Start(hipo::banklist& banks) { + + //# This is where I would call Fiducial Cuts and Banks in a more complex algorithm. + +} + +void FT_Energy_Corr::Run(hipo::banklist& banks) const { + + //# This is where I would do the big chunk of calculations in a more complex algorithm. + +} + + +// This function returns an electron 4-vector with the corrected energy for the Forward Tagger. +// Currently only validated for Fall 2018 outbending data. + +TLorentzVector FT_Energy_Corr::Correct(TLorentzVector x) const{ + + Double_t E_new, Px_el, Py_el, Pz_el; + TLorentzVector el_new; + E_new = x.E() + 0.0208922 + 0.050158*x.E() - 0.0181107*pow(x.E(),2) + 0.00305671*pow(x.E(),3) - 0.000178235*pow(x.E(),4); + + Px_el = E_new*(x.Px()/x.Rho()); + Py_el = E_new*(x.Py()/x.Rho()); + Pz_el = E_new*(x.Pz()/x.Rho()); + + el_new.SetXYZM(Px_el, Py_el, Pz_el, 0.000511); + + return el_new; +} + +void ExampleAlgorithm::Stop() { + + + } + +} From 40b49cd433bdc4591b9c89097ba5fb6759f5c010 Mon Sep 17 00:00:00 2001 From: asligonulacar <67739979+asligonulacar@users.noreply.github.com> Date: Tue, 23 Jan 2024 10:07:01 -0500 Subject: [PATCH 02/18] Create FT_Energy_Corr.h FT Energy Correction header --- src/iguana/algorithms/clas12/FT_Energy_Corr.h | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/iguana/algorithms/clas12/FT_Energy_Corr.h diff --git a/src/iguana/algorithms/clas12/FT_Energy_Corr.h b/src/iguana/algorithms/clas12/FT_Energy_Corr.h new file mode 100644 index 00000000..e38ec69f --- /dev/null +++ b/src/iguana/algorithms/clas12/FT_Energy_Corr.h @@ -0,0 +1,36 @@ +#pragma once + +#include "iguana/algorithms/Algorithm.h" + +namespace iguana::clas12 { + + class FT_Energy_Corr : public Algorithm { + + //############################################################################################### + //# Variables: + //# TLorentzVector x: the 4-vector of the electron that needs to have its energy corrected. + //# Double_t E_new: the corrected energy. + //# Double_t Px_el, Py_el, Pz_el: 3-momentum components of the corrected electron. + //# TLorentzVector el_new: new electron 4-vector with the corrected energy. + //################################################################################################ + DEFINE_IGUANA_ALGORITHM(FT_Energy_Corr, example::FT_Energy_Corr) + + public: + + void Start(hipo::banklist& banks) override; + void Run(hipo::banklist& banks) const override; + void Stop() override; + + // Transformation function that returns 4-vector of electron with corrected energy for the Forward Tagger. + TLorentzVector Correct(TLorentzVector x) const; + + private: + + /// Example integer configuration option + int o_exampleInt; + /// Example float configuration option + double o_exampleFloat; + + }; + +} From 65b73bcf516fe1300ffc9b8b89690780ace3957e Mon Sep 17 00:00:00 2001 From: asligonulacar <67739979+asligonulacar@users.noreply.github.com> Date: Tue, 23 Jan 2024 10:27:54 -0500 Subject: [PATCH 03/18] Update FT_Energy_Corr.cc --- src/iguana/algorithms/clas12/FT_Energy_Corr.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/iguana/algorithms/clas12/FT_Energy_Corr.cc b/src/iguana/algorithms/clas12/FT_Energy_Corr.cc index 02dbfe7f..473217e6 100644 --- a/src/iguana/algorithms/clas12/FT_Energy_Corr.cc +++ b/src/iguana/algorithms/clas12/FT_Energy_Corr.cc @@ -1,4 +1,5 @@ #include "FT_Energy_Corr.h" +#include LorentzTransformer.h namespace iguana::clas12 { REGISTER_IGUANA_ALGORITHM(FT_Energy_Corr); From 54db3a10c046f2ab92bcb5e819bde5b920c673b0 Mon Sep 17 00:00:00 2001 From: asligonulacar <67739979+asligonulacar@users.noreply.github.com> Date: Tue, 23 Jan 2024 10:28:41 -0500 Subject: [PATCH 04/18] Update FT_Energy_Corr.h --- src/iguana/algorithms/clas12/FT_Energy_Corr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/iguana/algorithms/clas12/FT_Energy_Corr.h b/src/iguana/algorithms/clas12/FT_Energy_Corr.h index e38ec69f..8087f45c 100644 --- a/src/iguana/algorithms/clas12/FT_Energy_Corr.h +++ b/src/iguana/algorithms/clas12/FT_Energy_Corr.h @@ -1,6 +1,7 @@ #pragma once #include "iguana/algorithms/Algorithm.h" +#include LorentzTransformer.h namespace iguana::clas12 { From c0f058dee74d4fabc168c77f865f9264621318d3 Mon Sep 17 00:00:00 2001 From: asligonulacar <67739979+asligonulacar@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:29:12 -0500 Subject: [PATCH 05/18] Update FT_Energy_Corr.h --- src/iguana/algorithms/clas12/FT_Energy_Corr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/iguana/algorithms/clas12/FT_Energy_Corr.h b/src/iguana/algorithms/clas12/FT_Energy_Corr.h index 8087f45c..3035a0c6 100644 --- a/src/iguana/algorithms/clas12/FT_Energy_Corr.h +++ b/src/iguana/algorithms/clas12/FT_Energy_Corr.h @@ -2,6 +2,7 @@ #include "iguana/algorithms/Algorithm.h" #include LorentzTransformer.h +#include "iguana/algorithms/TypeDefs.h" namespace iguana::clas12 { From 734ec2711306044c899dcbd46a2c8a17efb41c12 Mon Sep 17 00:00:00 2001 From: asligonulacar <67739979+asligonulacar@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:29:23 -0500 Subject: [PATCH 06/18] Update FT_Energy_Corr.cc --- src/iguana/algorithms/clas12/FT_Energy_Corr.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/iguana/algorithms/clas12/FT_Energy_Corr.cc b/src/iguana/algorithms/clas12/FT_Energy_Corr.cc index 473217e6..f18cf61d 100644 --- a/src/iguana/algorithms/clas12/FT_Energy_Corr.cc +++ b/src/iguana/algorithms/clas12/FT_Energy_Corr.cc @@ -1,5 +1,7 @@ #include "FT_Energy_Corr.h" #include LorentzTransformer.h +#include "iguana/algorithms/TypeDefs.h" + namespace iguana::clas12 { REGISTER_IGUANA_ALGORITHM(FT_Energy_Corr); From 3553dd4ca1f67bde44ac3392c947e1dd7219496c Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Thu, 9 May 2024 12:02:26 -0400 Subject: [PATCH 07/18] ci: re-trigger From a4109909cc43701bda2f5d66d35122ecfd308355 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Thu, 9 May 2024 12:22:26 -0400 Subject: [PATCH 08/18] style: algorithm name -> PascalCase --- .../{FT_Energy_Corr.cc => FTEnergyCorrection.cc} | 10 +++++----- .../clas12/{FT_Energy_Corr.h => FTEnergyCorrection.h} | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) rename src/iguana/algorithms/clas12/{FT_Energy_Corr.cc => FTEnergyCorrection.cc} (76%) rename src/iguana/algorithms/clas12/{FT_Energy_Corr.h => FTEnergyCorrection.h} (90%) diff --git a/src/iguana/algorithms/clas12/FT_Energy_Corr.cc b/src/iguana/algorithms/clas12/FTEnergyCorrection.cc similarity index 76% rename from src/iguana/algorithms/clas12/FT_Energy_Corr.cc rename to src/iguana/algorithms/clas12/FTEnergyCorrection.cc index f18cf61d..28254cbc 100644 --- a/src/iguana/algorithms/clas12/FT_Energy_Corr.cc +++ b/src/iguana/algorithms/clas12/FTEnergyCorrection.cc @@ -1,17 +1,17 @@ -#include "FT_Energy_Corr.h" +#include "FTEnergyCorrection.h" #include LorentzTransformer.h #include "iguana/algorithms/TypeDefs.h" namespace iguana::clas12 { -REGISTER_IGUANA_ALGORITHM(FT_Energy_Corr); +REGISTER_IGUANA_ALGORITHM(FTEnergyCorrection); -void FT_Energy_Corr::Start(hipo::banklist& banks) { +void FTEnergyCorrection::Start(hipo::banklist& banks) { //# This is where I would call Fiducial Cuts and Banks in a more complex algorithm. } -void FT_Energy_Corr::Run(hipo::banklist& banks) const { +void FTEnergyCorrection::Run(hipo::banklist& banks) const { //# This is where I would do the big chunk of calculations in a more complex algorithm. @@ -21,7 +21,7 @@ void FT_Energy_Corr::Run(hipo::banklist& banks) const { // This function returns an electron 4-vector with the corrected energy for the Forward Tagger. // Currently only validated for Fall 2018 outbending data. -TLorentzVector FT_Energy_Corr::Correct(TLorentzVector x) const{ +TLorentzVector FTEnergyCorrection::Correct(TLorentzVector x) const{ Double_t E_new, Px_el, Py_el, Pz_el; TLorentzVector el_new; diff --git a/src/iguana/algorithms/clas12/FT_Energy_Corr.h b/src/iguana/algorithms/clas12/FTEnergyCorrection.h similarity index 90% rename from src/iguana/algorithms/clas12/FT_Energy_Corr.h rename to src/iguana/algorithms/clas12/FTEnergyCorrection.h index 3035a0c6..504bbea0 100644 --- a/src/iguana/algorithms/clas12/FT_Energy_Corr.h +++ b/src/iguana/algorithms/clas12/FTEnergyCorrection.h @@ -6,7 +6,7 @@ namespace iguana::clas12 { - class FT_Energy_Corr : public Algorithm { + class FTEnergyCorrection : public Algorithm { //############################################################################################### //# Variables: @@ -15,7 +15,7 @@ namespace iguana::clas12 { //# Double_t Px_el, Py_el, Pz_el: 3-momentum components of the corrected electron. //# TLorentzVector el_new: new electron 4-vector with the corrected energy. //################################################################################################ - DEFINE_IGUANA_ALGORITHM(FT_Energy_Corr, example::FT_Energy_Corr) + DEFINE_IGUANA_ALGORITHM(FTEnergyCorrection, clas12::FTEnergyCorrection) public: From a20b36a5e5289081c7edac0aa9f59c3f0e780a4f Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Thu, 9 May 2024 12:23:39 -0400 Subject: [PATCH 09/18] fix: don't include `LorentzTransformer` --- src/iguana/algorithms/clas12/FTEnergyCorrection.cc | 1 - src/iguana/algorithms/clas12/FTEnergyCorrection.h | 1 - 2 files changed, 2 deletions(-) diff --git a/src/iguana/algorithms/clas12/FTEnergyCorrection.cc b/src/iguana/algorithms/clas12/FTEnergyCorrection.cc index 28254cbc..be36f5c2 100644 --- a/src/iguana/algorithms/clas12/FTEnergyCorrection.cc +++ b/src/iguana/algorithms/clas12/FTEnergyCorrection.cc @@ -1,5 +1,4 @@ #include "FTEnergyCorrection.h" -#include LorentzTransformer.h #include "iguana/algorithms/TypeDefs.h" namespace iguana::clas12 { diff --git a/src/iguana/algorithms/clas12/FTEnergyCorrection.h b/src/iguana/algorithms/clas12/FTEnergyCorrection.h index 504bbea0..261ed3a6 100644 --- a/src/iguana/algorithms/clas12/FTEnergyCorrection.h +++ b/src/iguana/algorithms/clas12/FTEnergyCorrection.h @@ -1,7 +1,6 @@ #pragma once #include "iguana/algorithms/Algorithm.h" -#include LorentzTransformer.h #include "iguana/algorithms/TypeDefs.h" namespace iguana::clas12 { From eb5e252f31ded90c577c6c64caf0006903b7112f Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Thu, 9 May 2024 12:26:01 -0400 Subject: [PATCH 10/18] build: include new algo --- src/iguana/algorithms/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/iguana/algorithms/meson.build b/src/iguana/algorithms/meson.build index 3236a569..6c2af486 100644 --- a/src/iguana/algorithms/meson.build +++ b/src/iguana/algorithms/meson.build @@ -75,6 +75,14 @@ algo_dict = { 'configs': [ 'clas12/LorentzTransformer.yaml' ], 'test_args': { 'banks': ['REC::Particle'] }, }, + 'clas12::FTEnergyCorrection': { + 'algorithm': { + 'sources': [ 'clas12/FTEnergyCorrection.cc' ], + 'headers': [ 'clas12/FTEnergyCorrection.h' ], + 'needs_ROOT': true, + }, + 'test_args': { 'banks': [] }, # FIXME: what banks will this algorithm use? + }, 'clas12::MomentumCorrection': { 'algorithm': { 'sources': [ 'clas12/MomentumCorrection.cc' ], From 6fef28fe1df0f304823cce0331acb6d81d8559f4 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Thu, 9 May 2024 12:30:01 -0400 Subject: [PATCH 11/18] fix: some build fixes --- src/iguana/algorithms/clas12/FTEnergyCorrection.cc | 2 +- src/iguana/algorithms/clas12/FTEnergyCorrection.h | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/iguana/algorithms/clas12/FTEnergyCorrection.cc b/src/iguana/algorithms/clas12/FTEnergyCorrection.cc index be36f5c2..b18d4bb5 100644 --- a/src/iguana/algorithms/clas12/FTEnergyCorrection.cc +++ b/src/iguana/algorithms/clas12/FTEnergyCorrection.cc @@ -35,7 +35,7 @@ TLorentzVector FTEnergyCorrection::Correct(TLorentzVector x) const{ return el_new; } -void ExampleAlgorithm::Stop() { +void FTEnergyCorrection::Stop() { } diff --git a/src/iguana/algorithms/clas12/FTEnergyCorrection.h b/src/iguana/algorithms/clas12/FTEnergyCorrection.h index 261ed3a6..9c2d5830 100644 --- a/src/iguana/algorithms/clas12/FTEnergyCorrection.h +++ b/src/iguana/algorithms/clas12/FTEnergyCorrection.h @@ -3,6 +3,8 @@ #include "iguana/algorithms/Algorithm.h" #include "iguana/algorithms/TypeDefs.h" +#include // FIXME: use `ROOTVecOps` instead + namespace iguana::clas12 { class FTEnergyCorrection : public Algorithm { @@ -24,13 +26,8 @@ namespace iguana::clas12 { // Transformation function that returns 4-vector of electron with corrected energy for the Forward Tagger. TLorentzVector Correct(TLorentzVector x) const; - + private: - - /// Example integer configuration option - int o_exampleInt; - /// Example float configuration option - double o_exampleFloat; }; From 847b5c6f6d85bafeb44b3b9895c92b77a86685a5 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Thu, 9 May 2024 18:06:26 -0400 Subject: [PATCH 12/18] feat: fill `Run` method and remove ROOT dependence --- .../algorithms/clas12/FTEnergyCorrection.cc | 66 +++++++++---------- .../algorithms/clas12/FTEnergyCorrection.h | 27 ++++---- src/iguana/algorithms/meson.build | 3 +- 3 files changed, 50 insertions(+), 46 deletions(-) diff --git a/src/iguana/algorithms/clas12/FTEnergyCorrection.cc b/src/iguana/algorithms/clas12/FTEnergyCorrection.cc index b18d4bb5..fd27a96c 100644 --- a/src/iguana/algorithms/clas12/FTEnergyCorrection.cc +++ b/src/iguana/algorithms/clas12/FTEnergyCorrection.cc @@ -1,43 +1,43 @@ #include "FTEnergyCorrection.h" -#include "iguana/algorithms/TypeDefs.h" namespace iguana::clas12 { -REGISTER_IGUANA_ALGORITHM(FTEnergyCorrection); + REGISTER_IGUANA_ALGORITHM(FTEnergyCorrection); -void FTEnergyCorrection::Start(hipo::banklist& banks) { - - //# This is where I would call Fiducial Cuts and Banks in a more complex algorithm. - -} - -void FTEnergyCorrection::Run(hipo::banklist& banks) const { - - //# This is where I would do the big chunk of calculations in a more complex algorithm. - -} - - -// This function returns an electron 4-vector with the corrected energy for the Forward Tagger. -// Currently only validated for Fall 2018 outbending data. - -TLorentzVector FTEnergyCorrection::Correct(TLorentzVector x) const{ - - Double_t E_new, Px_el, Py_el, Pz_el; - TLorentzVector el_new; - E_new = x.E() + 0.0208922 + 0.050158*x.E() - 0.0181107*pow(x.E(),2) + 0.00305671*pow(x.E(),3) - 0.000178235*pow(x.E(),4); - - Px_el = E_new*(x.Px()/x.Rho()); - Py_el = E_new*(x.Py()/x.Rho()); - Pz_el = E_new*(x.Pz()/x.Rho()); - - el_new.SetXYZM(Px_el, Py_el, Pz_el, 0.000511); - - return el_new; -} + void FTEnergyCorrection::Start(hipo::banklist& banks) { + b_ft_particle = GetBankIndex(banks, "RECFT::Particle"); + electron_mass = particle::mass.at(particle::electron); + } -void FTEnergyCorrection::Stop() { + void FTEnergyCorrection::Run(hipo::banklist& banks) const { + auto& ftParticleBank = GetBank(banks, b_ft_particle, "RECFT::Particle"); + ShowBank(ftParticleBank, Logger::Header("INPUT FT PARTICLES")); + for(int row = 0; row < ftParticleBank.getRows(); row++) { + if(ftParticleBank.getInt("pid", row) == particle::PDG::electron) { + auto px = ftParticleBank.getFloat("px", row); + auto py = ftParticleBank.getFloat("py", row); + auto pz = ftParticleBank.getFloat("pz", row); + auto E = std::hypot(std::hypot(px, py, pz), electron_mass); + auto [px_new, py_new, pz_new, E_new] = Transform(px, py, pz, E); + ftParticleBank.putFloat("px", row, px_new); + ftParticleBank.putFloat("py", row, py_new); + ftParticleBank.putFloat("pz", row, pz_new); + } + } + ShowBank(ftParticleBank, Logger::Header("OUTPUT FT PARTICLES")); + } + vector4_t FTEnergyCorrection::Transform( + vector_element_t px, + vector_element_t py, + vector_element_t pz, + vector_element_t E) const + { + vector_element_t rho = std::hypot(px, py, pz); + vector_element_t E_new = E + 0.0208922 + 0.050158*E - 0.0181107*pow(E,2) + 0.00305671*pow(E,3) - 0.000178235*pow(E,4); + return { E_new*(px/rho), E_new*(py/rho), E_new*(pz/rho), E_new }; + } + void FTEnergyCorrection::Stop() { } } diff --git a/src/iguana/algorithms/clas12/FTEnergyCorrection.h b/src/iguana/algorithms/clas12/FTEnergyCorrection.h index 9c2d5830..d9f30ba0 100644 --- a/src/iguana/algorithms/clas12/FTEnergyCorrection.h +++ b/src/iguana/algorithms/clas12/FTEnergyCorrection.h @@ -3,19 +3,10 @@ #include "iguana/algorithms/Algorithm.h" #include "iguana/algorithms/TypeDefs.h" -#include // FIXME: use `ROOTVecOps` instead - namespace iguana::clas12 { class FTEnergyCorrection : public Algorithm { - //############################################################################################### - //# Variables: - //# TLorentzVector x: the 4-vector of the electron that needs to have its energy corrected. - //# Double_t E_new: the corrected energy. - //# Double_t Px_el, Py_el, Pz_el: 3-momentum components of the corrected electron. - //# TLorentzVector el_new: new electron 4-vector with the corrected energy. - //################################################################################################ DEFINE_IGUANA_ALGORITHM(FTEnergyCorrection, clas12::FTEnergyCorrection) public: @@ -24,11 +15,25 @@ namespace iguana::clas12 { void Run(hipo::banklist& banks) const override; void Stop() override; - // Transformation function that returns 4-vector of electron with corrected energy for the Forward Tagger. - TLorentzVector Correct(TLorentzVector x) const; + /// @action_function{scalar transformer} + /// Transformation function that returns 4-vector of electron with corrected energy for the Forward Tagger. + /// Currently only validated for Fall 2018 outbending data. + /// @param px @f$p_x@f$ + /// @param py @f$p_y@f$ + /// @param pz @f$p_z@f$ + /// @param E @f$E@f$ + /// @returns an electron 4-vector with the corrected energy for the Forward Tagger. + vector4_t Transform( + vector_element_t px, + vector_element_t py, + vector_element_t pz, + vector_element_t E) const; private: + hipo::banklist::size_type b_ft_particle; + double electron_mass; + }; } diff --git a/src/iguana/algorithms/meson.build b/src/iguana/algorithms/meson.build index 6c2af486..af05d535 100644 --- a/src/iguana/algorithms/meson.build +++ b/src/iguana/algorithms/meson.build @@ -79,9 +79,8 @@ algo_dict = { 'algorithm': { 'sources': [ 'clas12/FTEnergyCorrection.cc' ], 'headers': [ 'clas12/FTEnergyCorrection.h' ], - 'needs_ROOT': true, }, - 'test_args': { 'banks': [] }, # FIXME: what banks will this algorithm use? + 'test_args': { 'banks': ['RECFT::Particle'] }, }, 'clas12::MomentumCorrection': { 'algorithm': { From 3cecae30c0fc8fca75ddaeb50ca2852401ff7af2 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Thu, 9 May 2024 18:23:53 -0400 Subject: [PATCH 13/18] fix: documentation --- src/iguana/algorithms/clas12/FTEnergyCorrection.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/iguana/algorithms/clas12/FTEnergyCorrection.h b/src/iguana/algorithms/clas12/FTEnergyCorrection.h index d9f30ba0..db89b741 100644 --- a/src/iguana/algorithms/clas12/FTEnergyCorrection.h +++ b/src/iguana/algorithms/clas12/FTEnergyCorrection.h @@ -5,6 +5,12 @@ namespace iguana::clas12 { + /// @brief_algo Forward Tagger energy correction + /// + /// @begin_doc_algo{Transformer} + /// @input_banks{RECFT::Particle} + /// @output_banks{RECFT::Particle} + /// @end_doc class FTEnergyCorrection : public Algorithm { DEFINE_IGUANA_ALGORITHM(FTEnergyCorrection, clas12::FTEnergyCorrection) From 917ce7159e56604489d298b623a1fbf7ade4cf0a Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Fri, 10 May 2024 22:54:32 -0400 Subject: [PATCH 14/18] fix: bank `.getRows` -> `.getRowList` --- src/iguana/algorithms/clas12/FTEnergyCorrection.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iguana/algorithms/clas12/FTEnergyCorrection.cc b/src/iguana/algorithms/clas12/FTEnergyCorrection.cc index fd27a96c..932f2616 100644 --- a/src/iguana/algorithms/clas12/FTEnergyCorrection.cc +++ b/src/iguana/algorithms/clas12/FTEnergyCorrection.cc @@ -11,7 +11,7 @@ namespace iguana::clas12 { void FTEnergyCorrection::Run(hipo::banklist& banks) const { auto& ftParticleBank = GetBank(banks, b_ft_particle, "RECFT::Particle"); ShowBank(ftParticleBank, Logger::Header("INPUT FT PARTICLES")); - for(int row = 0; row < ftParticleBank.getRows(); row++) { + for(auto const& row : ftParticleBank.getRowList()) { if(ftParticleBank.getInt("pid", row) == particle::PDG::electron) { auto px = ftParticleBank.getFloat("px", row); auto py = ftParticleBank.getFloat("py", row); From ea121161a48ccca4f78ca50df443497590880234 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Fri, 17 May 2024 17:00:38 -0400 Subject: [PATCH 15/18] fix: `CODEOWNERS` --- CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS index cc77756c..72d198aa 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,6 +1,7 @@ ################################################################################# # GitHub Handle Name # ============= ==== +# @asligonulacar Asli Acar # @c-dilks Christopher Dilks # @RichCap Richard Capobianco # @rtysonCLAS12 Richard Tyson @@ -10,4 +11,5 @@ src/iguana/algorithms/clas12/MomentumCorrection.* @RichCap @c-dilks src/iguana/algorithms/clas12/ZVertexFilter.* @rtysonCLAS12 src/iguana/algorithms/clas12/SectorFinder.* @rtysonCLAS12 +src/iguana/algorithms/clas12/FTEnergyCorrection.* @asligonulacar src/iguana/services/YAMLReader.* @rtysonCLAS12 @c-dilks From 757afee48cc861e1d147f6de08d2b05fc3a177c6 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Fri, 17 May 2024 17:01:28 -0400 Subject: [PATCH 16/18] doc: fixme reminder for PR #206 --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 72d198aa..54f70cad 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -11,5 +11,5 @@ src/iguana/algorithms/clas12/MomentumCorrection.* @RichCap @c-dilks src/iguana/algorithms/clas12/ZVertexFilter.* @rtysonCLAS12 src/iguana/algorithms/clas12/SectorFinder.* @rtysonCLAS12 -src/iguana/algorithms/clas12/FTEnergyCorrection.* @asligonulacar +src/iguana/algorithms/clas12/FTEnergyCorrection.* @asligonulacar ####### FIXME: respect PR 206 src/iguana/services/YAMLReader.* @rtysonCLAS12 @c-dilks From daa38466602ca9de8372e1b4f5d48deafec3f071 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Mon, 20 May 2024 15:57:41 -0400 Subject: [PATCH 17/18] fix: move algorithm into its own directory (respect PR #206) --- .../{FTEnergyCorrection.cc => FTEnergyCorrection/Algorithm.cc} | 0 .../{FTEnergyCorrection.h => FTEnergyCorrection/Algorithm.h} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename src/iguana/algorithms/clas12/{FTEnergyCorrection.cc => FTEnergyCorrection/Algorithm.cc} (100%) rename src/iguana/algorithms/clas12/{FTEnergyCorrection.h => FTEnergyCorrection/Algorithm.h} (100%) diff --git a/src/iguana/algorithms/clas12/FTEnergyCorrection.cc b/src/iguana/algorithms/clas12/FTEnergyCorrection/Algorithm.cc similarity index 100% rename from src/iguana/algorithms/clas12/FTEnergyCorrection.cc rename to src/iguana/algorithms/clas12/FTEnergyCorrection/Algorithm.cc diff --git a/src/iguana/algorithms/clas12/FTEnergyCorrection.h b/src/iguana/algorithms/clas12/FTEnergyCorrection/Algorithm.h similarity index 100% rename from src/iguana/algorithms/clas12/FTEnergyCorrection.h rename to src/iguana/algorithms/clas12/FTEnergyCorrection/Algorithm.h From c01cd25bc7ba43b947f5109716cd9c11e32076c8 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Wed, 22 May 2024 09:46:00 -0400 Subject: [PATCH 18/18] fix: wrong include --- src/iguana/algorithms/clas12/FTEnergyCorrection/Algorithm.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iguana/algorithms/clas12/FTEnergyCorrection/Algorithm.cc b/src/iguana/algorithms/clas12/FTEnergyCorrection/Algorithm.cc index 932f2616..48c26021 100644 --- a/src/iguana/algorithms/clas12/FTEnergyCorrection/Algorithm.cc +++ b/src/iguana/algorithms/clas12/FTEnergyCorrection/Algorithm.cc @@ -1,4 +1,4 @@ -#include "FTEnergyCorrection.h" +#include "Algorithm.h" namespace iguana::clas12 { REGISTER_IGUANA_ALGORITHM(FTEnergyCorrection);