#include <DDTECPhiAlgo.h>
Public Member Functions | |
DDTECPhiAlgo () | |
void | execute (DDCompactView &cpv) |
void | initialize (const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) |
virtual | ~DDTECPhiAlgo () |
Private Attributes | |
std::string | childName |
std::string | idNameSpace |
double | incrAngle |
int | incrCopyNo |
int | number |
double | startAngle |
int | startCopyNo |
double | zIn |
double | zOut |
Definition at line 10 of file DDTECPhiAlgo.h.
DDTECPhiAlgo::DDTECPhiAlgo | ( | ) |
Definition at line 18 of file DDTECPhiAlgo.cc.
References LogDebug.
{ LogDebug("TECGeom") << "DDTECPhiAlgo info: Creating an instance"; }
DDTECPhiAlgo::~DDTECPhiAlgo | ( | ) | [virtual] |
Definition at line 22 of file DDTECPhiAlgo.cc.
{}
void DDTECPhiAlgo::execute | ( | DDCompactView & | cpv | ) |
Definition at line 54 of file DDTECPhiAlgo.cc.
References childName, dbl_to_string(), DDrot(), DDSplit(), first, i, idNameSpace, incrAngle, incrCopyNo, LogDebug, number, dbtoconf::parent, DDCompactView::position(), edm::second(), startAngle, startCopyNo, theta(), zIn, and zOut.
{ if (number > 0) { double theta = 90.*CLHEP::deg; int copyNo = startCopyNo; DDName mother = parent().name(); DDName child(DDSplit(childName).first, DDSplit(childName).second); for (int i=0; i<number; i++) { double phix = startAngle + i*incrAngle; double phiy = phix + 90.*CLHEP::deg; double phideg = phix/CLHEP::deg; DDRotation rotation; std::string rotstr = DDSplit(childName).first+dbl_to_string(phideg*10.); rotation = DDRotation(DDName(rotstr, idNameSpace)); if (!rotation) { LogDebug("TECGeom") << "DDTECPhiAlgo test: Creating a new " << "rotation " << rotstr << "\t" << theta/CLHEP::deg << ", " << phix/CLHEP::deg << ", " << theta/CLHEP::deg << ", " << phiy/CLHEP::deg << ", 0, 0"; rotation = DDrot(DDName(rotstr, idNameSpace), theta, phix, theta, phiy, 0., 0.); } double zpos = zOut; if (i%2 == 0) zpos = zIn; DDTranslation tran(0., 0., zpos); cpv.position(child, mother, copyNo, tran, rotation); LogDebug("TECGeom") << "DDTECPhiAlgo test: " << child <<" number " << copyNo << " positioned in " << mother <<" at " << tran << " with " << rotation; copyNo += incrCopyNo; } } }
void DDTECPhiAlgo::initialize | ( | const DDNumericArguments & | nArgs, |
const DDVectorArguments & | vArgs, | ||
const DDMapArguments & | mArgs, | ||
const DDStringArguments & | sArgs, | ||
const DDStringVectorArguments & | vsArgs | ||
) |
Definition at line 24 of file DDTECPhiAlgo.cc.
References childName, idNameSpace, incrAngle, incrCopyNo, LogDebug, DDCurrentNamespace::ns(), number, dbtoconf::parent, startAngle, startCopyNo, zIn, and zOut.
{ startAngle = nArgs["StartAngle"]; incrAngle = nArgs["IncrAngle"]; zIn = nArgs["ZIn"]; zOut = nArgs["ZOut"]; number = int (nArgs["Number"]); startCopyNo= int (nArgs["StartCopyNo"]); incrCopyNo = int (nArgs["IncrCopyNo"]); LogDebug("TECGeom") << "DDTECPhiAlgo debug: Parameters for " << "positioning--" << "\tStartAngle " << startAngle/CLHEP::deg << "\tIncrAngle " << incrAngle/CLHEP::deg << "\tZ in/out " << zIn << ", " << zOut << "\tCopy Numbers " << number << " Start/Increment " << startCopyNo << ", " << incrCopyNo; idNameSpace = DDCurrentNamespace::ns(); childName = sArgs["ChildName"]; DDName parentName = parent().name(); LogDebug("TECGeom") << "DDTECPhiAlgo debug: Parent " << parentName << "\tChild " << childName << " NameSpace " << idNameSpace; }
std::string DDTECPhiAlgo::childName [private] |
Definition at line 36 of file DDTECPhiAlgo.h.
Referenced by execute(), and initialize().
std::string DDTECPhiAlgo::idNameSpace [private] |
Definition at line 35 of file DDTECPhiAlgo.h.
Referenced by execute(), and initialize().
double DDTECPhiAlgo::incrAngle [private] |
Definition at line 28 of file DDTECPhiAlgo.h.
Referenced by execute(), and initialize().
int DDTECPhiAlgo::incrCopyNo [private] |
Definition at line 33 of file DDTECPhiAlgo.h.
Referenced by execute(), and initialize().
int DDTECPhiAlgo::number [private] |
Definition at line 31 of file DDTECPhiAlgo.h.
Referenced by execute(), and initialize().
double DDTECPhiAlgo::startAngle [private] |
Definition at line 27 of file DDTECPhiAlgo.h.
Referenced by execute(), and initialize().
int DDTECPhiAlgo::startCopyNo [private] |
Definition at line 32 of file DDTECPhiAlgo.h.
Referenced by execute(), and initialize().
double DDTECPhiAlgo::zIn [private] |
Definition at line 29 of file DDTECPhiAlgo.h.
Referenced by execute(), and initialize().
double DDTECPhiAlgo::zOut [private] |
Definition at line 30 of file DDTECPhiAlgo.h.
Referenced by execute(), and initialize().