9#include <spdlog/spdlog.h>
10#include <edm4hep/SimTrackerHitData.h>
14using CellIDType =
decltype(edm4hep::SimTrackerHitData::cellID);
37[[maybe_unused]]
static std::string RadiatorName(
int num,
38 std::shared_ptr<spdlog::logger> m_log =
nullptr) {
45 m_log->error(
"unknown radiator number {}", num);
47 std::cerr <<
"ERROR: unknown radiator number " << num << std::endl;
48 return "UNKNOWN_RADIATOR";
53[[maybe_unused]]
static int RadiatorNum(std::string name,
54 std::shared_ptr<spdlog::logger> m_log =
nullptr) {
55 if (name ==
"Aerogel")
57 else if (name ==
"Gas")
61 m_log->error(
"unknown radiator name {}", name);
63 std::cerr <<
"ERROR: unknown radiator name " << name << std::endl;
68[[maybe_unused]]
static int RadiatorNum(
const char* name,
69 std::shared_ptr<spdlog::logger> m_log =
nullptr) {
70 return RadiatorNum(std::string(name), m_log);
74[[maybe_unused]]
static int ParseRadiatorName(std::string input,
75 std::shared_ptr<spdlog::logger> m_log =
nullptr) {
76 if (input.find(
"aerogel") != std::string::npos)
78 else if (input.find(
"Aerogel") != std::string::npos)
80 else if (input.find(
"gas") != std::string::npos)
82 else if (input.find(
"Gas") != std::string::npos)
86 m_log->error(
"failed to parse '{}' for radiator name", input);
88 std::cerr <<
"ERROR: failed to parse '" << input <<
"' for radiator name" << std::endl;
Sensor()
Definition RichGeo.h:22
double size
Definition RichGeo.h:24
dd4hep::Direction surface_offset
Definition RichGeo.h:26
~Sensor()
Definition RichGeo.h:23
dd4hep::Position surface_centroid
Definition RichGeo.h:25
radiator_enum
Definition RichGeo.h:34
@ kAerogel
Definition RichGeo.h:34
@ kGas
Definition RichGeo.h:34
@ nRadiators
Definition RichGeo.h:34
decltype(edm4hep::SimTrackerHitData::cellID) CellIDType
Definition RichGeo.h:14