23 using namespace angle_units::operators;
67 startAngle = nArgs[
"startAngle"];
68 stepAngle = nArgs[
"stepAngle"];
69 invert = int(nArgs[
"invert"]);
70 rPos = nArgs[
"rPosition"];
71 zoffset = nArgs[
"zoffset"];
73 startCopyNo = int(nArgs[
"startCopyNo"]);
74 incrCopyNo = int(nArgs[
"incrCopyNo"]);
76 edm::LogVerbatim(
"MuonGeom") <<
"DDGEMAngular: Parameters for positioning-- " <<
n <<
" copies in steps of "
78 <<
" (inversion flag " <<
invert <<
") \trPos " << rPos <<
" Zoffest " << zoffset
79 <<
"\tStart and inremental "
80 <<
"copy nos " << startCopyNo <<
", " << incrCopyNo;
83 rotns = sArgs[
"RotNameSpace"];
85 childName = sArgs[
"ChildName"];
88 <<
"\tNameSpace " << idNameSpace <<
"\tRotation Namespace " << rotns;
93 double phi = startAngle;
94 int copyNo = startCopyNo;
96 for (
int ii = 0;
ii <
n;
ii++) {
108 double thetax = 90.0_deg;
109 double phix =
invert == 0 ? (90.0_deg + phitmp) : (-90.0_deg + phitmp);
110 double thetay =
invert == 0 ? 0.0 : 180.0_deg;
111 double phiz = phitmp;
113 edm::LogVerbatim(
"MuonGeom") <<
"DDGEMAngular: Creating a new rotation " <<
DDName(rotstr, idNameSpace) <<
"\t "
118 rotation =
DDrot(
DDName(rotstr, rotns), thetax, phix, thetay, 0., thetax, phiz);
124 cpv.
position(
DDName(childName, idNameSpace), parentName, copyNo, tran, rotation);
126 edm::LogVerbatim(
"MuonGeom") <<
"DDGEMAngular: " <<
DDName(childName, idNameSpace) <<
" number " << copyNo
127 <<
" positioned in " << parentName <<
" at " << tran <<
" with " << rotstr <<
" "
131 copyNo += incrCopyNo;
Log< level::Info, true > LogVerbatim
static AlgebraicMatrix initialize()
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
constexpr NumType convertRadToDeg(NumType radians)
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.
static std::string & ns()
Compact representation of the geometrical detector hierarchy.
Represents a uniquely identifyable rotation matrix.
void execute(DDCompactView &cpv) override
Cos< T >::type cos(const T &t)
std::string formatAsDegrees(double radianVal)
#define DEFINE_EDM_PLUGIN(factory, type, name)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation