1 #include "DD4hep/DetFactoryHelper.h"
12 int startCopyNo = args.
find(
"StartCopyNo") ? args.
value<
int>(
"StartCopyNo") : 1;
13 int incrCopyNo = args.
find(
"IncrCopyNo") ? args.
value<
int>(
"IncrCopyNo") : 1;
16 vector<double> zvec = args.
value<vector<double> >(
"ZPositions");
17 vector<string> rotMat = args.
value<vector<string> >(
"Rotations");
19 edm::LogVerbatim(
"TrackerGeom") <<
"debug: Parent " << mother.name() <<
"\tChild " << child.name() <<
" NameSpace "
20 << ns.
name() <<
"\tCopyNo (Start/Increment) " << startCopyNo <<
", " << incrCopyNo
21 <<
"\tNumber " << zvec.size();
22 for (
int i = 0;
i < (int)(zvec.size());
i++)
23 edm::LogVerbatim(
"TrackerGeom") <<
"\t[" <<
i <<
"]\tZ = " << zvec[
i] <<
", Rot.Matrix = " << rotMat[
i];
25 for (
int i = 0,
copy = startCopyNo;
i < (int)(zvec.size());
i++,
copy += incrCopyNo) {
29 ? mother.placeVolume(child, copy, Transform3D(ns.
rotation(rotMat[i]), tran))
30 : mother.placeVolume(child, copy, tran);
31 edm::LogVerbatim(
"TrackerGeom") <<
"test: " << child.name() <<
" number " << copy <<
" positioned in "
32 << mother.name() <<
" at " << tran <<
" with " <<
rot;
Log< level::Info, true > LogVerbatim
dd4hep::Volume volume(const std::string &name, bool exc=true) const
T value(const std::string &name) const
std::string_view name() const
#define DECLARE_DDCMS_DETELEMENT(name, func)
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.