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