#include <Geometry/TrackerCommonData/interface/DDTECPhiAltAlgo.h>
Public Member Functions | |
DDTECPhiAltAlgo () | |
void | execute () |
void | initialize (const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) |
virtual | ~DDTECPhiAltAlgo () |
Private Attributes | |
std::string | childName |
std::string | idNameSpace |
double | incrAngle |
int | incrCopyNo |
int | number |
double | radius |
double | startAngle |
int | startCopyNo |
double | zIn |
double | zOut |
Definition at line 10 of file DDTECPhiAltAlgo.h.
DDTECPhiAltAlgo::DDTECPhiAltAlgo | ( | ) |
Definition at line 19 of file DDTECPhiAltAlgo.cc.
References LogDebug.
00019 { 00020 LogDebug("TECGeom") << "DDTECPhiAltAlgo info: Creating an instance"; 00021 }
DDTECPhiAltAlgo::~DDTECPhiAltAlgo | ( | ) | [virtual] |
void DDTECPhiAltAlgo::execute | ( | ) |
Definition at line 56 of file DDTECPhiAltAlgo.cc.
References childName, funct::cos(), dbl_to_string(), DDpos(), DDrot(), DDSplit(), first, i, idNameSpace, incrAngle, incrCopyNo, LogDebug, number, dbtoconf::parent, radius, edm::second(), funct::sin(), startAngle, startCopyNo, theta, zIn, and zOut.
00056 { 00057 00058 if (number > 0) { 00059 double theta = 90.*deg; 00060 int copyNo = startCopyNo; 00061 00062 DDName mother = parent().name(); 00063 DDName child(DDSplit(childName).first, DDSplit(childName).second); 00064 for (int i=0; i<number; i++) { 00065 double phiz = startAngle + i*incrAngle; 00066 double phix = phiz + 90.*deg; 00067 double phideg = phiz/deg; 00068 00069 DDRotation rotation; 00070 std::string rotstr = DDSplit(childName).first+dbl_to_string(phideg*10.); 00071 rotation = DDRotation(DDName(rotstr, idNameSpace)); 00072 if (!rotation) { 00073 LogDebug("TECGeom") << "DDTECPhiAltAlgo test: Creating a new " 00074 << "rotation " << rotstr << "\t" << theta/deg 00075 << ", " << phix/deg << ", 0, 0, " << theta/deg 00076 << ", " << phiz/deg; 00077 rotation = DDrot(DDName(rotstr, idNameSpace), theta, phix, 0., 0., 00078 theta, phiz); 00079 } 00080 00081 double xpos = radius*cos(phiz); 00082 double ypos = radius*sin(phiz); 00083 double zpos; 00084 if (i%2 == 0) zpos = zIn; 00085 else zpos = zOut; 00086 DDTranslation tran(xpos, ypos, zpos); 00087 00088 DDpos (child, mother, copyNo, tran, rotation); 00089 LogDebug("TECGeom") << "DDTECPhiAltAlgo test: " << child <<" number " 00090 << copyNo << " positioned in " << mother <<" at " 00091 << tran << " with " << rotation; 00092 copyNo += incrCopyNo; 00093 } 00094 } 00095 }
void DDTECPhiAltAlgo::initialize | ( | const DDNumericArguments & | nArgs, | |
const DDVectorArguments & | vArgs, | |||
const DDMapArguments & | mArgs, | |||
const DDStringArguments & | sArgs, | |||
const DDStringVectorArguments & | vsArgs | |||
) |
Definition at line 25 of file DDTECPhiAltAlgo.cc.
References childName, idNameSpace, incrAngle, incrCopyNo, int, LogDebug, DDCurrentNamespace::ns(), number, dbtoconf::parent, radius, startAngle, startCopyNo, zIn, and zOut.
00029 { 00030 00031 startAngle = nArgs["StartAngle"]; 00032 incrAngle = nArgs["IncrAngle"]; 00033 radius = nArgs["Radius"]; 00034 zIn = nArgs["ZIn"]; 00035 zOut = nArgs["ZOut"]; 00036 number = int (nArgs["Number"]); 00037 startCopyNo= int (nArgs["StartCopyNo"]); 00038 incrCopyNo = int (nArgs["IncrCopyNo"]); 00039 00040 LogDebug("TECGeom") << "DDTECPhiAltAlgo debug: Parameters for " 00041 << "positioning--" << "\tStartAngle " 00042 << startAngle/deg << "\tIncrAngle " << incrAngle/deg 00043 << "\tRadius " << radius << "\tZ in/out " << zIn 00044 << ", " << zOut << "\tCopy Numbers " << number 00045 << " Start/Increment " << startCopyNo << ", " 00046 << incrCopyNo; 00047 00048 idNameSpace = DDCurrentNamespace::ns(); 00049 childName = sArgs["ChildName"]; 00050 DDName parentName = parent().name(); 00051 LogDebug("TECGeom") << "DDTECPhiAltAlgo debug: Parent " << parentName 00052 << "\tChild " << childName << " NameSpace " 00053 << idNameSpace; 00054 }
std::string DDTECPhiAltAlgo::childName [private] |
std::string DDTECPhiAltAlgo::idNameSpace [private] |
double DDTECPhiAltAlgo::incrAngle [private] |
int DDTECPhiAltAlgo::incrCopyNo [private] |
int DDTECPhiAltAlgo::number [private] |
double DDTECPhiAltAlgo::radius [private] |
double DDTECPhiAltAlgo::startAngle [private] |
int DDTECPhiAltAlgo::startCopyNo [private] |
double DDTECPhiAltAlgo::zIn [private] |
double DDTECPhiAltAlgo::zOut [private] |