29 class TGeoDetectorElement;
32 using NodeTransform = std::pair<TGeoNode*, std::shared_ptr<const Transform3D>>;
33 using namespace Acts::UnitLiterals;
51 std::string layerName =
"";
53 std::string sensorName =
"";
55 std::string localAxes =
"xyz";
57 std::pair<double, double> parseRangeR = {
60 std::pair<double, double> parseRangeZ = {
64 std::pair<double, double> envelope = {0
_mm, 0
_mm};
66 std::pair<double, double> splitRangeR = {
70 std::vector<double> splitParametersR = {};
72 std::pair<double, double> splitRangeZ = {
76 std::vector<double> splitParametersZ = {};
87 envelope(std::pair<double, double>(1
_mm, 1
_mm)) {}
94 std::string configurationName =
"undefined";
98 std::shared_ptr<const ITGeoIdentifierProvider> identifierProvider =
nullptr;
100 std::shared_ptr<const LayerCreator> layerCreator =
nullptr;
104 std::array<double, 3> layerSplitToleranceR = {-1., -1., -1.};
106 std::array<double, 3> layerSplitToleranceZ = {-1., -1., -1.};
108 bool checkRingLayout =
false;
110 double ringTolerance = 0
_mm;
117 std::unique_ptr<const Logger> logger =
142 const std::string& identification() const final;
146 void setConfiguration(const
Config& config);
149 Config getConfiguration() const;
152 void setLogger(std::unique_ptr<const
Logger> newLogger);
156 detectorElements() const;
163 std::array<std::
string, 3> m_layerTypes = {
"Negative",
"Central",
"Positive"};
185 void resolveSensitive(
187 std::vector<std::shared_ptr<const Surface>>& layerSurfaces,
188 TGeoVolume* tgVolume, TGeoNode* tgNode,
const TGeoMatrix& tgTransform,
189 LayerConfig& layerConfig,
int type,
bool correctBranch =
false,
190 const std::string&
offset =
"");
203 bool match(
const char* first,
const char*
second)
const;
207 double tolerance, std::pair<double, double>& range)
const;
212 std::pair<double, double>& range)
const {
215 range.first =
std::min(range.first, test);
216 range.second =
std::max(range.second, test);
218 for (
auto& splitPar : parameters) {
219 if (
std::abs(test - splitPar) < tolerance) {
224 parameters.push_back(test);
232 inline const std::vector<std::shared_ptr<const TGeoDetectorElement>>&
234 return m_elementStore;
238 return m_cfg.configurationName;
244 const char*
second)
const {
246 if (*first ==
'\0' && *second ==
'\0') {
253 if (*first ==
'*' && *(first + 1) !=
'\0' && *second ==
'\0') {
259 if (*first ==
'?' || *first == *second) {
260 return match(first + 1, second + 1);
267 return match(first + 1, second) || match(first, second + 1);