CMS 3D CMS Logo

DDTOBRadCableAlgo Class Reference

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

List of all members.

Public Member Functions

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

Private Attributes

std::vector< std::string > cableM
double cableT
std::vector< std::string > connM
double connT
double connW
double coolDeltaPhi1
double coolDeltaPhi2
std::string coolM1
std::string coolM2
std::vector< double > coolR1
std::vector< double > coolR2
double coolRin
double coolRout1
double coolRout2
double coolStartPhi1
double coolStartPhi2
double diskDz
std::string idNameSpace
std::vector< std::string > names
double rMax
std::vector< double > rodRin
std::vector< double > rodRout


Detailed Description

Definition at line 10 of file DDTOBRadCableAlgo.h.


Constructor & Destructor Documentation

DDTOBRadCableAlgo::DDTOBRadCableAlgo (  ) 

Definition at line 21 of file DDTOBRadCableAlgo.cc.

References LogDebug.

00021                                     :
00022   rodRin(0),rodRout(0),cableM(0),connM(0),
00023   coolR1(0),coolR2(0),coolRin(0),coolRout1(0),coolRout2(0),
00024   coolStartPhi1(0),coolDeltaPhi1(0),
00025   coolStartPhi2(0),coolDeltaPhi2(0),
00026   names(0) {
00027   LogDebug("TOBGeom") <<"DDTOBRadCableAlgo info: Creating an instance";
00028 }

DDTOBRadCableAlgo::~DDTOBRadCableAlgo (  )  [virtual]

Definition at line 30 of file DDTOBRadCableAlgo.cc.

00030 {}


Member Function Documentation

void DDTOBRadCableAlgo::execute (  ) 

Definition at line 101 of file DDTOBRadCableAlgo.cc.

References cableM, cableT, connM, connT, connW, coolDeltaPhi1, coolDeltaPhi2, coolM1, coolM2, coolR1, coolR2, coolRin, coolRout1, coolRout2, coolStartPhi1, coolStartPhi2, DDpos(), DDSplit(), diskDz, first, i, idNameSpace, int, LogDebug, name, names, dbtoconf::parent, DDSolidFactory::polycone(), r1, r2, r3, rMax, rodRin, rodRout, edm::second(), DDSolidFactory::torus(), and DDSolidFactory::tubs().

