CMS 3D CMS Logo

DDTIBRadCableAlgo_MTCC Class Reference

#include <Geometry/MTCCTrackerCommonData/interface/DDTIBRadCableAlgo_MTCC.h>

List of all members.

Public Member Functions

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

Private Attributes

std::vector< std::string > cableMat
double cableT
double cylinderT
double deltaR
std::string idNameSpace
std::vector< double > layers
std::vector< double > layRin
double rMax
double rMin
std::vector< std::string > strucMat
double supportDR
std::string supportMat
double supportT


Detailed Description

Definition at line 10 of file DDTIBRadCableAlgo_MTCC.h.


Constructor & Destructor Documentation

DDTIBRadCableAlgo_MTCC::DDTIBRadCableAlgo_MTCC (  ) 

Definition at line 22 of file DDTIBRadCableAlgo_MTCC.cc.

References LogDebug.

00022                                               : layRin(0),cableMat(0),strucMat(0), layers(0) {
00023   LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC info: Creating an instance";
00024 }

DDTIBRadCableAlgo_MTCC::~DDTIBRadCableAlgo_MTCC (  )  [virtual]

Definition at line 26 of file DDTIBRadCableAlgo_MTCC.cc.

00026 {}


Member Function Documentation

void DDTIBRadCableAlgo_MTCC::execute (  ) 

Definition at line 80 of file DDTIBRadCableAlgo_MTCC.cc.

References cableMat, cableT, cylinderT, dbl_to_string(), DDpos(), DDSplit(), deltaR, empty, first, i, idNameSpace, j, layers, layRin, LogDebug, name, dbtoconf::parent, DDSolidFactory::polycone(), r1, r2, r3, rMax, rMin, edm::second(), strucMat, supportDR, supportMat, supportT, and DDSolidFactory::tubs().

