14 double diskDz =
args.dble(
"DiskDz");
16 double cableT =
args.dble(
"CableT");
17 vector<double> rodRin =
args.vecDble(
"RodRin");
18 vector<double> rodRout =
args.vecDble(
"RodRout");
19 vector<string> cableM =
args.vecStr(
"CableMaterial");
20 double connW =
args.dble(
"ConnW");
21 double connT =
args.dble(
"ConnT");
22 vector<string> connM =
args.vecStr(
"ConnMaterial");
23 vector<double> coolR1 =
args.vecDble(
"CoolR1");
24 vector<double> coolR2 =
args.vecDble(
"CoolR2");
25 double coolRin =
args.dble(
"CoolRin");
26 double coolRout1 =
args.dble(
"CoolRout1");
27 double coolRout2 =
args.dble(
"CoolRout2");
28 double coolStartPhi1 =
args.dble(
"CoolStartPhi1");
29 double coolDeltaPhi1 =
args.dble(
"CoolDeltaPhi1");
30 double coolStartPhi2 =
args.dble(
"CoolStartPhi2");
31 double coolDeltaPhi2 =
args.dble(
"CoolDeltaPhi2");
32 string coolM1 =
args.str(
"CoolMaterial1");
33 string coolM2 =
args.str(
"CoolMaterial2");
34 vector<string>
names =
args.vecStr(
"RingName");
36 string parentName =
args.parentName();
37 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: Parent " << parentName <<
" NameSpace " << ns.name();
38 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: Disk Half width " << diskDz <<
"\tRMax " <<
rMax
39 <<
"\tCable Thickness " << cableT <<
"\tRadii of disk position and cable materials:";
40 for (
int i = 0;
i < (
int)(rodRin.size());
i++)
41 LogDebug(
"TOBGeom") <<
"\t[" <<
i <<
"]\tRin = " << rodRin[
i] <<
"\tRout = " << rodRout[
i] <<
" " << cableM[
i];
42 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: Connector Width = " << connW <<
"\tThickness = " << connT
44 for (
int i = 0;
i < (
int)(connM.size());
i++)
45 LogDebug(
"TOBGeom") <<
"\tconnM[" <<
i <<
"] = " << connM[
i];
46 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: Cool Manifold Torus Rin = " << coolRin <<
" Rout = " << coolRout1
47 <<
"\t Phi start = " << coolStartPhi1 <<
" Phi Range = " << coolDeltaPhi1
48 <<
"\t Material = " << coolM1 <<
"\t Radial positions:";
49 for (
int i = 0;
i < (
int)(coolR1.size());
i++)
50 LogDebug(
"TOBGeom") <<
"\t[" <<
i <<
"]\tR = " << coolR1[
i];
51 for (
int i = 0;
i < (
int)(coolR2.size());
i++)
52 LogDebug(
"TOBGeom") <<
"\t[" <<
i <<
"]\tR = " << coolR2[
i];
53 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: Cooling Fluid Torus Rin = " << coolRin <<
" Rout = " << coolRout2
54 <<
"\t Phi start = " << coolStartPhi2 <<
" Phi Range = " << coolDeltaPhi2
55 <<
"\t Material = " << coolM2 <<
"\t Radial positions:";
56 for (
int i = 0;
i < (
int)(coolR1.size());
i++)
57 LogDebug(
"TOBGeom") <<
"\t[" <<
i <<
"]\tR = " << coolR1[
i];
58 for (
int i = 0;
i < (
int)(coolR2.size());
i++)
59 LogDebug(
"TOBGeom") <<
"\t[" <<
i <<
"]\tR = " << coolR2[
i];
61 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: names[" <<
i <<
"] = " <<
names[
i];
63 Volume disk = ns.volume(parentName);
73 solid = ns.addSolid(
name, Torus(coolR1[
i], coolRin, coolRout1, coolStartPhi1, coolDeltaPhi1));
75 <<
convertRadToDeg((coolStartPhi1 + coolDeltaPhi1)) <<
" with Rin " << coolRin <<
" Rout "
76 << coolRout1 <<
" R torus " << coolR1[
i];
77 Volume coolManifoldLogic_a = ns.addVolume(
Volume(
name, solid, ns.material(coolM1)));
79 disk.placeVolume(coolManifoldLogic_a,
i + 1,
r1);
80 LogDebug(
"TOBGeom") <<
name <<
" number " <<
i + 1 <<
" positioned in " << disk.name() <<
" at " <<
r1
81 <<
" with no rotation";
84 name =
"TOBCoolingManifoldFluid" +
names[
i] +
"a";
85 solid = ns.addSolid(
name, Torus(coolR1[
i], coolRin, coolRout2, coolStartPhi2, coolDeltaPhi2));
87 <<
convertRadToDeg((coolStartPhi2 + coolDeltaPhi2)) <<
" with Rin " << coolRin <<
" Rout "
88 << coolRout2 <<
" R torus " << coolR1[
i];
89 Volume coolManifoldFluidLogic_a = ns.addVolume(
Volume(
name, solid, ns.material(coolM2)));
90 coolManifoldLogic_a.placeVolume(coolManifoldFluidLogic_a,
i + 1);
91 LogDebug(
"TOBGeom") <<
name <<
" number " <<
i + 1 <<
" positioned in " << coolM2
92 <<
" with no translation and no rotation";
96 solid = ns.addSolid(
name, Torus(coolR2[
i], coolRin, coolRout1, coolStartPhi1, coolDeltaPhi1));
98 <<
convertRadToDeg((coolStartPhi1 + coolDeltaPhi1)) <<
" with Rin " << coolRin <<
" Rout "
99 << coolRout1 <<
" R torus " << coolR2[
i];
100 Volume coolManifoldLogic_r = ns.addVolume(
Volume(
name, solid, ns.material(coolM1)));
102 disk.placeVolume(coolManifoldLogic_r,
i + 1,
r1);
103 LogDebug(
"TOBGeom") <<
name <<
" number " <<
i + 1 <<
" positioned in " << disk.name() <<
" at " <<
r1
104 <<
" with no rotation";
107 name =
"TOBCoolingManifoldFluid" +
names[
i] +
"r";
108 solid = ns.addSolid(
name, Torus(coolR2[
i], coolRin, coolRout2, coolStartPhi2, coolDeltaPhi2));
110 <<
convertRadToDeg((coolStartPhi2 + coolDeltaPhi2)) <<
" with Rin " << coolRin <<
" Rout "
111 << coolRout2 <<
" R torus " << coolR2[
i];
112 Volume coolManifoldFluidLogic_r = ns.addVolume(
Volume(
name, solid, ns.material(coolM2)));
113 coolManifoldLogic_r.placeVolume(coolManifoldFluidLogic_r,
i + 1);
114 LogDebug(
"TOBGeom") <<
name <<
" number " <<
i + 1 <<
" positioned in " << coolM2
115 <<
" with no translation and no rotation";
120 rin = 0.5 * (rodRin[
i] + rodRout[
i]) - 0.5 * connW;
121 rout = 0.5 * (rodRin[
i] + rodRout[
i]) + 0.5 * connW;
122 solid = ns.addSolid(
name, Tube(rin, rout,
dz));
124 <<
" with Rin " << rin <<
" Rout " << rout <<
" ZHalf " <<
dz;
127 disk.placeVolume(connLogic,
i + 1,
r2);
128 LogDebug(
"TOBGeom") <<
name <<
" number " <<
i + 1 <<
" positioned in " << disk.name() <<
" at " <<
r2
129 <<
" with no rotation";
133 rin = 0.5 * (rodRin[
i] + rodRout[
i]);
134 rout = (
i + 1 == (
int)(
names.size()) ?
rMax : 0.5 * (rodRin[
i + 1] + rodRout[
i + 1]));
135 vector<double> pgonZ;
136 pgonZ.emplace_back(-0.5 * cableT);
137 pgonZ.emplace_back(cableT * (rin /
rMax - 0.5));
138 pgonZ.emplace_back(0.5 * cableT);
139 vector<double> pgonRmin;
140 pgonRmin.emplace_back(rin);
141 pgonRmin.emplace_back(rin);
142 pgonRmin.emplace_back(rin);
143 vector<double> pgonRmax;
144 pgonRmax.emplace_back(rout);
145 pgonRmax.emplace_back(rout);
146 pgonRmax.emplace_back(rout);
147 solid = ns.addSolid(
name, Polycone(0, 2_pi, pgonRmin, pgonRmax, pgonZ));
149 <<
" and with " << pgonZ.size() <<
" sections";
150 for (
int ii = 0;
ii < (
int)(pgonZ.size());
ii++)
151 LogDebug(
"TOBGeom") <<
"\t[" <<
ii <<
"]\tZ = " << pgonZ[
ii] <<
"\tRmin = " << pgonRmin[
ii]
152 <<
"\tRmax = " << pgonRmax[
ii];
154 Position r3(0, 0, (diskDz - (
i + 0.5) * cableT));
155 disk.placeVolume(cableLogic,
i + 1, r3);
156 LogDebug(
"TOBGeom") <<
name <<
" number " <<
i + 1 <<
" positioned in " << disk.name() <<
" at " << r3
157 <<
" with no rotation";
159 LogDebug(
"TOBGeom") <<
"<<== End of DDTOBRadCableAlgo construction ...";