CMS 3D CMS Logo

DDTECPhiAltAlgo Class Reference

#include <Geometry/TrackerCommonData/interface/DDTECPhiAltAlgo.h>

List of all members.

Public Member Functions

 DDTECPhiAltAlgo ()
void execute ()
void initialize (const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
virtual ~DDTECPhiAltAlgo ()

Private Attributes

std::string childName
std::string idNameSpace
double incrAngle
int incrCopyNo
int number
double radius
double startAngle
int startCopyNo
double zIn
double zOut


Detailed Description

Definition at line 10 of file DDTECPhiAltAlgo.h.


Constructor & Destructor Documentation

DDTECPhiAltAlgo::DDTECPhiAltAlgo (  ) 

Definition at line 19 of file DDTECPhiAltAlgo.cc.

References LogDebug.

00019                                  {
00020   LogDebug("TECGeom") << "DDTECPhiAltAlgo info: Creating an instance";
00021 }

DDTECPhiAltAlgo::~DDTECPhiAltAlgo (  )  [virtual]

Definition at line 23 of file DDTECPhiAltAlgo.cc.

00023 {}


Member Function Documentation

void DDTECPhiAltAlgo::execute (  ) 

Definition at line 56 of file DDTECPhiAltAlgo.cc.

References childName, funct::cos(), dbl_to_string(), DDpos(), DDrot(), DDSplit(), first, i, idNameSpace, incrAngle, incrCopyNo, LogDebug, number, dbtoconf::parent, radius, edm::second(), funct::sin(), startAngle, startCopyNo, theta, zIn, and zOut.

00056                               {
00057 
00058   if (number > 0) {
00059     double theta  = 90.*deg;
00060     int    copyNo = startCopyNo;
00061 
00062     DDName mother = parent().name();
00063     DDName child(DDSplit(childName).first, DDSplit(childName).second);
00064     for (int i=0; i<number; i++) {
00065       double phiz = startAngle + i*incrAngle;
00066       double phix = phiz + 90.*deg;
00067       double phideg = phiz/deg;
00068   
00069       DDRotation rotation;
00070       std::string rotstr = DDSplit(childName).first+dbl_to_string(phideg*10.);
00071       rotation = DDRotation(DDName(rotstr, idNameSpace));
00072       if (!rotation) {
00073         LogDebug("TECGeom") << "DDTECPhiAltAlgo test: Creating a new "
00074                             << "rotation " << rotstr << "\t" << theta/deg
00075                             << ", " << phix/deg << ", 0, 0, " << theta/deg
00076                             << ", " << phiz/deg;
00077         rotation = DDrot(DDName(rotstr, idNameSpace), theta, phix, 0., 0.,
00078                          theta, phiz);
00079       }
00080         
00081       double xpos = radius*cos(phiz);
00082       double ypos = radius*sin(phiz);
00083       double zpos;
00084       if (i%2 == 0) zpos = zIn;
00085       else          zpos = zOut;
00086       DDTranslation tran(xpos, ypos, zpos);
00087   
00088       DDpos (child, mother, copyNo, tran, rotation);
00089       LogDebug("TECGeom") << "DDTECPhiAltAlgo test: " << child <<" number "
00090                           << copyNo << " positioned in " << mother <<" at "
00091                           << tran << " with " << rotation;
00092       copyNo += incrCopyNo;
00093     }
00094   }
00095 }

void DDTECPhiAltAlgo::initialize ( const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments vsArgs 
)

Definition at line 25 of file DDTECPhiAltAlgo.cc.

References childName, idNameSpace, incrAngle, incrCopyNo, int, LogDebug, DDCurrentNamespace::ns(), number, dbtoconf::parent, radius, startAngle, startCopyNo, zIn, and zOut.

00029                                                                    {
00030 
00031   startAngle = nArgs["StartAngle"];
00032   incrAngle  = nArgs["IncrAngle"];
00033   radius     = nArgs["Radius"];
00034   zIn        = nArgs["ZIn"];
00035   zOut       = nArgs["ZOut"];
00036   number     = int (nArgs["Number"]);
00037   startCopyNo= int (nArgs["StartCopyNo"]);
00038   incrCopyNo = int (nArgs["IncrCopyNo"]);
00039 
00040   LogDebug("TECGeom") << "DDTECPhiAltAlgo debug: Parameters for "
00041                       << "positioning--" << "\tStartAngle " 
00042                       << startAngle/deg << "\tIncrAngle " << incrAngle/deg
00043                       << "\tRadius " << radius << "\tZ in/out " << zIn 
00044                       << ", " << zOut << "\tCopy Numbers " << number 
00045                       << " Start/Increment " << startCopyNo << ", " 
00046                       << incrCopyNo;
00047 
00048   idNameSpace = DDCurrentNamespace::ns();
00049   childName   = sArgs["ChildName"]; 
00050   DDName parentName = parent().name();
00051   LogDebug("TECGeom") << "DDTECPhiAltAlgo debug: Parent " << parentName 
00052                       << "\tChild " << childName << " NameSpace " 
00053                       << idNameSpace;
00054 }


Member Data Documentation

std::string DDTECPhiAltAlgo::childName [private]

Definition at line 37 of file DDTECPhiAltAlgo.h.

Referenced by execute(), and initialize().

std::string DDTECPhiAltAlgo::idNameSpace [private]

Definition at line 36 of file DDTECPhiAltAlgo.h.

Referenced by execute(), and initialize().

double DDTECPhiAltAlgo::incrAngle [private]

Definition at line 28 of file DDTECPhiAltAlgo.h.

Referenced by execute(), and initialize().

int DDTECPhiAltAlgo::incrCopyNo [private]

Definition at line 34 of file DDTECPhiAltAlgo.h.

Referenced by execute(), and initialize().

int DDTECPhiAltAlgo::number [private]

Definition at line 32 of file DDTECPhiAltAlgo.h.

Referenced by execute(), and initialize().

double DDTECPhiAltAlgo::radius [private]

Definition at line 29 of file DDTECPhiAltAlgo.h.

Referenced by execute(), and initialize().

double DDTECPhiAltAlgo::startAngle [private]

Definition at line 27 of file DDTECPhiAltAlgo.h.

Referenced by execute(), and initialize().

int DDTECPhiAltAlgo::startCopyNo [private]

Definition at line 33 of file DDTECPhiAltAlgo.h.

Referenced by execute(), and initialize().

double DDTECPhiAltAlgo::zIn [private]

Definition at line 30 of file DDTECPhiAltAlgo.h.

Referenced by execute(), and initialize().

double DDTECPhiAltAlgo::zOut [private]

Definition at line 31 of file DDTECPhiAltAlgo.h.

Referenced by execute(), and initialize().


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