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