#include <DDTrackerLinearXY.h>
Public Member Functions | |
DDTrackerLinearXY () | |
void | execute (DDCompactView &cpv) |
void | initialize (const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) |
virtual | ~DDTrackerLinearXY () |
Private Attributes | |
std::vector< double > | centre |
std::string | childName |
double | deltaX |
double | deltaY |
std::string | idNameSpace |
int | numberX |
int | numberY |
Definition at line 10 of file DDTrackerLinearXY.h.
DDTrackerLinearXY::DDTrackerLinearXY | ( | ) |
Definition at line 17 of file DDTrackerLinearXY.cc.
References LogDebug.
{ LogDebug("TrackerGeom") <<"DDTrackerLinearXY info: Creating an instance"; }
DDTrackerLinearXY::~DDTrackerLinearXY | ( | ) | [virtual] |
Definition at line 21 of file DDTrackerLinearXY.cc.
{}
void DDTrackerLinearXY::execute | ( | DDCompactView & | cpv | ) |
Definition at line 46 of file DDTrackerLinearXY.cc.
References centre, childName, filterCSVwithJSON::copy, DDSplit(), deltaX, deltaY, first, i, j, LogDebug, numberX, numberY, dbtoconf::parent, DDCompactView::position(), makeMuonMisalignmentScenario::rot, and edm::second().
{ DDName mother = parent().name(); DDName child(DDSplit(childName).first, DDSplit(childName).second); DDRotation rot; double xoff = centre[0] - (numberX-1)*deltaX/2.; double yoff = centre[1] - (numberY-1)*deltaY/2.; int copy = 0; for (int i=0; i<numberX; i++) { for (int j=0; j<numberY; j++) { DDTranslation tran(xoff+i*deltaX,yoff+j*deltaY,centre[2]); copy++; cpv.position(child, mother, copy, tran, rot); LogDebug("TrackerGeom") << "DDTrackerLinearXY test: " << child << " number " << copy << " positioned in " << mother << " at " << tran << " with " << rot; } } }
void DDTrackerLinearXY::initialize | ( | const DDNumericArguments & | nArgs, |
const DDVectorArguments & | vArgs, | ||
const DDMapArguments & | mArgs, | ||
const DDStringArguments & | sArgs, | ||
const DDStringVectorArguments & | vsArgs | ||
) |
Definition at line 23 of file DDTrackerLinearXY.cc.
References centre, childName, deltaX, deltaY, idNameSpace, LogDebug, DDCurrentNamespace::ns(), numberX, numberY, and dbtoconf::parent.
{ numberX = int(nArgs["NumberX"]); deltaX = nArgs["DeltaX"]; numberY = int(nArgs["NumberY"]); deltaY = nArgs["DeltaY"]; centre = vArgs["Center"]; idNameSpace = DDCurrentNamespace::ns(); childName = sArgs["ChildName"]; DDName parentName = parent().name(); LogDebug("TrackerGeom") << "DDTrackerLinearXY debug: Parent " << parentName << "\tChild " << childName << " NameSpace " << idNameSpace << "\tNumber along X/Y " << numberX << "/" << numberY << "\tDelta along X/Y " << deltaX << "/" << deltaY << "\tCentre " << centre[0] << ", " << centre[1] << ", " << centre[2]; }
std::vector<double> DDTrackerLinearXY::centre [private] |
Definition at line 32 of file DDTrackerLinearXY.h.
Referenced by execute(), and initialize().
std::string DDTrackerLinearXY::childName [private] |
Definition at line 27 of file DDTrackerLinearXY.h.
Referenced by execute(), and initialize().
double DDTrackerLinearXY::deltaX [private] |
Definition at line 29 of file DDTrackerLinearXY.h.
Referenced by execute(), and initialize().
double DDTrackerLinearXY::deltaY [private] |
Definition at line 31 of file DDTrackerLinearXY.h.
Referenced by execute(), and initialize().
std::string DDTrackerLinearXY::idNameSpace [private] |
Definition at line 26 of file DDTrackerLinearXY.h.
Referenced by initialize().
int DDTrackerLinearXY::numberX [private] |
Definition at line 28 of file DDTrackerLinearXY.h.
Referenced by execute(), and initialize().
int DDTrackerLinearXY::numberY [private] |
Definition at line 30 of file DDTrackerLinearXY.h.
Referenced by execute(), and initialize().