1 #include "DD4hep/DetFactoryHelper.h"
7 using namespace angle_units::operators;
16 float startAngle = args.
value<
float>(
"startAngle");
17 float stepAngle = args.
value<
float>(
"stepAngle");
19 double rPos = args.
value<
double>(
"rPosition");
20 double zoffset = args.
value<
double>(
"zoffset");
21 int n = args.
value<
int>(
"n");
22 int startCopyNo = args.
value<
int>(
"startCopyNo");
23 int incrCopyNo = args.
value<
int>(
"incrCopyNo");
25 edm::LogVerbatim(
"MuonGeom") <<
"DDGEMAngular: Parameters for positioning-- " << n <<
" copies in steps of "
27 <<
" (inversion flag " << invert <<
") \trPos " <<
cms::convert2mm(rPos) <<
" Zoffest "
29 <<
"copy nos " << startCopyNo <<
", " << incrCopyNo;
32 childName = ns.
prepend(childName);
34 parentName = ns.
prepend(parentName);
38 edm::LogVerbatim(
"MuonGeom") <<
"DDGEMAngular: Parent " << parentName <<
"\tChild " << child.name() <<
"\tNameSpace "
43 double phi = startAngle;
44 int copyNo = startCopyNo;
45 double thetax = 90.0_deg;
46 double thetay = invert == 0 ? 0.0 : 180.0_deg;
47 for (
int ii = 0;
ii <
n;
ii++) {
51 double phix = invert == 0 ? (90.0_deg + phiz) : (-90.0_deg + phiz);
59 parent.placeVolume(child, copyNo, dd4hep::Transform3D(rotation, tran));
61 edm::LogVerbatim(
"MuonGeom") <<
"DDGEMAngular: " << child.name() <<
" number " << copyNo <<
" positioned in "
Log< level::Info, true > LogVerbatim
dd4hep::Volume volume(const std::string &name, bool exc=true) const
constexpr NumType convertRadToDeg(NumType radians)
constexpr NumType convert2mm(NumType length)
Sin< T >::type sin(const T &t)
T value(const std::string &name) const
DDRotationMatrix makeRotation3D(double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ)
std::string_view name() const
#define DECLARE_DDCMS_DETELEMENT(name, func)
static constexpr long s_executed
Cos< T >::type cos(const T &t)
std::string prepend(const std::string &) const
std::string parentName() const
Access value of rParent child node.