00080                                      {
00081   
00082   LogDebug("TIBGeom") << "==>> Constructing DDTIBRadCableAlgo_MTCC...";
00083   DDName diskName = parent().name();
00084 
00085   DDSolid solid;
00086   std::string  name;
00087   double  rin, rout;
00088 
00089   // Loop over sub disks
00090   DDName suppName(DDSplit(supportMat).first, DDSplit(supportMat).second);
00091   DDMaterial suppMatter(suppName);
00092   double diskDz = 0.5 * (supportT + cableT*layRin.size());
00093   double dz     = 0.5*supportT;
00094 
00095   for (unsigned int i=0; i<layRin.size(); i++) {
00096 
00097     // fill only layers in layers list
00098     bool empty=true;
00099     for(unsigned int j=0; j<layers.size(); j++) {
00100       if(i+1==(unsigned int)layers[j]) {
00101         empty=false;
00102       }
00103     }
00104     
00105     if(!empty) {
00106       //Support disks
00107       name  = "TIBSupportSideDisk" + dbl_to_string(i);
00108       rin   = layRin[i]+0.5*(deltaR-cylinderT)-supportDR;
00109       rout  = layRin[i]+0.5*(deltaR+cylinderT)+supportDR;
00110       solid = DDSolidFactory::tubs(DDName(name, idNameSpace), dz, rin, 
00111                                    rout, 0, twopi);
00112       LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: " 
00113                           << DDName(name, idNameSpace) << " Tubs made of "
00114                           << supportMat << " from 0 to " << twopi/deg 
00115                           << " with Rin " << rin << " Rout " << rout 
00116                           << " ZHalf " << dz;
00117       DDLogicalPart suppLogic(DDName(name, idNameSpace), suppMatter, solid);
00118       
00119       DDTranslation r1(0, 0, (dz-diskDz));
00120       DDpos(DDName(name,idNameSpace), diskName, i+1, r1, DDRotation());
00121       LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: " 
00122                           << DDName(name,idNameSpace) << " number " << i+1 
00123                           << " positioned in " << diskName << " at " << r1 
00124                           << " with no rotation";
00125       
00126       //Open Structure
00127       name  = "TIBOpenZone" + dbl_to_string(i);
00128       rout  = rin;
00129       if (i == 0) rin = rMin;
00130       else        rin = layRin[i-1]+0.5*(deltaR+cylinderT)+supportDR;
00131       solid = DDSolidFactory::tubs(DDName(name, idNameSpace), dz, rin, 
00132                                    rout, 0, twopi);
00133       LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: "
00134                           << DDName(name, idNameSpace) << " Tubs made of " 
00135                           << strucMat[i] << " from 0 to " << twopi/deg 
00136                           << " with Rin " << rin << " Rout " << rout 
00137                           << " ZHalf " << dz;
00138       DDName strucName(DDSplit(strucMat[i]).first, DDSplit(strucMat[i]).second);
00139       DDMaterial strucMatter(strucName);
00140       DDLogicalPart strucLogic(DDName(name, idNameSpace), strucMatter, solid);
00141       
00142       DDTranslation r2(0, 0, (dz-diskDz));
00143       DDpos(DDName(name,idNameSpace), diskName, i+1, r2, DDRotation());
00144       LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: " 
00145                           << DDName(name,idNameSpace) << " number " << i+1 
00146                           << " positioned in " << diskName 
00147                           << " at " << r2 << " with no rotation";
00148       
00149       //Now the radial cable
00150       name  = "TIBRadCable" + dbl_to_string(i);
00151       double rv = layRin[i]+0.5*deltaR;
00152       std::vector<double> pgonZ;
00153       pgonZ.push_back(-0.5*cableT); 
00154       pgonZ.push_back(cableT*(rv/rMax-0.5));
00155       pgonZ.push_back(0.5*cableT);
00156       std::vector<double> pgonRmin;
00157       pgonRmin.push_back(rv); 
00158       pgonRmin.push_back(rv); 
00159       pgonRmin.push_back(rv); 
00160       std::vector<double> pgonRmax;
00161       pgonRmax.push_back(rMax); 
00162       pgonRmax.push_back(rMax); 
00163       pgonRmax.push_back(rv); 
00164       solid = DDSolidFactory::polycone(DDName(name, idNameSpace), 0, twopi,
00165                                        pgonZ, pgonRmin, pgonRmax);
00166       LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: "
00167                           << DDName(name, idNameSpace) 
00168                           << " Polycone made of " << cableMat[i]
00169                           << " from 0 to " << twopi/deg << " and with " 
00170                           << pgonZ.size() << " sections";
00171       for (unsigned int ii = 0; ii <pgonZ.size(); ii++) 
00172         LogDebug("TIBGeom") << "\t" << "\tZ = " << pgonZ[ii] << "\tRmin = " 
00173                             << pgonRmin[ii] << "\tRmax = " << pgonRmax[ii];
00174       DDName cableName(DDSplit(cableMat[i]).first, DDSplit(cableMat[i]).second);
00175       LogDebug("TIBGeom") << " material cableName " << i << " " << cableName;
00176       DDMaterial cableMatter(cableName);
00177       DDLogicalPart cableLogic(DDName(name, idNameSpace), cableMatter, solid);
00178       
00179       DDTranslation r3(0, 0, (diskDz-(i+0.5)*cableT));
00180       DDpos(DDName(name,idNameSpace), diskName, i+1, r3, DDRotation());
00181       LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: " 
00182                           << DDName(name,idNameSpace) << " number " << i+1
00183                           << " positioned in " << diskName << " at "
00184                           << r3 << " with no rotation";
00185       
00186     }
00187     //
00188     
00189     // fill only layers in layers list
00190     empty=true;
00191     for(unsigned int j=0; j<layers.size(); j++) {
00192       if(i+1==(unsigned int)layers[j]) {
00193         empty=false;
00194       }
00195     }
00196     
00197     if(!empty) {
00198       //Now the last open zone
00199       unsigned int i = layRin.size();
00200       rin  = layRin[i-1]+0.5*(deltaR+cylinderT)+supportDR;
00201       rout = rMax;
00202       name  = "TIBOpenZone" + dbl_to_string(i);
00203       solid = DDSolidFactory::tubs(DDName(name, idNameSpace), dz, rin, 
00204                                    rout, 0, twopi);
00205       LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: "
00206                           << DDName(name, idNameSpace) << " Tubs made of "
00207                           << strucMat[i] << " from 0 to " << twopi/deg
00208                           << " with Rin " << rin << " Rout " << rout 
00209                           << " ZHalf " << dz;
00210       DDName strucName(DDSplit(strucMat[i]).first, DDSplit(strucMat[i]).second);
00211       DDMaterial strucMatter(strucName);
00212       DDLogicalPart strucLogic(DDName(name, idNameSpace), strucMatter, solid);
00213       
00214       DDTranslation r2(0, 0, (dz-diskDz));
00215       DDpos(DDName(name,idNameSpace), diskName, i+1, r2, DDRotation());
00216       LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC test: "
00217                           << DDName(name,idNameSpace) << " number " << i+1 
00218                           << " positioned in " << diskName 
00219                           << " at " << r2 << " with no rotation";
00220     } 
00221   }
00222   LogDebug("TIBGeom") << "<<== End of DDTIBRadCableAlgo_MTCC construction ...";
00223  
00224 }

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

