CMS 3D CMS Logo

DDTECCoolAlgo Class Reference

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

List of all members.

Public Member Functions

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

Private Attributes

std::vector< std::string > coolInsert
std::string idNameSpace
std::vector< double > phiPosition
double rPosition
int startCopyNo


Detailed Description

Definition at line 10 of file DDTECCoolAlgo.h.


Constructor & Destructor Documentation

DDTECCoolAlgo::DDTECCoolAlgo (  ) 

Definition at line 22 of file DDTECCoolAlgo.cc.

References LogDebug.

00022                             : phiPosition(0),coolInsert(0) {
00023   LogDebug("TECGeom") << "DDTECCoolAlgo info: Creating an instance";
00024 }

DDTECCoolAlgo::~DDTECCoolAlgo (  )  [virtual]

Definition at line 26 of file DDTECCoolAlgo.cc.

00026 {}


Member Function Documentation

void DDTECCoolAlgo::execute (  ) 

Definition at line 53 of file DDTECCoolAlgo.cc.

References coolInsert, funct::cos(), DDpos(), DDSplit(), first, i, int, LogDebug, dbtoconf::parent, phiPosition, rPosition, edm::second(), funct::sin(), and startCopyNo.

00053                             {
00054   LogDebug("TECGeom") << "==>> Constructing DDTECCoolAlgo...";
00055   int copyNo  = startCopyNo;
00056   // loop over the inserts to be placed
00057   for (int i = 0; i < (int)(coolInsert.size()); i++) {
00058     // get objects
00059     DDName child  = DDName(DDSplit(coolInsert.at(i)).first, 
00060                            DDSplit(coolInsert.at(i)).second);
00061     DDName mother = parent().name();
00062     // get positions
00063     double xpos = rPosition*cos(phiPosition.at(i));
00064     double ypos = -rPosition*sin(phiPosition.at(i));
00065     // place inserts
00066     DDTranslation tran(xpos, ypos, 0.0);
00067     DDRotation rotation;
00068     DDpos (child, mother, copyNo, tran, rotation);
00069     LogDebug("TECGeom") << "DDTECCoolAlgo test " << child << "["  
00070                         << copyNo << "] positioned in " << mother 
00071                         << " at " << tran  << " with " << rotation 
00072                         << " phi " << phiPosition.at(i)/deg <<" r " << rPosition;
00073     copyNo++;
00074   }
00075   LogDebug("TECGeom") << "<<== End of DDTECCoolAlgo construction ...";
00076 }

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

Definition at line 28 of file DDTECCoolAlgo.cc.

References coolInsert, i, idNameSpace, int, LogDebug, DDCurrentNamespace::ns(), dbtoconf::parent, phiPosition, rPosition, and startCopyNo.

00032                                                                        {
00033 
00034   idNameSpace    = DDCurrentNamespace::ns();
00035   startCopyNo    = int(nArgs["StartCopyNo"]);
00036 
00037   DDName parentName = parent().name(); 
00038   rPosition       = nArgs["RPosition"];
00039   LogDebug("TECGeom") << "DDTECCoolAlgo debug: Parent " << parentName 
00040                       <<" NameSpace " << idNameSpace << " at radial Position " 
00041                       << rPosition ;
00042   phiPosition    = vArgs["PhiPosition"]; 
00043   coolInsert     = vsArgs["CoolInsert"];
00044   if(phiPosition.size() == coolInsert.size()){
00045     for (int i=0; i<(int)(phiPosition.size()); i++) LogDebug("TECGeom") << "DDTECCoolAlgo debug: Insert[" << i << "]: "
00046                                                                       << coolInsert.at(i) << " at Phi " << phiPosition.at(i)/deg;
00047   }else{
00048     LogDebug("TECGeom") << "ERROR: Number of inserts does not match the numer of PhiPositions!";
00049   }
00050   LogDebug("TECGeom") << " Done creating instance of DDTECCoolAlgo ";
00051 }


Member Data Documentation

std::vector<std::string> DDTECCoolAlgo::coolInsert [private]

Definition at line 29 of file DDTECCoolAlgo.h.

Referenced by execute(), and initialize().

std::string DDTECCoolAlgo::idNameSpace [private]

Definition at line 25 of file DDTECCoolAlgo.h.

Referenced by initialize().

std::vector<double> DDTECCoolAlgo::phiPosition [private]

Definition at line 28 of file DDTECCoolAlgo.h.

Referenced by execute(), and initialize().

double DDTECCoolAlgo::rPosition [private]

Definition at line 27 of file DDTECCoolAlgo.h.

Referenced by execute(), and initialize().

int DDTECCoolAlgo::startCopyNo [private]

Definition at line 26 of file DDTECCoolAlgo.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