Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-15 08:16:14

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2023, Christopher Dilks
0003 
0004 #pragma once
0005 
0006 #include <algorithms/logger.h>
0007 #include <spdlog/spdlog.h>
0008 
0009 namespace eicrecon {
0010 
0011 class MergeParticleIDConfig {
0012 public:
0013   /////////////////////////////////////////////////////
0014   // CONFIGURATION PARAMETERS
0015   //   NOTE: some defaults are hard-coded here; override externally
0016 
0017   // decide how to combine the weights
0018   enum math_enum { kAddWeights, kMultiplyWeights };
0019   int mergeMode = kAddWeights;
0020 
0021   //
0022   /////////////////////////////////////////////////////
0023 
0024   // stream all parameters
0025   friend std::ostream& operator<<(std::ostream& os, const MergeParticleIDConfig& cfg) {
0026     // print all parameters
0027     os << fmt::format("{:=^60}", " MergeParticleIDConfig Settings ") << std::endl;
0028     auto print_param = [&os](auto name, auto val) {
0029       os << fmt::format("  {:>20} = {:<}", name, val) << std::endl;
0030     };
0031     print_param("mergeMode", cfg.mergeMode);
0032     os << fmt::format("{:=^60}", "") << std::endl;
0033     return os;
0034   }
0035 };
0036 
0037 } // namespace eicrecon