00101                                 {
00102   
00103   LogDebug("TOBGeom") << "==>> Constructing DDTOBRadCableAlgo...";
00104   DDName diskName = parent().name();
00105 
00106   // Loop over sub disks
00107   for (int i=0; i<(int)(names.size()); i++) {
00108 
00109     DDSolid solid;
00110     std::string  name;
00111     double  dz, rin, rout;
00112     
00113     // Cooling Manifolds
00114     name  = "TOBCoolingManifold" + names[i] + "a";
00115     dz    = coolRout1;
00116     DDName manifoldName_a(name, idNameSpace);
00117     solid = DDSolidFactory::torus(manifoldName_a,coolRin,coolRout1,coolR1[i],coolStartPhi1,coolDeltaPhi1);
00118     LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " 
00119                         << DDName(name, idNameSpace) << " Torus made of " 
00120                         << coolM1 << " from " << coolStartPhi1/deg << " to " << (coolStartPhi1+coolDeltaPhi1)/deg 
00121                         << " with Rin " << coolRin << " Rout " << coolRout1
00122                         << " R torus " << coolR1[i];
00123     DDName coolManifoldName_a(DDSplit(coolM1).first, DDSplit(coolM1).second);
00124     DDMaterial coolManifoldMatter_a(coolManifoldName_a);
00125     DDLogicalPart coolManifoldLogic_a(DDName(name, idNameSpace), coolManifoldMatter_a, solid);
00126     
00127     DDTranslation r1(0, 0, (dz-diskDz));
00128     DDpos(DDName(name,idNameSpace), diskName, i+1, r1, DDRotation());
00129     LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " 
00130                         << DDName(name,idNameSpace) << " number " << i+1 
00131                         << " positioned in " << diskName << " at " << r1
00132                         << " with no rotation";
00133     // Cooling Fluid (in Cooling Manifold)
00134     name  = "TOBCoolingManifoldFluid" + names[i] + "a";
00135     solid = DDSolidFactory::torus(DDName(name, idNameSpace),coolRin,coolRout2,coolR1[i],coolStartPhi2,coolDeltaPhi2);
00136     LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " 
00137                         << DDName(name, idNameSpace) << " Torus made of " 
00138                         << coolM2 << " from " << coolStartPhi2/deg << " to " << (coolStartPhi2+coolDeltaPhi2)/deg 
00139                         << " with Rin " << coolRin << " Rout " << coolRout2
00140                         << " R torus " << coolR1[i];
00141     DDName coolManifoldFluidName_a(DDSplit(coolM2).first, DDSplit(coolM2).second);
00142     DDMaterial coolManifoldFluidMatter_a(coolManifoldFluidName_a);
00143     DDLogicalPart coolManifoldFluidLogic_a(DDName(name, idNameSpace), coolManifoldFluidMatter_a, solid);
00144     DDpos(DDName(name,idNameSpace), manifoldName_a, i+1, DDTranslation(), DDRotation());
00145     LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " 
00146                         << DDName(name,idNameSpace) << " number " << i+1 
00147                         << " positioned in " << coolManifoldName_a
00148                         << " with no translation and no rotation";
00149     //
00150     name  = "TOBCoolingManifold" + names[i] + "r";
00151     dz    = coolRout1;
00152     DDName manifoldName_r(name, idNameSpace);
00153     solid = DDSolidFactory::torus(manifoldName_r,coolRin,coolRout1,coolR2[i],coolStartPhi1,coolDeltaPhi1);
00154     LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " 
00155                         << DDName(name, idNameSpace) << " Torus made of " 
00156                         << coolM1 << " from " << coolStartPhi1/deg << " to " << (coolStartPhi1+coolDeltaPhi1)/deg 
00157                         << " with Rin " << coolRin << " Rout " << coolRout1
00158                         << " R torus " << coolR2[i];
00159     DDName coolManifoldName_r(DDSplit(coolM1).first, DDSplit(coolM1).second);
00160     DDMaterial coolManifoldMatter_r(coolManifoldName_r);
00161     DDLogicalPart coolManifoldLogic_r(DDName(name, idNameSpace), coolManifoldMatter_r, solid);
00162     
00163     r1 = DDTranslation(0, 0, (dz-diskDz));
00164     DDpos(DDName(name,idNameSpace), diskName, i+1, r1, DDRotation());
00165     LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " 
00166                         << DDName(name,idNameSpace) << " number " << i+1 
00167                         << " positioned in " << diskName << " at " << r1
00168                         << " with no rotation";
00169     // Cooling Fluid (in Cooling Manifold)
00170     name  = "TOBCoolingManifoldFluid" + names[i] + "r";
00171     solid = DDSolidFactory::torus(DDName(name, idNameSpace),coolRin,coolRout2,coolR2[i],coolStartPhi2,coolDeltaPhi2);
00172     LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " 
00173                         << DDName(name, idNameSpace) << " Torus made of " 
00174                         << coolM2 << " from " << coolStartPhi2/deg << " to " << (coolStartPhi2+coolDeltaPhi2)/deg 
00175                         << " with Rin " << coolRin << " Rout " << coolRout2
00176                         << " R torus " << coolR2[i];
00177     DDName coolManifoldFluidName_r(DDSplit(coolM2).first, DDSplit(coolM2).second);
00178     DDMaterial coolManifoldFluidMatter_r(coolManifoldFluidName_r);
00179     DDLogicalPart coolManifoldFluidLogic_r(DDName(name, idNameSpace), coolManifoldFluidMatter_r, solid);
00180     DDpos(DDName(name,idNameSpace), manifoldName_r, i+1, DDTranslation(), DDRotation());
00181     LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " 
00182                         << DDName(name,idNameSpace) << " number " << i+1 
00183                         << " positioned in " << coolManifoldName_r
00184                         << " with no translation and no rotation";
00185     
00186     // Connectors
00187     name  = "TOBConn" + names[i];
00188     dz    = 0.5*connT;
00189     rin   = 0.5*(rodRin[i]+rodRout[i])-0.5*connW;
00190     rout  = 0.5*(rodRin[i]+rodRout[i])+0.5*connW;
00191     solid = DDSolidFactory::tubs(DDName(name, idNameSpace), dz, rin, 
00192                                  rout, 0, twopi);
00193     LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " 
00194                         << DDName(name, idNameSpace) << " Tubs made of " 
00195                         << connM[i] << " from 0 to " << twopi/deg
00196                         << " with Rin " << rin << " Rout " << rout 
00197                         << " ZHalf " << dz;
00198     DDName connName(DDSplit(connM[i]).first, DDSplit(connM[i]).second);
00199     DDMaterial connMatter(connName);
00200     DDLogicalPart connLogic(DDName(name, idNameSpace), connMatter, solid);
00201 
00202     DDTranslation r2(0, 0, (dz-diskDz));
00203     DDpos(DDName(name,idNameSpace), diskName, i+1, r2, DDRotation());
00204     LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " 
00205                         << DDName(name,idNameSpace) << " number " << i+1 
00206                         << " positioned in " << diskName << " at " << r2 
00207                         << " with no rotation";
00208 
00209     // Now the radial cable
00210     name  = "TOBRadServices" + names[i];
00211     rin   = 0.5*(rodRin[i]+rodRout[i]);
00212     rout = ( i+1 == (int)(names.size()) ? rMax : 0.5*(rodRin[i+1]+rodRout[i+1]) );
00213     std::vector<double> pgonZ;
00214     pgonZ.push_back(-0.5*cableT); 
00215     pgonZ.push_back(cableT*(rin/rMax-0.5));
00216     pgonZ.push_back(0.5*cableT);
00217     std::vector<double> pgonRmin;
00218     pgonRmin.push_back(rin); 
00219     pgonRmin.push_back(rin); 
00220     pgonRmin.push_back(rin); 
00221     std::vector<double> pgonRmax;
00222     pgonRmax.push_back(rout); 
00223     pgonRmax.push_back(rout); 
00224     pgonRmax.push_back(rout); 
00225     solid = DDSolidFactory::polycone(DDName(name, idNameSpace), 0, twopi,
00226                                      pgonZ, pgonRmin, pgonRmax);
00227     LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " 
00228                         << DDName(name, idNameSpace) <<" Polycone made of "
00229                         << cableM[i] << " from 0 to " << twopi/deg
00230                         << " and with " << pgonZ.size() << " sections";
00231     for (int ii = 0; ii < (int)(pgonZ.size()); ii++) 
00232       LogDebug("TOBGeom") << "\t[" << ii << "]\tZ = " << pgonZ[ii] 
00233                           << "\tRmin = " << pgonRmin[ii] << "\tRmax = " 
00234                           << pgonRmax[ii];
00235     DDName cableName(DDSplit(cableM[i]).first, DDSplit(cableM[i]).second);
00236     DDMaterial cableMatter(cableName);
00237     DDLogicalPart cableLogic(DDName(name, idNameSpace), cableMatter, solid);
00238 
00239     DDTranslation r3(0, 0, (diskDz-(i+0.5)*cableT));
00240     DDpos(DDName(name,idNameSpace), diskName, i+1, r3, DDRotation());
00241     LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " 
00242                         << DDName(name,idNameSpace) << " number " <<i+1
00243                         << " positioned in " << diskName << " at " << r3
00244                         << " with no rotation";
00245     
00246   }
00247 
00248   LogDebug("TOBGeom") << "<<== End of DDTOBRadCableAlgo construction ...";
00249 }

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

