File indexing completed on 2026-10-24 08:25:02
0001
0002
0003
0004 #pragma once
0005
0006 #include <cstdint>
0007 #include <iostream>
0008 #include <string>
0009 #include <vector>
0010
0011 namespace eicrecon {
0012
0013 struct CalorimeterCALOROCRecoConfig {
0014
0015 std::string readout{""};
0016 std::string layerField{""};
0017 std::string sectorField{""};
0018
0019
0020
0021 std::string localDetElement{""};
0022 std::vector<std::string> localDetFields{};
0023 std::string maskPos{""};
0024 std::vector<std::string> maskPosFields{};
0025
0026 std::string edep_to_npe_filename{""};
0027 std::vector<std::string> edep_to_npe_fields{};
0028 enum class ProxyType { sum = 0, simpson = 1, templateFit = 2 } proxy_type = ProxyType::sum;
0029
0030 bool timeWalkCor{false};
0031 bool useNpeHitPos{false};
0032
0033 uint16_t highGainDR{0};
0034 double gainRatio{1};
0035
0036 std::string attenuationReferencePositionNamePos{""};
0037 std::string attenuationReferencePositionNameNeg{""};
0038
0039
0040
0041
0042 std::vector<double> attenuationParameters{0};
0043
0044 std::vector<double> timeWalkCorrectionParameters{0};
0045 std::vector<double> lightSpeedParameters{0};
0046
0047
0048 double slope = 1 / 9.41e-2;
0049 double intercept = 0;
0050 };
0051
0052 std::istream& operator>>(std::istream& in, CalorimeterCALOROCRecoConfig::ProxyType& proxyType) {
0053 std::string s;
0054 in >> s;
0055
0056 if (s == "sum" or s == "0") {
0057 proxyType = CalorimeterCALOROCRecoConfig::ProxyType::sum;
0058 } else if (s == "simpson" or s == "1") {
0059 proxyType = CalorimeterCALOROCRecoConfig::ProxyType::simpson;
0060 } else if (s == "templateFit" or s == "2") {
0061 proxyType = CalorimeterCALOROCRecoConfig::ProxyType::templateFit;
0062 } else {
0063 in.setstate(std::ios::failbit);
0064 }
0065
0066 return in;
0067 }
0068 std::ostream& operator<<(std::ostream& out,
0069 const CalorimeterCALOROCRecoConfig::ProxyType& proxyType) {
0070 switch (proxyType) {
0071 case CalorimeterCALOROCRecoConfig::ProxyType::sum:
0072 out << "sum";
0073 break;
0074 case CalorimeterCALOROCRecoConfig::ProxyType::simpson:
0075 out << "simpson";
0076 break;
0077 case CalorimeterCALOROCRecoConfig::ProxyType::templateFit:
0078 out << "templateFit";
0079 break;
0080 default:
0081 out.setstate(std::ios::failbit);
0082 }
0083 return out;
0084 }
0085
0086 }