#include <Geometry/HcalAlgo/interface/DDHCalTBZposAlgo.h>
Public Member Functions | |
DDHCalTBZposAlgo () | |
void | execute () |
void | initialize (const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) |
virtual | ~DDHCalTBZposAlgo () |
Private Attributes | |
std::string | childName |
int | copyNumber |
double | dist |
double | eta |
std::string | idNameSpace |
double | shiftX |
double | shiftY |
double | theta |
double | tilt |
double | zoffset |
Definition at line 10 of file DDHCalTBZposAlgo.h.
DDHCalTBZposAlgo::DDHCalTBZposAlgo | ( | ) |
Definition at line 19 of file DDHCalTBZposAlgo.cc.
References LogDebug.
00019 { 00020 LogDebug("HCalGeom") << "DDHCalTBZposAlgo test: Creating an instance"; 00021 }
DDHCalTBZposAlgo::~DDHCalTBZposAlgo | ( | ) | [virtual] |
void DDHCalTBZposAlgo::execute | ( | ) |
Definition at line 54 of file DDHCalTBZposAlgo.cc.
References childName, copyNumber, funct::cos(), dbl_to_string(), DDpos(), DDrot(), DDSplit(), dist, first, idNameSpace, int, LogDebug, dbtoconf::parent, rot, edm::second(), shiftX, shiftY, funct::sin(), funct::tan(), theta, tilt, x, y, z, and zoffset.
00054 { 00055 00056 DDName mother = parent().name(); 00057 DDName child(DDSplit(childName).first, DDSplit(childName).second); 00058 00059 double thetax = 90.*deg - theta; 00060 double z = zoffset + dist*tan(thetax); 00061 double x = shiftX - shiftY*sin(tilt); 00062 double y = shiftY*cos(tilt); 00063 DDTranslation tran(x,y,z); 00064 DDRotation rot; 00065 double tiltdeg = tilt/deg; 00066 int itilt = int(tiltdeg+0.1); 00067 if (itilt != 0) { 00068 std::string rotstr = "R"; 00069 if (tiltdeg < 100) rotstr = "R0"; 00070 rotstr = rotstr + dbl_to_string(tiltdeg); 00071 rot = DDRotation(DDName(rotstr, idNameSpace)); 00072 if (!rot) { 00073 LogDebug("HCalGeom") << "DDHCalAngular test: Creating a new rotation " 00074 << DDName(rotstr,idNameSpace) << "\t90, " << tiltdeg 00075 << ", 90, " << (tiltdeg+90) << ", 0, 0"; 00076 rot = DDrot(DDName(rotstr, idNameSpace), 90*deg, tilt, 00077 90*deg, (90*deg+tilt), 0*deg, 0*deg); 00078 } 00079 } 00080 DDpos (child, mother, copyNumber, tran, rot); 00081 LogDebug("HCalGeom") << "DDHCalTBZposAlgo test: " << child << " number " 00082 << copyNumber << " positioned in " << mother 00083 << " at " << tran << " with " << rot; 00084 }
void DDHCalTBZposAlgo::initialize | ( | const DDNumericArguments & | nArgs, | |
const DDVectorArguments & | vArgs, | |||
const DDMapArguments & | mArgs, | |||
const DDStringArguments & | sArgs, | |||
const DDStringVectorArguments & | vsArgs | |||
) |
Definition at line 25 of file DDHCalTBZposAlgo.cc.
References childName, copyNumber, dist, eta, funct::exp(), idNameSpace, int, LogDebug, DDCurrentNamespace::ns(), dbtoconf::parent, shiftX, shiftY, theta, tilt, and zoffset.
00029 { 00030 00031 eta = nArgs["Eta"]; 00032 theta = 2.0*atan(exp(-eta)); 00033 shiftX = nArgs["ShiftX"]; 00034 shiftY = nArgs["ShiftY"]; 00035 zoffset = nArgs["Zoffset"]; 00036 dist = nArgs["Distance"]; 00037 tilt = nArgs["TiltAngle"]; 00038 copyNumber = int (nArgs["Number"]); 00039 LogDebug("HCalGeom") << "DDHCalTBZposAlgo debug: Parameters for position" 00040 << "ing--" << " Eta " << eta << "\tTheta " << theta/deg 00041 << "\tShifts " << shiftX << ", " << shiftY 00042 << " along x, y axes; \tZoffest " << zoffset 00043 << "\tRadial Distance " << dist << "\tTilt angle " 00044 << tilt/deg << "\tcopyNumber " << copyNumber; 00045 00046 idNameSpace = DDCurrentNamespace::ns(); 00047 childName = sArgs["ChildName"]; 00048 DDName parentName = parent().name(); 00049 LogDebug("HCalGeom") << "DDHCalTBZposAlgo debug: Parent " << parentName 00050 << "\tChild " << childName << " NameSpace " 00051 << idNameSpace; 00052 }
std::string DDHCalTBZposAlgo::childName [private] |
int DDHCalTBZposAlgo::copyNumber [private] |
double DDHCalTBZposAlgo::dist [private] |
double DDHCalTBZposAlgo::eta [private] |
std::string DDHCalTBZposAlgo::idNameSpace [private] |
double DDHCalTBZposAlgo::shiftX [private] |
double DDHCalTBZposAlgo::shiftY [private] |
double DDHCalTBZposAlgo::theta [private] |
double DDHCalTBZposAlgo::tilt [private] |
double DDHCalTBZposAlgo::zoffset [private] |