#include <Geometry/HcalAlgo/interface/DDHCalTestBeamAlgo.h>
Public Member Functions | |
DDHCalTestBeamAlgo () | |
void | execute () |
void | initialize (const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) |
virtual | ~DDHCalTestBeamAlgo () |
Private Attributes | |
std::string | childName |
int | copyNumber |
double | dist |
double | distance |
double | distanceZ |
double | dz |
double | eta |
std::string | idNameSpace |
double | phi |
double | theta |
Definition at line 10 of file DDHCalTestBeamAlgo.h.
DDHCalTestBeamAlgo::DDHCalTestBeamAlgo | ( | ) |
Definition at line 17 of file DDHCalTestBeamAlgo.cc.
References LogDebug.
00017 { 00018 LogDebug("HCalGeom") << "DDHCalTestBeamAlgo test: Creating an instance"; 00019 }
DDHCalTestBeamAlgo::~DDHCalTestBeamAlgo | ( | ) | [virtual] |
void DDHCalTestBeamAlgo::execute | ( | ) |
Definition at line 51 of file DDHCalTestBeamAlgo.cc.
References funct::abs(), childName, copyNumber, funct::cos(), DDpos(), DDrot(), dist, dz, e, eta, idNameSpace, LogDebug, dbtoconf::parent, phi, r, funct::sin(), and theta.
00051 { 00052 00053 double thetax = 90.*deg + theta; 00054 double sthx = sin(thetax); 00055 if (abs(sthx)>1.e-12) sthx = 1./sthx; 00056 else sthx = 1.; 00057 double phix = atan2(sthx*cos(theta)*sin(phi),sthx*cos(theta)*cos(phi)); 00058 double thetay = 90.*deg; 00059 double phiy = 90.*deg + phi; 00060 double thetaz = theta; 00061 double phiz = phi; 00062 00063 DDRotation rotation; 00064 string rotstr = childName; 00065 LogDebug("HCalGeom") << "DDHCalTestBeamAlgo test: Creating a new rotation " 00066 << rotstr << "\t" << thetax/deg << "," << phix/deg 00067 << "," << thetay/deg << "," << phiy/deg << "," 00068 << thetaz/deg <<"," << phiz/deg; 00069 rotation = DDrot(DDName(rotstr, idNameSpace), thetax, phix, thetay, phiy, 00070 thetaz, phiz); 00071 00072 double r = dist*sin(theta); 00073 double xpos = r*cos(phi); 00074 double ypos = r*sin(phi); 00075 double zpos = dist*cos(theta); 00076 DDTranslation tran(xpos, ypos, zpos); 00077 00078 DDName parentName = parent().name(); 00079 DDpos (DDName(childName,idNameSpace), parentName,copyNumber, tran,rotation); 00080 LogDebug("HCalGeom") << "DDHCalTestBeamAlgo test: " 00081 << DDName(childName, idNameSpace) << " number " 00082 << copyNumber << " positioned in " << parentName 00083 << " at " << tran << " with " << rotation; 00084 00085 xpos = (dist-dz)*sin(theta)*cos(phi); 00086 ypos = (dist-dz)*sin(theta)*sin(phi); 00087 zpos = (dist-dz)*cos(theta); 00088 00089 edm::LogInfo("HCalGeom") << "DDHCalTestBeamAlgo: Suggested Beam position " 00090 << "(" << xpos << ", " << ypos << ", " << zpos 00091 << ") and (dist, eta, phi) = (" << (dist-dz) << ", " 00092 << eta << ", " << phi << ")"; 00093 }
void DDHCalTestBeamAlgo::initialize | ( | const DDNumericArguments & | nArgs, | |
const DDVectorArguments & | vArgs, | |||
const DDMapArguments & | mArgs, | |||
const DDStringArguments & | sArgs, | |||
const DDStringVectorArguments & | vsArgs | |||
) |
Definition at line 23 of file DDHCalTestBeamAlgo.cc.
References childName, copyNumber, dist, distance, distanceZ, dz, eta, funct::exp(), idNameSpace, int, LogDebug, DDCurrentNamespace::ns(), dbtoconf::parent, phi, funct::sin(), and theta.
00027 { 00028 00029 eta = nArgs["Eta"]; 00030 theta = 2.0*atan(exp(-eta)); 00031 phi = nArgs["Phi"]; 00032 distance = nArgs["Dist"]; 00033 distanceZ = nArgs["DistZ"]; 00034 dz = nArgs["Dz"]; 00035 copyNumber = int (nArgs["Number"]); 00036 dist = (distance+distanceZ/sin(theta)); 00037 LogDebug("HCalGeom") << "DDHCalTestBeamAlgo debug: Parameters for position" 00038 << "ing--" << " Eta " << eta << "\tPhi " << phi/deg 00039 << "\tTheta " << theta/deg << "\tDistance " << distance 00040 << "/" << distanceZ << "/" << dist << "\tDz " << dz 00041 << "\tcopyNumber " << copyNumber; 00042 00043 idNameSpace = DDCurrentNamespace::ns(); 00044 childName = sArgs["ChildName"]; 00045 DDName parentName = parent().name(); 00046 LogDebug("HCalGeom") << "DDHCalTestBeamAlgo debug: Parent " << parentName 00047 << "\tChild " << childName << " NameSpace " 00048 << idNameSpace; 00049 }
std::string DDHCalTestBeamAlgo::childName [private] |
int DDHCalTestBeamAlgo::copyNumber [private] |
double DDHCalTestBeamAlgo::dist [private] |
double DDHCalTestBeamAlgo::distance [private] |
double DDHCalTestBeamAlgo::distanceZ [private] |
double DDHCalTestBeamAlgo::dz [private] |
double DDHCalTestBeamAlgo::eta [private] |
std::string DDHCalTestBeamAlgo::idNameSpace [private] |
double DDHCalTestBeamAlgo::phi [private] |
double DDHCalTestBeamAlgo::theta [private] |