Definition at line 28 of file DDTIBRadCableAlgo_MTCC.cc.

References cableMat, cableT, cylinderT, deltaR, i, idNameSpace, layers, layRin, LogDebug, DDCurrentNamespace::ns(), dbtoconf::parent, rMax, rMin, strucMat, supportDR, supportMat, and supportT.

00032                                                                                 {
00033 
00034   idNameSpace  = DDCurrentNamespace::ns();
00035   unsigned int i;
00036   DDName parentName = parent().name();
00037   LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC debug: Parent " << parentName 
00038                       << " NameSpace " << idNameSpace;
00039 
00040   rMin         = nArgs["RMin"];
00041   rMax         = nArgs["RMax"];
00042   layRin       = vArgs["RadiusLo"];    
00043   deltaR       = nArgs["DeltaR"];
00044   LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC debug: Disk Rmin " << rMin
00045                       << "\tRMax " << rMax  << "\tSeparation of layers " 
00046                       << deltaR <<" with " << layRin.size() <<" layers at R =";
00047   for (i = 0; i < layRin.size(); i++)
00048     LogDebug("TIBGeom") << " " << i << " : " << layRin[i];
00049   
00050   cylinderT    = nArgs["CylinderThick"];
00051   supportT     = nArgs["SupportThick"];
00052   supportDR    = nArgs["SupportDR"];
00053   supportMat   = sArgs["SupportMaterial"];
00054   LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC debug: SupportCylinder "
00055                       << "Thickness " << cylinderT << "\tSupportDisk "
00056                       << "Thickness " << supportT << "\tExtra width along R " 
00057                       << supportDR << "\tMaterial: " << supportMat;
00058 
00059   cableT       = nArgs["CableThick"];     
00060   cableMat     = vsArgs["CableMaterial"];
00061   LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC debug: Cable Thickness "
00062                       << cableT  << " with materials: ";
00063   for (i = 0; i < cableMat.size(); i++)
00064     LogDebug("TIBGeom") << " " << i << " : " << cableMat[i];
00065 
00066   strucMat     = vsArgs["StructureMaterial"];
00067   LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC debug: " << strucMat.size()
00068                       << " materials for open structure:";
00069   for (i=0; i<strucMat.size(); i++)
00070     LogDebug("TIBGeom") << " " << i << " : " << strucMat[i];
00071   
00072   layers       = vArgs["Layers"];
00073   LogDebug("TIBGeom") << "DDTIBRadCableAlgo_MTCC debug: " << layers.size()
00074                       << " layers:";
00075   for (i=0; i<layers.size(); i++)
00076     LogDebug("TIBGeom") << " " << i << " : " << layers[i];
00077   
00078 }


Member Data Documentation

std::vector<std::string> DDTIBRadCableAlgo_MTCC::cableMat [private]

Definition at line 37 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

double DDTIBRadCableAlgo_MTCC::cableT [private]

Definition at line 36 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

double DDTIBRadCableAlgo_MTCC::cylinderT [private]

Definition at line 32 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

double DDTIBRadCableAlgo_MTCC::deltaR [private]

Definition at line 31 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

std::string DDTIBRadCableAlgo_MTCC::idNameSpace [private]

Definition at line 26 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

std::vector<double> DDTIBRadCableAlgo_MTCC::layers [private]

Definition at line 39 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

std::vector<double> DDTIBRadCableAlgo_MTCC::layRin [private]

Definition at line 30 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

double DDTIBRadCableAlgo_MTCC::rMax [private]

Definition at line 29 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

double DDTIBRadCableAlgo_MTCC::rMin [private]

Definition at line 28 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

std::vector<std::string> DDTIBRadCableAlgo_MTCC::strucMat [private]

Definition at line 38 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

double DDTIBRadCableAlgo_MTCC::supportDR [private]

Definition at line 34 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

std::string DDTIBRadCableAlgo_MTCC::supportMat [private]

Definition at line 35 of file DDTIBRadCableAlgo_MTCC.h.

Referenced by execute(), and initialize().

double DDTIBRadCableAlgo_MTCC::supportT [private]

Definition at line 33 of file DDTIBRadCableAlgo_MTCC.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