#include <DDTOBRadCableAlgo.h>
Public Member Functions | |
DDTOBRadCableAlgo () | |
void | execute (DDCompactView &cpv) |
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 |
Definition at line 10 of file DDTOBRadCableAlgo.h.
DDTOBRadCableAlgo::DDTOBRadCableAlgo | ( | ) |
Definition at line 20 of file DDTOBRadCableAlgo.cc.
References LogDebug.
: rodRin(0),rodRout(0),cableM(0),connM(0), coolR1(0),coolR2(0),coolRin(0),coolRout1(0),coolRout2(0), coolStartPhi1(0),coolDeltaPhi1(0), coolStartPhi2(0),coolDeltaPhi2(0), names(0) { LogDebug("TOBGeom") <<"DDTOBRadCableAlgo info: Creating an instance"; }
DDTOBRadCableAlgo::~DDTOBRadCableAlgo | ( | ) | [virtual] |
Definition at line 29 of file DDTOBRadCableAlgo.cc.
{}
void DDTOBRadCableAlgo::execute | ( | DDCompactView & | cpv | ) |
Definition at line 100 of file DDTOBRadCableAlgo.cc.
References cableM, cableT, connM, connT, connW, coolDeltaPhi1, coolDeltaPhi2, coolM1, coolM2, coolR1, coolR2, coolRin, coolRout1, coolRout2, coolStartPhi1, coolStartPhi2, DDSplit(), diskDz, first, i, idNameSpace, LogDebug, mergeVDriftHistosByStation::name, names, dbtoconf::parent, DDSolidFactory::polycone(), DDCompactView::position(), diffTwoXMLs::r1, diffTwoXMLs::r2, rMax, rodRin, rodRout, edm::second(), DDSolidFactory::torus(), and DDSolidFactory::tubs().
{ LogDebug("TOBGeom") << "==>> Constructing DDTOBRadCableAlgo..."; DDName diskName = parent().name(); // Loop over sub disks for (int i=0; i<(int)(names.size()); i++) { DDSolid solid; std::string name; double dz, rin, rout; // Cooling Manifolds name = "TOBCoolingManifold" + names[i] + "a"; dz = coolRout1; DDName manifoldName_a(name, idNameSpace); solid = DDSolidFactory::torus(manifoldName_a,coolRin,coolRout1,coolR1[i],coolStartPhi1,coolDeltaPhi1); LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " Torus made of " << coolM1 << " from " << coolStartPhi1/CLHEP::deg << " to " << (coolStartPhi1+coolDeltaPhi1)/CLHEP::deg << " with Rin " << coolRin << " Rout " << coolRout1 << " R torus " << coolR1[i]; DDName coolManifoldName_a(DDSplit(coolM1).first, DDSplit(coolM1).second); DDMaterial coolManifoldMatter_a(coolManifoldName_a); DDLogicalPart coolManifoldLogic_a(DDName(name, idNameSpace), coolManifoldMatter_a, solid); DDTranslation r1(0, 0, (dz-diskDz)); cpv.position(DDName(name,idNameSpace), diskName, i+1, r1, DDRotation()); LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name,idNameSpace) << " number " << i+1 << " positioned in " << diskName << " at " << r1 << " with no rotation"; // Cooling Fluid (in Cooling Manifold) name = "TOBCoolingManifoldFluid" + names[i] + "a"; solid = DDSolidFactory::torus(DDName(name, idNameSpace),coolRin,coolRout2, coolR1[i],coolStartPhi2,coolDeltaPhi2); LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " Torus made of " << coolM2 << " from " << coolStartPhi2/CLHEP::deg << " to " << (coolStartPhi2+coolDeltaPhi2)/CLHEP::deg << " with Rin " << coolRin << " Rout " << coolRout2 << " R torus " << coolR1[i]; DDName coolManifoldFluidName_a(DDSplit(coolM2).first, DDSplit(coolM2).second); DDMaterial coolManifoldFluidMatter_a(coolManifoldFluidName_a); DDLogicalPart coolManifoldFluidLogic_a(DDName(name, idNameSpace), coolManifoldFluidMatter_a, solid); cpv.position(DDName(name,idNameSpace), manifoldName_a, i+1, DDTranslation(), DDRotation()); LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name,idNameSpace) << " number " << i+1 << " positioned in " << coolManifoldName_a << " with no translation and no rotation"; // name = "TOBCoolingManifold" + names[i] + "r"; dz = coolRout1; DDName manifoldName_r(name, idNameSpace); solid = DDSolidFactory::torus(manifoldName_r,coolRin,coolRout1,coolR2[i], coolStartPhi1,coolDeltaPhi1); LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " Torus made of " << coolM1 << " from " << coolStartPhi1/CLHEP::deg << " to " << (coolStartPhi1+coolDeltaPhi1)/CLHEP::deg << " with Rin " << coolRin << " Rout " << coolRout1 << " R torus " << coolR2[i]; DDName coolManifoldName_r(DDSplit(coolM1).first, DDSplit(coolM1).second); DDMaterial coolManifoldMatter_r(coolManifoldName_r); DDLogicalPart coolManifoldLogic_r(DDName(name, idNameSpace), coolManifoldMatter_r, solid); r1 = DDTranslation(0, 0, (dz-diskDz)); cpv.position(DDName(name,idNameSpace), diskName, i+1, r1, DDRotation()); LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name,idNameSpace) << " number " << i+1 << " positioned in " << diskName << " at " << r1 << " with no rotation"; // Cooling Fluid (in Cooling Manifold) name = "TOBCoolingManifoldFluid" + names[i] + "r"; solid = DDSolidFactory::torus(DDName(name, idNameSpace),coolRin,coolRout2, coolR2[i],coolStartPhi2,coolDeltaPhi2); LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " Torus made of " << coolM2 << " from " << coolStartPhi2/CLHEP::deg << " to " << (coolStartPhi2+coolDeltaPhi2)/CLHEP::deg << " with Rin " << coolRin << " Rout " << coolRout2 << " R torus " << coolR2[i]; DDName coolManifoldFluidName_r(DDSplit(coolM2).first, DDSplit(coolM2).second); DDMaterial coolManifoldFluidMatter_r(coolManifoldFluidName_r); DDLogicalPart coolManifoldFluidLogic_r(DDName(name, idNameSpace), coolManifoldFluidMatter_r, solid); cpv.position(DDName(name,idNameSpace), manifoldName_r, i+1, DDTranslation(), DDRotation()); LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name,idNameSpace) << " number " << i+1 << " positioned in " << coolManifoldName_r << " with no translation and no rotation"; // Connectors name = "TOBConn" + names[i]; dz = 0.5*connT; rin = 0.5*(rodRin[i]+rodRout[i])-0.5*connW; rout = 0.5*(rodRin[i]+rodRout[i])+0.5*connW; solid = DDSolidFactory::tubs(DDName(name, idNameSpace), dz, rin, rout, 0, CLHEP::twopi); LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) << " Tubs made of " << connM[i] << " from 0 to " << CLHEP::twopi/CLHEP::deg << " with Rin " << rin << " Rout " << rout << " ZHalf " << dz; DDName connName(DDSplit(connM[i]).first, DDSplit(connM[i]).second); DDMaterial connMatter(connName); DDLogicalPart connLogic(DDName(name, idNameSpace), connMatter, solid); DDTranslation r2(0, 0, (dz-diskDz)); cpv.position(DDName(name,idNameSpace), diskName, i+1, r2, DDRotation()); LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name,idNameSpace) << " number " << i+1 << " positioned in " << diskName << " at " << r2 << " with no rotation"; // Now the radial cable name = "TOBRadServices" + names[i]; rin = 0.5*(rodRin[i]+rodRout[i]); rout = ( i+1 == (int)(names.size()) ? rMax : 0.5*(rodRin[i+1]+rodRout[i+1])); std::vector<double> pgonZ; pgonZ.push_back(-0.5*cableT); pgonZ.push_back(cableT*(rin/rMax-0.5)); pgonZ.push_back(0.5*cableT); std::vector<double> pgonRmin; pgonRmin.push_back(rin); pgonRmin.push_back(rin); pgonRmin.push_back(rin); std::vector<double> pgonRmax; pgonRmax.push_back(rout); pgonRmax.push_back(rout); pgonRmax.push_back(rout); solid = DDSolidFactory::polycone(DDName(name,idNameSpace), 0, CLHEP::twopi, pgonZ, pgonRmin, pgonRmax); LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name, idNameSpace) <<" Polycone made of " << cableM[i] << " from 0 to " << CLHEP::twopi/CLHEP::deg << " and with " << pgonZ.size() << " sections"; for (int ii = 0; ii < (int)(pgonZ.size()); ii++) LogDebug("TOBGeom") << "\t[" << ii << "]\tZ = " << pgonZ[ii] << "\tRmin = " << pgonRmin[ii] << "\tRmax = " << pgonRmax[ii]; DDName cableName(DDSplit(cableM[i]).first, DDSplit(cableM[i]).second); DDMaterial cableMatter(cableName); DDLogicalPart cableLogic(DDName(name, idNameSpace), cableMatter, solid); DDTranslation r3(0, 0, (diskDz-(i+0.5)*cableT)); cpv.position(DDName(name,idNameSpace), diskName, i+1, r3, DDRotation()); LogDebug("TOBGeom") << "DDTOBRadCableAlgo test: " << DDName(name,idNameSpace) << " number " <<i+1 << " positioned in " << diskName << " at " << r3 << " with no rotation"; } LogDebug("TOBGeom") << "<<== End of DDTOBRadCableAlgo construction ..."; }
void DDTOBRadCableAlgo::initialize | ( | const DDNumericArguments & | nArgs, |
const DDVectorArguments & | vArgs, | ||
const DDMapArguments & | mArgs, | ||
const DDStringArguments & | sArgs, | ||
const DDStringVectorArguments & | vsArgs | ||
) |
Definition at line 31 of file DDTOBRadCableAlgo.cc.
References cableM, cableT, connM, connT, connW, coolDeltaPhi1, coolDeltaPhi2, coolM1, coolM2, coolR1, coolR2, coolRin, coolRout1, coolRout2, coolStartPhi1, coolStartPhi2, diskDz, i, idNameSpace, LogDebug, names, DDCurrentNamespace::ns(), dbtoconf::parent, rMax, rodRin, and rodRout.
{ idNameSpace = DDCurrentNamespace::ns(); DDName parentName = parent().name(); LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Parent " << parentName << " NameSpace " << idNameSpace; diskDz = nArgs["DiskDz"]; rMax = nArgs["RMax"]; cableT = nArgs["CableT"]; rodRin = vArgs["RodRin"]; rodRout = vArgs["RodRout"]; cableM = vsArgs["CableMaterial"]; LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Disk Half width " << diskDz << "\tRMax " << rMax << "\tCable Thickness " << cableT << "\tRadii of disk position and cable materials:"; for (int i=0; i<(int)(rodRin.size()); i++) LogDebug("TOBGeom") << "\t[" << i << "]\tRin = " << rodRin[i] << "\tRout = " << rodRout[i] << " " << cableM[i]; connW = nArgs["ConnW"]; connT = nArgs["ConnT"]; connM = vsArgs["ConnMaterial"]; LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Connector Width = " << connW << "\tThickness = " << connT << "\tMaterials: "; for (int i=0; i<(int)(connM.size()); i++) LogDebug("TOBGeom") << "\tconnM[" << i << "] = " << connM[i]; coolR1 = vArgs["CoolR1"]; coolR2 = vArgs["CoolR2"]; coolRin = nArgs["CoolRin"]; coolRout1 = nArgs["CoolRout1"]; coolRout2 = nArgs["CoolRout2"]; coolStartPhi1 = nArgs["CoolStartPhi1"]; coolDeltaPhi1 = nArgs["CoolDeltaPhi1"]; coolStartPhi2 = nArgs["CoolStartPhi2"]; coolDeltaPhi2 = nArgs["CoolDeltaPhi2"]; coolM1 = sArgs["CoolMaterial1"]; coolM2 = sArgs["CoolMaterial2"]; LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Cool Manifold Torus Rin = " << coolRin << " Rout = " << coolRout1 << "\t Phi start = " << coolStartPhi1 << " Phi Range = " << coolDeltaPhi1 << "\t Material = " << coolM1 << "\t Radial positions:"; for (int i=0; i<(int)(coolR1.size()); i++) LogDebug("TOBGeom") << "\t[" << i <<"]\tR = " << coolR1[i]; for (int i=0; i<(int)(coolR2.size()); i++) LogDebug("TOBGeom") << "\t[" << i <<"]\tR = " << coolR2[i]; LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: Cooling Fluid Torus Rin = " << coolRin << " Rout = " << coolRout2 << "\t Phi start = " << coolStartPhi2 << " Phi Range = " << coolDeltaPhi2 << "\t Material = " << coolM2 << "\t Radial positions:"; for (int i=0; i<(int)(coolR1.size()); i++) LogDebug("TOBGeom") << "\t[" << i <<"]\tR = " << coolR1[i]; for (int i=0; i<(int)(coolR2.size()); i++) LogDebug("TOBGeom") << "\t[" << i <<"]\tR = " << coolR2[i]; names = vsArgs["RingName"]; for (int i=0; i<(int)(names.size()); i++) LogDebug("TOBGeom") << "DDTOBRadCableAlgo debug: names[" << i << "] = " << names[i]; }
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().