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