#include <DDTrackerXYZPosAlgo.h>
Public Member Functions | |
DDTrackerXYZPosAlgo () | |
void | execute (DDCompactView &cpv) |
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 17 of file DDTrackerXYZPosAlgo.cc.
References LogDebug.
{ LogDebug("TrackerGeom") <<"DDTrackerXYZPosAlgo info: Creating an instance"; }
DDTrackerXYZPosAlgo::~DDTrackerXYZPosAlgo | ( | ) | [virtual] |
Definition at line 21 of file DDTrackerXYZPosAlgo.cc.
{}
void DDTrackerXYZPosAlgo::execute | ( | DDCompactView & | cpv | ) |
Definition at line 52 of file DDTrackerXYZPosAlgo.cc.
References childName, filterCSVwithJSON::copy, DDSplit(), first, i, incrCopyNo, LogDebug, dbtoconf::parent, DDCompactView::position(), makeMuonMisalignmentScenario::rot, rotMat, edm::second(), startCopyNo, xvec, yvec, and zvec.
{ int copy = startCopyNo; DDName mother = parent().name(); DDName child(DDSplit(childName).first, DDSplit(childName).second); for (int i=0; i<(int)(zvec.size()); i++) { DDTranslation tran(xvec[i], yvec[i], zvec[i]); std::string rotstr = DDSplit(rotMat[i]).first; DDRotation rot; if (rotstr != "NULL") { std::string rotns = DDSplit(rotMat[i]).second; rot = DDRotation(DDName(rotstr, rotns)); } cpv.position(child, mother, copy, tran, rot); LogDebug("TrackerGeom") << "DDTrackerXYZPosAlgo test: " << child <<" number " << copy << " positioned in " << mother << " at " << tran << " with " << rot; copy += incrCopyNo; } }
void DDTrackerXYZPosAlgo::initialize | ( | const DDNumericArguments & | nArgs, |
const DDVectorArguments & | vArgs, | ||
const DDMapArguments & | mArgs, | ||
const DDStringArguments & | sArgs, | ||
const DDStringVectorArguments & | vsArgs | ||
) |
Definition at line 23 of file DDTrackerXYZPosAlgo.cc.
References childName, i, idNameSpace, incrCopyNo, LogDebug, DDCurrentNamespace::ns(), dbtoconf::parent, rotMat, startCopyNo, xvec, yvec, and zvec.
{ startCopyNo = int(nArgs["StartCopyNo"]); incrCopyNo = int(nArgs["IncrCopyNo"]); xvec = vArgs["XPositions"]; yvec = vArgs["YPositions"]; zvec = vArgs["ZPositions"]; rotMat = vsArgs["Rotations"]; idNameSpace = DDCurrentNamespace::ns(); childName = sArgs["ChildName"]; DDName parentName = parent().name(); LogDebug("TrackerGeom") << "DDTrackerXYZPosAlgo debug: Parent " << parentName << "\tChild " << childName << " NameSpace " << idNameSpace << "\tCopyNo (Start/Increment) " << startCopyNo << ", " << incrCopyNo << "\tNumber " << xvec.size() << ", " << yvec.size() << ", " << zvec.size(); for (int i = 0; i < (int)(zvec.size()); i++) { LogDebug("TrackerGeom") << "\t[" << i << "]\tX = " << xvec[i] << "\t[" << i << "]\tY = " << yvec[i] << "\t[" << i << "]\tZ = " << zvec[i] << ", Rot.Matrix = " << rotMat[i]; } }
std::string DDTrackerXYZPosAlgo::childName [private] |
Definition at line 32 of file DDTrackerXYZPosAlgo.h.
Referenced by execute(), and initialize().
std::string DDTrackerXYZPosAlgo::idNameSpace [private] |
Definition at line 31 of file DDTrackerXYZPosAlgo.h.
Referenced by initialize().
int DDTrackerXYZPosAlgo::incrCopyNo [private] |
Definition at line 34 of file DDTrackerXYZPosAlgo.h.
Referenced by execute(), and initialize().
std::vector<std::string> DDTrackerXYZPosAlgo::rotMat [private] |
Definition at line 29 of file DDTrackerXYZPosAlgo.h.
Referenced by execute(), and initialize().
int DDTrackerXYZPosAlgo::startCopyNo [private] |
Definition at line 33 of file DDTrackerXYZPosAlgo.h.
Referenced by execute(), and initialize().
std::vector<double> DDTrackerXYZPosAlgo::xvec [private] |
Definition at line 26 of file DDTrackerXYZPosAlgo.h.
Referenced by execute(), and initialize().
std::vector<double> DDTrackerXYZPosAlgo::yvec [private] |
Definition at line 27 of file DDTrackerXYZPosAlgo.h.
Referenced by execute(), and initialize().
std::vector<double> DDTrackerXYZPosAlgo::zvec [private] |
Definition at line 28 of file DDTrackerXYZPosAlgo.h.
Referenced by execute(), and initialize().