CMS 3D CMS Logo

DDTrackerZPosAlgo Class Reference

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

List of all members.

Public Member Functions

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

Private Attributes

std::string childName
std::string idNameSpace
int incrCopyNo
std::vector< std::string > rotMat
int startCopyNo
std::vector< double > zvec


Detailed Description

Definition at line 10 of file DDTrackerZPosAlgo.h.


Constructor & Destructor Documentation

DDTrackerZPosAlgo::DDTrackerZPosAlgo (  ) 

Definition at line 18 of file DDTrackerZPosAlgo.cc.

References LogDebug.

00018                                      {
00019   LogDebug("TrackerGeom") <<"DDTrackerZPosAlgo info: Creating an instance";
00020 }

DDTrackerZPosAlgo::~DDTrackerZPosAlgo (  )  [virtual]

Definition at line 22 of file DDTrackerZPosAlgo.cc.

00022 {}


Member Function Documentation

void DDTrackerZPosAlgo::execute (  ) 

Definition at line 49 of file DDTrackerZPosAlgo.cc.

References childName, edmNew::copy(), DDpos(), DDSplit(), first, i, incrCopyNo, int, LogDebug, dbtoconf::parent, rot, rotMat, edm::second(), startCopyNo, and zvec.

00049                                 {
00050 
00051   int    copy   = startCopyNo;
00052   DDName mother = parent().name();
00053   DDName child(DDSplit(childName).first, DDSplit(childName).second);
00054 
00055   for (int i=0; i<(int)(zvec.size()); i++) {
00056         
00057     DDTranslation tran(0, 0, zvec[i]);
00058     std::string rotstr = DDSplit(rotMat[i]).first;
00059     DDRotation rot;
00060     if (rotstr != "NULL") {
00061       std::string rotns  = DDSplit(rotMat[i]).second;
00062       rot = DDRotation(DDName(rotstr, rotns));
00063     }
00064     DDpos (child, mother, copy, tran, rot);
00065     LogDebug("TrackerGeom") << "DDTrackerZPosAlgo test: " << child <<" number "
00066                             << copy << " positioned in " << mother << " at "
00067                             << tran << " with " << rot;
00068     copy += incrCopyNo;
00069   }
00070 }

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

Definition at line 24 of file DDTrackerZPosAlgo.cc.

References childName, i, idNameSpace, incrCopyNo, int, LogDebug, DDCurrentNamespace::ns(), dbtoconf::parent, rotMat, startCopyNo, and zvec.

00028                                                                            {
00029 
00030   startCopyNo = int(nArgs["StartCopyNo"]);
00031   incrCopyNo  = int(nArgs["IncrCopyNo"]);
00032   zvec        = vArgs["ZPositions"];
00033   rotMat      = vsArgs["Rotations"];
00034   
00035   idNameSpace = DDCurrentNamespace::ns();
00036   childName   = sArgs["ChildName"]; 
00037   DDName parentName = parent().name();
00038   LogDebug("TrackerGeom") << "DDTrackerZPosAlgo debug: Parent " << parentName 
00039                           << "\tChild " << childName << " NameSpace " 
00040                           << idNameSpace << "\tCopyNo (Start/Increment) " 
00041                           << startCopyNo << ", " << incrCopyNo << "\tNumber " 
00042                           << zvec.size();
00043   for (int i = 0; i < (int)(zvec.size()); i++) {
00044     LogDebug("TrackerGeom") << "\t[" << i << "]\tZ = " << zvec[i] 
00045                             << ", Rot.Matrix = " << rotMat[i];
00046   }
00047 }


Member Data Documentation

std::string DDTrackerZPosAlgo::childName [private]

Definition at line 30 of file DDTrackerZPosAlgo.h.

Referenced by execute(), and initialize().

std::string DDTrackerZPosAlgo::idNameSpace [private]

Definition at line 29 of file DDTrackerZPosAlgo.h.

Referenced by initialize().

int DDTrackerZPosAlgo::incrCopyNo [private]

Definition at line 32 of file DDTrackerZPosAlgo.h.

Referenced by execute(), and initialize().

std::vector<std::string> DDTrackerZPosAlgo::rotMat [private]

Definition at line 27 of file DDTrackerZPosAlgo.h.

Referenced by execute(), and initialize().

int DDTrackerZPosAlgo::startCopyNo [private]

Definition at line 31 of file DDTrackerZPosAlgo.h.

Referenced by execute(), and initialize().

std::vector<double> DDTrackerZPosAlgo::zvec [private]

Definition at line 26 of file DDTrackerZPosAlgo.h.

Referenced by execute(), and initialize().


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