#include <Geometry/TrackerCommonData/interface/DDTrackerLinearXY.h>
Public Member Functions | |
DDTrackerLinearXY () | |
void | execute () |
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 18 of file DDTrackerLinearXY.cc.
References LogDebug.
00018 { 00019 LogDebug("TrackerGeom") <<"DDTrackerLinearXY info: Creating an instance"; 00020 }
DDTrackerLinearXY::~DDTrackerLinearXY | ( | ) | [virtual] |
void DDTrackerLinearXY::execute | ( | ) |
Definition at line 47 of file DDTrackerLinearXY.cc.
References centre, childName, edmNew::copy(), DDpos(), DDSplit(), deltaX, deltaY, first, i, j, LogDebug, numberX, numberY, dbtoconf::parent, rot, and edm::second().
00047 { 00048 00049 DDName mother = parent().name(); 00050 DDName child(DDSplit(childName).first, DDSplit(childName).second); 00051 DDRotation rot; 00052 double xoff = centre[0] - (numberX-1)*deltaX/2.; 00053 double yoff = centre[1] - (numberY-1)*deltaY/2.; 00054 int copy = 0; 00055 00056 for (int i=0; i<numberX; i++) { 00057 for (int j=0; j<numberY; j++) { 00058 00059 DDTranslation tran(xoff+i*deltaX,yoff+j*deltaY,centre[2]); 00060 copy++; 00061 DDpos (child, mother, copy, tran, rot); 00062 LogDebug("TrackerGeom") << "DDTrackerLinearXY test: " << child 00063 << " number " << copy << " positioned in " 00064 << mother << " at " << tran << " with " << rot; 00065 } 00066 } 00067 }
void DDTrackerLinearXY::initialize | ( | const DDNumericArguments & | nArgs, | |
const DDVectorArguments & | vArgs, | |||
const DDMapArguments & | mArgs, | |||
const DDStringArguments & | sArgs, | |||
const DDStringVectorArguments & | vsArgs | |||
) |
Definition at line 24 of file DDTrackerLinearXY.cc.
References centre, childName, deltaX, deltaY, idNameSpace, int, LogDebug, DDCurrentNamespace::ns(), numberX, numberY, and dbtoconf::parent.
00028 { 00029 00030 numberX = int(nArgs["NumberX"]); 00031 deltaX = nArgs["DeltaX"]; 00032 numberY = int(nArgs["NumberY"]); 00033 deltaY = nArgs["DeltaY"]; 00034 centre = vArgs["Center"]; 00035 00036 idNameSpace = DDCurrentNamespace::ns(); 00037 childName = sArgs["ChildName"]; 00038 DDName parentName = parent().name(); 00039 LogDebug("TrackerGeom") << "DDTrackerLinearXY debug: Parent " << parentName 00040 << "\tChild " << childName << " NameSpace " 00041 << idNameSpace << "\tNumber along X/Y " << numberX 00042 << "/" << numberY << "\tDelta along X/Y " << deltaX 00043 << "/" << deltaY << "\tCentre " << centre[0] << ", " 00044 << centre[1] << ", " << centre[2]; 00045 }
std::vector<double> DDTrackerLinearXY::centre [private] |
std::string DDTrackerLinearXY::childName [private] |
double DDTrackerLinearXY::deltaX [private] |
double DDTrackerLinearXY::deltaY [private] |
std::string DDTrackerLinearXY::idNameSpace [private] |
int DDTrackerLinearXY::numberX [private] |
int DDTrackerLinearXY::numberY [private] |