#include <DDGEMAngular.h>
Public Member Functions | |
DDGEMAngular () | |
void | execute (DDCompactView &cpv) |
void | initialize (const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) |
virtual | ~DDGEMAngular () |
Private Attributes | |
std::string | childName |
std::string | idNameSpace |
int | incrCopyNo |
int | invert |
int | n |
std::string | rotns |
double | rPos |
double | startAngle |
int | startCopyNo |
double | stepAngle |
double | zoffset |
Definition at line 10 of file DDGEMAngular.h.
DDGEMAngular::DDGEMAngular | ( | ) |
Definition at line 17 of file DDGEMAngular.cc.
{ edm::LogInfo("MuonGeom") << "DDGEMAngular test: Creating an instance"; }
DDGEMAngular::~DDGEMAngular | ( | ) | [virtual] |
Definition at line 21 of file DDGEMAngular.cc.
{}
void DDGEMAngular::execute | ( | DDCompactView & | cpv | ) |
Definition at line 54 of file DDGEMAngular.cc.
References childName, funct::cos(), dbl_to_string(), DDrot(), idNameSpace, cuy::ii, incrCopyNo, invert, n, dbtoconf::parent, phi, DDCompactView::position(), idealTransformation::rotation, rotns, rPos, funct::sin(), startAngle, startCopyNo, stepAngle, AlCaHLTBitMon_QueryRunRegistry::string, and zoffset.
{ double phi = startAngle; int copyNo = startCopyNo; for (int ii=0; ii<n; ii++) { double phideg = phi/CLHEP::deg; int iphi; if (phideg > 0) iphi = int(phideg+0.1); else iphi = int(phideg-0.1); if (iphi >= 360) iphi -= 360; phideg = iphi; DDRotation rotation; std::string rotstr("NULL"); rotstr = "RG"; if (invert > 0) rotstr += "I"; if (phideg >=0 && phideg < 10) rotstr += "00"; else if (phideg < 100) rotstr += "0"; rotstr += dbl_to_string(phideg); rotation = DDRotation(DDName(rotstr, rotns)); if (!rotation) { double thetax = 90.0; double phix = invert==0 ? (90.0+phideg) : (-90.0+phideg); double thetay = invert==0 ? 0.0 : 180.0; double phiz = phideg; edm::LogInfo("MuonGeom") << "DDGEMAngular test: Creating a new rotation " << DDName(rotstr, idNameSpace) << "\t " << thetax << ", " << phix << ", " << thetay << ", 0, " << thetax << ", " << phiz << std::endl; rotation = DDrot(DDName(rotstr, rotns), thetax*CLHEP::deg, phix*CLHEP::deg, thetay*CLHEP::deg, 0*CLHEP::deg, thetax*CLHEP::deg, phiz*CLHEP::deg); } DDTranslation tran(rPos*cos(phideg*CLHEP::deg), rPos*sin(phideg*CLHEP::deg), zoffset); DDName parentName = parent().name(); cpv.position(DDName(childName,idNameSpace), parentName, copyNo, tran, rotation); edm::LogInfo("MuonGeom") << "DDGEMAngular test: " << DDName(childName, idNameSpace) << " number " << copyNo << " positioned in " << parentName << " at " << tran << " with " << rotstr << " " << rotation << "\n"; phi += stepAngle; copyNo += incrCopyNo; } }
void DDGEMAngular::initialize | ( | const DDNumericArguments & | nArgs, |
const DDVectorArguments & | vArgs, | ||
const DDMapArguments & | mArgs, | ||
const DDStringArguments & | sArgs, | ||
const DDStringVectorArguments & | vsArgs | ||
) |
Definition at line 23 of file DDGEMAngular.cc.
References childName, idNameSpace, incrCopyNo, invert, n, DDCurrentNamespace::ns(), dbtoconf::parent, rotns, rPos, startAngle, startCopyNo, stepAngle, and zoffset.
{ startAngle = nArgs["startAngle"]; stepAngle = nArgs["stepAngle"]; invert = int (nArgs["invert"]); rPos = nArgs["rPosition"]; zoffset = nArgs["zoffset"]; n = int (nArgs["n"]); startCopyNo = int (nArgs["startCopyNo"]); incrCopyNo = int (nArgs["incrCopyNo"]); edm::LogInfo("MuonGeom") << "DDGEMAngular debug: Parameters for positioning-- " << n << " copies in steps of " << stepAngle/CLHEP::deg << " from " << startAngle/CLHEP::deg << " (inversion flag " << invert << ") \trPos " << rPos << " Zoffest " << zoffset << "\tStart and inremental " << "copy nos " << startCopyNo << ", " << incrCopyNo << std::endl; rotns = sArgs["RotNameSpace"]; idNameSpace = DDCurrentNamespace::ns(); childName = sArgs["ChildName"]; DDName parentName = parent().name(); edm::LogInfo("MuonGeom") << "DDGEMAngular debug: Parent " << parentName << "\tChild " << childName << "\tNameSpace " << idNameSpace << "\tRotation Namespace " << rotns << std::endl; }
std::string DDGEMAngular::childName [private] |
Definition at line 37 of file DDGEMAngular.h.
Referenced by execute(), and initialize().
std::string DDGEMAngular::idNameSpace [private] |
Definition at line 36 of file DDGEMAngular.h.
Referenced by execute(), and initialize().
int DDGEMAngular::incrCopyNo [private] |
Definition at line 33 of file DDGEMAngular.h.
Referenced by execute(), and initialize().
int DDGEMAngular::invert [private] |
Definition at line 28 of file DDGEMAngular.h.
Referenced by execute(), and initialize().
int DDGEMAngular::n [private] |
Definition at line 31 of file DDGEMAngular.h.
Referenced by execute(), and initialize().
std::string DDGEMAngular::rotns [private] |
Definition at line 35 of file DDGEMAngular.h.
Referenced by execute(), and initialize().
double DDGEMAngular::rPos [private] |
Definition at line 29 of file DDGEMAngular.h.
Referenced by execute(), and initialize().
double DDGEMAngular::startAngle [private] |
Definition at line 26 of file DDGEMAngular.h.
Referenced by execute(), and initialize().
int DDGEMAngular::startCopyNo [private] |
Definition at line 32 of file DDGEMAngular.h.
Referenced by execute(), and initialize().
double DDGEMAngular::stepAngle [private] |
Definition at line 27 of file DDGEMAngular.h.
Referenced by execute(), and initialize().
double DDGEMAngular::zoffset [private] |
Definition at line 30 of file DDGEMAngular.h.
Referenced by execute(), and initialize().