23 edm::LogInfo(
"MuonGeom") <<
"DDGEMAngular test: Creating an instance";
35 startAngle = nArgs[
"startAngle"];
36 stepAngle = nArgs[
"stepAngle"];
38 rPos = nArgs[
"rPosition"];
39 zoffset = nArgs[
"zoffset"];
41 startCopyNo =
int (nArgs[
"startCopyNo"]);
42 incrCopyNo =
int (nArgs[
"incrCopyNo"]);
44 edm::LogInfo(
"MuonGeom") <<
"DDGEMAngular debug: Parameters for positioning-- " 45 <<
n <<
" copies in steps of " <<
CONVERT_TO( stepAngle, deg )
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 edm::LogInfo(
"MuonGeom") <<
"DDGEMAngular debug: Parent " << parentName
58 <<
"\tChild " << childName <<
"\tNameSpace " 59 << idNameSpace <<
"\tRotation Namespace " << rotns;
65 double phi = startAngle;
66 int copyNo = startCopyNo;
71 if (phitmp >= 2.
_pi) phitmp -= 2._pi;
75 if (
invert > 0) rotstr +=
"I";
79 double thetax = 90.0_deg;
80 double phix =
invert==0 ? (90.0_deg + phitmp) : (-90.0_deg + phitmp);
81 double thetay =
invert==0 ? 0.0 : 180.0_deg;
84 edm::LogInfo(
"MuonGeom") <<
"DDGEMAngular test: Creating a new rotation " 85 <<
DDName(rotstr, idNameSpace) <<
"\t " 89 rotation =
DDrot(
DDName(rotstr, rotns), thetax, phix, thetay, 0., thetax, phiz);
95 cpv.
position(
DDName(childName,idNameSpace), parentName, copyNo, tran, rotation);
98 <<
DDName(childName, idNameSpace) <<
" number " 99 << copyNo <<
" positioned in " << parentName
100 <<
" at " << tran <<
" with " << rotstr <<
" " 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)
#define CONVERT_TO(_x, _y)
DDName is used to identify DDD entities uniquely.
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)
constexpr long double _pi(M_PI)