4 #include "DD4hep/DetFactoryHelper.h"
13 int numberX =
args.value<
int>(
"NumberX");
14 int numberY =
args.value<
int>(
"NumberY");
15 double deltaX =
args.value<
double>(
"DeltaX");
16 double deltaY =
args.value<
double>(
"DeltaY");
17 std::vector<double> centre =
args.value<std::vector<double> >(
"Center");
19 std::vector<std::string> childName =
args.value<std::vector<std::string> >(
"Child");
22 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalLinearXY: Parent " <<
parent.name() <<
" \twith " << childName.size()
25 for (
auto const&
child : childName) {
29 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalLinearXY: Number along X/Y " << numberX <<
"/" << numberY
34 double xoff = centre[0] - (numberX - 1) * 0.5 * deltaX;
35 double yoff = centre[1] - (numberY - 1) * 0.5 * deltaY;
36 unsigned int copy = 0;
37 for (
int i = 0;
i < numberX; ++
i) {
38 for (
int j = 0;
j < numberY; ++
j) {
39 unsigned int k = (childName.size() == 1) ? 0 :
copy;
41 if (
k < childName.size() && (childName[
k] !=
" " && childName[
k] !=
"Null")) {
49 <<
") with no rotation";