Definition at line 32 of file DDTOBRadCableAlgo.cc.

References cableM, cableT, connM, connT, connW, coolDeltaPhi1, coolDeltaPhi2, coolM1, coolM2, coolR1, coolR2, coolRin, coolRout1, coolRout2, coolStartPhi1, coolStartPhi2, diskDz, i, idNameSpace, int, LogDebug, names, DDCurrentNamespace::ns(), dbtoconf::parent, rMax, rodRin, and rodRout.

00036                                                                            {
00037 
00038   idNameSpace  = DDCurrentNamespace::ns();
00039   DDName parentName = parent().name();
00040   LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Parent " << parentName
00041                       << " NameSpace " << idNameSpace;
00042 
00043   diskDz       = nArgs["DiskDz"];
00044   rMax         = nArgs["RMax"];
00045   cableT       = nArgs["CableT"];     
00046   rodRin       = vArgs["RodRin"];    
00047   rodRout      = vArgs["RodRout"];
00048   cableM       = vsArgs["CableMaterial"];
00049   LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Disk Half width " << diskDz 
00050                       << "\tRMax " << rMax  << "\tCable Thickness " << cableT 
00051                       << "\tRadii of disk position and cable materials:";
00052   for (int i=0; i<(int)(rodRin.size()); i++)
00053     LogDebug("TOBGeom") << "\t[" << i << "]\tRin = " << rodRin[i] 
00054                         << "\tRout = " << rodRout[i] << "  " << cableM[i];
00055 
00056   connW        = nArgs["ConnW"];     
00057   connT        = nArgs["ConnT"];    
00058   connM        = vsArgs["ConnMaterial"];
00059   LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Connector Width = " 
00060                       << connW << "\tThickness = " << connT 
00061                       << "\tMaterials: ";
00062   for (int i=0; i<(int)(connM.size()); i++)
00063     LogDebug("TOBGeom") << "\tconnM[" << i << "] = " << connM[i];
00064 
00065   coolR1        = vArgs["CoolR1"];
00066   coolR2        = vArgs["CoolR2"];
00067   coolRin       = nArgs["CoolRin"];
00068   coolRout1     = nArgs["CoolRout1"];
00069   coolRout2     = nArgs["CoolRout2"];
00070   coolStartPhi1 = nArgs["CoolStartPhi1"];
00071   coolDeltaPhi1 = nArgs["CoolDeltaPhi1"];
00072   coolStartPhi2 = nArgs["CoolStartPhi2"];
00073   coolDeltaPhi2 = nArgs["CoolDeltaPhi2"];
00074   coolM1        = sArgs["CoolMaterial1"];
00075   coolM2        = sArgs["CoolMaterial2"];
00076   LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Cool Manifold Torus Rin = " << coolRin
00077                       << " Rout = " << coolRout1
00078                       << "\t Phi start = " << coolStartPhi1 << " Phi Range = " << coolDeltaPhi1
00079                       << "\t Material = " << coolM1
00080                       << "\t Radial positions:";
00081   for (int i=0; i<(int)(coolR1.size()); i++)
00082     LogDebug("TOBGeom") << "\t[" << i <<"]\tR = " << coolR1[i];
00083   for (int i=0; i<(int)(coolR2.size()); i++)
00084     LogDebug("TOBGeom") << "\t[" << i <<"]\tR = " << coolR2[i];
00085   LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Cooling Fluid Torus Rin = " << coolRin
00086                       << " Rout = " << coolRout2
00087                       << "\t Phi start = " << coolStartPhi2 << " Phi Range = " << coolDeltaPhi2
00088                       << "\t Material = " << coolM2
00089                       << "\t Radial positions:";
00090   for (int i=0; i<(int)(coolR1.size()); i++)
00091     LogDebug("TOBGeom") << "\t[" << i <<"]\tR = " << coolR1[i];
00092   for (int i=0; i<(int)(coolR2.size()); i++)
00093     LogDebug("TOBGeom") << "\t[" << i <<"]\tR = " << coolR2[i];
00094   
00095   names        = vsArgs["RingName"];      
00096   for (int i=0; i<(int)(names.size()); i++)
00097     LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: names[" << i
00098                         << "] = " << names[i];
00099 }


Member Data Documentation

std::vector<std::string> DDTOBRadCableAlgo::cableM [private]

Definition at line 33 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::cableT [private]

Definition at line 30 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::vector<std::string> DDTOBRadCableAlgo::connM [private]

Definition at line 36 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::connT [private]

Definition at line 35 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::connW [private]

Definition at line 34 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolDeltaPhi1 [private]

Definition at line 43 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolDeltaPhi2 [private]

Definition at line 45 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::string DDTOBRadCableAlgo::coolM1 [private]

Definition at line 46 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::string DDTOBRadCableAlgo::coolM2 [private]

Definition at line 47 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::vector<double> DDTOBRadCableAlgo::coolR1 [private]

Definition at line 37 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::vector<double> DDTOBRadCableAlgo::coolR2 [private]

Definition at line 38 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolRin [private]

Definition at line 39 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolRout1 [private]

Definition at line 40 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolRout2 [private]

Definition at line 41 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolStartPhi1 [private]

Definition at line 42 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::coolStartPhi2 [private]

Definition at line 44 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::diskDz [private]

Definition at line 28 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::string DDTOBRadCableAlgo::idNameSpace [private]

Definition at line 26 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::vector<std::string> DDTOBRadCableAlgo::names [private]

Definition at line 48 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

double DDTOBRadCableAlgo::rMax [private]

Definition at line 29 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::vector<double> DDTOBRadCableAlgo::rodRin [private]

Definition at line 31 of file DDTOBRadCableAlgo.h.

Referenced by execute(), and initialize().

std::vector<double> DDTOBRadCableAlgo::rodRout [private]

Definition at line 32 of file DDTOBRadCableAlgo.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