1 #include "DD4hep/DetFactoryHelper.h"
9 using namespace cms_units::operators;
16 double startAngle = args.
value<
double>(
"StartAngle");
17 double incrAngle = args.
value<
double>(
"IncrAngle");
19 double zIn = args.
value<
double>(
"ZIn");
20 double zOut = args.
value<
double>(
"ZOut");
22 int startCopyNo = args.
find(
"StartCopyNo") ? args.
value<
int>(
"StartCopyNo") : 1;
23 int incrCopyNo = args.
find(
"IncrCopyNo") ? args.
value<
int>(
"IncrCopyNo") : 1;
28 <<
convertRadToDeg(incrAngle) <<
"\tZ in/out " << zIn <<
", " << zOut <<
"\tCopy Numbers "
29 << number <<
" Start/Increment " << startCopyNo <<
", " << incrCopyNo;
30 edm::LogVerbatim(
"TECGeom") <<
"debug: Parent " << mother.name() <<
"\tChild " << child.name() <<
" NameSpace "
34 double theta = 90._deg;
35 int copyNo = startCopyNo;
37 double phiz = startAngle +
i * incrAngle;
38 double phix = phiz + 90._deg;
40 Position tran(radius *
cos(phiz), radius *
sin(phiz), (
i % 2 == 0) ? zIn : zOut);
41 mother.placeVolume(child, copyNo, Transform3D(rotation, tran));
42 edm::LogVerbatim(
"TECGeom") <<
"test: " << child.name() <<
" number " << copyNo <<
" positioned in "
43 << mother.name() <<
" at " << tran <<
" with " <<
rotation;
Log< level::Info, true > LogVerbatim
dd4hep::Volume volume(const std::string &name, bool exc=true) const
std::string childName() const
Access value of child'name from the xml element.
constexpr NumType convertRadToDeg(NumType radians)
Sin< T >::type sin(const T &t)
T value(const std::string &name) const
Geom::Theta< T > theta() 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)
Cos< T >::type cos(const T &t)
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.