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