File indexing completed on 2024-09-28 07:02:55
0001
0002
0003
0004 #pragma once
0005
0006 #include <spdlog/spdlog.h>
0007
0008 namespace eicrecon {
0009 class PhotoMultiplierHitDigiConfig {
0010 public:
0011
0012
0013
0014
0015
0016
0017 unsigned long seed = 1;
0018
0019
0020 double hitTimeWindow = 20.0;
0021 double timeResolution = 1/16.0;
0022 double speMean = 80.0;
0023 double speError = 16.0;
0024 double pedMean = 200.0;
0025 double pedError = 3.0;
0026
0027
0028 bool enableNoise = false;
0029 double noiseRate = 20000;
0030 double noiseTimeWindow = 20.0;
0031
0032
0033 bool enablePixelGaps = false;
0034
0035
0036
0037
0038
0039
0040
0041 double safetyFactor = 1.0;
0042
0043
0044
0045
0046 std::vector<std::pair<double, double> > quantumEfficiency = {
0047 {315, 0.00},
0048 {325, 0.04},
0049 {340, 0.10},
0050 {350, 0.20},
0051 {370, 0.30},
0052 {400, 0.35},
0053 {450, 0.40},
0054 {500, 0.38},
0055 {550, 0.35},
0056 {600, 0.27},
0057 {650, 0.20},
0058 {700, 0.15},
0059 {750, 0.12},
0060 {800, 0.08},
0061 {850, 0.06},
0062 {900, 0.04},
0063 {1000, 0.00}
0064 };
0065
0066
0067
0068
0069
0070
0071
0072
0073 friend std::ostream& operator<<(std::ostream& os, const PhotoMultiplierHitDigiConfig& cfg);
0074
0075 };
0076
0077 std::ostream& operator<<(std::ostream& os, const PhotoMultiplierHitDigiConfig& cfg) {
0078 os << fmt::format("{:=^60}", " PhotoMultiplierHitDigiConfig Settings ") << std::endl;
0079 auto print_param = [&os] (auto name, auto val) {
0080 os << fmt::format(" {:>20} = {:<}", name, val) << std::endl;
0081 };
0082 print_param("seed", cfg.seed);
0083 print_param("hitTimeWindow", cfg.hitTimeWindow);
0084 print_param("timeResolution", cfg.timeResolution);
0085 print_param("speMean", cfg.speMean);
0086 print_param("speError", cfg.speError);
0087 print_param("pedMean", cfg.pedMean);
0088 print_param("pedError", cfg.pedError);
0089 print_param("enablePixelGaps", cfg.enablePixelGaps);
0090 print_param("safetyFactor", cfg.safetyFactor);
0091 print_param("enableNoise", cfg.enableNoise);
0092 print_param("noiseRate", cfg.noiseRate);
0093 print_param("noiseTimeWindow", cfg.noiseTimeWindow);
0094 os << fmt::format("{:-^60}", " Quantum Efficiency vs. Wavelength ") << std::endl;
0095 for(auto& [wl,qe] : cfg.quantumEfficiency)
0096 os << fmt::format(" {:>10} {:<}", wl, qe) << std::endl;
0097 return os;
0098 }
0099
0100 }