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