1 #include "DD4hep/DetFactoryHelper.h" 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) {
44 if (irot !=
context.rotations.end()) {
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
const dd4hep::Rotation3D & rotation(const std::string &name) const
constexpr NumType convertRadToDeg(NumType radians)
constexpr NumType convert2mm(NumType length)
std::string to_string(const V &value)
DDRotationMatrix makeRotation3D(double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ)
static long algorithm(dd4hep::Detector &, cms::DDParsingContext &context, xml_h element)
#define DECLARE_DDCMS_DETELEMENT(name, func)
static std::string nsName(const std::string &)
static constexpr long s_executed
std::string_view name() const
dd4hep::Volume volume(const std::string &name, bool exc=true) const
std::string prepend(const std::string &) const