CMS 3D CMS Logo

DDHCalTBZposAlgo Class Reference

#include <Geometry/HcalAlgo/interface/DDHCalTBZposAlgo.h>

List of all members.

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


Detailed Description

Definition at line 10 of file DDHCalTBZposAlgo.h.


Constructor & Destructor Documentation

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]

Definition at line 23 of file DDHCalTBZposAlgo.cc.

00023 {}


Member Function Documentation

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 }


Member Data Documentation

std::string DDHCalTBZposAlgo::childName [private]

Definition at line 36 of file DDHCalTBZposAlgo.h.

Referenced by execute(), and initialize().

int DDHCalTBZposAlgo::copyNumber [private]

Definition at line 33 of file DDHCalTBZposAlgo.h.

Referenced by execute(), and initialize().

double DDHCalTBZposAlgo::dist [private]

Definition at line 31 of file DDHCalTBZposAlgo.h.

Referenced by execute(), and initialize().

double DDHCalTBZposAlgo::eta [private]

Definition at line 26 of file DDHCalTBZposAlgo.h.

Referenced by initialize().

std::string DDHCalTBZposAlgo::idNameSpace [private]

Definition at line 35 of file DDHCalTBZposAlgo.h.

Referenced by execute(), and initialize().

double DDHCalTBZposAlgo::shiftX [private]

Definition at line 29 of file DDHCalTBZposAlgo.h.

Referenced by execute(), and initialize().

double DDHCalTBZposAlgo::shiftY [private]

Definition at line 28 of file DDHCalTBZposAlgo.h.

Referenced by execute(), and initialize().

double DDHCalTBZposAlgo::theta [private]

Definition at line 27 of file DDHCalTBZposAlgo.h.

Referenced by execute(), and initialize().

double DDHCalTBZposAlgo::tilt [private]

Definition at line 32 of file DDHCalTBZposAlgo.h.

Referenced by execute(), and initialize().

double DDHCalTBZposAlgo::zoffset [private]

Definition at line 30 of file DDHCalTBZposAlgo.h.

Referenced by execute(), and initialize().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:58 2009 for CMSSW by  doxygen 1.5.4