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