#include <Geometry/TrackerCommonData/interface/DDTrackerZPosAlgo.h>
Public Member Functions | |
DDTrackerZPosAlgo () | |
void | execute () |
void | initialize (const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) |
virtual | ~DDTrackerZPosAlgo () |
Private Attributes | |
std::string | childName |
std::string | idNameSpace |
int | incrCopyNo |
std::vector< std::string > | rotMat |
int | startCopyNo |
std::vector< double > | zvec |
Definition at line 10 of file DDTrackerZPosAlgo.h.
DDTrackerZPosAlgo::DDTrackerZPosAlgo | ( | ) |
Definition at line 18 of file DDTrackerZPosAlgo.cc.
References LogDebug.
00018 { 00019 LogDebug("TrackerGeom") <<"DDTrackerZPosAlgo info: Creating an instance"; 00020 }
DDTrackerZPosAlgo::~DDTrackerZPosAlgo | ( | ) | [virtual] |
void DDTrackerZPosAlgo::execute | ( | ) |
Definition at line 49 of file DDTrackerZPosAlgo.cc.
References childName, edmNew::copy(), DDpos(), DDSplit(), first, i, incrCopyNo, int, LogDebug, dbtoconf::parent, rot, rotMat, edm::second(), startCopyNo, and zvec.
00049 { 00050 00051 int copy = startCopyNo; 00052 DDName mother = parent().name(); 00053 DDName child(DDSplit(childName).first, DDSplit(childName).second); 00054 00055 for (int i=0; i<(int)(zvec.size()); i++) { 00056 00057 DDTranslation tran(0, 0, zvec[i]); 00058 std::string rotstr = DDSplit(rotMat[i]).first; 00059 DDRotation rot; 00060 if (rotstr != "NULL") { 00061 std::string rotns = DDSplit(rotMat[i]).second; 00062 rot = DDRotation(DDName(rotstr, rotns)); 00063 } 00064 DDpos (child, mother, copy, tran, rot); 00065 LogDebug("TrackerGeom") << "DDTrackerZPosAlgo test: " << child <<" number " 00066 << copy << " positioned in " << mother << " at " 00067 << tran << " with " << rot; 00068 copy += incrCopyNo; 00069 } 00070 }
void DDTrackerZPosAlgo::initialize | ( | const DDNumericArguments & | nArgs, | |
const DDVectorArguments & | vArgs, | |||
const DDMapArguments & | mArgs, | |||
const DDStringArguments & | sArgs, | |||
const DDStringVectorArguments & | vsArgs | |||
) |
Definition at line 24 of file DDTrackerZPosAlgo.cc.
References childName, i, idNameSpace, incrCopyNo, int, LogDebug, DDCurrentNamespace::ns(), dbtoconf::parent, rotMat, startCopyNo, and zvec.
00028 { 00029 00030 startCopyNo = int(nArgs["StartCopyNo"]); 00031 incrCopyNo = int(nArgs["IncrCopyNo"]); 00032 zvec = vArgs["ZPositions"]; 00033 rotMat = vsArgs["Rotations"]; 00034 00035 idNameSpace = DDCurrentNamespace::ns(); 00036 childName = sArgs["ChildName"]; 00037 DDName parentName = parent().name(); 00038 LogDebug("TrackerGeom") << "DDTrackerZPosAlgo debug: Parent " << parentName 00039 << "\tChild " << childName << " NameSpace " 00040 << idNameSpace << "\tCopyNo (Start/Increment) " 00041 << startCopyNo << ", " << incrCopyNo << "\tNumber " 00042 << zvec.size(); 00043 for (int i = 0; i < (int)(zvec.size()); i++) { 00044 LogDebug("TrackerGeom") << "\t[" << i << "]\tZ = " << zvec[i] 00045 << ", Rot.Matrix = " << rotMat[i]; 00046 } 00047 }
std::string DDTrackerZPosAlgo::childName [private] |
std::string DDTrackerZPosAlgo::idNameSpace [private] |
int DDTrackerZPosAlgo::incrCopyNo [private] |
std::vector<std::string> DDTrackerZPosAlgo::rotMat [private] |
int DDTrackerZPosAlgo::startCopyNo [private] |
std::vector<double> DDTrackerZPosAlgo::zvec [private] |