15 #include "CLHEP/Units/GlobalSystemOfUnits.h"
18 edm::LogInfo(
"MuonGeom") <<
"DDGEMAngular test: Creating an instance";
31 invert = int (nArgs[
"invert"]);
32 rPos = nArgs[
"rPosition"];
37 edm::LogInfo(
"MuonGeom") <<
"DDGEMAngular debug: Parameters for positioning-- "
38 <<
n <<
" copies in steps of " <<
stepAngle/CLHEP::deg
40 <<
" (inversion flag " <<
invert <<
") \trPos " <<
rPos
41 <<
" Zoffest " <<
zoffset <<
"\tStart and inremental "
45 rotns = sArgs[
"RotNameSpace"];
49 edm::LogInfo(
"MuonGeom") <<
"DDGEMAngular debug: Parent " << parentName
50 <<
"\tChild " <<
childName <<
"\tNameSpace "
61 double phideg = phi/CLHEP::deg;
63 if (phideg > 0) iphi = int(phideg+0.1);
64 else iphi = int(phideg-0.1);
65 if (iphi >= 360) iphi -= 360;
71 if (
invert > 0) rotstr +=
"I";
72 if (phideg >=0 && phideg < 10) rotstr +=
"00";
73 else if (phideg < 100) rotstr +=
"0";
78 double phix =
invert==0 ? (90.0+phideg) : (-90.0+phideg);
79 double thetay =
invert==0 ? 0.0 : 180.0;
81 edm::LogInfo(
"MuonGeom") <<
"DDGEMAngular test: Creating a new rotation "
83 << thetax <<
", " << phix <<
", " << thetay
84 <<
", 0, " << thetax <<
", " << phiz << std::endl;
86 phix*CLHEP::deg, thetay*CLHEP::deg, 0*CLHEP::deg,
87 thetax*CLHEP::deg, phiz*CLHEP::deg);
96 << copyNo <<
" positioned in " << parentName <<
" at "
97 << tran <<
" with " << rotstr <<
" " << rotation <<
"\n";
void execute(DDCompactView &cpv)
Sin< T >::type sin(const T &t)
void position(const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL)
DDName is used to identify DDD entities uniquely.
static std::string & ns()
std::string dbl_to_string(const double &in)
Converts only the integer part of a double to a string.
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
type of data representation of DDCompactView
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
Cos< T >::type cos(const T &t)
const std::string & name() const
Returns the name.