1 #include "DD4hep/DetFactoryHelper.h"
9 using namespace angle_units::operators;
15 int n = args.
value<
int>(
"n");
16 int startCopyNo = args.
find(
"startCopyNo") ? args.
value<
int>(
"startCopyNo") : 1;
17 int incrCopyNo = args.
find(
"incrCopyNo") ? args.
value<
int>(
"incrCopyNo") : 1;
18 float startAngle = args.
value<
float>(
"startAngle");
19 float stepAngle = args.
value<
float>(
"stepAngle");
20 float zoffset = args.
value<
float>(
"zoffset");
24 childName = ns.
prepend(childName);
28 edm::LogVerbatim(
"MuonGeom") <<
"DDMuonAngular: Parameters for positioning:: n " << n <<
" Start, Step "
31 edm::LogVerbatim(
"MuonGeom") <<
"DDMuonAngular: Parent " << mother.name() <<
"\tChild " << child.name()
32 <<
" NameSpace " << ns.
name();
34 double phi = startAngle;
35 int copyNo = startCopyNo;
37 for (
int i = 0;
i <
n; ++
i) {
48 mother.placeVolume(child, copyNo, dd4hep::Transform3D(rotation, tran));
50 edm::LogVerbatim(
"MuonGeom") <<
"DDMuonAngular:" << child.name() <<
" number " << copyNo <<
" positioned in "
51 << mother.name() <<
" at (0,0," <<
cms::convert2mm(zoffset) <<
") with " << rotstr
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)
std::unordered_map< std::string, dd4hep::Rotation3D > rotations
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 std::string nsName(const std::string &)
static constexpr long s_executed
std::string prepend(const std::string &) const
const dd4hep::Rotation3D & rotation(const std::string &name) const
bool find(const std::string &name) const
Check the existence of an argument by name.
std::string parentName() const
Access value of rParent child node.