File indexing completed on 2025-07-01 08:35:29
0001
0002
0003
0004 #pragma once
0005
0006 #include <Evaluator/DD4hepUnits.h>
0007 #include <algorithms/logger.h>
0008 #include <spdlog/spdlog.h>
0009
0010 namespace eicrecon {
0011
0012
0013 struct RadiatorConfig {
0014 double referenceRIndex;
0015 double attenuation;
0016 std::string smearingMode;
0017 double smearing;
0018 };
0019
0020
0021 class IrtCherenkovParticleIDConfig {
0022 public:
0023
0024
0025
0026
0027 unsigned numRIndexBins = 100;
0028
0029
0030
0031
0032
0033 std::map<std::string, RadiatorConfig> radiators;
0034
0035
0036
0037
0038 std::vector<int> pdgList;
0039
0040
0041
0042
0043 bool cheatPhotonVertex = false;
0044 bool cheatTrueRadiator = false;
0045
0046
0047
0048
0049
0050 bool CheatModeEnabled() const { return cheatPhotonVertex || cheatTrueRadiator; }
0051
0052
0053 friend std::ostream& operator<<(std::ostream& os, const IrtCherenkovParticleIDConfig& cfg) {
0054 os << fmt::format("{:=^60}", " IrtCherenkovParticleIDConfig Settings ") << std::endl;
0055 auto print_param = [&os](auto name, auto val) {
0056 os << fmt::format(" {:>20} = {:<}", name, val) << std::endl;
0057 };
0058 print_param("numRIndexBins", cfg.numRIndexBins);
0059 print_param("cheatPhotonVertex", cfg.cheatPhotonVertex);
0060 print_param("cheatTrueRadiator", cfg.cheatTrueRadiator);
0061 os << "pdgList:" << std::endl;
0062 for (const auto& pdg : cfg.pdgList)
0063 os << fmt::format(" {}", pdg) << std::endl;
0064 for (const auto& [name, rad] : cfg.radiators) {
0065 os << fmt::format("{:-<60}", fmt::format("--- {} config ", name)) << std::endl;
0066 print_param("smearingMode", rad.smearingMode);
0067 print_param("smearing", rad.smearing);
0068 print_param("referenceRIndex", rad.referenceRIndex);
0069 print_param("attenuation", rad.attenuation);
0070 }
0071 os << fmt::format("{:=^60}", "") << std::endl;
0072 return os;
0073 };
0074 };
0075
0076 }