1 #include "DD4hep/DetFactoryHelper.h" 16 const auto& cellSize =
args.value<
double>(
"CellSize");
17 const auto& cellType =
args.value<
int>(
"CellType");
18 const auto& childNames =
args.value<std::vector<std::string> >(
"ChildNames");
19 const auto& positionX =
args.value<std::vector<int> >(
"PositionX");
20 const auto& positionY =
args.value<std::vector<int> >(
"PositionY");
21 const auto&
angles =
args.value<std::vector<double> >(
"Angles");
22 const auto& detectorType =
args.value<std::vector<int> >(
"DetectorType");
24 edm::LogVerbatim(
"HGCalGeom") << childNames.size() <<
" children: " << childNames[0] <<
"; " << childNames[1]
25 <<
" positioned " << positionX.size() <<
" times with cell size " << cellSize;
26 for (
unsigned int k = 0;
k < positionX.size(); ++
k)
36 double dx = 0.5 * cellSize;
37 double dy = 0.5 *
dx *
tan(30._deg);
39 for (
unsigned int k = 0;
k < positionX.size(); ++
k) {
47 << (
angles[
k] + 90) <<
", 0, 0";
51 double xpos =
dx * positionX[
k];
52 double ypos =
dy * positionY[
k];
Log< level::Info, true > LogVerbatim
constexpr double convertDegToRad(NumType degrees)
constexpr NumType convert2mm(NumType length)
DDRotationMatrix makeRotation3D(double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ)
#define DECLARE_DDCMS_DETELEMENT(name, func)
static constexpr long s_executed
std::string_view name() const
Tan< T >::type tan(const T &t)
static int32_t packCellType6(int type, int cell)
static long algorithm(dd4hep::Detector &, cms::DDParsingContext &ctxt, xml_h e)
dd4hep::Volume volume(const std::string &name, bool exc=true) const
std::string prepend(const std::string &) const