File indexing completed on 2025-01-30 10:04:50
0001
0002
0003
0004 #pragma once
0005
0006 #include <string>
0007 #include <iostream>
0008
0009 namespace eicrecon {
0010
0011 struct ImagingTopoClusterConfig {
0012
0013
0014 int neighbourLayersRange = 1;
0015
0016 std::vector<double> localDistXY = {1.0 * dd4hep::mm, 1.0 * dd4hep::mm};
0017
0018 std::vector<double> layerDistEtaPhi = {0.01, 0.01};
0019
0020 std::vector<double> layerDistXY = {1.0 * dd4hep::mm, 1.0 * dd4hep::mm};
0021
0022 enum ELayerMode {etaphi=0, xy=1} layerMode = etaphi;
0023
0024
0025 double sectorDist = 1.0 * dd4hep::cm;
0026
0027
0028 double minClusterHitEdep = 0.;
0029
0030 double minClusterCenterEdep = 0.;
0031
0032 double minClusterEdep = 0.5 * dd4hep::MeV;
0033
0034 std::size_t minClusterNhits = 10;
0035
0036 };
0037
0038 std::istream& operator>>(std::istream& in, ImagingTopoClusterConfig::ELayerMode& layerMode) {
0039 std::string s;
0040 in >> s;
0041
0042 if (s == "etaphi" or s=="0") {
0043 layerMode = ImagingTopoClusterConfig::ELayerMode::etaphi;
0044 } else if (s == "xy" or s=="1") {
0045 layerMode = ImagingTopoClusterConfig::ELayerMode::xy;
0046 } else {
0047 in.setstate(std::ios::failbit);
0048 }
0049
0050 return in;
0051 }
0052 std::ostream& operator<<(std::ostream& out, ImagingTopoClusterConfig::ELayerMode& layerMode) {
0053 switch(layerMode) {
0054 case ImagingTopoClusterConfig::ELayerMode::etaphi:
0055 out << "etaphi";
0056 break;
0057 case ImagingTopoClusterConfig::ELayerMode::xy:
0058 out << "xy";
0059 break;
0060 default:
0061 out.setstate(std::ios::failbit);
0062 }
0063 return out;
0064 }
0065 }