Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DetUtils.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DetUtils.h
1 #pragma once
2 
3 #include <memory>
4 #include <string>
5 
6 // DD4hep
9 
10 #include "DD4hep/DetFactoryHelper.h"
11 #include "DD4hep/Detector.h"
12 #include "DD4hep/Objects.h"
13 #include "DD4hep/Segmentations.h"
14 #include "DDSegmentation/BitField64.h"
15 #include "DDSegmentation/CartesianGridXY.h"
16 #include "DDSegmentation/CartesianGridXYZ.h"
17 #include "DDSegmentation/PolarGridRPhi.h"
18 #include "XML/XMLDetector.h"
19 #include "XML/XMLElements.h"
20 
21 namespace Acts {
22 class DigitizationModule;
23 } // namespace Acts
24 
31 namespace det {
32 namespace utils {
33 
43 std::shared_ptr<const Acts::DigitizationModule> rectangleDigiModuleXZ(
44  double halflengthX, double halflengthZ, double thickness,
45  const dd4hep::Segmentation& segmentation);
46 
57 std::shared_ptr<const Acts::DigitizationModule> rectangleDigiModuleXZ(
58  double halflengthX, double halflengthZ, double thickness, double gridSizeX,
59  double gridSizeZ);
60 
73 std::shared_ptr<const Acts::DigitizationModule> trapezoidalDigiModuleXZ(
74  double minHalflengthX, double maxHalflengthX, double halflengthZ,
75  double thickness, const dd4hep::Segmentation& segmentation);
76 
90 std::shared_ptr<const Acts::DigitizationModule> trapezoidalDigiModuleXZ(
91  double minHalflengthX, double maxHalflengthX, double halflengthZ,
92  double thickness, double gridSizeX, double gridSizeZ);
93 
99 dd4hep::xml::Component getNodeByStrAttr(const dd4hep::xml::Handle_t& mother,
100  const std::string& nodeName,
101  const std::string& attrName,
102  const std::string& attrValue);
103 
106 double getAttrValueWithFallback(const dd4hep::xml::Component& node,
107  const std::string& attrName,
108  const double& defaultValue);
109 } // namespace utils
110 } // namespace det