File indexing completed on 2026-11-13 10:32:59
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 inline std::istream& operator>>(std::istream& in,
0053 CalorimeterCALOROCRecoConfig::ProxyType& proxyType) {
0054 std::string s;
0055 in >> s;
0056
0057 if (s == "sum" or s == "0") {
0058 proxyType = CalorimeterCALOROCRecoConfig::ProxyType::sum;
0059 } else if (s == "simpson" or s == "1") {
0060 proxyType = CalorimeterCALOROCRecoConfig::ProxyType::simpson;
0061 } else if (s == "templateFit" or s == "2") {
0062 proxyType = CalorimeterCALOROCRecoConfig::ProxyType::templateFit;
0063 } else {
0064 in.setstate(std::ios::failbit);
0065 }
0066
0067 return in;
0068 }
0069 inline std::ostream& operator<<(std::ostream& out,
0070 const CalorimeterCALOROCRecoConfig::ProxyType& proxyType) {
0071 switch (proxyType) {
0072 case CalorimeterCALOROCRecoConfig::ProxyType::sum:
0073 out << "sum";
0074 break;
0075 case CalorimeterCALOROCRecoConfig::ProxyType::simpson:
0076 out << "simpson";
0077 break;
0078 case CalorimeterCALOROCRecoConfig::ProxyType::templateFit:
0079 out << "templateFit";
0080 break;
0081 default:
0082 out.setstate(std::ios::failbit);
0083 }
0084 return out;
0085 }
0086
0087 }