34 startAngle = nArgs[
"startAngle"];
35 stepAngle = nArgs[
"stepAngle"];
37 rPos = nArgs[
"rPosition"];
38 zoffset = nArgs[
"zoffset"];
40 startCopyNo =
int (nArgs[
"startCopyNo"]);
41 incrCopyNo =
int (nArgs[
"incrCopyNo"]);
44 <<
"DDGEMAngular: Parameters for positioning-- " <<
n 47 <<
" (inversion flag " <<
invert <<
") \trPos " << rPos
48 <<
" Zoffest " << zoffset <<
"\tStart and inremental " 49 <<
"copy nos " << startCopyNo <<
", " << incrCopyNo;
52 rotns = sArgs[
"RotNameSpace"];
54 childName = sArgs[
"ChildName"];
57 <<
"DDGEMAngular: Parent " <<
parent().name() <<
"\tChild " << childName
58 <<
"\tNameSpace " << idNameSpace <<
"\tRotation Namespace " << rotns;
64 double phi = startAngle;
65 int copyNo = startCopyNo;
70 if (phitmp >= 2._pi) phitmp -= 2._pi;
74 if (
invert > 0) rotstr +=
"I";
78 double thetax = 90.0_deg;
79 double phix =
invert==0 ? (90.0_deg + phitmp) : (-90.0_deg + phitmp);
80 double thetay =
invert==0 ? 0.0 : 180.0_deg;
84 <<
"DDGEMAngular: Creating a new rotation " 85 <<
DDName(rotstr, idNameSpace) <<
"\t " 90 rotation =
DDrot(
DDName(rotstr, rotns), thetax, phix, thetay, 0., thetax, phiz);
96 cpv.
position(
DDName(childName,idNameSpace), parentName, copyNo, tran, rotation);
99 <<
"DDGEMAngular: " <<
DDName(childName, idNameSpace) <<
" number " 100 << copyNo <<
" positioned in " << parentName
101 <<
" at " << tran <<
" with " << rotstr <<
" " <<
rotation;
104 copyNo += incrCopyNo;
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
Sin< T >::type sin(const T &t)
DDName is used to identify DDD entities uniquely.
constexpr NumType convertRadToDeg(NumType radians)
static std::string & ns()
Compact representation of the geometrical detector hierarchy.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
void execute(DDCompactView &cpv) override
Cos< T >::type cos(const T &t)
std::string formatAsDegrees(double radianVal)
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)