41 {
42 TGeoVolume*
top = gGeoManager->GetTopVolume();
43
45 TGeoMedium* tungsten = gGeoManager->GetMedium("tungsten");
47 TGeoMedium* tantalum = gGeoManager->GetMedium("tantalum");
49 TGeoMedium* mo = gGeoManager->GetMedium("molybdenum");
51 TGeoMedium* iron = gGeoManager->GetMedium("iron");
53 TGeoMedium* steel316L = gGeoManager->GetMedium("steel316L");
55 TGeoMedium* copper = gGeoManager->GetMedium("copper");
56
58 TGeoMedium* inc718 = gGeoManager->GetMedium("Inconel718");
59
61 TGeoMedium* vacuum = gGeoManager->GetMedium("vacuums");
62
63 double He_T = 273.15 +
fHeT;
64 double He_P = 1.6e6 * 6.241509e3;
65
66 std::ostringstream lHename;
67 lHename <<
"PressurisedHe" <<
fHeT;
69 TGeoMedium* pressurised_He = gGeoManager->GetMedium(lHename.str().c_str());
70
71
72
73 TGeoMaterial* fixedCooler = pressurised_He->GetMaterial();
74 fixedCooler->SetTemperature(He_T);
75 fixedCooler->SetPressure(He_P);
76 TGeoMedium* cooler = pressurised_He;
77
78 LOG(info) << "-- Target cooler: " << cooler->GetName()
79 << " T=" << cooler->GetMaterial()->GetTemperature()
80 << " K, P=" << cooler->GetMaterial()->GetPressure()
81 << " MeV/mm3, Density=" << cooler->GetMaterial()->GetDensity();
82
83 TGeoVolume* tTarget = new TGeoVolumeAssembly("TargetArea");
84
86
87 double vessel_thickness = 8 *
mm;
89 double vessel_shift =
90 62 *
93
94 TGeoVolume* vessel;
95 vessel = gGeoManager->MakeTube("TargetVessel", inc718, vessel_diameter / 2.,
96 vessel_diameter / 2. + vessel_thickness,
97 vessel_length / 2.);
98 vessel->SetLineColor(28);
99 tTarget->AddNode(
100 vessel, 1,
101 new TGeoTranslation(0, 0, -1. * vessel_shift + vessel_length / 2.));
102
103 vessel = gGeoManager->MakeTube("TargetVesselFront", inc718, 0,
104 vessel_diameter / 2. + vessel_thickness,
105 vessel_thickness / 2.);
106 vessel->SetLineColor(28);
107 tTarget->AddNode(
108 vessel, 1,
109 new TGeoTranslation(0, 0, -1. * vessel_shift - vessel_thickness / 2.));
110
111 vessel = gGeoManager->MakeTube("TargetVesselBack", inc718, 0,
112 vessel_diameter / 2. + vessel_thickness,
113 vessel_thickness / 2.);
114 vessel->SetLineColor(28);
115 tTarget->AddNode(
116 vessel, 1,
117 new TGeoTranslation(
118 0, 0, -1. * vessel_shift + vessel_length + vessel_thickness / 2.));
119
120 vessel = gGeoManager->MakeTube("HeVolume", cooler, 0, vessel_diameter / 2.,
121 vessel_length / 2.);
122 vessel->SetLineColor(7);
123
124
125
126
127 double enclosure_clearance =
129 double enclosure_inner_radius =
fDiameter / 2. + enclosure_clearance;
130 double enclosure_thickness = 66.9 *
mm;
131 double enclosure_outer_radius =
132 enclosure_inner_radius + enclosure_thickness;
133 double enclosure_cutout_width_x = 160 *
mm;
134 double enclosure_cutout_width_y = 280 *
mm;
136
137 [[maybe_unused]] auto enclosure_outer_tube =
138 new TGeoTube("enclosure_outer_tube", enclosure_inner_radius,
139 enclosure_outer_radius, enclosure_length / 2.);
140 [[maybe_unused]] auto enclosure_cutout_box =
141 new TGeoBBox("enclosure_cutout_box", enclosure_cutout_width_x / 2.,
142 enclosure_cutout_width_y / 2., enclosure_length / 2.);
143 auto enclosure_shape = new TGeoCompositeShape(
144 "enclosure_shape", "enclosure_outer_tube - enclosure_cutout_box");
145 auto enclosure =
146 new TGeoVolume("target_enclosure", enclosure_shape, steel316L);
147 enclosure->SetLineColor(46);
148 vessel->AddNode(
149 enclosure, 1,
150 new TGeoTranslation(
151 0, 0, -vessel_length / 2. + vessel_shift + enclosure_length / 2.));
152
153
154
155 double cladding_width = 1.5 *
mm;
156
157 Double_t zPos = 0.;
158 unsigned slots =
fnS;
159 if (slots > 0) slots = slots - 1;
160
161 TGeoVolume* claddedTarget;
162 TGeoVolume* targetCore;
163
164 for (
unsigned i = 0;
i <
fnS;
i++) {
165 TString nmi_cladded = "CladdedTarget_";
166 nmi_cladded +=
i + 1;
167 TString nmi_core = "TargetCore_";
169
171 if (
fM.at(i) ==
"molybdenum") {
173 }
else if (
fM.at(i) ==
"tungsten") {
175 }
176
177
178 claddedTarget = gGeoManager->MakeTube(nmi_cladded, tantalum, 0.,
180 claddedTarget->SetLineColor(8);
181
182
183
184
185 targetCore = gGeoManager->MakeTube(nmi_core, material, 0.,
187 (
fL.at(i) - 2 * cladding_width) / 2.);
188 if (
fM.at(i) ==
"molybdenum") {
189 targetCore->SetLineColor(28);
190 } else {
191 targetCore->SetLineColor(38);
192 };
193
194
195
196 claddedTarget->AddNode(targetCore, 1, new TGeoTranslation(0, 0, 0));
197
198
199 vessel->AddNode(
200 claddedTarget, 1,
201 new TGeoTranslation(
202 0, 0, -vessel_length / 2. + vessel_shift + zPos +
fL.at(i) / 2.));
203
204 if (i < slots) {
205
206 zPos +=
fL.at(i) +
fG.at(i);
207 } else {
209 }
210 }
211
212
213 tTarget->AddNode(
214 vessel, 1,
215 new TGeoTranslation(0, 0, -1. * vessel_shift + vessel_length / 2.));
217
218
219
220
222 LOG(fatal) << "Target design 2 requires the last disk diameter, "
223 "use SetLastDiskDiameter()";
224 }
225
226
227
228 const double he_zmin = -37.8 *
mm;
229 const double he_zmax = 1509.7 *
mm;
230 const double he_rmax = 237 *
mm;
231 const double he_zc = (he_zmin + he_zmax) / 2.;
232 TGeoVolume* heVolume = gGeoManager->MakeTube("HeVolume", cooler, 0, he_rmax,
233 (he_zmax - he_zmin) / 2.);
234 heVolume->SetLineColor(7);
235
236
237 auto placeAt = [he_zc](double z0, double z1) {
238 return new TGeoTranslation(0, 0, (z0 + z1) / 2. - he_zc);
239 };
240
241
242
243
244 Double_t zPos = 0.;
245 for (
unsigned i = 0;
i <
fnS;
i++) {
246 TString nmi_core = "TargetCore_";
249 if (
fM.at(i) ==
"molybdenum") {
251 }
else if (
fM.at(i) ==
"tungsten") {
253 }
255 TGeoVolume* targetCore =
256 gGeoManager->MakeTube(nmi_core, material, 0., radius,
fL.at(i) / 2.);
257 targetCore->SetLineColor(
fM.at(i) ==
"molybdenum" ? 28 : 38);
258 heVolume->AddNode(targetCore, 1, placeAt(zPos, zPos +
fL.at(i)));
259 zPos +=
fL.at(i) +
fG.at(i);
260 }
261
262
263
264
265
266 const double core_zmin = 7.2 *
mm;
267 const double core_zmax = 1443.7 *
mm;
268 const double core_rout = 207 *
mm;
271 const double bore_step_z = 1005 *
mm;
272 const double core_front_rout = 195 *
mm;
273 const double core_front_zmax = 55.2 *
mm;
274 const double core_rear_rout = 190 *
mm;
275 const double core_rear_zmin = 1233.7 *
mm;
276 const double groove_rmax = 153 *
mm;
277 const double groove_phi = 61.;
279
280 std::ostringstream core_expr;
281 auto addTube = [&core_expr](
const TString&
name,
double rmin,
double rmax,
282 double z0, double z1, bool subtract) {
283 new TGeoTube(name, rmin, rmax, (z1 - z0) / 2.);
284 auto trans = new TGeoTranslation(name + "_tr", 0, 0, (z0 + z1) / 2.);
285 trans->RegisterYourself();
286 if (subtract) {
287 core_expr << " - ";
288 }
289 core_expr <<
name <<
":" <<
name <<
"_tr";
290 };
291 auto addGroove = [&core_expr](
const TString&
name,
double rmin,
double rmax,
292 double z0, double z1, double phi1,
293 double phi2) {
294 new TGeoTubeSeg(name, rmin, rmax, (z1 - z0) / 2., phi1, phi2);
295 auto trans = new TGeoTranslation(name + "_tr", 0, 0, (z0 + z1) / 2.);
296 trans->RegisterYourself();
297 core_expr <<
" - " <<
name <<
":" <<
name <<
"_tr";
298 };
299
300 addTube("tgt_core_base", bore_r1, core_rout, core_zmin, core_zmax, false);
301 addTube("tgt_core_front_step", core_front_rout, core_rout + margin,
302 core_zmin - margin, core_front_zmax, true);
303 addTube("tgt_core_rear_step", core_rear_rout, core_rout + margin,
304 core_rear_zmin, core_zmax + margin, true);
305 addTube("tgt_core_rear_bore", bore_r1 - margin, bore_r2, bore_step_z,
306 core_zmax + margin, true);
307
308
309
310
311 const std::vector<std::pair<double, double>> grooves_top = {{12.2, 57.0},
312 {95.0, 153.0},
313 {191.0, 257.0},
314 {300.0, 464.0},
315 {559.0, 933.2}};
316 const std::vector<std::pair<double, double>> grooves_bottom = {
317 {45.0, 104.7}, {142.7, 200.7}, {238.7, 334.7}, {385.7, 1005.0}};
318 int grooveId = 0;
319 for (const auto& [z0, z1] : grooves_top) {
320 addGroove(TString::Format("tgt_groove_%d", grooveId++), bore_r1 - margin,
321 groove_rmax, z0 *
mm, z1 *
mm, 90. - groove_phi / 2.,
322 90. + groove_phi / 2.);
323 }
324 for (const auto& [z0, z1] : grooves_bottom) {
325 addGroove(TString::Format("tgt_groove_%d", grooveId++), bore_r1 - margin,
326 groove_rmax, z0 *
mm, z1 *
mm, 270. - groove_phi / 2.,
327 270. + groove_phi / 2.);
328 }
329
330
331 addGroove(
"tgt_groove_rear", bore_r2 - margin, 182 *
mm, bore_step_z,
332 1441.7 *
mm, 90. - 49. / 2., 90. + 49. / 2.);
333
334 auto core_shape =
335 new TGeoCompositeShape("target_core_shape", core_expr.str().c_str());
336 auto core = new TGeoVolume("target_core_steel", core_shape, steel316L);
337 core->SetLineColor(46);
338 heVolume->AddNode(core, 1, new TGeoTranslation(0, 0, -he_zc));
339
340
341
342
343
344
345 const double jacket_zmin = core_front_zmax;
346 const double jacket_zmax = 1198.7 *
mm;
347 auto jacket =
348 gGeoManager->MakeTube(
"target_jacket", steel316L, 217 *
mm, 225 *
mm,
349 (jacket_zmax - jacket_zmin) / 2.);
350 jacket->SetLineColor(46);
351 heVolume->AddNode(jacket, 1, placeAt(jacket_zmin, jacket_zmax));
352
353
354 const double flange_front_zmin = -23.8 *
mm;
355 const double nose_zmin = -35.8 *
mm;
356 auto flangeFront =
357 gGeoManager->MakeTube("target_flange_front", steel316L, core_front_rout,
358 225 *
mm, (jacket_zmin - flange_front_zmin) / 2.);
359 flangeFront->SetLineColor(46);
360 heVolume->AddNode(flangeFront, 1, placeAt(flange_front_zmin, jacket_zmin));
361
362
363
364
365 const double window_rmax = 141 *
mm;
366 auto window = gGeoManager->MakeTube("target_front_window", steel316L, 0,
367 window_rmax, (33.5 - 25.5) *
mm / 2.);
368 window->SetLineColor(46);
369 heVolume->AddNode(window, 1, placeAt(-33.5 *
mm, -25.5 *
mm));
370 auto nose = gGeoManager->MakeTube("target_front_nose", steel316L,
371 window_rmax, core_front_rout,
372 (flange_front_zmin - nose_zmin) / 2.);
373 nose->SetLineColor(46);
374 heVolume->AddNode(nose, 1, placeAt(nose_zmin, flange_front_zmin));
375
376
377
378 auto coverRing1 =
379 gGeoManager->MakeTube(
"target_cover_ring1", steel316L, 196 *
mm,
380 he_rmax, (flange_front_zmin - he_zmin) / 2.);
381 coverRing1->SetLineColor(46);
382 heVolume->AddNode(coverRing1, 1, placeAt(he_zmin, flange_front_zmin));
383 auto coverRing2 =
384 gGeoManager->MakeTube(
"target_cover_ring2", steel316L, 226 *
mm,
385 he_rmax, (-17.8 *
mm - flange_front_zmin) / 2.);
386 coverRing2->SetLineColor(46);
387 heVolume->AddNode(coverRing2, 1, placeAt(flange_front_zmin, -17.8 *
mm));
388 const double flange_rear_zmax = 1263.7 *
mm;
389 auto flangeRear =
390 gGeoManager->MakeTube(
"target_flange_back", steel316L, 225 *
mm,
391 he_rmax, (flange_rear_zmax - jacket_zmax) / 2.);
392 flangeRear->SetLineColor(46);
393 heVolume->AddNode(flangeRear, 1, placeAt(jacket_zmax, flange_rear_zmax));
394
395
396
397 const double endcap_zmin = flange_rear_zmax;
398 auto endcapTube =
399 gGeoManager->MakeTube(
"target_endcap_tube", steel316L, 229 *
mm,
400 237 *
mm, (1413.7 *
mm - endcap_zmin) / 2.);
401 heVolume->AddNode(endcapTube, 1, placeAt(endcap_zmin, 1413.7 *
mm));
402 auto endcapDome1 = gGeoManager->MakeCone(
403 "target_endcap_dome1", steel316L, (1450. - 1413.7) *
mm / 2., 229 *
mm,
404 237 *
mm, 212 *
mm, 223 *
mm);
405 heVolume->AddNode(endcapDome1, 1, placeAt(1413.7 *
mm, 1450. *
mm));
406 auto endcapDome2 = gGeoManager->MakeCone(
407 "target_endcap_dome2", steel316L, (1480. - 1450.) *
mm / 2., 212 *
mm,
408 223 *
mm, 142 *
mm, 166.5 *
mm);
409 heVolume->AddNode(endcapDome2, 1, placeAt(1450. *
mm, 1480. *
mm));
410 auto endcapDome3 = gGeoManager->MakeCone("target_endcap_dome3", steel316L,
411 (1505. - 1480.) *
mm / 2.,
412 142 *
mm, 166.5 *
mm, 0, 67 *
mm);
413 heVolume->AddNode(endcapDome3, 1, placeAt(1480. *
mm, 1505. *
mm));
414 auto endcapCap =
415 gGeoManager->MakeTube(
"target_endcap_cap", steel316L, 0, 67 *
mm,
416 (he_zmax - 1505. *
mm) / 2.);
417 heVolume->AddNode(endcapCap, 1, placeAt(1505. *
mm, he_zmax));
418 for (auto* v :
419 {endcapTube, endcapDome1, endcapDome2, endcapDome3, endcapCap}) {
421 }
422
423
424
425
426
427 const double cover_y_offset = -75 *
mm;
428 [[maybe_unused]] auto cover_box =
429 new TGeoBBox(
"target_cover_box", 300 *
mm, 325 *
mm, 10 *
mm);
430 [[maybe_unused]] auto cover_hole =
431 new TGeoTube(
"target_cover_hole", 0, he_rmax, 11 *
mm);
432 auto cover_hole_shift =
433 new TGeoTranslation("target_cover_hole_shift", 0, -cover_y_offset, 0);
434 cover_hole_shift->RegisterYourself();
435 auto cover_shape = new TGeoCompositeShape(
436 "target_cover_shape",
437 "target_cover_box - target_cover_hole:target_cover_hole_shift");
438 auto coverPlate =
439 new TGeoVolume("target_cover_plate", cover_shape, steel316L);
440 coverPlate->SetLineColor(46);
441 tTarget->AddNode(coverPlate, 1,
442 new TGeoTranslation(0, cover_y_offset, -27.8 *
mm));
443
444
445 tTarget->AddNode(heVolume, 1, new TGeoTranslation(0, 0, he_zc));
446 } else {
447 LOG(fatal) <<
"Unknown target design " <<
fDesign <<
", expected 1 or 2";
448 }
449
450
451
454 LOG(fatal) << "Shielding reference length not set, "
455 "use SetShieldingReferenceLength()";
456 }
457
459 double shielding_width = 1600 *
mm;
460 double shielding_length = 3000 *
mm;
461 double proximity_shielding_height = 1126 *
mm;
462 double proximity_shielding_thickness = 250 *
mm;
463 double proximity_shielding_thickness_front = 550 *
mm;
464 double proximity_shielding_hole_diameter = 200 *
mm;
465 double proximity_shielding_hole_height = 735 *
mm;
466 double proximity_shielding_distance_after_target = 96.1 *
mm;
467 double top_shielding_height = 600 *
mm;
468 double bottom_shielding_height = 545 *
mm;
469 double shielding_position = start_of_target +
fTargetLength +
470 proximity_shielding_distance_after_target +
471 proximity_shielding_thickness -
472 shielding_length / 2;
473 double target_box_shift = 14.45 *
cm;
474 [[maybe_unused]] auto proximity_shielding_envelope =
475 new TGeoBBox("proximity_shielding_envelope", shielding_width / 2,
476 proximity_shielding_height / 2, shielding_length / 2);
477 [[maybe_unused]] auto proximity_shielding_inner = new TGeoBBox(
478 "proximity_shielding_inner",
479 shielding_width / 2 - proximity_shielding_thickness,
480 proximity_shielding_height / 2,
481 (shielding_length -
482 (proximity_shielding_thickness_front + proximity_shielding_thickness)) /
483 2);
484 [[maybe_unused]] auto proximity_shielding_hole = new TGeoTube(
485 "proximity_shielding_hole", 0, proximity_shielding_hole_diameter / 2,
486 proximity_shielding_thickness_front / 2);
487 auto proximity_shielding_inner_shift = new TGeoTranslation(
488 "proximity_shielding_inner_shift", 0, 0,
489 (proximity_shielding_thickness_front - proximity_shielding_thickness) /
490 2);
491 proximity_shielding_inner_shift->RegisterYourself();
492 auto proximity_shielding_hole_shift = new TGeoTranslation(
493 "proximity_shielding_hole_shift", 0,
494 proximity_shielding_hole_height - proximity_shielding_height / 2,
495 -shielding_length / 2 + proximity_shielding_thickness_front / 2);
496 proximity_shielding_hole_shift->RegisterYourself();
497 auto proximity_shielding_shape = new TGeoCompositeShape(
498 "proximity_shielding_shape",
499 "proximity_shielding_envelope"
500 "- proximity_shielding_inner:proximity_shielding_inner_shift"
501 "- proximity_shielding_hole:proximity_shielding_hole_shift");
502 auto proximity_shielding =
503 new TGeoVolume("proximity_shielding", proximity_shielding_shape, copper);
504 auto proximity_shielding_centre = new TGeoTranslation(
505 0.,
506 -(proximity_shielding_hole_height - proximity_shielding_height / 2) +
507 target_box_shift,
508 0);
509
510 auto target_vacuum_box =
511 gGeoManager->MakeBox("target_vacuum_box", vacuum, shielding_width / 2,
512 (proximity_shielding_height + top_shielding_height +
513 bottom_shielding_height) /
514 2,
515 shielding_length / 2);
516 auto vacuum_vessel_centre = new TGeoTranslation(
517 0.,
518
519
520 -target_box_shift, shielding_position);
521 top->AddNode(target_vacuum_box, 1, vacuum_vessel_centre);
522
523 target_vacuum_box->AddNode(proximity_shielding, 1,
524 proximity_shielding_centre);
525
526
527 auto top_shielding =
528 gGeoManager->MakeBox("top_shielding", copper, shielding_width / 2,
529 top_shielding_height / 2, shielding_length / 2);
530 target_vacuum_box->AddNode(
531 top_shielding, 1,
532 new TGeoTranslation(
533 0.,
534 top_shielding_height / 2 + proximity_shielding_height -
535 proximity_shielding_hole_height + target_box_shift,
536 0));
537 auto bottom_shielding =
538 gGeoManager->MakeBox("bottom_shielding", copper, shielding_width / 2,
539 bottom_shielding_height / 2, shielding_length / 2);
540 target_vacuum_box->AddNode(
541 bottom_shielding, 1,
542 new TGeoTranslation(0.,
543 -bottom_shielding_height / 2 -
544 proximity_shielding_hole_height +
545 target_box_shift,
546 0));
547 double pedestal_length = 2170 *
mm;
548 double pedestal_width = 1070 *
mm;
549 double pedestal_height = 150 *
mm;
550 auto shielding_pedestal =
551 gGeoManager->MakeBox("shielding_pedestal", iron, pedestal_width / 2,
552 pedestal_height / 2, pedestal_length / 2);
553 target_vacuum_box->AddNode(
554 shielding_pedestal, 1,
555 new TGeoTranslation(
556 0.,
557 pedestal_height / 2 - proximity_shielding_hole_height +
558 target_box_shift,
559 -shielding_length / 2 + 565 *
mm + pedestal_length / 2));
560
561 target_vacuum_box->AddNode(
562 tTarget, 1,
563 new TGeoTranslation(0, target_box_shift,
564 start_of_target - shielding_position));
565}
Double_t fShieldingReferenceLength
std::vector< std::string > fM
Int_t InitMedium(const char *name)