14 #include "DD4hep/CartesianGridXY.h"
16 using namespace FW::DD4hep;
18 std::shared_ptr<const Acts::DigitizationModule>
20 double halflengthX,
double halflengthY,
double thickness,
24 halflengthX *= scalor;
25 halflengthY *= scalor;
29 std::make_shared<const Acts::RectangleBounds>(halflengthX, halflengthY);
30 dd4hep::CartesianGridXY cartesianGrid = segmentation;
31 if (cartesianGrid.isValid()) {
33 double gridSizeX = cartesianGrid.gridSizeX() * scalor;
34 double gridSizeY = cartesianGrid.gridSizeY() * scalor;
36 (cartesianGrid.gridSizeX() != 0) ? (2 * halflengthX) / gridSizeX : 0;
38 (cartesianGrid.gridSizeY() != 0) ? (2 * halflengthY) / gridSizeY : 0;
40 std::shared_ptr<const Acts::CartesianSegmentation> actsSegmentation =
41 std::make_shared<const Acts::CartesianSegmentation>(bounds, bins0,
45 return (std::make_shared<const Acts::DigitizationModule>(actsSegmentation,
51 std::shared_ptr<const Acts::DigitizationModule>
53 double minHalflengthX,
double maxHalflengthX,
double halflengthY,
57 minHalflengthX *= scalor;
58 maxHalflengthX *= scalor;
59 halflengthY *= scalor;
62 auto bounds = std::make_shared<const Acts::TrapezoidBounds>(
63 minHalflengthX, maxHalflengthX, halflengthY);
65 dd4hep::CartesianGridXY cartesianGrid = segmentation;
66 if (cartesianGrid.isValid()) {
68 double gridSizeX = cartesianGrid.gridSizeX() * scalor;
69 double gridSizeY = cartesianGrid.gridSizeY() * scalor;
71 (cartesianGrid.gridSizeX() != 0) ? (2 * maxHalflengthX) / gridSizeX : 0;
73 (cartesianGrid.gridSizeY() != 0) ? (2 * halflengthY) / gridSizeY : 0;
75 std::shared_ptr<const Acts::CartesianSegmentation> actsSegmentation =
76 std::make_shared<const Acts::CartesianSegmentation>(bounds, bins0,
80 return (std::make_shared<const Acts::DigitizationModule>(actsSegmentation,