3 #include "G4UIdirectory.hh" 4 #include "G4UIcmdWithAString.hh" 5 #include "G4UIcmdWithABool.hh" 6 #include "G4UIcmdWithAnInteger.hh" 7 #include "G4UIcmdWithADoubleAndUnit.hh" 8 #include "G4UIcmdWithoutParameter.hh" 9 #include "G4UnitsTable.hh" 11 #include "G4Material.hh" 14 #include "G4GenericPolycone.hh" 18 #include "G4LogicalVolume.hh" 19 #include "G4ThreeVector.hh" 20 #include "G4PVPlacement.hh" 21 #include "G4SubtractionSolid.hh" 22 #include "G4UnionSolid.hh" 23 #include "G4VisAttributes.hh" 25 #include "G4Transform3D.hh" 26 #include "G4RotationMatrix.hh" 27 #include "G4PVReplica.hh" 28 #include "G4AssemblyVolume.hh" 30 #include "G4PhysicalVolumeStore.hh" 31 #include "G4LogicalVolumeStore.hh" 32 #include "G4PVPlacement.hh" 33 #include "G4RegionStore.hh" 34 #include "G4SolidStore.hh" 35 #include "G4GeometryManager.hh" 36 #include "G4FieldManager.hh" 40 #include "G4VisExtent.hh" 48 std::cerr <<
" LBNEVolumePlacements::PlaceFinalLBNFConceptHornA.. See Integration Drawing F10068454 " <<
std::endl;
49 std::cerr <<
" ........... start with upstream IO/layer. " <<
std::endl;
53 const bool installOuterConductor =
true;
55 const bool installDownstreamIOTransition =
true;
56 const bool installCurrentEqualizer =
false;
58 const double in = 25.4*CLHEP::mm;
60 "LBNEVolumePlacements::PlaceFinalLBNFConceptHornA");
61 G4LogicalVolume *volMother = plDatMother->
fCurrent;
62 const double lengthMother=plDatMother->
fParams[2];
64 std::cerr <<
" .....Mother Volume name " << volMother->GetName()
65 <<
" zShiftMother " << zShiftMotherCoords <<
" lengthMother " << lengthMother <<
std::endl;
66 const size_t nSegUpstrIO = 6;
67 const double zStartUpstrIOC = -0.5*lengthMother + 1.0*CLHEP::mm;
68 const double deltaPhiUpstrIO = M_PI/(2.0*nSegUpstrIO);
69 const double radInnerUpstIO = 25.0*CLHEP::mm;
70 const double radOuterUpstIO = 50.0*CLHEP::mm;
72 const double radInnerInnerCyl = 43.0*CLHEP::mm;
73 const double thickInner = 2.5*CLHEP::mm;
75 std::vector<double> zTmps(30, 0.); std::vector<double> rTmps(30, 0.);
76 G4ThreeVector zeroC(0., 0., 0.);
82 size_t nSegUpstrIOBy2 = nSegUpstrIO/2;
87 for (
size_t kPhi = 0; kPhi != nSegUpstrIO; kPhi++ ) {
88 std::ostringstream aNStrStr; aNStrStr <<
"LBNFConceptHornAUpstrIOSect" << kPhi;
90 const double phi0 = kPhi*deltaPhiUpstrIO + 1.0e-4;
91 const double phi1 = (kPhi+1)*deltaPhiUpstrIO - 1.0e-4;
92 zTmps[0] = zStartUpstrIOC + radOuterUpstIO - radOuterUpstIO*std::sin(phi1);
93 zTmps[1] = zStartUpstrIOC + radOuterUpstIO - radOuterUpstIO*std::sin(phi0);
94 zTmps[2] = zStartUpstrIOC + radOuterUpstIO - radInnerUpstIO*std::sin(phi0);
95 zTmps[3] = zStartUpstrIOC + radOuterUpstIO - radInnerUpstIO*std::sin(phi1);
96 rTmps[0] = radInnerInnerCyl + radOuterUpstIO - radOuterUpstIO*std::cos(phi1);
97 rTmps[1] = radInnerInnerCyl + radOuterUpstIO - radOuterUpstIO*std::cos(phi0);
98 rTmps[2] = radInnerInnerCyl + thickInner + radInnerUpstIO - radInnerUpstIO*std::cos(phi0);
99 rTmps[3] = radInnerInnerCyl + thickInner + radInnerUpstIO - radInnerUpstIO*std::cos(phi1);
103 if (kPhi == nSegUpstrIO-1) rTmps[3] =radInnerInnerCyl + 51.*CLHEP::mm - 0.25*CLHEP::mm;
104 G4GenericPolycone *aVolGP =
new G4GenericPolycone(aNStr, 0.0, 360.0*CLHEP::degree, 4, &rTmps[0], &zTmps[0]);
105 G4LogicalVolume *aVolG =
new G4LogicalVolume(aVolGP, myAlumIC, aNStr);
106 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolG, aNStr +
std::string(
"_P"),
107 volMother,
false, 1,
true);
108 if (kPhi < nSegUpstrIO/2) {
119 G4String aNStrTmp0(
"LBNFConceptHornAICFlangeUpstr");
121 const double radOutOuterCondInner = 220.*CLHEP::mm ;
123 G4Tubs* aVolICBulk =
new G4Tubs(aNStrTmp0,
124 radInnerInnerCyl + 51.*CLHEP::mm, radOutOuterCondInner - 1.0*CLHEP::mm ,
125 1.*in/2., 0.0, 360.0*CLHEP::degree);
126 G4LogicalVolume *aVolICBulkG =
new G4LogicalVolume(aVolICBulk, myAlumIC, aNStrTmp0);
127 G4ThreeVector posTmp0(0., 0., zStartUpstrIOC + 0.5*in);
128 new G4PVPlacement((G4RotationMatrix *) 0, posTmp0, aVolICBulkG, aNStrTmp0 +
std::string(
"_P"),
129 volMother,
false, 1,
true);
133 const double lengthICCyl = 1170*CLHEP::mm - 0.005*CLHEP::mm;
134 const double radInnerOuter = radInnerInnerCyl + thickInner;
135 G4String aNStrTmp(
"LBNFConceptHornAICCyl");
137 const double zZeroLocalCoord = zStartUpstrIOC + radOuterUpstIO + 0.1*CLHEP::mm;
139 G4Tubs* aVolIC0GT =
new G4Tubs(aNStrTmp,
140 radInnerInnerCyl, radInnerOuter, 0.5*lengthICCyl, 0.0, 360.0*CLHEP::degree);
141 G4LogicalVolume *aVolIC0G =
new G4LogicalVolume(aVolIC0GT, myAlumIC, aNStrTmp);
142 G4ThreeVector posTmp(0., 0., zZeroLocalCoord + 0.5*lengthICCyl);
143 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolIC0G, aNStrTmp +
std::string(
"_P"),
144 volMother,
false, 1,
true);
153 const double thickInnerIC1 = thickInner;
154 zTmps[0] = zZeroLocalCoord + lengthICCyl + 0.002*CLHEP::mm;
155 rTmps[0] = radInnerInnerCyl;
157 const double lengthTaperedIC1_1 = 992.3*CLHEP::mm-1.75*in;
158 rTmps[1] = 33*CLHEP::mm;
159 aNStrTmp =
std::string(
"LBNFConceptHornAICTaper_1");
161 G4Cons* aVolIC1GCon_1 =
162 new G4Cons(aNStrTmp, rTmps[0], rTmps[0]+thickInnerIC1,
163 rTmps[1], rTmps[1]+thickInnerIC1, 0.5*lengthTaperedIC1_1,
164 0.0, 360.0*CLHEP::degree);
165 G4LogicalVolume *aVolIC1G_1 =
new G4LogicalVolume(aVolIC1GCon_1, myAlumIC, aNStrTmp);
166 posTmp[2] = zZeroLocalCoord + lengthICCyl + 0.5*lengthTaperedIC1_1 + 0.002*CLHEP::mm;
167 const double zEndICTapered_1 = posTmp[2] + 0.5*lengthTaperedIC1_1 + 0.002*CLHEP::mm;
168 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolIC1G_1, aNStrTmp +
std::string(
"_P"),
169 volMother,
false, 1,
true);
174 const double thickInnerIC1_2 = 0.354*in;
175 zTmps[0] = zZeroLocalCoord + lengthICCyl + 0.002*CLHEP::mm+lengthTaperedIC1_1;
178 const double lengthTaperedIC1_2 = 1.75*in;
180 aNStrTmp =
std::string(
"LBNFConceptHornAICTaper_2");
182 G4Cons* aVolIC1GCon_2 =
183 new G4Cons(aNStrTmp, rTmps[0], rTmps[0]+thickInnerIC1,
184 rTmps[1], rTmps[1]+thickInnerIC1_2, 0.5*lengthTaperedIC1_2,
185 0.0, 360.0*CLHEP::degree);
186 G4LogicalVolume *aVolIC1G_2 =
new G4LogicalVolume(aVolIC1GCon_2, myAlumIC, aNStrTmp);
187 posTmp[2] = zZeroLocalCoord + lengthICCyl + lengthTaperedIC1_1 + 0.5*lengthTaperedIC1_2 + 0.002*CLHEP::mm;
188 const double zEndICTapered_2 = posTmp[2] + 0.5*lengthTaperedIC1_2 + 0.002*CLHEP::mm;
189 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolIC1G_2, aNStrTmp +
std::string(
"_P"),
190 volMother,
false, 1,
true);
197 const double lengthRingSpiderSuppIC = 20.0*CLHEP::mm;
198 const double radRingSpiderSuppICInner = radInnerInnerCyl + thickInner + 0.010*CLHEP::mm;
199 const double radRingSpiderSuppICOuter = 52.5;
200 aNStrTmp =
std::string(
"LBNFConceptHornARingSuppIC0");
202 G4Tubs* aVolIC0SGT =
new G4Tubs(aNStrTmp, radRingSpiderSuppICInner,radRingSpiderSuppICOuter,
203 0.5*lengthRingSpiderSuppIC, 0.0, 360.0*CLHEP::degree);
204 G4LogicalVolume *aVolIC0SG =
new G4LogicalVolume(aVolIC0SGT, myAlumIC, aNStrTmp);
205 posTmp[2] = zZeroLocalCoord + (1170. - 85.5)*CLHEP::mm;
206 const double zSpiderSupport = posTmp[2];
207 const double zEndOfWaterLayer = posTmp[2] - lengthRingSpiderSuppIC/2.0 - 1.0*CLHEP::mm;
208 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolIC0SG, aNStrTmp +
std::string(
"_P"),
209 volMother,
false, 1,
true);
213 const double lengthWeldIC0toIC1 = 23.3*CLHEP::mm;
214 const double radRingWeldIC0toICInner = radInnerInnerCyl + thickInner + 0.010*CLHEP::mm;
215 const double radRingWeldIC0toICOuter = radRingWeldIC0toICInner + 1.25*CLHEP::mm;
217 aNStrTmp =
std::string(
"LBNFConceptHornAWeldIC0toIC1");
219 G4Tubs* aVolIC0WGT =
new G4Tubs(aNStrTmp, radRingWeldIC0toICInner, radRingWeldIC0toICOuter,
220 0.5*lengthWeldIC0toIC1, 0.0, 360.0*CLHEP::degree);
221 G4LogicalVolume *aVolIC0WG =
new G4LogicalVolume(aVolIC0WGT, myAlumIC, aNStrTmp);
222 posTmp[2] = zZeroLocalCoord + (1170. - 30)*CLHEP::mm ;
223 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolIC0WG, aNStrTmp +
std::string(
"_P"),
224 volMother,
false, 1,
true);
239 const double radInnerDownstrtIO = (3.401-0.354)*in;
240 const double phiStartInnerDownstrtIO = 0.001*M_PI/180.;
241 const double yCenterDownstrtIO = 4.7*in;
242 const double radOuterDownstrtIO = 3.401*in;
243 const double zCenterDownstrtIO = zEndICTapered_2 + 0.025*CLHEP::mm;
245 const size_t nSegDownstrIO = 20.;
247 const double deltaPhiDownstrIO = (M_PI - phiStartInnerDownstrtIO)/nSegDownstrIO;
249 for (
size_t kPhi = 0; kPhi != nSegDownstrIO; kPhi++ ) {
250 std::ostringstream aNStrStr; aNStrStr <<
"LBNFConceptHornADownstrIOSect" << kPhi;
253 const double phi0 = phiStartInnerDownstrtIO + kPhi*deltaPhiDownstrIO + 1.0e-5;
254 const double phi1 = phi0 + deltaPhiDownstrIO - 2.0e-5;
255 zTmps[0] = zCenterDownstrtIO + radInnerDownstrtIO*std::sin(phi0);
256 zTmps[1] = zCenterDownstrtIO + radOuterDownstrtIO*std::sin(phi0);
257 zTmps[2] = zCenterDownstrtIO + radOuterDownstrtIO*std::sin(phi1);
258 zTmps[3] = zCenterDownstrtIO + radInnerDownstrtIO*std::sin(phi1);
259 rTmps[0] = yCenterDownstrtIO - radInnerDownstrtIO*std::cos(phi0);
260 rTmps[1] = yCenterDownstrtIO - radOuterDownstrtIO*std::cos(phi0);
261 rTmps[2] = yCenterDownstrtIO - radOuterDownstrtIO*std::cos(phi1);
262 rTmps[3] = yCenterDownstrtIO - radInnerDownstrtIO*std::cos(phi1);
266 if (!installDownstreamIOTransition)
continue;
267 G4GenericPolycone *aVolGP =
new G4GenericPolycone(aNStr, 0.0, 360.0*CLHEP::degree, 4, &rTmps[0], &zTmps[0]);
268 G4LogicalVolume *aVolG =
new G4LogicalVolume(aVolGP, myAlumIC, aNStr);
269 std::cerr <<
" Volume for volume " << aNStr <<
" is " << aVolG->GetSolid()->GetCubicVolume()
270 <<
" at Y = " << 0.25*(rTmps[0] + rTmps[1] + rTmps[2] + rTmps[3]) << std::endl;
271 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolG, aNStr +
std::string(
"_P"),
272 volMother,
false, 1,
true);
273 if (kPhi < nSegDownstrIO/2) {
282 if (installCurrentEqualizer) {
284 <<
" Located upstream of the start of the target, the Current qualizer sections are irrelevant" <<
std::endl;
285 std::cerr <<
" So., not implemented yet.. " <<
std::endl;
288 const double radOuterFlangesDownstr = 274.5*CLHEP::mm;
292 const double radInnerFlangesDownstrU = (220.52 + 0.25) *CLHEP::mm;
293 const double thickFlangesDownstrU = 34.0*CLHEP::mm;
294 posTmp[2] = zCenterDownstrtIO -58.0*CLHEP::mm + 0.5*thickFlangesDownstrU - 0.02*CLHEP::mm;
295 std::cerr <<
" Z Position LBNFConceptHornAFlangeDownstrU " << posTmp[2]
296 <<
" Thickness " << thickFlangesDownstrU <<
std::endl;
297 const double zCoordEndOCFlangeU = posTmp[2] + 0.5*thickFlangesDownstrU + 0.025*CLHEP::mm;
298 aNStrTmp =
std::string(
"LBNFConceptHornAFlangeDwnstrU");
299 if (installDownstreamIOTransition) {
300 G4Tubs *aVolGPFDU =
new G4Tubs(aNStrTmp, radInnerFlangesDownstrU, radOuterFlangesDownstr,
301 0.5*thickFlangesDownstrU, 0.0, 360.0*CLHEP::degree);
302 G4LogicalVolume *aVolGFDU =
new G4LogicalVolume(aVolGPFDU, myAlumIC, aNStrTmp);
303 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolGFDU, aNStrTmp +
std::string(
"_P"),
304 volMother,
false, 1,
true);
308 const double radInnerFlangesDownstrD = 4.7*in+radInnerDownstrtIO;
310 const double thickFlangesDownstrD = (58.4 - 34.0 - 2.50)*CLHEP::mm;
311 posTmp[2] = zCoordEndOCFlangeU + 0.5*thickFlangesDownstrD - 0.025*CLHEP::mm;
312 aNStrTmp =
std::string(
"LBNFConceptHornAFlangeDwnstrD");
313 if (installDownstreamIOTransition) {
314 G4Tubs *aVolGPFDD =
new G4Tubs(aNStrTmp, radInnerFlangesDownstrD, radOuterFlangesDownstr,
315 0.5*thickFlangesDownstrD, 0.0, 360.0*CLHEP::degree);
316 G4LogicalVolume *aVolGFDD =
new G4LogicalVolume(aVolGPFDD, myAlumIC, aNStrTmp);
317 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolGFDD, aNStrTmp +
std::string(
"_P"),
318 volMother,
false, 1,
true);
329 const double lengthOC = (2104. - 0.5)*CLHEP::mm+50*CLHEP::mm;
331 const double radOuterOC = (220.5 + 16)*CLHEP::mm;
332 const double radInnerOC = 220.5*CLHEP::mm;
333 posTmp[2] = zZeroLocalCoord + 0.5*lengthOC + 0.1*CLHEP::mm-50*CLHEP::mm;
335 if (installOuterConductor) {
336 G4Tubs* aVolOCG =
new G4Tubs(aNStrTmp, radInnerOC, radOuterOC,
337 0.5*lengthOC, 0.0, 360.0*CLHEP::degree);
338 G4LogicalVolume *aVolOCGL =
new G4LogicalVolume(aVolOCG, myAlumOC, aNStrTmp);
339 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolOCGL, aNStrTmp +
std::string(
"_P"),
340 volMother,
false, 1,
true);
357 bool installSpiderSupport =
true;
358 if (installSpiderSupport) {
360 const std::string nameStrH(
"LBNFConceptHornASpSupp");
361 G4String nameStr2(nameStrH); nameStr2 += G4String(
"Riser");
362 const double heightRiser = 0.333*in - 0.020*CLHEP::mm;
363 const double widthH = 1.5*in;
364 const double thickH = 0.184*2*in;
365 G4Box *aBoxRiser =
new G4Box(nameStr2, widthH/2., heightRiser/2.0, thickH/2.0);
366 G4LogicalVolume *pCurrentRiser =
367 new G4LogicalVolume(aBoxRiser, myAlumOC, nameStr2);
369 G4String nameStr3(nameStrH); nameStr3 += G4String(
"Hanger");
370 const double heightH = radInnerOC - radRingSpiderSuppICOuter - 1.0*CLHEP::mm - heightRiser;
371 const double widthH2 = 1.0*in;
373 const double thickH2 = 0.031*in;
374 G4Box *aBoxHanger =
new G4Box(nameStr3, widthH2/2., heightH/2.0, thickH2/2.0);
375 G4LogicalVolume *pCurrentHanger =
376 new G4LogicalVolume(aBoxHanger, myAlumOC, nameStr3);
378 posTmp[2] = zSpiderSupport;
380 for (
int iRot=0; iRot != 3; iRot++) {
381 std::ostringstream rnStrStr; rnStrStr <<
"_" << (iRot+1);
382 G4String rnStr(rnStrStr.str());
384 G4RotationMatrix * rMatPr = 0;
386 rMatPr =
new G4RotationMatrix;
387 rMatPr->rotateZ(2.0*M_PI/3.);
388 }
else if (iRot == 2) {
389 rMatPr =
new G4RotationMatrix;
390 rMatPr->rotateZ(-2.0*M_PI/3.);
393 const double dHRiser = radRingSpiderSuppICOuter + 0.010*CLHEP::mm + heightRiser/2.;
394 posTmp[0] = 0.; posTmp[1] = dHRiser;
396 posTmp[0] = dHRiser*rMatPr->xy();
397 posTmp[1] = dHRiser*rMatPr->yy();
400 new G4PVPlacement(rMatPr, posTmp, pCurrentRiser, nameStr2 +
std::string(
"_P") + rnStr,
403 new G4PVPlacement(G4Transform3D(*rMatPr, posTmp), pCurrentRiser, nameStr2 +
std::string(
"_P") + rnStr,
404 volMother,
false, iRot,
true);
408 const double dHHanger = radRingSpiderSuppICOuter + 0.010*CLHEP::mm + 0.5*CLHEP::mm + heightRiser + heightH/2.;
409 posTmp[0] = 0.; posTmp[1] = dHHanger;
411 posTmp[0] = dHHanger*rMatPr->xy();
412 posTmp[1] = dHHanger*rMatPr->yy();
416 new G4PVPlacement(rMatPr, posTmp, pCurrentHanger, nameStr3 +
std::string(
"_P") + rnStr,
419 new G4PVPlacement(G4Transform3D(*rMatPr, posTmp), pCurrentHanger, nameStr3 +
std::string(
"_P") + rnStr,
420 volMother,
false, iRot,
true);
433 G4Material *myWater = G4Material::GetMaterial(
"Water");
435 const double lengthICCylW = zEndOfWaterLayer - zZeroLocalCoord;
436 const double radWaterInnerCyl = radInnerInnerCyl + thickInner + 0.025*CLHEP::mm;
438 G4String aNStrTmpW0(
"LBNFConceptHornAICCylWater");
439 G4Tubs* aVolIC0GWT =
new G4Tubs(aNStrTmpW0,
440 radWaterInnerCyl, radWaterOuter, 0.5*lengthICCylW, 0.0, 360.0*CLHEP::degree);
441 G4LogicalVolume *aVolIC0GW =
new G4LogicalVolume(aVolIC0GWT, myWater, aNStrTmpW0);
442 G4ThreeVector posTmpW(0., 0., zZeroLocalCoord + 0.5*lengthICCylW);
443 new G4PVPlacement((G4RotationMatrix *) 0, posTmpW, aVolIC0GW, aNStrTmpW0 +
std::string(
"_P"),
444 volMother,
false, 1,
true);
449 G4VisAttributes* visAttributes =
new G4VisAttributes(G4Colour(0.0,0.0,0.9));
450 visAttributes->SetVisibility(
true);
451 std::string aNStrTmpIC1W = G4String(
"LBNFConceptHornAICDTaperCL1Water");
452 zTmps[0] = zZeroLocalCoord + lengthICCyl + 0.002*CLHEP::mm;
453 rTmps[0] = radInnerInnerCyl + thickInner + 0.025*CLHEP::mm;
454 rTmps[1] = 33*CLHEP::mm + thickInner + 0.025*CLHEP::mm;
455 aNStrTmp =
std::string(
"LBNFConceptHornAICTaperWater_1");
456 G4Cons* aVolIC1GConW_1 =
457 new G4Cons(aNStrTmp, rTmps[0], rTmps[0]+fWaterLayerThickInHorns,
458 rTmps[1], rTmps[1]+fWaterLayerThickInHorns, 0.5*lengthTaperedIC1_1,
459 0.0, 360.0*CLHEP::degree);
460 G4LogicalVolume *aVolIC1GW_1 =
new G4LogicalVolume(aVolIC1GConW_1, myWater, aNStrTmp);
461 aVolIC1GW_1->SetVisAttributes(visAttributes);
462 G4ThreeVector posTmpW2_1 (0., 0.,
463 zZeroLocalCoord + lengthICCyl + 0.5*lengthTaperedIC1_1 + 0.002*CLHEP::mm);
464 new G4PVPlacement((G4RotationMatrix *) 0, posTmpW2_1, aVolIC1GW_1, aNStrTmp +
std::string(
"_P"),
465 volMother,
false, 1,
true);
469 zTmps[0] = zZeroLocalCoord + lengthICCyl + 0.002*CLHEP::mm+lengthTaperedIC1_1;
471 rTmps[1] = 33*CLHEP::mm + thickInnerIC1_2 + 0.025*CLHEP::mm;
472 aNStrTmp =
std::string(
"LBNFConceptHornAICTaperWater_2");
473 G4Cons* aVolIC1GConW_2 =
474 new G4Cons(aNStrTmp, rTmps[0], rTmps[0]+fWaterLayerThickInHorns,
475 rTmps[1], rTmps[1]+fWaterLayerThickInHorns, 0.5*lengthTaperedIC1_2,
476 0.0, 360.0*CLHEP::degree);
477 G4LogicalVolume *aVolIC1GW_2 =
new G4LogicalVolume(aVolIC1GConW_2, myWater, aNStrTmp);
478 aVolIC1GW_2->SetVisAttributes(visAttributes);
479 G4ThreeVector posTmpW2_2 (0., 0.,
480 zZeroLocalCoord + lengthICCyl + lengthTaperedIC1_1 + 0.5*lengthTaperedIC1_2 + 0.002*CLHEP::mm);
481 new G4PVPlacement((G4RotationMatrix *) 0, posTmpW2_2, aVolIC1GW_2, aNStrTmp +
std::string(
"_P"),
482 volMother,
false, 1,
true);
488 std::cerr <<
" Dump of the R/Z map, accurate, for the magnetic field " <<
std::endl;
492 std::cerr <<
"... Should be good to go... " <<
std::endl;
499 std::cerr <<
" LBNEVolumePlacements::PlaceFinalLBNFConceptTgtSupport " <<
std::endl;
501 "TargetHallAndHorn1",
502 "LBNEVolumePlacements::PlaceFinalLBNFConceptTgtSupport");
503 G4LogicalVolume *volMother = plDatMother->
fCurrent;
507 const double lengthTitCTube = 275.0*CLHEP::mm;
508 const double outerRadiusTitCTube = 5.0*CLHEP::mm;
509 const double innerRadiusTitCTube = outerRadiusTitCTube - 0.5*CLHEP::mm;
514 G4Material *myTitanium = G4Material::GetMaterial(
"Titanium");
517 G4Tubs* aVolTgtSup1 =
new G4Tubs(aNStrExtTubeTmp, innerRadiusTitCTube, outerRadiusTitCTube,
518 0.5*lengthTitCTube, 0.0, 360.0*CLHEP::degree);
519 G4LogicalVolume *aVolTgtSup1L =
new G4LogicalVolume(aVolTgtSup1, myTitanium, aNStrExtTubeTmp);
522 "LBNEVolumePlacements::PlaceFinalLBNFConceptHornA");
523 const double lengthHornTotal = plDatMotherHorn->
fParams[2];
524 const double zPosTitCTube = lengthHornTotal + 0.1*CLHEP::mm - 360.0*CLHEP::mm;
526 const double radTitCTubeCenter = 50.0*CLHEP::mm + 0.5*lengthTitCTube+0.25*CLHEP::mm;
528 G4ThreeVector posTitCTubeTop(0., radTitCTubeCenter , zPosTitCTube);
530 volMother,
false, 1,
true);
532 G4ThreeVector posTitCTubeBottom(0., -radTitCTubeCenter , zPosTitCTube);
534 volMother,
false, 1,
true);
536 G4ThreeVector posTitCTubeLeft(-radTitCTubeCenter , 0., zPosTitCTube);
538 volMother,
false, 1,
true);
540 G4ThreeVector posTitCTubeRight(radTitCTubeCenter, 0. , zPosTitCTube);
542 volMother,
false, 1,
true);
548 <<
" LBNEVolumePlacements::PlaceFinalLBNFConceptHornB..Rev 2 Drawing F10071359... Start with upstream IO/layer. " 553 const double in = 25.4*CLHEP::mm;
556 "LBNEVolumePlacements::PlaceFinalLBNFConceptHornB");
557 G4LogicalVolume *volMother = plDatMother->
fCurrent;
558 const double lengthMother=plDatMother->
fParams[2];
559 const double zShiftMotherCoords = 0.005*CLHEP::mm;
560 const size_t nSegUpstrIO = 20;
561 const double radInnerInner = 159.0*CLHEP::mm;
562 const double thickInner = 3.0*CLHEP::mm;
564 const double zStartUpstrIOC = -0.5*lengthMother + 0.025*CLHEP::mm;
565 const double deltaPhiUpstrIO = M_PI/nSegUpstrIO;
566 const double radOuterUpstIO = 0.5*(642. - radInnerInner) *CLHEP::mm;
567 const double radInnerUpstIO = 0.5*(2.0*radOuterUpstIO - 8.0*CLHEP::mm - thickInner);
568 const double distUpstreamToBeginIC = radOuterUpstIO + 0.025 ;
569 const double zZeroLocalCoord = -0.5*lengthMother + distUpstreamToBeginIC;
570 const double radInnerOC = 634.0*CLHEP::mm;
571 std::cerr <<
" .....Mother Volume name " << volMother->GetName()
572 <<
" zShiftMother " << zShiftMotherCoords <<
" distUpstreamToBeginIC " 573 << distUpstreamToBeginIC <<
" zZeroLocalCoords " << zZeroLocalCoord <<
std::endl;
575 std::vector<double> zTmps(20, 0.); std::vector<double> rTmps(20, 0.);
576 G4ThreeVector zeroC(0., 0., 0.);
577 G4Material *myAlumina = G4Material::GetMaterial(
"Alumina");
582 G4Material *myWater = 0;
584 size_t nSegUpstrIOBy2 = nSegUpstrIO/2;
588 for (
size_t kPhi = 0; kPhi != nSegUpstrIO; kPhi++ ) {
589 std::ostringstream aNStrStr; aNStrStr << header <<
"UpstrIOSect" << kPhi;
592 const double phi0 = kPhi*deltaPhiUpstrIO + 1.0e-5;
593 const double phi1 = phi0 + deltaPhiUpstrIO - 2.0e-5;
594 zTmps[0] = zStartUpstrIOC + radOuterUpstIO - radOuterUpstIO*std::sin(phi1);
595 zTmps[1] = zStartUpstrIOC + radOuterUpstIO - radOuterUpstIO*std::sin(phi0);
596 zTmps[2] = zStartUpstrIOC + radOuterUpstIO - radInnerUpstIO*std::sin(phi0);
597 zTmps[3] = zStartUpstrIOC + radOuterUpstIO - radInnerUpstIO*std::sin(phi1);
598 rTmps[0] = radInnerInner + radOuterUpstIO - radOuterUpstIO*std::cos(phi1);
599 rTmps[1] = radInnerInner + radOuterUpstIO - radOuterUpstIO*std::cos(phi0);
600 rTmps[2] = radInnerInner + thickInner + radInnerUpstIO - radInnerUpstIO*std::cos(phi0);
601 rTmps[3] = radInnerInner + thickInner + radInnerUpstIO - radInnerUpstIO*std::cos(phi1);
605 G4GenericPolycone *aVolGP =
new G4GenericPolycone(aNStr, 0.0, 360.0*CLHEP::degree, 4, &rTmps[0], &zTmps[0]);
606 G4LogicalVolume *aVolG =
new G4LogicalVolume(aVolGP, myAlumIC, aNStr);
607 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolG, aNStr +
std::string(
"_P"),
608 volMother,
false, 1,
true);
610 if (kPhi < nSegUpstrIO/2) {
620 const double thickUpstrICFlangeTr = 10.0;
621 const double radInnerICFl = 634.*CLHEP::mm;
622 const double radOuterICFlTr = radInnerICFl + 10.0*(1.0- M_PI/4.);
625 G4Tubs* aVolICFlG0 =
new G4Tubs(aNStrTmp0, radInnerICFl, radOuterICFlTr,
626 0.5*thickUpstrICFlangeTr, 0.0, 360.0*CLHEP::degree);
627 G4LogicalVolume *aVolICFlGL0 =
new G4LogicalVolume(aVolICFlG0, myAlumIC, aNStrTmp0);
629 G4ThreeVector posTmp0(0., 0.,
630 zZeroLocalCoord + 0.5*thickUpstrICFlangeTr + 0.05*CLHEP::mm);
631 new G4PVPlacement((G4RotationMatrix *) 0, posTmp0, aVolICFlGL0, aNStrTmp0 +
std::string(
"_P"),
632 volMother,
false, 1,
true);
634 const double thickUpstrICFlange = 29.8;
635 const double radOuterICFl = 691.5*CLHEP::mm;
637 G4Tubs* aVolICFlG =
new G4Tubs(aNStrTmp, radInnerICFl, radOuterICFl,
638 0.5*thickUpstrICFlange, 0.0, 360.0*CLHEP::degree);
639 G4LogicalVolume *aVolICFlGL =
new G4LogicalVolume(aVolICFlG, myAlumIC, aNStrTmp);
641 G4ThreeVector posTmp(0., 0.,
642 zZeroLocalCoord + thickUpstrICFlangeTr + 0.5*thickUpstrICFlange + 0.1*CLHEP::mm);
643 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolICFlGL, aNStrTmp +
std::string(
"_P"),
644 volMother,
false, 1,
true);
649 double zCoordLocalCurrent = zZeroLocalCoord;
652 const double lengthFirstCylIC = 1089.*CLHEP::mm;
653 const double lengthFirstCylICWUp = lengthFirstCylIC - 126.*CLHEP::mm;
655 const double lengthSpiderWebSupportOnIC = 27*CLHEP::mm;
656 std::vector<double> zPosSpiderWebSupportOnIC(3, 0.);
657 std::vector<double> radRingSpiderSuppICOuter(3, 0.);
660 const double radInnerOuter = radInnerInner + thickInner;
662 G4Tubs* aVolIC0GT =
new G4Tubs(aNStrTmp,
663 radInnerInner, radInnerOuter, 0.5*lengthFirstCylIC, 0.0, 360.0*CLHEP::degree);
664 G4LogicalVolume *aVolIC0G =
new G4LogicalVolume(aVolIC0GT, myAlumIC, aNStrTmp);
665 G4ThreeVector posTmp(0., 0., zZeroLocalCoord + 0.5*lengthFirstCylIC);
666 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolIC0G, aNStrTmp +
std::string(
"_P"),
667 volMother,
false, 1,
true);
668 zCoordLocalCurrent += lengthFirstCylIC + 0.025*CLHEP::mm;
670 const double radInnerW = radInnerOuter + 0.010;
673 G4Tubs* aVolIC0GTWUp =
new G4Tubs(aNStrTmpWUp,
674 radInnerW, radOuterW, 0.5*lengthFirstCylICWUp, 0.0, 360.0*CLHEP::degree);
675 G4LogicalVolume *aVolIC0GWUp =
new G4LogicalVolume(aVolIC0GTWUp, myWater, aNStrTmpWUp);
676 G4ThreeVector posTmpWUp(0., 0., zZeroLocalCoord + 0.5*lengthFirstCylICWUp);
677 new G4PVPlacement((G4RotationMatrix *) 0, posTmpWUp, aVolIC0GWUp, aNStrTmpWUp +
std::string(
"_P"),
678 volMother,
false, 1,
true);
681 const double lengthFirstCylICWDw = 92. *CLHEP::mm;
683 G4Tubs* aVolIC0GTWDw =
new G4Tubs(aNStrTmpWDw,
684 radInnerW, radOuterW, 0.5*lengthFirstCylICWDw, 0.0, 360.0*CLHEP::degree);
685 G4LogicalVolume *aVolIC0GWDw =
new G4LogicalVolume(aVolIC0GTWDw, myWater, aNStrTmpWDw);
686 G4ThreeVector posTmpWDw(0., 0.,
687 zZeroLocalCoord + lengthFirstCylIC - 0.5*lengthFirstCylICWDw);
688 new G4PVPlacement((G4RotationMatrix *) 0, posTmpWDw, aVolIC0GWDw, aNStrTmpWDw +
std::string(
"_P"),
689 volMother,
false, 1,
true);
696 const double lengthFirstWeld = 16.0*CLHEP::mm;
697 double radInnerWeld = radInnerOuter + 0.010;
698 double radOuterWeld = radInnerWeld + 2.0;
705 G4Tubs* aVolIC0GTWe =
new G4Tubs(aNStrTmpWeld,
706 radInnerWeld, radOuterWeld, 0.5*lengthFirstWeld, 0.0, 360.0*CLHEP::degree);
707 G4LogicalVolume *aVolIC0GWe =
new G4LogicalVolume(aVolIC0GTWe, myAlumIC, aNStrTmpWeld);
708 G4ThreeVector posTmpWeld(0., 0., zZeroLocalCoord + lengthFirstCylIC - 36.);
709 new G4PVPlacement((G4RotationMatrix *) 0, posTmpWeld, aVolIC0GWe, aNStrTmpWeld +
std::string(
"_P"),
710 volMother,
false, 1,
true);
714 G4Tubs* aVolIC0GTSpd =
new G4Tubs(aNStrTmpSpd,
715 radInnerOuter+0.010*CLHEP::mm,
716 radInnerOuter+7.5*CLHEP::mm, 0.5*lengthSpiderWebSupportOnIC, 0.0, 360.0*CLHEP::degree);
717 G4LogicalVolume *aVolIC0GSpd =
new G4LogicalVolume(aVolIC0GTSpd, myAlumIC, aNStrTmpSpd);
718 G4ThreeVector posTmpSpd(0., 0., zZeroLocalCoord + lengthFirstCylIC - 110.*CLHEP::mm);
720 zPosSpiderWebSupportOnIC[0] = posTmpSpd[2];
721 radRingSpiderSuppICOuter[0] = radInnerOuter+7.5*CLHEP::mm + 0.025*CLHEP::mm;
722 new G4PVPlacement((G4RotationMatrix *) 0, posTmpSpd, aVolIC0GSpd, aNStrTmpSpd +
std::string(
"_P"),
723 volMother,
false, 1,
true);
729 const double radInnerInnerNeck = 81.0*CLHEP::mm;
732 const double lengthUpstrConeSec1 = 18.23*CLHEP::mm;
733 const double lengthUpstrConeSec2 = 851.46*CLHEP::mm;
734 const double lengthUpstrConeSec3 = 8.98*CLHEP::mm;
735 const double lengthUpstrCone = (lengthUpstrConeSec1 + lengthUpstrConeSec2 + lengthUpstrConeSec3);
737 std::cerr <<
" Before defining upstream conical section, zCoordLocalCurrent " 739 zTmps[0] = zCoordLocalCurrent;
740 rTmps[0] = radInnerInner;
741 zTmps[1] = zCoordLocalCurrent + lengthUpstrConeSec1;
742 rTmps[1] = 158.2*CLHEP::mm;
743 zTmps[2] = zTmps[1] + lengthUpstrConeSec2;
744 rTmps[2] = 81.42*CLHEP::mm;
745 zTmps[3] = zTmps[2] + lengthUpstrConeSec3;
746 rTmps[3] = radInnerInnerNeck;
747 for (
size_t kk=0; kk != 4; kk++) {
748 zTmps[4+kk] = zTmps[4 - kk - 1];
749 rTmps[4+kk] = rTmps[4 - kk - 1] + thickInner;
751 for(
size_t kk=0; kk != 4; kk++) {
755 G4GenericPolycone *aVolGPCU =
756 new G4GenericPolycone(aNStrTmp, 0.0, 360.0*CLHEP::degree, 8, &rTmps[0], &zTmps[0]);
757 G4LogicalVolume *aVolGCU =
new G4LogicalVolume(aVolGPCU, myAlumIC, aNStrTmp);
758 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolGCU, aNStrTmp +
std::string(
"_P"),
759 volMother,
false, 1,
true);
764 std::vector<double> zTmpsW(zTmps);
765 std::vector<double> rTmpsW(rTmps);
766 for (
size_t kk=0; kk != 2; kk++) rTmpsW[kk] += thickInner + .025*CLHEP::mm;
767 zTmpsW[2] = zTmpsW[1] + 686.*CLHEP::mm;
768 rTmpsW[2] = (0.5+99.27)*CLHEP::mm;
769 for (
size_t kk=0; kk != 3; kk++) {
770 zTmpsW[3+kk] = zTmpsW[3 - kk - 1];
773 std::cerr <<
" Last Z coord for water layer, upstream cone, upstr section " << zTmpsW[2] <<
std::endl;
776 G4GenericPolycone* aVolUCGTWUp =
777 new G4GenericPolycone(aNStrTmpWUp, 0.0, 360.0*CLHEP::degree, 6, &rTmpsW[0], &zTmpsW[0]);
778 G4LogicalVolume *aVolUCGWUp =
new G4LogicalVolume(aVolUCGTWUp, myWater, aNStrTmpWUp);
779 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolUCGWUp, aNStrTmpWUp +
std::string(
"_P"),
780 volMother,
false, 1,
true);
781 const double lengthUpstrUpstrConeW = lengthUpstrConeSec1 + 686.*CLHEP::mm;
782 zTmpsW[0] = zCoordLocalCurrent + lengthUpstrUpstrConeW + lengthSpiderWebSupportOnIC + 0.5*CLHEP::mm;
783 rTmpsW[0] = (96.650 + 0.3)*CLHEP::mm;
784 zTmpsW[1] = zTmpsW[0] + 143.*CLHEP::mm;
785 rTmpsW[1] = (radInnerInnerNeck + thickInner + 0.6)*CLHEP::mm;
786 zTmpsW[2] = zTmpsW[1];
788 zTmpsW[3] = zTmpsW[0];
790 std::cerr <<
" Last zCoord for LBNFConceptHornBUpstrConeWaterDw " 791 << zTmpsW[1] <<
" lengthUpstrUpstrConeW " <<lengthUpstrUpstrConeW
792 <<
" zCoordLocalCurrent " << zCoordLocalCurrent <<
std::endl;
794 G4GenericPolycone* aVolUCGTWDw =
795 new G4GenericPolycone(aNStrTmpWDw, 0.0, 360.0*CLHEP::degree, 4, &rTmpsW[0], &zTmpsW[0]);
796 G4LogicalVolume *aVolUCGWDw =
new G4LogicalVolume(aVolUCGTWDw, myWater, aNStrTmpWDw);
797 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolUCGWDw, aNStrTmpWDw +
std::string(
"_P"),
798 volMother,
false, 1,
true);
805 G4Tubs* aVolICodGTSpd =
new G4Tubs(aNStrTmpSpd,
806 99.20+0.030*CLHEP::mm,
807 99.23+7.5*CLHEP::mm, 0.5*lengthSpiderWebSupportOnIC, 0.0, 360.0*CLHEP::degree);
808 G4LogicalVolume *aVolICodGSpd =
new G4LogicalVolume(aVolICodGTSpd, myAlumIC, aNStrTmpSpd);
809 G4ThreeVector posTmpSpd(0., 0.,
810 zCoordLocalCurrent + lengthUpstrCone - 173.2*CLHEP::mm + 0.5*lengthSpiderWebSupportOnIC );
811 zPosSpiderWebSupportOnIC[1] = posTmpSpd[2];
812 radRingSpiderSuppICOuter[1] = 99.23 + 7.5*CLHEP::mm + 0.025*CLHEP::mm;
813 new G4PVPlacement((G4RotationMatrix *) 0, posTmpSpd, aVolICodGSpd, aNStrTmpSpd +
std::string(
"_P"),
814 volMother,
false, 1,
true);
816 zCoordLocalCurrent += lengthUpstrCone + 0.025;
817 std::cerr <<
" Last Z coord for upstr. cone " << zCoordLocalCurrent <<
std::endl;
819 const double thickNeck = 3.0*CLHEP::mm;
824 const double lengthNeck = 62.4;
825 const double radInnerOuterNeck = radInnerInnerNeck + thickNeck;
827 G4Tubs* aVolNeckGT =
new G4Tubs(aNStrTmp,
828 radInnerInnerNeck, radInnerOuterNeck, 0.5*lengthNeck, 0.0, 360.0*CLHEP::degree);
829 G4LogicalVolume *aVolNeckG =
new G4LogicalVolume(aVolNeckGT, myAlumIC, aNStrTmp);
830 G4ThreeVector posTmp(0., 0., zCoordLocalCurrent + 0.5*lengthNeck);
831 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolNeckG, aNStrTmp +
std::string(
"_P"),
832 volMother,
false, 1,
true);
834 const double lengthNeckW = lengthNeck - 0.010*CLHEP::mm;
835 const double radInnerNeckW = radInnerOuterNeck + 0.010;
838 G4Tubs* aVolNeckGTW =
new G4Tubs(aNStrTmpW,
839 radInnerNeckW, radOuterNeckW, 0.5*lengthNeckW, 0.0, 360.0*CLHEP::degree);
840 G4LogicalVolume *aVolNeckGW =
new G4LogicalVolume(aVolNeckGTW, myWater, aNStrTmpW);
841 G4ThreeVector posTmpW(posTmp); posTmpW[2] -= 0.050*CLHEP::mm;
842 new G4PVPlacement((G4RotationMatrix *) 0, posTmpW, aVolNeckGW, aNStrTmpW +
std::string(
"_P"),
843 volMother,
false, 1,
true);
846 zCoordLocalCurrent += lengthNeck + 0.025*CLHEP::mm;
849 std::cerr <<
" Last Z coord for upstr. cone and neck " << zCoordLocalCurrent <<
std::endl;
856 zTmps[0] = zCoordLocalCurrent;
857 rTmps[0] = radInnerInnerNeck;
858 const double zDwnstCL1 = 22.3*CLHEP::mm;
859 zTmps[1] = zTmps[0] + zDwnstCL1;
860 rTmps[1] = 83.6*CLHEP::mm;
861 const double zDwnstCL2 = 595.75*CLHEP::mm;
862 zTmps[2] = zTmps[1] + zDwnstCL2;
863 rTmps[2] = 219.9*CLHEP::mm;
864 const double zDwnstCL3 = 44.63*CLHEP::mm;
865 zTmps[3] = zTmps[2] + zDwnstCL3;
866 rTmps[3] = 225.0*CLHEP::mm;
867 for (
size_t kk=0; kk != 4; kk++) {
868 zTmps[4+kk] = zTmps[4 - kk - 1];
869 rTmps[4+kk] = rTmps[4 - kk - 1] + thickInner;
872 G4GenericPolycone *aVolGPCD =
873 new G4GenericPolycone(aNStrTmp, 0.0, 360.0*CLHEP::degree, 8, &rTmps[0], &zTmps[0]);
874 G4LogicalVolume *aVolGCD =
new G4LogicalVolume(aVolGPCD, myAlumIC, aNStrTmp);
875 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolGCD, aNStrTmp +
std::string(
"_P"),
876 volMother,
false, 1,
true);
877 for(
size_t kk=0; kk != 4; kk++) {
883 std::vector<double> rTmpsW(rTmps);
884 for (
size_t kk=0; kk != 4; kk++) rTmps[kk] = rTmps[4+kk] + 0.025*CLHEP::mm;
886 std::vector<double> zTmpsW(zTmps);
888 G4GenericPolycone* aVolDCGTW =
889 new G4GenericPolycone(aNStrTmpW, 0.0, 360.0*CLHEP::degree, 8, &rTmpsW[0], &zTmpsW[0]);
890 G4LogicalVolume *aVolDCGW =
new G4LogicalVolume(aVolDCGTW, myWater, aNStrTmpW);
891 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolDCGW, aNStrTmpW +
std::string(
"_P"),
892 volMother,
false, 1,
true);
895 zCoordLocalCurrent += zDwnstCL1 + zDwnstCL2 + zDwnstCL3 + 0.025*CLHEP::mm;
896 std::cerr <<
" zCoordLocalCurrent, just before defining downstream cylinder " << zCoordLocalCurrent <<
std::endl;
902 const double lengthICDwnstrCyl = (1042.82 - 0.1)*CLHEP::mm;
904 const double radInnerInnerDw = 225.0*CLHEP::mm;
907 const double radInnerOuterDw = radInnerInnerDw + thickInner;
909 G4Tubs* aVolIC0GT =
new G4Tubs(aNStrTmp,
910 radInnerInnerDw, radInnerOuterDw, 0.5*lengthICDwnstrCyl, 0.0, 360.0*CLHEP::degree);
911 G4LogicalVolume *aVolIC0G =
new G4LogicalVolume(aVolIC0GT, myAlumIC, aNStrTmp);
912 G4ThreeVector posTmp(0., 0., zCoordLocalCurrent + 0.5*lengthICDwnstrCyl);
913 std::cerr <<
" Long. Position of downstream cylinder " << posTmp[2] <<
" length " << lengthICDwnstrCyl<<
std::endl;
914 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolIC0G, aNStrTmp +
std::string(
"_P"),
915 volMother,
false, 1,
true);
917 double lengthICDwnCylICWUp = 101.5*CLHEP::mm - 1.0*CLHEP::mm;
919 const double radInnerW = radInnerOuterDw + 0.010;
922 G4Tubs* aVolIC0GTWUp =
new G4Tubs(aNStrTmpWUp,
923 radInnerW, radOuterW, 0.5*lengthICDwnCylICWUp, 0.0, 360.0*CLHEP::degree);
924 G4LogicalVolume *aVolIC0GWUp =
new G4LogicalVolume(aVolIC0GTWUp, myWater, aNStrTmpWUp);
925 G4ThreeVector posTmpWUp(0., 0., zCoordLocalCurrent + 0.5*lengthICDwnCylICWUp + 0.5*CLHEP::mm);
927 std::cerr <<
" Long. Position of downstream cylinder water layer, upstream " 928 << posTmpWUp[2] <<
" Length " << lengthICDwnCylICWUp <<
std::endl;
929 new G4PVPlacement((G4RotationMatrix *) 0, posTmpWUp, aVolIC0GWUp, aNStrTmpWUp +
std::string(
"_P"),
930 volMother,
false, 1,
true);
933 const double lengthICDwnCylICWDw = lengthICDwnstrCyl -
934 lengthICDwnCylICWUp - lengthSpiderWebSupportOnIC - 1.0*CLHEP::mm;
936 G4Tubs* aVolIC0GTWDw =
new G4Tubs(aNStrTmpWDw,
937 radInnerW, radOuterW, 0.5*lengthICDwnCylICWDw, 0.0, 360.0*CLHEP::degree);
938 G4LogicalVolume *aVolIC0GWDw =
new G4LogicalVolume(aVolIC0GTWDw, myWater, aNStrTmpWDw);
939 G4ThreeVector posTmpWDw(0., 0.,
940 zCoordLocalCurrent + lengthICDwnCylICWUp +
941 lengthSpiderWebSupportOnIC + 0.5*lengthICDwnCylICWDw + 1.0*CLHEP::mm);
942 std::cerr <<
" Long. Position of downstream cylinder water layer, downsstream " 943 << posTmpWDw[2] <<
" Length " << lengthICDwnCylICWDw <<
std::endl;
944 new G4PVPlacement((G4RotationMatrix *) 0, posTmpWDw, aVolIC0GWDw, aNStrTmpWDw +
std::string(
"_P"),
945 volMother,
false, 1,
true);
952 const double length2ndWeld = 16.0*CLHEP::mm;
953 double radInnerWeld = radInnerOuterDw + 0.010;
954 double radOuterWeld = radInnerWeld + 2.0;
961 G4Tubs* aVolIC0GTWe =
new G4Tubs(aNStrTmpWeld,
962 radInnerWeld, radOuterWeld, 0.5*length2ndWeld, 0.0, 360.0*CLHEP::degree);
963 G4LogicalVolume *aVolIC0GWe =
new G4LogicalVolume(aVolIC0GTWe, myAlumIC, aNStrTmpWeld);
964 G4ThreeVector posTmpWeld(0., 0., zCoordLocalCurrent + 48.5*CLHEP::mm + 0.5*length2ndWeld);
965 new G4PVPlacement((G4RotationMatrix *) 0, posTmpWeld, aVolIC0GWe, aNStrTmpWeld +
std::string(
"_P"),
966 volMother,
false, 1,
true);
971 G4Tubs* aVolIC1GTSpd =
new G4Tubs(aNStrTmpSpd,
972 radInnerOuterDw+0.010*CLHEP::mm,
973 radInnerOuterDw+7.5*CLHEP::mm, 0.5*lengthSpiderWebSupportOnIC, 0.0, 360.0*CLHEP::degree);
974 G4LogicalVolume *aVolIC1GSpd =
new G4LogicalVolume(aVolIC1GTSpd, myAlumIC, aNStrTmpSpd);
975 G4ThreeVector posTmpSpd(0., 0.,
976 zCoordLocalCurrent + 101.5*CLHEP::mm + 0.5*lengthSpiderWebSupportOnIC );
977 zPosSpiderWebSupportOnIC[2] = posTmpSpd[2];
978 radRingSpiderSuppICOuter[2] = radInnerOuterDw + 7.5*CLHEP::mm + 0.025*CLHEP::mm;
979 std::cerr <<
" Long. Position of last spider web support ring " 980 << posTmpSpd[2] <<
" Length " << lengthSpiderWebSupportOnIC <<
std::endl;
981 new G4PVPlacement((G4RotationMatrix *) 0, posTmpSpd, aVolIC1GSpd, aNStrTmpSpd +
std::string(
"_P"),
982 volMother,
false, 1,
true);
984 zCoordLocalCurrent += lengthICDwnstrCyl + 0.025*CLHEP::mm;
988 std::cerr <<
" Distance between the downstream end of IC and zZeroLocal Coord " 989 << zCoordLocalCurrent - zZeroLocalCoord <<
std::endl;
995 for (
size_t iCs=0; iCs != 3; iCs++) {
997 const double zSpiderSupport = zPosSpiderWebSupportOnIC[iCs];
1003 std::ostringstream osstrTmp; osstrTmp << iCs;
1004 nameStrH += osstrTmp.str() +
std::string(
"_support");
1005 G4String nameStr2(nameStrH); nameStr2 += G4String(
"_Riser");
1006 const double heightRiser = 0.333*in - 0.020*CLHEP::mm;
1007 const double widthH = 1.5*in;
1008 const double thickH = 0.184*2*in;
1009 G4Box *aBoxRiser =
new G4Box(nameStr2, widthH/2., heightRiser/2.0, thickH/2.0);
1010 G4LogicalVolume *pCurrentRiser =
1011 new G4LogicalVolume(aBoxRiser, myAlumIC, nameStr2);
1013 G4String nameStr3(nameStrH); nameStr3 += G4String(
"Hanger");
1014 const double heightH = radInnerOC - radRingSpiderSuppICOuter[iCs] - 1.0*CLHEP::mm - heightRiser;
1015 const double widthH2 = 1.0*in;
1017 const double thickH2 = 0.031*in;
1018 G4Box *aBoxHanger =
new G4Box(nameStr3, widthH2/2., heightH/2.0, thickH2/2.0);
1019 G4LogicalVolume *pCurrentHanger =
1020 new G4LogicalVolume(aBoxHanger, myAlumIC, nameStr3);
1022 G4ThreeVector posTmp(0., 0., zSpiderSupport);
1024 for (
int iRot=0; iRot != 3; iRot++) {
1025 std::ostringstream rnStrStr; rnStrStr <<
"_" << (iRot+1);
1026 G4String rnStr(rnStrStr.str());
1028 G4RotationMatrix * rMatPr = 0;
1030 rMatPr =
new G4RotationMatrix;
1031 rMatPr->rotateZ(2.0*M_PI/3.);
1032 }
else if (iRot == 2) {
1033 rMatPr =
new G4RotationMatrix;
1034 rMatPr->rotateZ(-2.0*M_PI/3.);
1037 const double dHRiser = radRingSpiderSuppICOuter[iCs] + 0.010*CLHEP::mm + heightRiser/2.;
1038 posTmp[0] = 0.; posTmp[1] = dHRiser;
1040 posTmp[0] = dHRiser*rMatPr->xy();
1041 posTmp[1] = dHRiser*rMatPr->yy();
1044 new G4PVPlacement(rMatPr, posTmp, pCurrentRiser, nameStr2 +
std::string(
"_P") + rnStr,
1047 new G4PVPlacement(G4Transform3D(*rMatPr, posTmp), pCurrentRiser, nameStr2 +
std::string(
"_P") + rnStr,
1048 volMother,
false, iRot,
true);
1052 const double dHHanger = radRingSpiderSuppICOuter[iCs] + 0.010*CLHEP::mm + 0.5*CLHEP::mm + heightRiser + heightH/2.;
1053 posTmp[0] = 0.; posTmp[1] = dHHanger;
1055 posTmp[0] = dHHanger*rMatPr->xy();
1056 posTmp[1] = dHHanger*rMatPr->yy();
1060 new G4PVPlacement(rMatPr, posTmp, pCurrentHanger, nameStr3 +
std::string(
"_P") + rnStr,
1063 new G4PVPlacement(G4Transform3D(*rMatPr, posTmp), pCurrentHanger, nameStr3 +
std::string(
"_P") + rnStr,
1064 volMother,
false, iRot,
true);
1071 double zEndICIOFl = 0.;
1073 const double radOuterDownstrtIO = 0.5*(525. - radInnerInnerDw)*CLHEP::mm;
1074 const double radInnerDownstrtIO = 0.5*(2.0*radOuterDownstrtIO - 8.0*CLHEP::mm - thickInner);
1075 const double phiStartInnerDownstrtIO = 0.;
1076 const double yCenterInnerDownstrtIO = radInnerInnerDw + thickInner + radInnerDownstrtIO;
1077 const double yCenterOuterDownstrtIO = radInnerInnerDw + radOuterDownstrtIO;
1078 const double zCenterDownstrtIO = zCoordLocalCurrent;
1079 std::cerr <<
" Check distance between start of the downstream IO section to zZeroLocalCoord " 1080 << zCenterDownstrtIO - zZeroLocalCoord <<
std::endl;
1081 const size_t nSegDownstrIO = 20.;
1083 const double deltaPhiDownstrIO = (M_PI - phiStartInnerDownstrtIO)/nSegDownstrIO;
1085 for (
size_t kPhi = 0; kPhi != nSegDownstrIO; kPhi++ ) {
1086 std::ostringstream aNStrStr; aNStrStr << header <<
"DownstrIOSect" << kPhi;
1089 const double phi0 = phiStartInnerDownstrtIO + kPhi*deltaPhiDownstrIO + 1.0e-5;
1090 const double phi1 = phi0 + deltaPhiDownstrIO - 2.0e-5;
1091 zTmps[0] = zCenterDownstrtIO + radInnerDownstrtIO*std::sin(phi0);
1092 zTmps[1] = zCenterDownstrtIO + radOuterDownstrtIO*std::sin(phi0);
1093 zTmps[2] = zCenterDownstrtIO + radOuterDownstrtIO*std::sin(phi1);
1094 zTmps[3] = zCenterDownstrtIO + radInnerDownstrtIO*std::sin(phi1);
1095 rTmps[0] = yCenterInnerDownstrtIO - radInnerDownstrtIO*std::cos(phi0);
1096 rTmps[1] = yCenterOuterDownstrtIO - radOuterDownstrtIO*std::cos(phi0);
1097 rTmps[2] = yCenterOuterDownstrtIO - radOuterDownstrtIO*std::cos(phi1);
1098 rTmps[3] = yCenterInnerDownstrtIO - radInnerDownstrtIO*std::cos(phi1);
1102 G4GenericPolycone *aVolGP =
new G4GenericPolycone(aNStr, 0.0, 360.0*CLHEP::degree, 4, &rTmps[0], &zTmps[0]);
1103 G4LogicalVolume *aVolG =
new G4LogicalVolume(aVolGP, myAlumIC, aNStr);
1104 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolG, aNStr +
std::string(
"_P"),
1105 volMother,
false, 1,
true);
1106 if (kPhi < nSegDownstrIO/2) {
1115 double zLocalDwnstrICFlange = 0.;
1119 const double radInnerFlDownstrtIO = 50.*CLHEP::mm;
1120 const double radOuterFlDownstrtIO = 24.5*CLHEP::mm;
1121 const double phiStartInnerFlDownstrtIO = 0.083333;
1122 const double phiStartOuterFlDownstrtIO = 0.0;
1123 const double yCenterOuterFlDownstrtIO = radOuterFlDownstrtIO + 525.0*CLHEP::mm;
1124 const double yCenterInnerFlDownstrtIO = radInnerFlDownstrtIO + 517.0*CLHEP::mm;
1125 const double zCenterFlDownstrtIO = zCoordLocalCurrent - 0.050*CLHEP::mm;
1126 const size_t nSegFlDownstrIO = 10;
1127 const double deltaPhiFlDownstrIOInner = (M_PI/2.0 - phiStartInnerFlDownstrtIO)/nSegFlDownstrIO;
1128 const double deltaPhiFlDownstrIOOuter = (M_PI/2.0 - phiStartOuterFlDownstrtIO)/nSegFlDownstrIO;
1132 for (
size_t kPhi = 0; kPhi != nSegFlDownstrIO; kPhi++ ) {
1133 std::ostringstream aNStrStr; aNStrStr << header <<
"DwnstrFlIOSect" << kPhi;
1135 const double phi0Inner = phiStartInnerFlDownstrtIO + kPhi*deltaPhiFlDownstrIOInner + 1.0e-2;
1136 const double phi1Inner = phi0Inner + deltaPhiFlDownstrIOInner - 2.0e-2;
1137 const double phi0Outer = phiStartOuterFlDownstrtIO + kPhi*deltaPhiFlDownstrIOOuter + 1.0e-2;
1138 const double phi1Outer = phi0Outer + deltaPhiFlDownstrIOOuter - 2.0e-2;
1139 zTmps[0] = zCenterFlDownstrtIO - radOuterFlDownstrtIO*std::cos(phi0Outer);
1140 zTmps[1] = zCenterFlDownstrtIO - radOuterFlDownstrtIO*std::cos(phi1Outer);
1141 zTmps[2] = zCenterFlDownstrtIO - radInnerFlDownstrtIO*std::cos(phi1Inner);
1142 zTmps[3] = zCenterFlDownstrtIO - radInnerFlDownstrtIO*std::cos(phi0Inner);
1143 rTmps[0] = yCenterOuterFlDownstrtIO - radOuterFlDownstrtIO*std::sin(phi0Outer);
1144 rTmps[1] = yCenterOuterFlDownstrtIO - radOuterFlDownstrtIO*std::sin(phi1Outer);
1145 rTmps[2] = yCenterInnerFlDownstrtIO - radInnerFlDownstrtIO*std::sin(phi1Inner);
1146 rTmps[3] = yCenterInnerFlDownstrtIO - radInnerFlDownstrtIO*std::sin(phi0Inner);
1150 G4GenericPolycone *aVolGP =
new G4GenericPolycone(aNStr, 0.0, 360.0*CLHEP::degree, 4, &rTmps[0], &zTmps[0]);
1151 G4LogicalVolume *aVolG =
new G4LogicalVolume(aVolGP, myAlumIC, aNStr);
1152 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolG, aNStr +
std::string(
"_P"),
1153 volMother,
false, 1,
true);
1157 zTmps[0] = zCenterFlDownstrtIO - radOuterFlDownstrtIO;
1158 rTmps[0] = 629.5*CLHEP::mm;
1159 zTmps[1] = zTmps[0];
1160 rTmps[1] = yCenterOuterFlDownstrtIO + 0.010*CLHEP::mm;
1161 zTmps[2] = zCenterFlDownstrtIO - radInnerFlDownstrtIO;;
1162 rTmps[2] = yCenterInnerFlDownstrtIO + 0.010*CLHEP::mm;;
1163 zTmps[3] = zTmps[2];
1164 rTmps[3] = rTmps[0];
1167 G4GenericPolycone* aVolDwnstrFlA =
1168 new G4GenericPolycone(aNStrTmpO, 0.0, 360.0*CLHEP::degree, 4, &rTmps[0], &zTmps[0]);
1169 G4LogicalVolume *aVolDwnstrFlAG =
new G4LogicalVolume(aVolDwnstrFlA, myAlumOC, aNStrTmpO);
1170 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolDwnstrFlAG, aNStrTmpO +
std::string(
"_P"),
1171 volMother,
false, 1,
true);
1172 zEndICIOFl = zTmps[0];
1178 double zLocalDwnstrOCFlange = 0.;
1179 double zLocalStartICEQ = 0.;
1180 double zLocalStartOCEQ = 0.;
1182 const double thickUpstrFlange = (28.0 -1.5)*CLHEP::mm;
1183 const double spacerUstrFlange = 67.0*CLHEP::mm;
1184 const double lengthOC = (3149.2 - 0.05)*CLHEP::mm;
1185 const double radOuterOC = 650.*CLHEP::mm;
1187 G4Tubs* aVolOCG =
new G4Tubs(aNStrTmp, radInnerOC, radOuterOC,
1188 0.5*lengthOC, 0.0, 360.0*CLHEP::degree);
1189 G4LogicalVolume *aVolOCGL =
new G4LogicalVolume(aVolOCG, myAlumOC, aNStrTmp);
1190 G4ThreeVector posTmp(0., 0., zZeroLocalCoord + spacerUstrFlange + 0.5*lengthOC + 0.010*CLHEP::mm);
1191 std::cerr <<
" Position of Outer Conductor main cylinder " << posTmp[2] <<
" length " 1193 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolOCGL, aNStrTmp +
std::string(
"_P"),
1194 volMother,
false, 1,
true);
1196 zLocalDwnstrOCFlange += posTmp[2] + 0.5*lengthOC + 0.010*CLHEP::mm;
1197 std::cerr <<
" Z position of the start of the OC " << posTmp[2] - 0.5*lengthOC <<
std::endl;
1198 std::cerr <<
" Z position of the start of the OC downstream flange and drain connect " <<
1203 const double radInnerOCFl = 634*CLHEP::mm;
1204 const double radOuterOCFl = 688.*CLHEP::mm;
1206 G4Tubs* aVolOCFlG =
new G4Tubs(aNStrTmp2, radInnerOCFl, radOuterOCFl,
1207 0.5*thickUpstrFlange, 0.0, 360.0*CLHEP::degree);
1208 G4LogicalVolume *aVolOCFlGL =
new G4LogicalVolume(aVolOCFlG, myAlumOC, aNStrTmp);
1210 G4ThreeVector posTmp2(0., 0., zZeroLocalCoord + 39.5*CLHEP::mm + 0.5*thickUpstrFlange + 0.5*CLHEP::mm);
1211 new G4PVPlacement((G4RotationMatrix *) 0, posTmp2, aVolOCFlGL, aNStrTmp2 +
std::string(
"_P"),
1212 volMother,
false, 1,
true);
1220 const double thickOC = 16.0*CLHEP::mm;
1221 zTmps[0] = zLocalDwnstrOCFlange;
1222 rTmps[0] = 634.0*CLHEP::mm;
1223 zTmps[1] = zTmps[0] + 108.76*CLHEP::mm;
1224 rTmps[1] = 702.2*CLHEP::mm;
1225 zTmps[2] = zTmps[0] + 138.2*CLHEP::mm;
1226 rTmps[2] = 707.5*CLHEP::mm;
1227 zTmps[3] = zTmps[0] + 297.4*CLHEP::mm;
1228 rTmps[3] = 691.*CLHEP::mm;
1229 zTmps[4] = zTmps[0] + 359.1*CLHEP::mm;
1230 rTmps[4] = 651.*CLHEP::mm;
1231 zTmps[5] = zTmps[0] + 376.*CLHEP::mm;
1232 rTmps[5] = 651.*CLHEP::mm;
1233 zTmps[6] = zTmps[0] + 404.*CLHEP::mm;
1234 rTmps[6] = 634.*CLHEP::mm;
1235 zTmps[7] = zTmps[0] + 404.*CLHEP::mm;
1236 rTmps[7] = 634.*CLHEP::mm;
1237 for (
size_t kk=0; kk != 8; kk++) {
1238 zTmps[kk+8] = zTmps[7 - kk];
1239 rTmps[kk+8] = rTmps[7 - kk] + thickOC;
1241 rTmps[8] = 697.*CLHEP::mm;
1242 rTmps[9] = 766.5*CLHEP::mm;
1243 rTmps[10] = 766.5*CLHEP::mm;
1245 G4GenericPolycone* aVolDwnstrFlA =
1246 new G4GenericPolycone(aNStrTmpO, 0.0, 360.0*CLHEP::degree, 16, &rTmps[0], &zTmps[0]);
1247 G4LogicalVolume *aVolDwnstrFlAG =
new G4LogicalVolume(aVolDwnstrFlA, myAlumOC, aNStrTmpO);
1248 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolDwnstrFlAG, aNStrTmpO +
std::string(
"_P"),
1249 volMother,
false, 1,
true);
1250 zLocalStartOCEQ = zTmps[7];
1256 const double thickInsulator = (70.0 - 0.050)*CLHEP::mm;
1257 const double radInnerInsul = 634.0*CLHEP::mm;
1258 const double radOuterInsul = 694.0*CLHEP::mm;
1260 G4Tubs* aVolOCInsulG =
new G4Tubs(aNStrTmp, radInnerInsul, radOuterInsul,
1261 0.5*thickInsulator, 0.0, 360.0*CLHEP::degree);
1262 G4LogicalVolume *aVolOCInsulGL =
new G4LogicalVolume(aVolOCInsulG, myAlumina, aNStrTmp);
1263 std::cerr <<
" Placing insulator ring, from zLocalStartICEQ " << zLocalStartICEQ <<
std::endl;
1265 G4ThreeVector posTmp(0., 0., zLocalStartOCEQ + 0.5*thickInsulator + 0.025*CLHEP::mm);
1266 std::cerr <<
" .... zLocalStartICEQ after installation of the insulator ring .. " << zLocalStartICEQ <<
std::endl;
1268 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolOCInsulGL, aNStrTmp +
std::string(
"_P"),
1269 volMother,
false, 1,
true);
1271 zLocalStartICEQ = posTmp[2] + 0.5*thickInsulator + 0.050*CLHEP::mm;
1278 const double thickCon1 = 23.*CLHEP::mm;
1279 const double thickCon2 = (45. - thickCon1 - 0.050)*CLHEP::mm;
1280 const double radInnerCon1 = 630.1*CLHEP::mm;
1281 const double radOuterCon1 = 697.0*CLHEP::mm;
1282 const double radInnerCon2 = 570.0*CLHEP::mm;
1283 const double radOuterCon2 = radOuterCon1;
1285 G4Tubs* aVolOC1G =
new G4Tubs(aNStrTmp1, radInnerCon1, radOuterCon1,
1286 0.5*thickCon1, 0.0, 360.0*CLHEP::degree);
1288 G4Tubs* aVolOC2G =
new G4Tubs(aNStrTmp2, radInnerCon2, radOuterCon2,
1289 0.5*thickCon2, 0.0, 360.0*CLHEP::degree);
1290 G4LogicalVolume *aVolOC1GL =
new G4LogicalVolume(aVolOC1G, myAlumOC, aNStrTmp1);
1291 G4LogicalVolume *aVolOC2GL =
new G4LogicalVolume(aVolOC2G, myAlumOC, aNStrTmp2);
1297 G4ThreeVector posTmp1(0., 0., zLocalStartICEQ + 0.5*thickCon1 + 0.05*CLHEP::mm);
1298 std::cerr <<
" Zstart of Inner IC connect Flange to EQ IC1 " << posTmp1[2] - 0.5*thickCon1
1299 <<
" Zend of of the downstream IC flange " << zEndICIOFl <<
std::endl;
1300 std::cerr <<
" Dist Zstart of Inner IC connect Flange to EQ IC1 " << posTmp1[2] - 0.5*thickCon1 - zZeroLocalCoord
1301 <<
" and dist Zend of of the downstream IC flange " << zEndICIOFl - zZeroLocalCoord <<
std::endl;
1303 new G4PVPlacement((G4RotationMatrix *) 0, posTmp1, aVolOC1GL, aNStrTmp1 +
std::string(
"_P"),
1304 volMother,
false, 1,
true);
1305 std::cerr <<
" Z position of the connecting flange, inner " << posTmp1[2] <<
std::endl;
1306 G4ThreeVector posTmp2(0., 0., posTmp1[2] + 0.5*thickCon1 + 0.5*thickCon2 + 0.015*CLHEP::mm);
1307 new G4PVPlacement((G4RotationMatrix *) 0, posTmp2, aVolOC2GL, aNStrTmp2 +
std::string(
"_P"),
1308 volMother,
false, 1,
true);
1309 std::cerr <<
" Z position of the connecting flange, outer " << posTmp2[2] <<
std::endl;
1310 zLocalDwnstrICFlange = posTmp2[2] + 0.5*thickCon2 + 0.025*CLHEP::mm;
1312 const double radInnerCon3 = radOuterCon1 + 0.015*CLHEP::mm;
1313 const double radOuterCon3 = 715.*CLHEP::mm;
1314 const double thickCon3 = 12.9*CLHEP::mm;
1316 G4Tubs* aVolOC3G =
new G4Tubs(aNStrTmp3, radInnerCon3, radOuterCon3,
1317 0.5*thickCon3, 0.0, 360.0*CLHEP::degree);
1318 G4LogicalVolume *aVolOC3GL =
new G4LogicalVolume(aVolOC3G, myAlumOC, aNStrTmp3);
1319 G4ThreeVector posTmp3(0., 0., zLocalDwnstrICFlange - 0.5*thickCon3 + 0.0125*CLHEP::mm);
1320 new G4PVPlacement((G4RotationMatrix *) 0, posTmp3, aVolOC3GL, aNStrTmp3 +
std::string(
"_P"),
1321 volMother,
false, 1,
true);
1330 std::cerr <<
" ... Installing the current equalizer section for IC , Starting at Z " <<
1331 zLocalDwnstrICFlange <<
" (In Horn2 coord sys.), " << std::endl
1332 <<
" ..... length of mother " << lengthMother <<
1336 const double thickFlDWICICEQ = 27.31*CLHEP::mm;
1337 const double radInnerICICEQ = 707.*CLHEP::mm;
1338 const double radOuterICICEQ = 715.*CLHEP::mm;
1339 const double radInnerFlDWICICEQ = 707.0*CLHEP::mm;
1340 const double radOuterFlDWICICEQ = 730.0*CLHEP::mm;
1344 G4Tubs* aVolOC1G =
new G4Tubs(aNStrTmp1, radInnerICICEQ, radOuterICICEQ,
1346 G4LogicalVolume *aVolOC1GL =
new G4LogicalVolume(aVolOC1G, myAlumOC, aNStrTmp1);
1349 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolOC1GL, aNStrTmp1 +
std::string(
"_P"),
1350 volMother,
false, 1,
true);
1352 G4Tubs* aVolOC2G =
new G4Tubs(aNStrTmp2, radInnerFlDWICICEQ, radOuterFlDWICICEQ,
1353 0.5*thickFlDWICICEQ, 0.0, 360.0*CLHEP::degree);
1355 0.0125*CLHEP::mm + 0.5*thickFlDWICICEQ);
1356 G4LogicalVolume *aVolOC2GL =
new G4LogicalVolume(aVolOC2G, myAlumOC, aNStrTmp2);
1357 new G4PVPlacement((G4RotationMatrix *) 0, posTmp2, aVolOC2GL, aNStrTmp2 +
std::string(
"_P"),
1358 volMother,
false, 1,
true);
1363 const double angleHalfWPad = 0.131;
1364 const double radOuterPaDWICICEQ = 760.0*CLHEP::mm;
1365 const double radInnerPaDWICICEQ = (730.0+0.015)*CLHEP::mm;
1366 const double thickPaDWICICEQ = thickFlDWICICEQ;
1368 double angleHalfPad = M_PI/4.;
1369 for (
size_t kk=0; kk !=4; kk++) {
1370 std::ostringstream aStrStrTmpK3; aStrStrTmpK3 <<
"_" << kk;
1371 std::string aNStrTmpK3(aNStrTmp3); aNStrTmpK3 += aStrStrTmpK3.str();
1372 G4Tubs* aVolOC3G =
new G4Tubs(aNStrTmpK3, radInnerPaDWICICEQ, radOuterPaDWICICEQ,
1373 0.5*thickPaDWICICEQ, angleHalfPad-angleHalfWPad, 2.0*angleHalfWPad);
1374 G4LogicalVolume *aVolOC3GL =
new G4LogicalVolume(aVolOC3G, myAlumOC, aNStrTmpK3);
1376 new G4PVPlacement((G4RotationMatrix *) 0, posTmp2, aVolOC3GL, aNStrTmpK3 +
std::string(
"_P"),
1377 volMother,
false, 1,
true);
1378 angleHalfPad += M_PI/2.;
1386 std::cerr <<
" ... Installing the current equalizer section for oC , Starting at Z " <<
1387 zLocalStartOCEQ <<
" (In Horn2 coord sys.), " << std::endl
1388 <<
" ..... length of mother " << lengthMother <<
1392 const double thickFl1 = 32.5*CLHEP::mm;
1394 const double radInnerFl1 = 714.*CLHEP::mm;
1395 const double radOuterFl1 = 766.5*CLHEP::mm;
1396 const double radInnerTube = 758.5*CLHEP::mm;
1397 const double radOuterTube = radOuterFl1;
1401 G4Tubs* aVolOC1G =
new G4Tubs(aNStrTmp1, radInnerFl1, radOuterFl1,
1402 0.5*thickFl1, 0.0, 360.0*CLHEP::degree);
1403 G4LogicalVolume *aVolOC1GL =
new G4LogicalVolume(aVolOC1G, myAlumOC, aNStrTmp1);
1405 G4ThreeVector posTmp(0., 0., zLocalStartOCEQ + 0.5*thickFl1 + 0.025*CLHEP::mm);
1406 std::cerr <<
" ZStart of EQOC upstrs flange " << posTmp[2] - 0.5*thickFl1 <<
" length " << thickFl1 <<
std::endl;
1407 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolOC1GL, aNStrTmp1 +
std::string(
"_P"),
1408 volMother,
false, 1,
true);
1410 G4Tubs* aVolOC2G =
new G4Tubs(aNStrTmp2, radInnerTube, radOuterTube,
1411 0.5*lengthTube, 0.0, 360.0*CLHEP::degree);
1412 G4LogicalVolume *aVolOC2GL =
new G4LogicalVolume(aVolOC2G, myAlumOC, aNStrTmp2);
1413 G4ThreeVector posTmp2(0., 0., posTmp[2] + 0.5*thickFl1 + 0.5*lengthTube + 0.0125*CLHEP::mm);
1414 std::cerr <<
" ZStart of EQOC upstrs body " << posTmp2[2] - 0.5*lengthTube <<
" length " << lengthTube <<
std::endl;
1415 new G4PVPlacement((G4RotationMatrix *) 0, posTmp2, aVolOC2GL, aNStrTmp2 +
std::string(
"_P"),
1416 volMother,
false, 1,
true);
1418 const double thickFl2 = 27.5*CLHEP::mm;
1419 const double radInnerFl2 = 766.5*CLHEP::mm;
1420 const double radOuterFl2 = 773.5*CLHEP::mm;
1422 G4Tubs* aVolOC3G =
new G4Tubs(aNStrTmp3, radInnerFl2, radOuterFl2,
1423 0.5*thickFl2, 0.0, 360.0*CLHEP::degree);
1424 G4LogicalVolume *aVolOC3GL =
new G4LogicalVolume(aVolOC3G, myAlumOC, aNStrTmp3);
1425 G4ThreeVector posTmp3(posTmp2);
1426 posTmp3[2] += 0.5*lengthTube + 0.5*thickFl2 + 0.050*CLHEP::mm;
1427 new G4PVPlacement((G4RotationMatrix *) 0, posTmp3, aVolOC3GL, aNStrTmp3 +
std::string(
"_P"),
1428 volMother,
false, 1,
true);
1432 const double radOuterPaDWOCOCEQ = 811.5*CLHEP::mm;
1433 const double angleHalfWPad = (210.*CLHEP::mm)/radOuterPaDWOCOCEQ;
1434 const double radInnerPaDWOCOCEQ = (773.5+0.015)*CLHEP::mm;
1435 const double thickPaDWOCOCEQ = thickFl2;
1437 double angleHalfPad = M_PI/4.;
1438 for (
size_t kk=0; kk !=4; kk++) {
1439 std::ostringstream aStrStrTmpK4; aStrStrTmpK4 <<
"_" << kk;
1440 std::string aNStrTmpK4(aNStrTmp4); aNStrTmpK4 += aStrStrTmpK4.str();
1441 G4Tubs* aVolOC4G =
new G4Tubs(aNStrTmpK4, radInnerPaDWOCOCEQ, radOuterPaDWOCOCEQ,
1442 0.5*thickPaDWOCOCEQ, angleHalfPad-angleHalfWPad, 2.0*angleHalfWPad);
1443 G4LogicalVolume *aVolOC4GL =
new G4LogicalVolume(aVolOC4G, myAlumOC, aNStrTmpK4);
1445 new G4PVPlacement((G4RotationMatrix *) 0, posTmp3, aVolOC4GL, aNStrTmpK4 +
std::string(
"_P"),
1446 volMother,
false, 1,
true);
1447 angleHalfPad += M_PI/2.;
1456 std::cerr <<
" Dump of the R/Z map, accurate, for the magnetic field " <<
std::endl;
1466 std::cerr <<
" Conceptual desing, October/November 2016, Skipping the installation of the strip lines, " <<
1467 " as they are no longer in the beam aperture. " <<
std::endl 1468 <<
" .... Also, we do not have the updated drawings yet. " <<
std::endl;
1474 "LBNEVolumePlacements::PlaceFinalLBNFConceptStripLinesConnectHornB");
1476 "LBNEVolumePlacements::PlaceFinalLBNFConceptHornB");
1478 const double lengthHornB = plDatMotherHorn2->
fParams[2];
1479 const double lengthStripZone = 870.25;
1481 const double zPosStripZone = plDatMotherHorn2->
fPosition[2] + 0.5*lengthHornB
1482 + 0.5*lengthStripZoneEff + 0.1*CLHEP::mm;
1483 G4Material *myAlum = G4Material::GetMaterial(
"Aluminum");
1484 G4Material *myAir = G4Material::GetMaterial(
"Air");
1486 const double halfWidthZone = 561. + 47.5*CLHEP::mm;
1487 const double halfHeightZone = 0.5*(1560. + 0.5*CLHEP::mm);
1489 G4Box* aVolM =
new G4Box(aNStrTmp1, halfWidthZone, halfHeightZone, 0.5*lengthStripZoneEff);
1490 G4LogicalVolume *volMotherLoc =
new G4LogicalVolume(aVolM, myAir, aNStrTmp1);
1491 G4ThreeVector posTmpM(0., 0., zPosStripZone);
1492 G4LogicalVolume *volMother = plDatMotherTunnel->
fCurrent;
1493 new G4PVPlacement((G4RotationMatrix *) 0, posTmpM, volMotherLoc, aNStrTmp1 +
std::string(
"_P"),
1494 volMother,
false, 1,
true);
1495 bool doInstallCurrEq =
true;
1496 bool doInstallStrplConn =
true;
1497 bool doInstallStrpl =
true;
1501 const double lengthCurrEqOC = 501.0*mm;
1502 const double lengthCurrEqOCHere = lengthCurrEqOC - fLengthCurrEqOCInMotherHorn2 - 0.050*CLHEP::mm;
1503 double zLocalCurrent = -0.5*lengthStripZoneEff + 0.025*CLHEP::mm;
1504 std::cerr <<
" .... zLocalCurrent Before placing Current eq " 1505 << zLocalCurrent <<
" lengthCurrEqOCHere " << lengthCurrEqOCHere <<
std::endl;
1506 if (doInstallCurrEq) {
1509 0.5*lengthCurrEqOCHere, 0.0, 360.0*CLHEP::degree);
1510 G4LogicalVolume *aVolOC1GL =
new G4LogicalVolume(aVolOC1G, myAlum, aNStr1);
1511 G4ThreeVector posTmp1(0., 0., zLocalCurrent+ 0.5*lengthCurrEqOCHere);
1512 new G4PVPlacement((G4RotationMatrix *) 0, posTmp1, aVolOC1GL, aNStr1 +
std::string(
"_P"),
1513 volMotherLoc ,
false, 1,
true);
1517 0.5*lengthCurrEqOCHere, 0.0, 360.0*CLHEP::degree);
1518 G4LogicalVolume *aVolIC2GL =
new G4LogicalVolume(aVolIC2G, myAlum, aNStr2);
1519 new G4PVPlacement((G4RotationMatrix *) 0, posTmp1, aVolIC2GL, aNStr2 +
std::string(
"_P"),
1520 volMotherLoc ,
false, 1,
true);
1521 zLocalCurrent = posTmp1[2] + 0.5*lengthCurrEqOCHere + 0.025*CLHEP::mm;
1522 std::cerr <<
" .... zLocalCurrent after placing Current eq " << zLocalCurrent <<
std::endl;
1526 const double thickFlg = 25.0*CLHEP::mm;
1527 zLocalCurrent -= 0.5*thickFlg;
1530 0.5*thickFlg, 0.0, 360.0*CLHEP::degree);
1531 G4LogicalVolume *aVolOC3GL =
new G4LogicalVolume(aVolOC3G, myAlum, aNStr3);
1532 G4ThreeVector posTmp3(0., 0., zLocalCurrent);
1533 new G4PVPlacement((G4RotationMatrix *) 0, posTmp3, aVolOC3GL, aNStr3 +
std::string(
"_P"),
1534 volMotherLoc ,
false, 1,
true);
1538 0.5*thickFlg, 0.0, 360.0*CLHEP::degree);
1539 G4LogicalVolume *aVolIC4GL =
new G4LogicalVolume(aVolIC4G, myAlum, aNStr4);
1540 new G4PVPlacement((G4RotationMatrix *) 0, posTmp3, aVolIC4GL, aNStr4 +
std::string(
"_P"),
1541 volMotherLoc ,
false, 1,
true);
1542 zLocalCurrent += 0.5*thickFlg + 0.025*CLHEP::mm;
1543 std::cerr <<
" After installing current equal downstream flanges , zLocalCurrent " 1549 const double thickConnPlate = 9.52*CLHEP::mm;
1550 if (doInstallStrplConn) {
1557 const double widthConnPlate = 200.0*CLHEP::mm;
1558 const double heightConnPlateO = 56.875*CLHEP::mm;
1559 const double heightConnPlateI = 48.75*CLHEP::mm;
1562 G4Box* aVol1OOG =
new G4Box(aNStr1OO, 0.5*widthConnPlate, 0.5*heightConnPlateO, 0.5*thickConnPlate);
1563 G4LogicalVolume *aVol1OOGL =
new G4LogicalVolume(aVol1OOG, myAlum, aNStr1OO);
1565 G4Box* aVol1IIG =
new G4Box(aNStr1II, 0.5*widthConnPlate, 0.5*heightConnPlateI, 0.5*thickConnPlate);
1566 G4LogicalVolume *aVol1IIGL =
new G4LogicalVolume(aVol1IIG, myAlum, aNStr1II);
1567 const double radInnerCurveConnPlate = 45.0*CLHEP::mm;
1568 const double radOuterCurveConnPlate = radInnerCurveConnPlate + thickConnPlate + 0.025*CLHEP::mm;
1570 const double radLocConnPlateOC = 0.5*(1122. - heightConnPlateO)*CLHEP::mm;
1571 const double radLocConnPlateIC = 0.5*(662.3 + heightConnPlateI - 1.5)*CLHEP::mm;
1573 const double radLocConnCurvedOC = 0.5*(1005. - 0.050)*CLHEP::mm - 0.5*radOuterCurveConnPlate;
1574 const double radLocConnCurvedIC = 0.5*(871.42 - radOuterCurveConnPlate + 1.5)*CLHEP::mm;
1575 zLocalCurrent += 0.5*thickConnPlate + 0.025*CLHEP::mm;
1576 std::cerr <<
" Before installing ConnFlat, zLocalCurrent " << zLocalCurrent <<
std::endl;
1577 for (
int kPhi=0; kPhi != 4; kPhi++) {
1578 std::ostringstream phiOCStrStr; phiOCStrStr << (kPhi+1);
1579 std::ostringstream phiICStrStr; phiICStrStr << (kPhi+5);
1581 const double anglePhiPlate = (kPhi+1)*M_PI/2. - M_PI/4.;
1582 fRotHornBStrpLineConnFlatB[kPhi]->rotateZ(anglePhiPlate);
1583 double xLocalPlateOC = radLocConnPlateOC*std::cos(anglePhiPlate);
1584 double yLocalPlateOC = radLocConnPlateOC*std::sin(anglePhiPlate);
1585 G4ThreeVector posTmp1OC(xLocalPlateOC, yLocalPlateOC, zLocalCurrent);
1586 new G4PVPlacement(fRotHornBStrpLineConnFlatB[kPhi], posTmp1OC,
1587 aVol1OOGL, aNStr1OO + phiOCStrStr.str() +
std::string(
"_P"),
1588 volMotherLoc ,
false, kPhi+1,
true);
1589 double xLocalPlateIC = radLocConnPlateIC*std::cos(anglePhiPlate);
1590 double yLocalPlateIC = radLocConnPlateIC*std::sin(anglePhiPlate);
1591 G4ThreeVector posTmp1IC(xLocalPlateIC, yLocalPlateIC, zLocalCurrent);
1592 new G4PVPlacement(fRotHornBStrpLineConnFlatB[kPhi], posTmp1IC,
1593 aVol1IIGL, aNStr1II + phiICStrStr.str() +
std::string(
"_P"),
1594 volMotherLoc ,
false, kPhi+1,
true);
1603 G4Tubs* aVolTQ1G =
new G4Tubs(aNStr2Q1, radInnerCurveConnPlate,
1604 radInnerCurveConnPlate + thickConnPlate, 0.5*widthConnPlate, 180.*CLHEP::degree, 90.0*CLHEP::degree);
1605 G4LogicalVolume *aVolTQ1GL =
new G4LogicalVolume(aVolTQ1G, myAlum, aNStr2Q1);
1607 G4Box* aVolTQ1MG =
new G4Box(aNStr2Q1M,
1608 0.5*(widthConnPlate + 0.025*CLHEP::mm),
1609 0.5*(radOuterCurveConnPlate + 0.025*CLHEP::mm),
1610 0.5*(radOuterCurveConnPlate + 0.025*CLHEP::mm));
1611 G4LogicalVolume *aVolTQ1MGL =
new G4LogicalVolume(aVolTQ1MG, myAir, aNStr2Q1M);
1612 G4ThreeVector posTmpQ1MOC(0., 0.5*(radOuterCurveConnPlate-0.0125*CLHEP::mm),
1613 0.5*(radOuterCurveConnPlate-0.0125*CLHEP::mm));
1618 aVolTQ1MGL ,
false, 1,
true);
1623 G4Tubs* aVolTQ2G =
new G4Tubs(aNStr2Q2, radInnerCurveConnPlate,
1624 radInnerCurveConnPlate + thickConnPlate, 0.5*widthConnPlate, 90.*CLHEP::degree, 90.0*CLHEP::degree);
1625 G4LogicalVolume *aVolTQ2GL =
new G4LogicalVolume(aVolTQ2G, myAlum, aNStr2Q2);
1627 G4Box* aVolTQ2MG =
new G4Box(aNStr2Q2M,
1628 0.5*(widthConnPlate + 0.025*CLHEP::mm),
1629 0.5*(radOuterCurveConnPlate + 0.025*CLHEP::mm),
1630 0.5*(radOuterCurveConnPlate + 0.025*CLHEP::mm));
1631 G4LogicalVolume *aVolTQ2MGL =
new G4LogicalVolume(aVolTQ2MG, myAir, aNStr2Q2M);
1632 G4ThreeVector posTmpQ2MOC(0., -0.5*(radOuterCurveConnPlate-0.0125*CLHEP::mm),
1633 0.5*(radOuterCurveConnPlate-0.0125*CLHEP::mm));
1636 aVolTQ2MGL ,
false, 1,
true);
1639 zLocalCurrent += -0.5*thickConnPlate + 0.5*radOuterCurveConnPlate + 0.025*CLHEP::mm;
1640 std::cerr <<
" After installing ConnFlat, zLocalCurrent " << zLocalCurrent <<
std::endl;
1641 for (
int kPhi=0; kPhi != 4; kPhi++) {
1643 std::ostringstream phiOCStrStr; phiOCStrStr << (kPhi+1);
1644 const double anglePhiCurve = (kPhi + 1)*M_PI/2. - M_PI/4.;
1645 double xLocalCurvedOC = radLocConnCurvedOC*std::cos(anglePhiCurve);
1646 double yLocalCurvedOC = radLocConnCurvedOC*std::sin(anglePhiCurve);
1647 G4ThreeVector posTmp1OC(xLocalCurvedOC, yLocalCurvedOC, zLocalCurrent);
1648 if ((kPhi == 0) || (kPhi ==2)) {
1650 aVolTQ1MGL, aNStr2Q1M + phiOCStrStr.str() +
std::string(
"_P"),
1651 volMotherLoc ,
false, kPhi + 1,
true);
1655 aVolTQ2MGL, aNStr2Q2M + phiOCStrStr.str() +
std::string(
"_P"),
1656 volMotherLoc ,
false, kPhi + 1,
true);
1662 for (
int kPhi=0; kPhi != 4; kPhi++) {
1664 std::ostringstream phiICStrStr; phiICStrStr << (kPhi+5);
1665 const double anglePhiCurve = (kPhi + 1)*M_PI/2. - M_PI/4.;
1666 double xLocalCurvedIC = radLocConnCurvedIC*std::cos(anglePhiCurve);
1667 double yLocalCurvedIC = radLocConnCurvedIC*std::sin(anglePhiCurve);
1668 G4ThreeVector posTmp1IC(xLocalCurvedIC, yLocalCurvedIC, zLocalCurrent);
1669 if ((kPhi == 0) || (kPhi ==2)) {
1671 aVolTQ2MGL, aNStr2Q2M + phiICStrStr.str() +
std::string(
"_P"),
1672 volMotherLoc ,
false, kPhi + 1,
true);
1675 aVolTQ1MGL, aNStr2Q1M + phiICStrStr.str() +
std::string(
"_P"),
1676 volMotherLoc ,
false, kPhi + 1,
true);
1679 zLocalCurrent += 0.5*radOuterCurveConnPlate + 0.025*CLHEP::mm;
1682 std::cerr <<
" Before installing 45 degree stripline plates, zLocalCurrent " << zLocalCurrent <<
std::endl;
1683 if (doInstallStrpl) {
1688 const double length45Deg = 275.0*CLHEP::mm;
1689 const double width45Deg = 200*CLHEP::mm;
1691 G4Box* aVol45DG =
new G4Box(aNStr45D, 0.5*width45Deg, 0.5*thickConnPlate, 0.5*length45Deg);
1692 G4LogicalVolume *aVol45DGL =
new G4LogicalVolume(aVol45DG, myAlum, aNStr45D);
1693 const double radLoc45DegOC = 0.5*896.82*CLHEP::mm + 0.5*thickConnPlate;
1694 const double radLoc45DegIC = 0.5*871.45*CLHEP::mm - 0.5*thickConnPlate;
1695 zLocalCurrent += 0.5*length45Deg + 0.025*CLHEP::mm;
1696 std::cerr <<
" Before installing 45 degree stripline section, 2nd check, zLocalCurrent " << zLocalCurrent <<
std::endl;
1697 for (
int kPhi=0; kPhi != 4; kPhi++) {
1698 std::ostringstream phiOCStrStr; phiOCStrStr << (kPhi+1);
1699 std::ostringstream phiICStrStr; phiICStrStr << (kPhi+5);
1700 const double anglePhiPlate = (kPhi+1)*M_PI/2. - M_PI/4.;
1701 double xLocalPlateOC = radLoc45DegOC*std::cos(anglePhiPlate);
1702 double yLocalPlateOC = radLoc45DegOC*std::sin(anglePhiPlate);
1703 G4ThreeVector posTmp1OC(xLocalPlateOC, yLocalPlateOC, zLocalCurrent);
1705 aVol45DGL, aNStr45D + phiOCStrStr.str() +
std::string(
"_P"),
1706 volMotherLoc ,
false, 1,
true);
1707 double xLocalPlateIC = radLoc45DegIC*std::cos(anglePhiPlate);
1708 double yLocalPlateIC = radLoc45DegIC*std::sin(anglePhiPlate);
1709 G4ThreeVector posTmp1IC(xLocalPlateIC, yLocalPlateIC, zLocalCurrent);
1711 aVol45DGL, aNStr45D + phiICStrStr.str() +
std::string(
"_P"),
1712 volMotherLoc ,
false, 1,
true);
1719 const double lengthLateral = 200.0*CLHEP::mm;
1720 const double widthLateral = 195*CLHEP::mm;
1722 const double widthTopConn = 98.43*CLHEP::mm;
1724 G4Box* aVolLatG =
new G4Box(aNStrLat, 0.5*widthLateral, 0.5*thickConnPlate, 0.5*lengthLateral);
1725 G4LogicalVolume *aVolLatGL =
new G4LogicalVolume(aVolLatG, myAlum, aNStrLat);
1726 const double xLocalLatOC = 0.5*widthTopConn + 0.5*widthLateral;
1727 const double yLocalLatOC = 0.5*814. + 0.5*thickConnPlate;
1728 G4ThreeVector posLatOC(xLocalLatOC, yLocalLatOC, zLocalCurrent);
1729 new G4PVPlacement((G4RotationMatrix*) 0, posLatOC,
1731 volMotherLoc ,
false, 1,
true);
1733 new G4PVPlacement((G4RotationMatrix*) 0, posLatOC,
1735 volMotherLoc ,
false, 2,
true);
1738 new G4PVPlacement((G4RotationMatrix*) 0, posLatOC,
1740 volMotherLoc ,
false, 3,
true);
1742 new G4PVPlacement((G4RotationMatrix*) 0, posLatOC,
1744 volMotherLoc ,
false, 4,
true);
1746 const double xLocalLatIC = 22.2*CLHEP::mm + 0.5*widthLateral;
1747 const double yLocalLatIC = 0.5*770.5 + 0.5*thickConnPlate;
1748 G4ThreeVector posLatIC(xLocalLatIC, yLocalLatIC, zLocalCurrent);
1749 new G4PVPlacement((G4RotationMatrix*) 0, posLatIC,
1751 volMotherLoc ,
false, 5,
true);
1753 new G4PVPlacement((G4RotationMatrix*) 0, posLatIC,
1755 volMotherLoc ,
false, 6,
true);
1759 new G4PVPlacement((G4RotationMatrix*) 0, posLatIC,
1761 volMotherLoc ,
false, 7,
true);
1763 new G4PVPlacement((G4RotationMatrix*) 0, posLatIC,
1765 volMotherLoc ,
false, 8,
true);
1769 const double heightLateral = 230.*CLHEP::mm;
1772 G4Box* aVolVertG =
new G4Box(aNStrVert, 0.5*thickConnPlate, 0.5*heightLateral, 0.5*lengthLateral);
1773 G4LogicalVolume *aVolVertGL =
new G4LogicalVolume(aVolVertG, myAlum, aNStrVert);
1774 const double xLocalVertOC = 0.5*98.425*CLHEP::mm - 0.5*thickConnPlate;
1775 const double xLocalVertIC = 0.5*54.*CLHEP::mm - 0.5*thickConnPlate;
1776 const double yLocalVertAll = 0.5*1282 - 0.5*heightLateral + 10.0*CLHEP::mm;
1777 G4ThreeVector posVertOC(xLocalVertOC, yLocalVertAll, zLocalCurrent);
1778 new G4PVPlacement((G4RotationMatrix*) 0, posVertOC,
1780 volMotherLoc ,
false, 1,
true);
1781 posVertOC[0] *= -1.0;
1782 new G4PVPlacement((G4RotationMatrix*) 0, posVertOC,
1784 volMotherLoc ,
false, 2,
true);
1785 posVertOC[1] *= -1.0;
1786 posVertOC[0] *= -1.0;
1787 new G4PVPlacement((G4RotationMatrix*) 0, posVertOC,
1789 volMotherLoc ,
false, 3,
true);
1790 posVertOC[0] *= -1.0;
1791 new G4PVPlacement((G4RotationMatrix*) 0, posVertOC,
1793 volMotherLoc ,
false, 4,
true);
1795 G4ThreeVector posVertIC(xLocalVertIC, yLocalVertAll, zLocalCurrent);
1796 new G4PVPlacement((G4RotationMatrix*) 0, posVertIC,
1798 volMotherLoc ,
false, 5,
true);
1799 posVertIC[0] *= -1.0;
1800 new G4PVPlacement((G4RotationMatrix*) 0, posVertIC,
1802 volMotherLoc ,
false, 6,
true);
1803 posVertIC[1] *= -1.0;
1804 posVertIC[0] *= -1.0;
1805 new G4PVPlacement((G4RotationMatrix*) 0, posVertIC,
1807 volMotherLoc ,
false, 7,
true);
1808 posVertIC[0] *= -1.0;
1809 new G4PVPlacement((G4RotationMatrix*) 0, posVertIC,
1811 volMotherLoc ,
false, 8,
true);
1815 const double widthJumpBlck = 98.5*CLHEP::mm;
1816 const double heightJumpBlck = 145.0*CLHEP::mm;
1817 const double lengthJumpBlck = 20.0*CLHEP::mm;
1818 const double yLocJumpBlck = 0.5*1215.0 - 0.5*heightJumpBlck;
1820 G4Box* aVolJmpG =
new G4Box(aNStrJmp, 0.5*widthJumpBlck, 0.5*heightJumpBlck, 0.5*lengthJumpBlck);
1821 G4LogicalVolume *aVolJmpGL =
new G4LogicalVolume(aVolJmpG, myAlum, aNStrJmp);
1822 const double offZJmp = 0.5*lengthLateral + 0.5*lengthJumpBlck + 5.0*CLHEP::mm;
1823 G4ThreeVector posJmpTopFr(0., yLocJumpBlck, zLocalCurrent - offZJmp);
1824 new G4PVPlacement((G4RotationMatrix*) 0, posJmpTopFr,
1826 volMotherLoc ,
false, 1,
true);
1827 G4ThreeVector posJmpTopBck(0., yLocJumpBlck, zLocalCurrent + offZJmp);
1828 new G4PVPlacement((G4RotationMatrix*) 0, posJmpTopBck,
1830 volMotherLoc ,
false, 1,
true);
1831 G4ThreeVector posJmpBotFr(0., -1.0*yLocJumpBlck, zLocalCurrent - offZJmp);
1832 new G4PVPlacement((G4RotationMatrix*) 0, posJmpBotFr,
1834 volMotherLoc ,
false, 1,
true);
1835 G4ThreeVector posJmpBotBck(0., -1.0*yLocJumpBlck, zLocalCurrent + offZJmp);
1836 new G4PVPlacement((G4RotationMatrix*) 0, posJmpBotBck,
1838 volMotherLoc ,
false, 1,
true);
1847 std::cerr <<
" LBNEVolumePlacements::PlaceFinalLBNFConceptHornC In progress...Drawing F10071767 " <<
std::endl;
1850 const double in = 25.4*CLHEP::mm;
1853 "LBNEVolumePlacements::PlaceFinalLBNFConceptHornC");
1854 G4LogicalVolume *volMother = plDatMother->
fCurrent;
1855 const double lengthMother=plDatMother->
fParams[2];
1856 const double zShiftMotherCoords = 0.005*CLHEP::mm;
1857 const size_t nSegUpstrIO = 20;
1858 const double distUpstreamToBeginIC = (237.451 - 106.0479 + 0.025)*CLHEP::mm;
1859 const double distUpstrCurrEQToBeginIC = (926. + 0.025)*CLHEP::mm;
1861 const double deltaPhiUpstrIO = M_PI/nSegUpstrIO;
1862 const double radOuterUpstIO = 131.254*CLHEP::mm;
1863 const double radInnerUpstIO = 125.25*CLHEP::mm;
1864 const double radInnerInner = 284.0*CLHEP::mm;
1865 const double thickInner = 4.0*CLHEP::mm;
1867 const double zZeroLocalCoord = -0.5*lengthMother + distUpstrCurrEQToBeginIC + 0.010*CLHEP::mm;
1868 const double zStartUpstrIOC = zZeroLocalCoord - radOuterUpstIO - 1.050*CLHEP::mm;
1869 const double radInnerOC = 634.0*CLHEP::mm;
1870 std::cerr <<
" .....Mother Volume name " << volMother->GetName()
1871 <<
" zShiftMother " << zShiftMotherCoords <<
" distUpstreamToBeginIC " 1872 << distUpstreamToBeginIC <<
" zZeroLocalCoords " << zZeroLocalCoord <<
std::endl;
1874 std::vector<double> zTmps(10, 0.); std::vector<double> rTmps(10, 0.);
1875 G4ThreeVector zeroC(0., 0., 0.);
1876 G4Material *myAlumina = G4Material::GetMaterial(
"Alumina");
1881 G4Material *myWater = 0;
1884 size_t nSegUpstrIOBy2 = nSegUpstrIO/2;
1887 for (
size_t kPhi = 0; kPhi != nSegUpstrIO; kPhi++ ) {
1888 std::ostringstream aNStrStr; aNStrStr << header <<
"UpstrIOSect" << kPhi;
1891 const double phi0 = kPhi*deltaPhiUpstrIO + 1.0e-5;
1892 const double phi1 = phi0 + deltaPhiUpstrIO - 2.0e-5;
1893 zTmps[0] = zStartUpstrIOC + radOuterUpstIO - radOuterUpstIO*std::sin(phi1);
1894 zTmps[1] = zStartUpstrIOC + radOuterUpstIO - radOuterUpstIO*std::sin(phi0);
1895 zTmps[2] = zStartUpstrIOC + radOuterUpstIO - radInnerUpstIO*std::sin(phi0);
1896 zTmps[3] = zStartUpstrIOC + radOuterUpstIO - radInnerUpstIO*std::sin(phi1);
1897 rTmps[0] = radInnerInner + radOuterUpstIO - radOuterUpstIO*std::cos(phi1);
1898 rTmps[1] = radInnerInner + radOuterUpstIO - radOuterUpstIO*std::cos(phi0);
1899 rTmps[2] = radInnerInner + thickInner + radInnerUpstIO - radInnerUpstIO*std::cos(phi0);
1900 rTmps[3] = radInnerInner + thickInner + radInnerUpstIO - radInnerUpstIO*std::cos(phi1);
1904 G4GenericPolycone *aVolGP =
new G4GenericPolycone(aNStr, 0.0, 360.0*CLHEP::degree, 4, &rTmps[0], &zTmps[0]);
1905 G4LogicalVolume *aVolG =
new G4LogicalVolume(aVolGP, myAlumIC, aNStr);
1906 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolG, aNStr +
std::string(
"_P"),
1907 volMother,
false, 1,
true);
1908 if (kPhi < nSegUpstrIO/2) {
1918 const double radOuterICFlTr = 628.*CLHEP::mm;
1919 const double radInnerICFlTr = 538.5*CLHEP::mm;;
1921 zTmps.resize(20); rTmps.resize(20);
1922 const double radInnerBig = 40.0*CLHEP::mm;
1923 const double radOuterSmall = 15.0 *CLHEP::mm;
1924 const size_t numPtsBig = 8;
1925 const size_t numPtsSmall = 4;
1926 const double phiStepBig = (M_PI/2)/numPtsBig;
1927 const double phiStepSmall = (M_PI/2)/numPtsSmall;
1928 for (
size_t i=0;
i!= numPtsBig+1;
i++) {
1929 const double phiC =
i*phiStepBig;
1930 zTmps[
i] = radInnerBig*std::sin(phiC);
1931 rTmps[
i] = radInnerICFlTr + radInnerBig - radInnerBig*std::cos(phiC);
1933 zTmps[numPtsBig+1] = zTmps[numPtsBig];
1934 rTmps[numPtsBig+1] = radOuterICFlTr;
1935 zTmps[numPtsBig+2] = 15.0*CLHEP::mm;
1936 rTmps[numPtsBig+2] = radOuterICFlTr;
1937 for (
size_t i=0;
i != (numPtsSmall+1);
i++) {
1938 const double phiC =
i*phiStepSmall;
1939 zTmps[numPtsBig+3+
i] = radOuterSmall*std::cos(phiC);
1940 rTmps[numPtsBig+3+
i] = radInnerICFlTr + thickInner + radOuterSmall*(1.0 - std::sin(phiC));
1942 for (
size_t i=0;
i != zTmps.size();
i++) zTmps[
i] += zZeroLocalCoord + 0.050*CLHEP::mm;
1943 const size_t numPtsFinal = numPtsBig + 3 + numPtsSmall + 1;
1955 G4GenericPolycone *aVolICFlG =
new G4GenericPolycone(aNStrTmp, 0.0, 360.0*CLHEP::degree,
1956 numPtsFinal, &rTmps[0], &zTmps[0]);
1957 G4LogicalVolume *aVolICFlGL =
new G4LogicalVolume(aVolICFlG, myAlumIC, aNStrTmp);
1959 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolICFlGL, aNStrTmp +
std::string(
"_P"),
1960 volMother,
false, 1,
true);
1966 double zEndOfIC = 0.;
1969 size_t numPtsIC = 2*(numPtsRinThickZ-5);
1971 std::vector<double> zc(numPtsIC);
1972 std::vector<double>
rc(numPtsIC);
1974 iRZPtr++; iRZPtr++; iRZPtr++;
1975 for (
size_t iPt = 0; iPt != numPtsIC; iPt++) {
1976 if (iPt < numPtsIC/2) {
1977 zc[iPt] = -0.5*lengthMother + iRZPtr->z() + 0.025*CLHEP::mm;
1978 rc[iPt] = iRZPtr->x();
1982 size_t iPtBack = numPtsIC - iPt -1;
1983 zc[iPt] = zc[iPtBack];
1984 rc[iPt] = rc[iPtBack] + thickInner;
1988 zEndOfIC = zc[numPtsIC/2 - 1];
1989 std::cerr <<
" Dump of the IC Polygon .... zEndOfIC " << zEndOfIC <<
" From start of IC " <<
1990 zEndOfIC - zZeroLocalCoord <<
std::endl;
1991 for (
size_t k=0;
k != rc.size();
k++) {
1992 std::cerr <<
" " <<
k <<
" " << zc[
k] <<
" " << zc[
k] - zZeroLocalCoord <<
" " << rc[
k] <<
std::endl;
1995 G4GenericPolycone *aVolGP =
1996 new G4GenericPolycone(aNStrTmp, 0.0, 360.0*CLHEP::degree, numPtsIC, &rc[0], &zc[0]);
1997 G4LogicalVolume *aVolG =
new G4LogicalVolume(aVolGP, myAlumIC, aNStrTmp);
1998 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolG, aNStrTmp +
std::string(
"_P"),
1999 volMother,
false, 1,
true);
2006 const double radInnerUW1 = radInnerInner + thickInner + 0.025*CLHEP::mm;
2008 const double lengthUW1 = (286. - 0.100)*CLHEP::mm;
2010 G4Tubs* aVolUW1 =
new G4Tubs(aNStrUW1, radInnerUW1, radOuterUW1, 0.5*lengthUW1, 0., 360.0*CLHEP::degree);
2011 G4LogicalVolume *aVolUW1L =
new G4LogicalVolume(aVolUW1, myWater, aNStrUW1);
2012 G4ThreeVector posUW1(0., 0., zZeroLocalCoord + 0.5*lengthUW1 + 0.025);
2013 new G4PVPlacement((G4RotationMatrix *) 0, posUW1, aVolUW1L, aNStrUW1 +
std::string(
"_P"),
2014 volMother,
false, 1,
true);
2019 size_t numPtsUW2SumTmp = 0;
2021 size_t numPtsUW2 = 2*(2+ numPtsUW2SumTmp +1 );
2024 std::vector<double> zc(numPtsUW2);
2025 std::vector<double>
rc(numPtsUW2);
2027 for (
int i=0;
i != 4;
i++) iRZPtr++;
2028 zc[0] = zZeroLocalCoord + (310. + 3.0)*CLHEP::mm;
2029 rc[0] = iRZPtr->x() + thickInner + 0.025*CLHEP::mm;
2030 for (
size_t iPtUW2 = 1; iPtUW2 != numPtsUW2/2-1; iPtUW2++) {
2031 zc[iPtUW2] = -0.5*lengthMother + iRZPtr->z() + 0.025*CLHEP::mm;
2032 rc[iPtUW2] = iRZPtr->x() + thickInner + 0.025*CLHEP::mm;
2036 iRZPtrBefDwnstrCone--;
2037 std::cerr <<
" Last iRZ point, beginning of downnstream cone, Z " << iRZPtr->z()
2039 zc[numPtsUW2/2-1] = zZeroLocalCoord + (866. - 0.6)*CLHEP::mm;
2040 rc[numPtsUW2/2-1] = (179.2558 + 0.1)*CLHEP::mm;
2041 for (
size_t iPtUW2 = numPtsUW2/2; iPtUW2 != numPtsUW2; iPtUW2++) {
2042 size_t iPtUW2R = numPtsUW2 - iPtUW2 -1;
2043 zc[iPtUW2] = zc[iPtUW2R];
2047 std::cerr <<
" Dump of the upstream Water Polygon ICU2Water " <<
std::endl;
2048 for (
size_t k=0;
k != rc.size();
k++) {
2049 std::cerr <<
" " <<
k <<
" " << zc[
k] <<
" " << zc[
k] - zZeroLocalCoord <<
" " << rc[
k] <<
std::endl;
2051 G4GenericPolycone *aVolGPUW2 =
2052 new G4GenericPolycone(aNStrUW2, 0.0, 360.0*CLHEP::degree, numPtsUW2, &rc[0], &zc[0]);
2053 G4LogicalVolume *aVolGUW2L =
new G4LogicalVolume(aVolGPUW2, myAlumIC, aNStrUW2);
2054 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolGUW2L , aNStrUW2 +
std::string(
"_P"),
2055 volMother,
false, 1,
true);
2060 std::cerr <<
" Number of pst water layer, numPtsCW0 " << numPtsCW0 <<
std::endl;
2061 zc.resize(numPtsCW0);
2062 rc.resize(numPtsCW0);
2063 iRZPtr = iRZPtrBefDwnstrCone;
2066 zc[0] = zZeroLocalCoord + (893.8916 + 0.1)*CLHEP::mm;
2067 rc[0] = (187.9 + thickInner + 0.025)*CLHEP::mm;
2068 for (
size_t iPtCW0 = 1; iPtCW0 != numPtsCW0/2-1; iPtCW0++) {
2069 zc[iPtCW0] = -0.5*lengthMother + iRZPtr->z() + 0.025*CLHEP::mm;
2070 rc[iPtCW0] = iRZPtr->x() + thickInner + 0.025*CLHEP::mm;
2073 zc[numPtsCW0/2-1] = zZeroLocalCoord + (1525.9205 - 0.1)*CLHEP::mm;
2074 rc[numPtsCW0/2-1] = 366.0*CLHEP::mm + thickInner + 0.025*CLHEP::mm;
2075 for (
size_t iPtCW0 = numPtsCW0/2; iPtCW0 != numPtsCW0; iPtCW0++) {
2076 size_t iPtCW0R = numPtsCW0 - iPtCW0 -1;
2077 zc[iPtCW0] = zc[iPtCW0R];
2080 std::cerr <<
" Dump of the upstream Water Polygon ICDw0Water " <<
std::endl;
2081 for (
size_t k=0;
k != rc.size();
k++) {
2082 std::cerr <<
" " <<
k <<
" " << zc[
k] <<
" " << zc[
k] - zZeroLocalCoord <<
" " << rc[
k] <<
std::endl;
2085 G4GenericPolycone *aVolGPCW0 =
2086 new G4GenericPolycone(aNStrCW0, 0.0, 360.0*CLHEP::degree, numPtsCW0, &rc[0], &zc[0]);
2087 G4LogicalVolume *aVolGCW0L =
new G4LogicalVolume(aVolGPCW0, myAlumIC, aNStrCW0);
2088 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolGCW0L, aNStrCW0 +
std::string(
"_P"),
2089 volMother,
false, 1,
true);
2093 const double radInnerDW2 = 366.0*CLHEP::mm + 0.025*CLHEP::mm;
2095 const double lengthDW2 = (504.50 - 0.2)*CLHEP::mm;
2097 G4Tubs* aVolDW2 =
new G4Tubs(aNStrDW2, radInnerDW2, radOuterDW2, 0.5*lengthDW2, 0.0, 360.0*CLHEP::degree);
2098 G4LogicalVolume *aVolDW2L =
new G4LogicalVolume(aVolDW2, myWater, aNStrDW2);
2099 G4ThreeVector posDW2(0., 0., zZeroLocalCoord + 1549.7 +
2100 0.5*lengthDW2 - 0.025*CLHEP::mm);
2101 new G4PVPlacement((G4RotationMatrix *) 0, posDW2, aVolDW2L, aNStrDW2 +
std::string(
"_P"),
2102 volMother,
false, 1,
true);
2108 const double lengthFirstWeld = 8.0*CLHEP::mm;
2109 const double radInnerWeld = radInnerInner + thickInner + 0.010;
2110 const double radOuterWeld = radInnerWeld + 4.0;
2113 G4Tubs* aVolIC0GTWe =
new G4Tubs(aNStrTmpWeld,
2114 radInnerWeld, radOuterWeld, 0.5*lengthFirstWeld, 0.0, 360.0*CLHEP::degree);
2115 G4LogicalVolume *aVolIC0GWe =
new G4LogicalVolume(aVolIC0GTWe, myAlumIC, aNStrTmpWeld);
2116 G4ThreeVector posTmpWeld(0., 0., zZeroLocalCoord + 0.5*lengthFirstWeld + 288.5*CLHEP::mm);
2117 new G4PVPlacement((G4RotationMatrix *) 0, posTmpWeld, aVolIC0GWe, aNStrTmpWeld +
std::string(
"_P"),
2118 volMother,
false, 1,
true);
2121 const double length2ndWeld = 8.0*CLHEP::mm;
2122 const double radInnerWeld = 366.0*CLHEP::mm + 0.010*CLHEP::mm;
2123 const double radOuterWeld = radInnerWeld + 4.0;
2125 G4Tubs* aVolIC0GTWe =
new G4Tubs(aNStrTmpWeld,
2126 radInnerWeld, radOuterWeld, 0.5*length2ndWeld, 0.0, 360.0*CLHEP::degree);
2127 G4LogicalVolume *aVolIC0GWe =
new G4LogicalVolume(aVolIC0GTWe, myAlumIC, aNStrTmpWeld);
2128 G4ThreeVector posTmpWeld(0., 0., zZeroLocalCoord + 0.5*length2ndWeld + 1527.5*CLHEP::mm);
2130 new G4PVPlacement((G4RotationMatrix *) 0, posTmpWeld, aVolIC0GWe, aNStrTmpWeld +
std::string(
"_P"),
2131 volMother,
false, 1,
true);
2138 double zCoordLocalCurrent = zZeroLocalCoord + (866.4702 - 1.0)*CLHEP::mm;
2141 std::vector<double> rTmpsSR(5, 0.);
2142 std::vector<double> zTmpsSR(5, zCoordLocalCurrent);
2143 rTmpsSR[0] = (179.35 + 0.050 )*CLHEP::mm;
2144 rTmpsSR[1] = (191.32 + 0.050)*CLHEP::mm;
2145 zTmpsSR[1] += 3.55*CLHEP::mm;
2146 rTmpsSR[2] = (191.32 + 0.050)*CLHEP::mm;
2147 zTmpsSR[2] += 20.*CLHEP::mm;
2148 rTmpsSR[3] = (186.0 + 0.050)*CLHEP::mm;
2149 zTmpsSR[3] += 22.*CLHEP::mm;
2150 rTmpsSR[4] = (rTmpsSR[0] - 0.0125)*CLHEP::mm;
2151 G4GenericPolycone *aVolGPCDSp =
2152 new G4GenericPolycone(aNStrTmpSp, 0.0, 360.0*CLHEP::degree, 5, &rTmpsSR[0], &zTmpsSR[0]);
2153 G4LogicalVolume *aVolGCDSp =
new G4LogicalVolume(aVolGPCDSp, myAlumIC, aNStrTmpSp);
2154 G4ThreeVector posTmpCDZero(0., 0., 0.);
2155 new G4PVPlacement((G4RotationMatrix *) 0, posTmpCDZero, aVolGCDSp, aNStrTmpSp +
std::string(
"_P"),
2156 volMother,
false, 1,
true);
2157 const double radRingSpiderSuppICOuter = rTmpsSR[2] + 0.025*CLHEP::mm;
2158 const double zSpiderSupport = 0.5*(zTmpsSR[1] + zTmpsSR[2]);
2164 G4String nameStr2(nameStrH); nameStr2 += G4String(
"Riser");
2165 const double heightRiser = 0.333*in - 0.020*CLHEP::mm;
2166 const double widthH = 1.5*in;
2167 const double thickH = 0.184*2*in;
2168 G4Box *aBoxRiser =
new G4Box(nameStr2, widthH/2., heightRiser/2.0, thickH/2.0);
2169 G4LogicalVolume *pCurrentRiser =
2170 new G4LogicalVolume(aBoxRiser, myAlumIC, nameStr2);
2172 G4String nameStr3(nameStrH); nameStr3 += G4String(
"Hanger");
2173 const double heightH = radInnerOC - radRingSpiderSuppICOuter - 1.0*CLHEP::mm - heightRiser;
2174 const double widthH2 = 1.0*in;
2176 const double thickH2 = 0.031*in;
2177 G4Box *aBoxHanger =
new G4Box(nameStr3, widthH2/2., heightH/2.0, thickH2/2.0);
2178 G4LogicalVolume *pCurrentHanger =
2179 new G4LogicalVolume(aBoxHanger, myAlumIC, nameStr3);
2181 std::cerr <<
" ..... zSpiderSupport " << zSpiderSupport <<
std::endl;
2182 G4ThreeVector posTmp(0., 0., zSpiderSupport);
2184 for (
int iRot=0; iRot != 3; iRot++) {
2185 std::ostringstream rnStrStr; rnStrStr <<
"_" << (iRot+1);
2186 G4String rnStr(rnStrStr.str());
2188 G4RotationMatrix * rMatPr = 0;
2190 rMatPr =
new G4RotationMatrix;
2191 rMatPr->rotateZ(2.0*M_PI/3.);
2192 }
else if (iRot == 2) {
2193 rMatPr =
new G4RotationMatrix;
2194 rMatPr->rotateZ(-2.0*M_PI/3.);
2197 const double dHRiser = radRingSpiderSuppICOuter + 0.010*CLHEP::mm + heightRiser/2.;
2198 posTmp[0] = 0.; posTmp[1] = dHRiser;
2200 posTmp[0] = dHRiser*rMatPr->xy();
2201 posTmp[1] = dHRiser*rMatPr->yy();
2204 new G4PVPlacement(rMatPr, posTmp, pCurrentRiser, nameStr2 +
std::string(
"_P") + rnStr,
2207 new G4PVPlacement(G4Transform3D(*rMatPr, posTmp), pCurrentRiser, nameStr2 +
std::string(
"_P") + rnStr,
2208 volMother,
false, iRot,
true);
2212 const double dHHanger = radRingSpiderSuppICOuter + 0.010*CLHEP::mm
2213 + 0.5*CLHEP::mm + heightRiser + heightH/2.;
2214 posTmp[0] = 0.; posTmp[1] = dHHanger;
2216 posTmp[0] = dHHanger*rMatPr->xy();
2217 posTmp[1] = dHHanger*rMatPr->yy();
2221 new G4PVPlacement(rMatPr, posTmp, pCurrentHanger, nameStr3 +
std::string(
"_P") + rnStr,
2224 new G4PVPlacement(G4Transform3D(*rMatPr, posTmp), pCurrentHanger, nameStr3 +
std::string(
"_P") + rnStr,
2225 volMother,
false, iRot,
true);
2234 const double radInnerDownstrtIO = 122.1*CLHEP::mm;
2235 const double radOuterDownstrtIO = 128.1*CLHEP::mm;
2236 const double phiStartInnerDownstrtIO = 0.;
2237 const double yCenterInnerDownstrtIO = 362.0*CLHEP::mm + thickInner + radInnerDownstrtIO;
2238 const double yCenterOuterDownstrtIO = 362.0*CLHEP::mm + radOuterDownstrtIO;
2239 const double zCenterDownstrtIO = zEndOfIC + 0.5*CLHEP::mm;
2240 const size_t nSegDownstrIO = 30.;
2241 const double deltaPhiDownstrIO = (M_PI - phiStartInnerDownstrtIO)/nSegDownstrIO;
2244 for (
size_t kPhi = 0; kPhi != nSegDownstrIO; kPhi++ ) {
2245 std::ostringstream aNStrStr; aNStrStr << header <<
"DownstrIOSect" << kPhi;
2248 const double phi0 = phiStartInnerDownstrtIO + kPhi*deltaPhiDownstrIO + 1.0e-5;
2249 const double phi1 = phi0 + deltaPhiDownstrIO - 2.0e-5;
2250 zTmps[0] = zCenterDownstrtIO + radInnerDownstrtIO*std::sin(phi0);
2251 zTmps[1] = zCenterDownstrtIO + radOuterDownstrtIO*std::sin(phi0);
2252 zTmps[2] = zCenterDownstrtIO + radOuterDownstrtIO*std::sin(phi1);
2253 zTmps[3] = zCenterDownstrtIO + radInnerDownstrtIO*std::sin(phi1);
2254 rTmps[0] = yCenterInnerDownstrtIO - radInnerDownstrtIO*std::cos(phi0);
2255 rTmps[1] = yCenterOuterDownstrtIO - radOuterDownstrtIO*std::cos(phi0);
2256 rTmps[2] = yCenterOuterDownstrtIO - radOuterDownstrtIO*std::cos(phi1);
2257 rTmps[3] = yCenterInnerDownstrtIO - radInnerDownstrtIO*std::cos(phi1);
2261 G4GenericPolycone *aVolGP =
new G4GenericPolycone(aNStr, 0.0, 360.0*CLHEP::degree,
2262 4, &rTmps[0], &zTmps[0]);
2263 G4LogicalVolume *aVolG =
new G4LogicalVolume(aVolGP, myAlumIC, aNStr);
2264 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolG, aNStr +
std::string(
"_P"),
2265 volMother,
false, 1,
true);
2266 if (kPhi < nSegDownstrIO/2.) {
2276 const double radOuterICFlDwnTr = (671.1)*CLHEP::mm;
2277 const double radInnerICFlDwnTr = 614*CLHEP::mm;
2278 const double thickDwnICFlangeTr = 25.2*CLHEP::mm;
2281 G4Tubs* aVolICFlTrG =
new G4Tubs(aNStrTmp, radInnerICFlDwnTr, radOuterICFlDwnTr,
2282 0.5*thickDwnICFlangeTr, 0.0, 360.0*CLHEP::degree);
2283 G4LogicalVolume *aVolICFlTrGL =
new G4LogicalVolume(aVolICFlTrG, myAlumIC, aNStrTmp);
2285 G4ThreeVector posTmp(0., 0., zEndOfIC - 0.5*thickDwnICFlangeTr - 0.050*CLHEP::mm);
2286 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolICFlTrGL, aNStrTmp +
std::string(
"_P"),
2287 volMother,
false, 1,
true);
2295 const double radOuterOC = 650.*CLHEP::mm;
2296 const double lengthOCBody = 1682.606 - 0.250*CLHEP::mm;
2299 G4Tubs* aVolOCbG =
new G4Tubs(aNStrTmpB, radInnerOC, radOuterOC,
2300 0.5*lengthOCBody, 0.0, 360.0*CLHEP::degree);
2301 G4LogicalVolume *aVolOCbGL =
new G4LogicalVolume(aVolOCbG, myAlumOC, aNStrTmpB);
2303 G4ThreeVector posTmp(0., 0., zZeroLocalCoord + 0.5*lengthOCBody + 151*CLHEP::mm);
2304 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolOCbGL, aNStrTmpB +
std::string(
"_P"),
2305 volMother,
false, 1,
true);
2307 const double radOuterOCFlU2 = 766.5*CLHEP::mm;
2308 const double radICOCFlU2 = radInnerOC;
2309 const double lengthOCFlU2 = (30.0 - 0.025)*CLHEP::mm;
2312 G4Tubs* aVolOCU2G =
new G4Tubs(aNStrTmpFlU2, radICOCFlU2, radOuterOCFlU2,
2313 0.5*lengthOCFlU2, 0.0, 360.0*CLHEP::degree);
2314 G4LogicalVolume *aVolOCU2GL =
new G4LogicalVolume(aVolOCU2G, myAlumOC, aNStrTmpFlU2);
2316 G4ThreeVector posTmpU2(0., 0., zZeroLocalCoord + 0.5*lengthOCFlU2 + (120.5 - 0.0125)*CLHEP::mm);
2317 new G4PVPlacement((G4RotationMatrix *) 0, posTmpU2, aVolOCU2GL, aNStrTmpFlU2 +
std::string(
"_P"),
2318 volMother,
false, 1,
true);
2320 const double radOuterOCFlU1 = 697.*CLHEP::mm;
2321 const double radICOCFlU1 = radInnerOC;
2322 const double lengthOCFlU1 = (15.0 - 0.025)*CLHEP::mm;
2325 G4Tubs* aVolOCU1G =
new G4Tubs(aNStrTmpFlU1, radICOCFlU1, radOuterOCFlU1,
2326 0.5*lengthOCFlU1, 0.0, 360.0*CLHEP::degree);
2327 G4LogicalVolume *aVolOCU1GL =
new G4LogicalVolume(aVolOCU1G, myAlumOC, aNStrTmpFlU1);
2329 G4ThreeVector posTmpU1(0., 0., zZeroLocalCoord
2330 + 0.5*lengthOCFlU1 + (105.0 - 0.030)*CLHEP::mm);
2331 new G4PVPlacement((G4RotationMatrix *) 0, posTmpU1, aVolOCU1GL, aNStrTmpFlU1 +
std::string(
"_P"),
2332 volMother,
false, 1,
true);
2336 std::vector<double> rOCTmps(13, -1.);
2337 std::vector<double> zOCTmps(13, zZeroLocalCoord + lengthOCBody + 151*CLHEP::mm + 0.050*CLHEP::mm);
2338 const double zOrigDwOCFl = 1727.34;
2339 zOCTmps[1] += 1750.19*CLHEP::mm - zOrigDwOCFl;
2340 zOCTmps[2] += 1849.84*CLHEP::mm - zOrigDwOCFl;
2341 zOCTmps[3] += 1876.74*CLHEP::mm - zOrigDwOCFl;
2342 zOCTmps[4] += 1893.24*CLHEP::mm - zOrigDwOCFl;
2343 zOCTmps[5] += 1922.308*CLHEP::mm - zOrigDwOCFl - 0.6*CLHEP::mm;
2345 zOCTmps[6] = zOCTmps[5]; zOCTmps[7] = zOCTmps[4] + 1.0*CLHEP::mm; zOCTmps[8] = zOCTmps[4];
2346 zOCTmps[9] = zOCTmps[3]; zOCTmps[10] = zOCTmps[2]; zOCTmps[11] = zOCTmps[1];
2347 zOCTmps[12] = zOCTmps[0];
2348 const double thickOCNom = radOuterOC - radInnerOC;
2349 rOCTmps[0] = radInnerOC; rOCTmps[1] = 632.02; rOCTmps[2] = 621.52;
2350 rOCTmps[3] = 634.9*CLHEP::mm - thickOCNom; rOCTmps[4] = rOCTmps[3] -2.0*CLHEP::mm;
2351 rOCTmps[5] = rOCTmps[4] -4.0*CLHEP::mm; rOCTmps[6] = 668.1*CLHEP::mm;
2352 rOCTmps[7] = rOCTmps[6];
2353 rOCTmps[8] = 0.5*(rOCTmps[7] + rOCTmps[4]); rOCTmps[9] = rOCTmps[3] + thickOCNom;
2354 rOCTmps[10] = rOCTmps[2] + thickOCNom; rOCTmps[11] = rOCTmps[1] + thickOCNom;
2355 rOCTmps[12] = rOCTmps[0] + thickOCNom;
2367 G4GenericPolycone *aVolGPDwnOCEnd =
new G4GenericPolycone(aNStrOCDwnEndFl, 0.0, 360.0*CLHEP::degree,
2368 13, &rOCTmps[0], &zOCTmps[0]);
2369 G4LogicalVolume *aVolGDwnOCEnd =
new G4LogicalVolume(aVolGPDwnOCEnd, myAlumIC, aNStrOCDwnEndFl);
2370 new G4PVPlacement((G4RotationMatrix *) 0, zeroC, aVolGDwnOCEnd, aNStrOCDwnEndFl +
std::string(
"_P"),
2371 volMother,
false, 1,
true);
2378 const double radOuterIns = 694.*CLHEP::mm;
2379 const double radInnerIns = radInnerOC;
2380 const double thickIns = 67.0 - 0.060*CLHEP::mm;
2383 G4Tubs* aVolInsG =
new G4Tubs(aNStrTmp,radInnerIns , radOuterIns,
2384 0.5*thickIns, 0.0, 360.0*CLHEP::degree);
2385 G4LogicalVolume *aVolInsGL =
new G4LogicalVolume(aVolInsG, myAlumina, aNStrTmp);
2387 G4ThreeVector posTmp(0., 0., zZeroLocalCoord + 0.5*thickIns + (36. + 0.025)*CLHEP::mm);
2388 new G4PVPlacement((G4RotationMatrix *) 0, posTmp, aVolInsGL, aNStrTmp +
std::string(
"_P"),
2389 volMother,
false, 1,
true);
2400 const double radOuterICEQ1 = 760.0*CLHEP::mm;
2401 const double radInnerICEQ1 = 715.025*CLHEP::mm;
2402 const double thickICEQ1 = (25.- 0.0125)*CLHEP::mm;
2405 G4Tubs* aVol1G =
new G4Tubs(aNStrTmp1,radInnerICEQ1, radOuterICEQ1,
2406 0.5*thickICEQ1, 0.0, 360.0*CLHEP::degree);
2407 G4LogicalVolume *aVol1GL =
new G4LogicalVolume(aVol1G, myAlumIC, aNStrTmp1);
2409 const double zZeroLocalICEQ = -0.5*lengthMother + 0.010*CLHEP::mm;
2411 G4ThreeVector posTmp1(0., 0., zZeroLocalICEQ + 0.5*thickICEQ1 + 0.025*CLHEP::mm);
2412 new G4PVPlacement((G4RotationMatrix *) 0, posTmp1, aVol1GL, aNStrTmp1 +
std::string(
"_P"),
2413 volMother,
false, 1,
true);
2415 const double radOuterICEQ2 = 715.;
2416 const double radInnerICEQ2 = 707.*CLHEP::mm;
2420 const double lengthICEQ2 = (907. - 0.050)*CLHEP::mm;
2421 G4Tubs* aVol2G =
new G4Tubs(aNStrTmp2,radInnerICEQ2, radOuterICEQ2,
2422 0.5*lengthICEQ2, 0.0, 360.0*CLHEP::degree);
2423 G4LogicalVolume *aVol2GL =
new G4LogicalVolume(aVol2G, myAlumIC, aNStrTmp2);
2425 G4ThreeVector posTmp2(0., 0., zZeroLocalICEQ + 0.5*lengthICEQ2 + 0.0125);
2426 new G4PVPlacement((G4RotationMatrix *) 0, posTmp2, aVol2GL, aNStrTmp2 +
std::string(
"_P"),
2427 volMother,
false, 1,
true);
2432 const double radOuterICEQ3 = 715.*CLHEP::mm;
2433 const double radInnerICEQ3 = (570. - 0.10)*CLHEP::mm;
2434 const double thickICEQ3 = (13.- 0.0125)*CLHEP::mm;
2436 G4Tubs* aVol3G =
new G4Tubs(aNStrTmp3,radInnerICEQ3, radOuterICEQ3,
2437 0.5*thickICEQ3, 0.0, 360.0*CLHEP::degree);
2438 G4LogicalVolume *aVol3GL =
new G4LogicalVolume(aVol3G, myAlumIC, aNStrTmp3);
2440 G4ThreeVector posTmp3(0., 0., zZeroLocalICEQ + lengthICEQ2 + 0.5*thickICEQ3 + 0.0125*CLHEP::mm);
2442 new G4PVPlacement((G4RotationMatrix *) 0, posTmp3, aVol3GL, aNStrTmp3 +
std::string(
"_P"),
2443 volMother,
false, 1,
true);
2445 const double radOuterICEQ4 = 697.*CLHEP::mm;
2446 const double radInnerICEQ4 = (570. - 0.10)*CLHEP::mm;
2447 const double thickICEQ4 = (30. - 13. - 0.025)*CLHEP::mm;
2449 G4Tubs* aVol4G =
new G4Tubs(aNStrTmp4,radInnerICEQ4, radOuterICEQ4,
2450 0.5*thickICEQ4, 0.0, 360.0*CLHEP::degree);
2451 G4LogicalVolume *aVol4GL =
new G4LogicalVolume(aVol4G, myAlumIC, aNStrTmp4);
2453 G4ThreeVector posTmp4(0., 0., zZeroLocalICEQ + lengthICEQ2 + thickICEQ3 + 0.5*thickICEQ4 + 0.0125*CLHEP::mm);
2455 new G4PVPlacement((G4RotationMatrix *) 0, posTmp4, aVol4GL, aNStrTmp4 +
std::string(
"_P"),
2456 volMother,
false, 1,
true);
2457 const double radOuterICEQ5 = 697.*CLHEP::mm;
2458 const double radInnerICEQ5 = (628.5 - 0.250)*CLHEP::mm;
2459 const double thickICEQ5 = (55.0 - (thickICEQ4 + thickICEQ3) - 0.050 )*CLHEP::mm;
2461 G4Tubs* aVol5G =
new G4Tubs(aNStrTmp5,radInnerICEQ5, radOuterICEQ5,
2462 0.5*thickICEQ5, 0.0, 360.0*CLHEP::degree);
2463 G4LogicalVolume *aVol5GL =
new G4LogicalVolume(aVol5G, myAlumIC, aNStrTmp5);
2465 G4ThreeVector posTmp5(0., 0.,
2466 zZeroLocalICEQ + lengthICEQ2 + thickICEQ3 + thickICEQ4 + 0.5*thickICEQ5 + 0.075*CLHEP::mm);
2467 new G4PVPlacement((G4RotationMatrix *) 0, posTmp5, aVol5GL, aNStrTmp5 +
std::string(
"_P"),
2468 volMother,
false, 1,
true);
2472 const double radOuterOCEQ1 = 811.5*CLHEP::mm;
2473 const double radInnerOCEQ1 = (766.5 + 0.025)*CLHEP::mm;
2474 const double thickOCEQ1 = (25.- 0.0125)*CLHEP::mm;
2477 G4Tubs* aVol6G =
new G4Tubs(aNStrTmp6,radInnerOCEQ1, radOuterOCEQ1,
2478 0.5*thickOCEQ1, 0.0, 360.0*CLHEP::degree);
2479 G4LogicalVolume *aVol6GL =
new G4LogicalVolume(aVol6G, myAlumOC, aNStrTmp6);
2481 const double zZeroLocalOCEQ = -0.5*lengthMother + (45.0 - 0.10)*CLHEP::mm;
2482 G4ThreeVector posTmp6(0., 0., zZeroLocalOCEQ + 0.5*thickOCEQ1);
2483 new G4PVPlacement((G4RotationMatrix *) 0, posTmp6, aVol6GL, aNStrTmp6 +
std::string(
"_P"),
2484 volMother,
false, 1,
true);
2486 const double radInnerOCEQ2 = 758.5*CLHEP::mm;
2487 const double radOuterOCEQ2 = radInnerOCEQ1 - 0.050*CLHEP::mm;
2488 const double lengthOCEQ2 = (998.0 - 0.050)*CLHEP::mm;
2491 G4Tubs* aVol7G =
new G4Tubs(aNStrTmp7,radInnerOCEQ2, radOuterOCEQ2,
2492 0.5*lengthOCEQ2, 0.0, 360.0*CLHEP::degree);
2493 G4LogicalVolume *aVol7GL =
new G4LogicalVolume(aVol7G, myAlumOC, aNStrTmp7);
2495 G4ThreeVector posTmp7(0., 0., zZeroLocalOCEQ + 0.5*lengthOCEQ2 + 0.020*CLHEP::mm);
2496 new G4PVPlacement((G4RotationMatrix *) 0, posTmp7, aVol7GL, aNStrTmp7 +
std::string(
"_P"),
2497 volMother,
false, 1,
true);
2502 const double radOuterOCEQ3 = radInnerOCEQ2 - 0.050*CLHEP::mm;
2503 const double radInnerOCEQ3 = 714.0*CLHEP::mm;
2504 const double thickOCEQ3 = (25.- 0.0125)*CLHEP::mm;
2507 G4Tubs* aVol8G =
new G4Tubs(aNStrTmp8,radInnerOCEQ3, radOuterOCEQ3,
2508 0.5*thickOCEQ3, 0.0, 360.0*CLHEP::degree);
2509 G4LogicalVolume *aVol8GL =
new G4LogicalVolume(aVol8G, myAlumOC, aNStrTmp8);
2511 G4ThreeVector posTmp8(0., 0., zZeroLocalOCEQ + 973.0*CLHEP::mm + 0.5*thickOCEQ3);
2512 new G4PVPlacement((G4RotationMatrix *) 0, posTmp8, aVol8GL, aNStrTmp8 +
std::string(
"_P"),
2513 volMother,
false, 1,
true);
2525 std::cerr <<
" Dump of the R/Z map, accurate, for the magnetic field " <<
std::endl;
2538 const double outRadMax = 220.52;
2540 const double outLengthMax = 2277. + 25.;
2547 G4ThreeVector v1(outRadMax, 1.2500, 0.00);
2550 const double inRadMinCyl = 43.0;
2556 G4ThreeVector v2(inRadMinCyl -3.0, 2.000, 1.00);
2559 const double endOfCylIC = 1170.5 + 25. + 25.;
2561 G4ThreeVector v3(inRadMinCyl - 3.0, 2.000, endOfCylIC );
2566 const double endOfIC = 2188. + 25.0 + 1.;
2568 const double inRadMin = 33.0;
2569 G4ThreeVector v4(inRadMin - 3.0, 2.000, endOfIC);
2572 const double radOutIOC = 86.2;
2573 for (
int kTheta = 1; kTheta != 6; kTheta++) {
2574 const double thetaIOC = kTheta*M_PI/10.;
2576 G4ThreeVector vkTH(inRadMin - 0.1 + radOutIOC*(1.0-std::cos(thetaIOC)),
2577 2. + 5.*std::sin(thetaIOC),
2578 endOfIC + radOutIOC*std::sin(thetaIOC) + 2.0*CLHEP::mm);
2585 G4ThreeVector v10(outRadMax, 0.020, outLengthMax+0.001 + 3.0*CLHEP::mm);
2598 const double outRadMax = (811.5 + 2.0);
2602 const double distUpstreamToBeginIC = 242.25;
2603 G4ThreeVector v1(outRadMax, 0.05, 0.00);
2605 const double inRadMin = 159.0;
2607 G4ThreeVector v2(inRadMin, 3.000, 1.00);
2609 double zzTmp = 1090. + distUpstreamToBeginIC;
2610 G4ThreeVector v3(inRadMin, 3.0, zzTmp);
2613 G4ThreeVector v4(81.0, 2.000, zzTmp);
2616 G4ThreeVector v5(81.0, 3.0, zzTmp);
2619 G4ThreeVector v6(83.6, 3.0, zzTmp);
2622 G4ThreeVector v7(223., 3.0, zzTmp);
2624 zzTmp += 1042.8 + 0.5;
2625 G4ThreeVector v8(225., 3.0, zzTmp);
2628 zzTmp += 150. + 1.0;
2629 G4ThreeVector v9(225., 3.0, zzTmp);
2631 zzTmp += 975. - 151.;
2632 G4ThreeVector v10(630., 3.0, zzTmp);
2635 G4ThreeVector v11(outRadMax, 0.05, zzTmp);
2643 std::cerr <<
" Shifting start of Horn2 magnetic field region from " << zStartHorn2Set
2644 <<
" by " << -1.*distUpstreamToBeginIC <<
" to take into account I/O transition. " <<
std::endl;
2661 const double outRadMax = (811.5 + 2.0);
2666 const double distUpstreamIOToBeginIC = (237.451 - 106.0479 + 0.025)*CLHEP::mm;
2667 const double distUpstrCurrEQToBeginIC = (926. + 0.025)*CLHEP::mm;
2668 G4ThreeVector v1(outRadMax, 0.05, 0.00);
2670 const double inRadMinCurrEq = (707. -1.0)*CLHEP::mm;
2671 G4ThreeVector v2(inRadMinCurrEq, 4.000, 1.00);
2673 const double inRadMin = 284.0;
2675 G4ThreeVector v2a(inRadMinCurrEq, 4.000, distUpstrCurrEQToBeginIC - 1.0*CLHEP::mm - distUpstreamIOToBeginIC );
2678 G4ThreeVector v2b(inRadMin, 4.000, distUpstrCurrEQToBeginIC - 1.0*CLHEP::mm );
2681 double zzTmp = 336.8430 + distUpstrCurrEQToBeginIC;
2682 G4ThreeVector v3(inRadMin, 4.0, zzTmp);
2688 const double distZPtU1 = (398.2670 - 336.8430)*CLHEP::mm;
2689 const double deltaRU1 = inRadMin - 262.9119*CLHEP::mm;
2690 const double thetaArcU1 = std::atan(deltaRU1/(0.5*distZPtU1));
2691 const double outRadU1 = distZPtU1/std::sin(thetaArcU1);
2692 const int numStepU1 = 8;
2693 const double thetaStepU1 = thetaArcU1/numStepU1;
2694 for (
int iStepU1 = 0.; iStepU1 != numStepU1; iStepU1++) {
2695 const double thU1 = thetaStepU1*(iStepU1+1);
2696 const double rrU1 = inRadMin - outRadU1 * (1.0 - std::cos(thU1));
2697 const double dzU1 = outRadU1*std::sin(thU1);
2698 G4ThreeVector vTmpU1(rrU1, 4.0, zzTmp + dzU1);
2704 zzTmp = 553.1053 + distUpstrCurrEQToBeginIC; ;
2705 const double distZPtU2 = (586.2743 - 553.1053)*CLHEP::mm;
2706 const double inRadMinU2 = 142.3876;
2707 G4ThreeVector vU1ToU2(inRadMinU2, 4.000, zzTmp); iNumPt++;
2710 const double innerRadNeck = 131.0*CLHEP::mm;
2711 const double deltaRadMinU32 = inRadMinU2 - innerRadNeck;
2712 const double distZPtU2byHalf = 0.5*distZPtU2;
2713 const double thetaArcU2 = std::atan(deltaRadMinU32/(distZPtU2byHalf));
2714 const int numStepU2 = 6;
2715 const double thetaStepU2 = thetaArcU2/numStepU2;
2716 const double outRad2 = distZPtU2/std::sin(thetaArcU2);
2717 double thetaCurrU2 = thetaArcU2;
2718 for (
int iStepU2 = 0.; iStepU2 != numStepU2; iStepU2++) {
2719 thetaCurrU2 -= thetaStepU2;
2720 const double drrU2 = outRad2*(1.0-std::cos(thetaCurrU2));
2721 const double dzU2 = outRad2*std::sin(thetaCurrU2);
2722 G4ThreeVector vTmpU2(innerRadNeck + drrU2, 4.0, zzTmp + distZPtU2 - dzU2);
2731 zzTmp += 118.9697*CLHEP::mm;
2732 G4ThreeVector vNeckD(innerRadNeck, 4.000, zzTmp); iNumPt++;
2737 const double distZPtD1 = (147.8974 - 118.9697)*CLHEP::mm;
2738 const double innerRadD1 = 135.4465*CLHEP::mm;
2739 const double deltaInnerRadD1 = innerRadD1 - innerRadNeck;
2742 const double outRad3 = (distZPtD1*distZPtD1 + deltaInnerRadD1*deltaInnerRadD1)/(2.0*deltaInnerRadD1);
2743 const double thetaArcD1 = std::asin(distZPtD1/outRad3);
2744 const int numStepD1 = 4;
2745 const double thetaStepD1 = thetaArcD1/numStepD1;
2746 double thetaCurrD1 = 0.;
2747 for (
int iStepD1 = 0.; iStepD1 != numStepD1; iStepD1++) {
2748 thetaCurrD1 += thetaStepD1;
2749 const double drrD1 = outRad3*(1.0-std::cos(thetaCurrD1));
2750 const double dzD1 = outRad3*std::sin(thetaCurrD1);
2751 G4ThreeVector vTmpD1(innerRadNeck + drrD1, 4.0, zzTmp + dzD1);
2760 const double innerRadD2 = 357.7245*CLHEP::mm;
2761 const double distZPtD2 = 735.5382*CLHEP::mm;
2763 G4ThreeVector vTmpD2(innerRadD2, 4.0, zzTmp);
2770 const double distZPtD3 = 28.9277*CLHEP::mm;
2771 const double distZPtD3byHalf = 0.5*distZPtD3;
2772 const double innerRadD3 = 362*CLHEP::mm;
2773 const double deltaInnerRadD3 = innerRadD3 - innerRadD2;
2774 const double thetaArcD3 = std::atan(deltaInnerRadD3/distZPtD3byHalf);
2775 const int numStepD3 = 4;
2776 const double thetaStepD3 = thetaArcD3/numStepD3;
2777 const double outRad5 = distZPtD3/std::sin(thetaArcD3);
2778 double thetaCurrD3 = thetaArcD3;
2779 for (
int iStepD3 = 0.; iStepD3 != numStepD3; iStepD3++) {
2780 thetaCurrD3 -= thetaStepD3;
2781 const double drrD3 = outRad5*(1.0-std::cos(thetaCurrD3));
2782 const double dzD3 = outRad5*std::sin(thetaCurrD3);
2783 G4ThreeVector vTmpD3(innerRadD3 - drrD3, 4.0, zzTmp + distZPtD3 - dzD3);
2790 zzTmp += 554.3802*CLHEP::mm;
2791 G4ThreeVector vTmpD5(innerRadD3, 4.0, zzTmp);
2796 zzTmp += 138.0*CLHEP::mm;
2798 G4ThreeVector vTmpD6(innerRadD3, 4.0, zzTmp);
2802 zzTmp += 0.5*CLHEP::mm;
2803 G4ThreeVector vTmpD7(701.0*CLHEP::mm, 4.0, zzTmp);
2810 const double zStartHorn3Set = this->
GetHornsPolyZStartPos(3) - distUpstrCurrEQToBeginIC + 0.5*131.254*CLHEP::mm;
2815 std::cerr <<
" Shifting start of Horn3 magnetic field region from " << zStartHorn3SetUser
2816 <<
" to " << zStartHorn3Set <<
" to take into account current Eq and I/O transition. " <<
std::endl;
2834 "LBNEVolumePlacements::PlaceFinalLBNFConceptStripLinesConnectHornC");
2836 "LBNEVolumePlacements::PlaceFinalLBNFConceptHornB");
2838 const double lengthHornC = plDatMotherHorn3->
fParams[2];
2839 const double lengthStripZoneEff = 376.75*CLHEP::mm ;
2840 const double zPosStripZone = plDatMotherHorn3->
fPosition[2] - 0.5*lengthHornC
2841 - 0.5*lengthStripZoneEff - 5.0*CLHEP::mm;
2843 const double halfWidthZone = 820.0;
2844 G4Material *myAlum = G4Material::GetMaterial(
"Aluminum");
2845 G4Material *myAir = G4Material::GetMaterial(
"Air");
2849 G4Box* aVolM =
new G4Box(aNStrTmp1, halfWidthZone, halfWidthZone, 0.5*lengthStripZoneEff);
2850 G4LogicalVolume *volMotherLoc =
new G4LogicalVolume(aVolM, myAir, aNStrTmp1);
2851 G4ThreeVector posTmpM(0., 0., zPosStripZone);
2852 G4LogicalVolume *volMother = plDatMotherTunnel->
fCurrent;
2853 new G4PVPlacement((G4RotationMatrix *) 0, posTmpM, volMotherLoc, aNStrTmp1 +
std::string(
"_P"),
2854 volMother,
false, 1,
true);
2858 const double stripThick = 9.5250*CLHEP::mm;
2859 const double stripWidth = 200.0*CLHEP::mm;
2860 const double stripConnBlock = 100.0*CLHEP::mm;
2861 const double radLoc45DegIOC = 800.50*CLHEP::mm;
2868 G4Box* aVol45DG =
new G4Box(aNStr45D, 0.5*stripWidth, 0.5*stripConnBlock, 2.0*0.5*stripThick);
2869 G4LogicalVolume *aVol45DGL =
new G4LogicalVolume(aVol45DG, myAlum, aNStr45D);
2870 const double zLocalCurrent = 0.5*lengthStripZoneEff - stripThick - 0.010*CLHEP::mm;
2874 const double lengthLong45D = (345.0 - 0.5)*CLHEP::mm;
2876 G4Box* aVol45LG =
new G4Box(aNStrLongD, 0.5*stripWidth, 2.0*0.5*stripThick*1.10, 0.5*lengthLong45D );
2878 G4LogicalVolume *aVol45LGL =
new G4LogicalVolume(aVol45LG, myAlum, aNStrLongD);
2880 const double radLoc45LongIOC = (811.50 - 170.)*CLHEP::mm;
2881 for (
int kPhi=0; kPhi != 4; kPhi++) {
2882 std::ostringstream phiIOCStrStr; phiIOCStrStr <<
"phi" << kPhi;
2883 const double anglePhiPlate = (kPhi+1)*M_PI/2. - M_PI/4.;
2886 double xLocalPlateIOC = radLoc45DegIOC*std::cos(anglePhiPlate);
2887 double yLocalPlateIOC = radLoc45DegIOC*std::sin(anglePhiPlate);
2888 G4ThreeVector posTmp1IOC(xLocalPlateIOC, yLocalPlateIOC, zLocalCurrent);
2890 aVol45DGL, aNStr45D + phiIOCStrStr.str() +
std::string(
"_P"),
2891 volMotherLoc ,
false, 1,
true);
2892 double xLocalPlateIOL = radLoc45LongIOC*std::cos(anglePhiPlate);
2893 double yLocalPlateIOL = radLoc45LongIOC*std::sin(anglePhiPlate);
2894 G4ThreeVector posTmp1IOL(xLocalPlateIOL, yLocalPlateIOL, -0.5*lengthStripZoneEff + 0.5*lengthLong45D + 0.01*CLHEP::mm);
2897 aVol45LGL, aNStrLongD + phiIOCStrStr.str() +
std::string(
"_P"),
2898 volMotherLoc ,
false, 1,
true);
2904 const double heightVertStrip = 329.0*CLHEP::mm;
2905 const double widthVertStrip = 2.0*stripThick;
2906 const double depthVertStrip = stripWidth;
2907 const double xLocVertStrip = 537.0*CLHEP::mm;
2908 const double yLocVertStrip = 0.5*heightVertStrip + 5.0*CLHEP::mm;
2910 G4Box* aVolVertLG =
new G4Box(aNStrVert, 0.5*widthVertStrip, 0.5*heightVertStrip, 0.5*depthVertStrip);
2912 G4LogicalVolume *aVolVertLGL =
new G4LogicalVolume(aVolVertLG, myAlum, aNStrVert);
2913 G4ThreeVector posTmpIOV(0., 0., -0.5*lengthStripZoneEff + 0.5*depthVertStrip + 0.1*CLHEP::mm);
2915 for (
int kS=0; kS != 4; kS++) {
2918 posTmpIOV[0] = xLocVertStrip; posTmpIOV[1] = yLocVertStrip;
2922 posTmpIOV[0] = xLocVertStrip; posTmpIOV[1] = -1.*yLocVertStrip;
2926 posTmpIOV[0] = -1.0*xLocVertStrip; posTmpIOV[1] = yLocVertStrip;
2930 posTmpIOV[0] = -1.0*xLocVertStrip; posTmpIOV[1] = -1.*yLocVertStrip;
2934 new G4PVPlacement((G4RotationMatrix *) 0, posTmpIOV, aVolVertLGL,
2936 volMotherLoc,
false, 1,
true);
2943 const double heightHorzStrip = 1.05*(5.0*stripThick);
2945 const double widthHorzStrip = 162.0;
2946 const double depthHorzStrip = stripWidth*CLHEP::mm;
2947 const double xLocHorzStrip = 678.*CLHEP::mm;
2949 G4Box* aVolHorzLG =
new G4Box(aNStrHorz, 0.5*widthHorzStrip, 0.5*heightHorzStrip, 0.5*depthHorzStrip);
2951 G4LogicalVolume *aVolHorzLGL =
new G4LogicalVolume(aVolHorzLG, myAlum, aNStrHorz);
2952 G4ThreeVector posTmpIOH(0., 0., -0.5*lengthStripZoneEff + 0.5*depthHorzStrip + 0.1*CLHEP::mm);
2953 for (
int kS=0; kS != 2; kS++) {
2956 posTmpIOH[0] = xLocHorzStrip;
2960 posTmpIOH[0] = -1.0*xLocHorzStrip;
2964 new G4PVPlacement((G4RotationMatrix *) 0, posTmpIOH, aVolHorzLGL,
2966 volMotherLoc,
false, 1,
true);
void PlaceFinalLBNFConceptStripLinesConnectHornB()
double fThickICDRevisedHornA
void PlaceFinalLBNFConceptTgtSupport()
double fThickICDRevisedHornB
std::vector< std::vector< G4ThreeVector > > fHornsPolyListRinThickZVects
G4double fRadInnerOCCurrEqHorn2
std::vector< double > fZCoordCDRevisedHornC
const LBNEVolumePlacementData * Find(const G4String &name, const char *motherName, const char *method) const
void PreparePolyconForConceptHornB()
G4LogicalVolume * fCurrent
std::vector< double > fRInCoordCDRevisedHornA
void PlaceFinalLBNFConceptStripLinesConnectHornC()
G4double fHorn3OCQLengthIntoHornMother
G4double fRadInnerICCurrEqHornC
G4String fHorn1AllCondMat
G4double fLengthCurrEqOCInMotherHorn2
G4String fHorn1InnerCondMat
std::vector< double > fRInCoordCDRevisedHornC
void PreparePolyconForConceptHornA()
G4double fRadOuterICCurrEqHorn2
G4double fRadInnerOCCurrEqHornC
void SetHornsPolyZStartPos(size_t hornNumber, double z)
G4double fRadInnerICCurrEqHorn2
G4String fHorn2InnerCondMat
std::vector< G4String > fHorn2IC
std::vector< double > fParams
G4double fRadOuterICCurrEqHornC
double GetHornsPolyZStartPos(size_t iH) const
G4double fRadOuterOCCurrEqHorn2
G4String fHorn3InnerCondMat
G4double fHorn3ICQLengthIntoHornMother
G4RotationMatrix * fRotHornBStrpLineRotY
std::vector< double > fRInCoordCDRevisedHornB
void SetHorn1PolyOuterRadius(double r)
size_t fLBNFOptimConceptDesignHornCNumStepIC[10]
bool fInstallDownstTargetSupport
void SetUseHorn1PolyNumInnerPts(int n)
void PlaceFinalLBNFConceptHornB()
std::vector< double > fZCoordCDRevisedHornA
double fZShiftConceptHornAStartIC
G4RotationMatrix fRotTgtTitCTubeHor
void PlaceFinalLBNFConceptHornA()
bool fCheckVolumeOverLapWC
void PlaceFinalLBNFConceptHornC()
G4RotationMatrix fRotTgtTitCTubeVert
void SetHornsPolyOuterRadius(size_t hornNumber, double r)
std::vector< double > fZCoordCDRevisedHornB
void SetUseHornsPolyNumInnerPts(size_t hornNumber, size_t nElem)
void SetHornsPolyInnerThreeVect(size_t hornNumber, size_t iP, G4ThreeVector vVal)
G4String fHorn2AllCondMat
G4double fWaterLayerThickInHorns
G4String fHorn3AllCondMat
void SetHorn1PolyInnerThreeVect(size_t iP, G4ThreeVector vVal)
double fThickICDRevisedHornC
void PreparePolyconForConceptHornC()
QTextStream & endl(QTextStream &s)
G4RotationMatrix * fRotHornBStrpLineConnFlatB[4]
std::vector< G4String > fHorn1IC
G4double fLengthCurrEqICInMotherHorn2
G4RotationMatrix * fRotHornBStrpLineConnFlatC[4]