16 #include "DD4hep/CartesianGridXY.h"
18 using namespace ActsExamples::DD4hep;
20 std::shared_ptr<const Acts::DigitizationModule>
22 double halflengthX,
double halflengthY,
double thickness,
26 halflengthX *= scalor;
27 halflengthY *= scalor;
31 std::make_shared<const Acts::RectangleBounds>(halflengthX, halflengthY);
32 dd4hep::CartesianGridXY cartesianGrid = segmentation;
33 if (cartesianGrid.isValid()) {
35 double gridSizeX = cartesianGrid.gridSizeX() * scalor;
36 double gridSizeY = cartesianGrid.gridSizeY() * scalor;
38 (cartesianGrid.gridSizeX() != 0) ? (2 * halflengthX) / gridSizeX : 0;
40 (cartesianGrid.gridSizeY() != 0) ? (2 * halflengthY) / gridSizeY : 0;
42 std::shared_ptr<const Acts::CartesianSegmentation> actsSegmentation =
43 std::make_shared<const Acts::CartesianSegmentation>(bounds, bins0,
47 return (std::make_shared<const Acts::DigitizationModule>(actsSegmentation,
53 std::shared_ptr<const Acts::DigitizationModule>
55 double minHalflengthX,
double maxHalflengthX,
double halflengthY,
59 minHalflengthX *= scalor;
60 maxHalflengthX *= scalor;
61 halflengthY *= scalor;
64 auto bounds = std::make_shared<const Acts::TrapezoidBounds>(
65 minHalflengthX, maxHalflengthX, halflengthY);
67 dd4hep::CartesianGridXY cartesianGrid = segmentation;
68 if (cartesianGrid.isValid()) {
70 double gridSizeX = cartesianGrid.gridSizeX() * scalor;
71 double gridSizeY = cartesianGrid.gridSizeY() * scalor;
73 (cartesianGrid.gridSizeX() != 0) ? (2 * maxHalflengthX) / gridSizeX : 0;
75 (cartesianGrid.gridSizeY() != 0) ? (2 * halflengthY) / gridSizeY : 0;
77 std::shared_ptr<const Acts::CartesianSegmentation> actsSegmentation =
78 std::make_shared<const Acts::CartesianSegmentation>(bounds, bins0,
82 return (std::make_shared<const Acts::DigitizationModule>(actsSegmentation,