diff --git a/src/iguana/algorithms/clas12/PhotonGBTFilter/Algorithm.cc b/src/iguana/algorithms/clas12/PhotonGBTFilter/Algorithm.cc index 51ddc500..e860de5d 100644 --- a/src/iguana/algorithms/clas12/PhotonGBTFilter/Algorithm.cc +++ b/src/iguana/algorithms/clas12/PhotonGBTFilter/Algorithm.cc @@ -1,11 +1,38 @@ #include "Algorithm.h" +#include "iguana/algorithms/TypeDefs.h" +#include "models/RGA_inbending_pass1.cpp" +#include "models/RGA_outbending_pass1.cpp" +#include "models/RGA_inbending_pass2.cpp" +#include "models/RGA_outbending_pass2.cpp" +#include "models/RGC_Summer2022_pass1.cpp" namespace iguana::clas12 { REGISTER_IGUANA_ALGORITHM(PhotonGBTFilter); + // Map for the GBT Models to use depending on pass and run number + std::map, std::function const &)>> const PhotonGBTFilter::modelMap = { + {{5032, 5332, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass1(data); }}, // Fall2018 RGA Inbending + {{5032, 5332, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass2(data); }}, // Fall2018 RGA Inbending + {{5333, 5666, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGA_outbending_pass1(data); }}, // Fall2018 RGA Outbending + {{5333, 5666, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGA_outbending_pass2(data); }}, // Fall2018 RGA Outbending + {{6616, 6783, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass1(data); }}, // Spring2019 RGA Inbending + {{6616, 6783, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass2(data); }}, // Spring2019 RGA Inbending + {{6156, 6603, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass1(data); }}, // Spring2019 RGB Inbending + {{6156, 6603, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass2(data); }}, // Spring2019 RGB Inbending + {{11093, 11283, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGA_outbending_pass1(data); }}, // Fall2019 RGB Outbending + {{11093, 11283, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGA_outbending_pass2(data); }}, // Fall2019 RGB Outbending + {{11284, 11300, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass1(data); }}, // Fall2019 RGB BAND Inbending + {{11284, 11300, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass2(data); }}, // Fall2019 RGB BAND Inbending + {{11323, 11571, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass1(data); }}, // Spring2020 RGB Inbending + {{11323, 11571, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass2(data); }}, // Spring2020 RGB Inbending + {{16042, 16772, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGC_Summer2022_pass1(data); }}, // Summer2022 RGC Inbending + {{16042, 16772, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGC_Summer2022_pass1(data); }} // Summer2022 RGC Inbending (no pass2 currently) + }; + void PhotonGBTFilter::Start(hipo::banklist& banks) { + ParseYAMLConfig(); b_particle = GetBankIndex(banks, "REC::Particle"); diff --git a/src/iguana/algorithms/clas12/PhotonGBTFilter/Algorithm.h b/src/iguana/algorithms/clas12/PhotonGBTFilter/Algorithm.h index 84069f02..7498ff61 100644 --- a/src/iguana/algorithms/clas12/PhotonGBTFilter/Algorithm.h +++ b/src/iguana/algorithms/clas12/PhotonGBTFilter/Algorithm.h @@ -1,12 +1,6 @@ #pragma once #include "iguana/algorithms/Algorithm.h" -#include "iguana/algorithms/TypeDefs.h" -#include "models/RGA_inbending_pass1.cpp" -#include "models/RGA_outbending_pass1.cpp" -#include "models/RGA_inbending_pass2.cpp" -#include "models/RGA_outbending_pass2.cpp" -#include "models/RGC_Summer2022_pass1.cpp" #include #include @@ -125,24 +119,7 @@ namespace iguana::clas12 { int o_pass = 1; /// Map for the GBT Models to use depending on pass and run number - const std::map, std::function const &)>> modelMap = { - {{5032, 5332, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass1(data); }}, // Fall2018 RGA Inbending - {{5032, 5332, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass2(data); }}, // Fall2018 RGA Inbending - {{5333, 5666, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGA_outbending_pass1(data); }}, // Fall2018 RGA Outbending - {{5333, 5666, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGA_outbending_pass2(data); }}, // Fall2018 RGA Outbending - {{6616, 6783, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass1(data); }}, // Spring2019 RGA Inbending - {{6616, 6783, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass2(data); }}, // Spring2019 RGA Inbending - {{6156, 6603, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass1(data); }}, // Spring2019 RGB Inbending - {{6156, 6603, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass2(data); }}, // Spring2019 RGB Inbending - {{11093, 11283, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGA_outbending_pass1(data); }}, // Fall2019 RGB Outbending - {{11093, 11283, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGA_outbending_pass2(data); }}, // Fall2019 RGB Outbending - {{11284, 11300, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass1(data); }}, // Fall2019 RGB BAND Inbending - {{11284, 11300, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass2(data); }}, // Fall2019 RGB BAND Inbending - {{11323, 11571, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass1(data); }}, // Spring2020 RGB Inbending - {{11323, 11571, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGA_inbending_pass2(data); }}, // Spring2020 RGB Inbending - {{16042, 16772, 1}, [](std::vector const &data) { return ApplyCatboostModel_RGC_Summer2022_pass1(data); }}, // Summer2022 RGC Inbending - {{16042, 16772, 2}, [](std::vector const &data) { return ApplyCatboostModel_RGC_Summer2022_pass1(data); }} // Summer2022 RGC Inbending (no pass2 currently) - }; + static std::map, std::function const &)>> const modelMap; }; }