1 #include "DD4hep/DetFactoryHelper.h"
15 const auto& cellSize =
args.value<
double>(
"CellSize");
16 const auto& cellType =
args.value<
int>(
"CellType");
17 const auto& childNames =
args.value<std::vector<std::string> >(
"ChildNames");
18 const auto& positionX =
args.value<std::vector<int> >(
"PositionX");
19 const auto& positionY =
args.value<std::vector<int> >(
"PositionY");
20 const auto&
angles =
args.value<std::vector<double> >(
"Angles");
21 const auto& detectorType =
args.value<std::vector<int> >(
"DetectorType");
23 edm::LogVerbatim(
"HGCalGeom") << childNames.size() <<
" children: " << childNames[0] <<
"; " << childNames[1]
24 <<
" positioned " << positionX.size() <<
" times with cell size " << cellSize;
25 for (
unsigned int k = 0;
k < positionX.size(); ++
k)
26 edm::LogVerbatim(
"HGCalGeom") <<
"[" <<
k <<
"] x " << positionX[
k] <<
" y " << positionY[
k] <<
" angle "
27 <<
angles[
k] <<
" detector " << detectorType[
k];
34 double dx = 0.5 * cellSize;
35 double dy = 0.5 *
dx *
tan(30._deg);
37 for (
unsigned int k = 0;
k < positionX.size(); ++
k) {
45 << (
angles[
k] + 90) <<
", 0, 0";
49 double xpos =
dx * positionX[
k];
50 double ypos =
dy * positionY[
k];
56 <<
" at " << tran <<
" with " <<
rotation;