add: node, trans1/2, small section, midMaterial;
change: section tree structure;
This commit is contained in:
parent
bb829079e6
commit
6d1db6b480
@ -89,7 +89,23 @@
|
||||
"xtr1common": "cpp",
|
||||
"xtree": "cpp",
|
||||
"xutility": "cpp",
|
||||
"bbox_action": "cpp"
|
||||
"bbox_action": "cpp",
|
||||
"aida_ntuple": "cpp",
|
||||
"ntuple_binding": "cpp",
|
||||
"ntuple_booking": "cpp",
|
||||
"raxml_out": "cpp",
|
||||
"rcsv_ntuple": "cpp",
|
||||
"base_leaf": "cpp",
|
||||
"branch": "cpp",
|
||||
"info": "cpp",
|
||||
"iros": "cpp",
|
||||
"ntuple": "cpp",
|
||||
"tree": "cpp",
|
||||
"field_desc": "cpp",
|
||||
"wcsv_ntuple": "cpp",
|
||||
"bufobj": "cpp",
|
||||
"aidas": "cpp",
|
||||
"element": "cpp"
|
||||
}
|
||||
}
|
||||
}
|
@ -10,6 +10,8 @@ Dose Estimation by Simulation of China Space Station
|
||||
![](docs/size.webp)
|
||||
|
||||
* 全长:16.6 m
|
||||
* 总重:22.5 t
|
||||
* 体积:143.6 $\mathrm{m^3}$
|
||||
* 分区:
|
||||
* 大柱段
|
||||
* 外径:4.2 m
|
||||
|
@ -2,11 +2,14 @@
|
||||
#include "Material.h"
|
||||
|
||||
#include "G4Box.hh"
|
||||
#include "G4Cons.hh"
|
||||
#include "G4IntersectionSolid.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4SubtractionSolid.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4Trd.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4UnionSolid.hh"
|
||||
|
||||
@ -14,77 +17,232 @@ DetectorConstruction::DetectorConstruction() {}
|
||||
|
||||
DetectorConstruction::~DetectorConstruction() {}
|
||||
|
||||
static G4double ConstrustSectionBig(G4LogicalVolume* fMotherLogical, G4double zBias) {
|
||||
G4double pRmaxBig = 4.2 / 2 * m;
|
||||
G4double hzBig = 6.72 / 2 * m;
|
||||
G4double hxBigBox = 2.4 / 2 * m;
|
||||
G4double pRmaxBigMid = pRmaxBig - 10 * cm;
|
||||
G4ThreeVector pos1 = G4ThreeVector(0, 0, -(zBias + hzBig));
|
||||
G4double pos2 = -(zBias + hzBig * 2) + 9.8 * cm;
|
||||
std::ofstream dataFile("F:/Project/Geant4/DESCSS/debug.txt");
|
||||
|
||||
static void ConstructSectionSphere(G4LogicalVolume* fMotherLogical, G4double zBias) {
|
||||
G4double pRadius = 2.8 * m / 2;
|
||||
G4double pRadius2 = 1.2 * m;
|
||||
G4double pRadiusMid = pRadius - 10 * cm;
|
||||
G4ThreeVector pos0 = G4ThreeVector();
|
||||
G4ThreeVector pos1 = G4ThreeVector(0, 0, zBias + 0.91 * m);
|
||||
|
||||
// 大环境
|
||||
G4Sphere* solidWorld = new G4Sphere("NodeWorld", 0, pRadius, 0, 360 * deg, 0, 180 * deg);
|
||||
G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, G4Material::GetMaterial("Vacuum"), "NodeWorld");
|
||||
new G4PVPlacement(0, pos1, logicWorld, "NodeWorld", fMotherLogical, false, 0, true);
|
||||
|
||||
// 外壳
|
||||
G4Tubs* solidShellAl1 = new G4Tubs("sectionBigShellAl1", pRmaxBig - 2, pRmaxBig, hzBig, 0, 360);
|
||||
G4LogicalVolume* logicShellAl1 = new G4LogicalVolume(
|
||||
solidShellAl1, G4Material::GetMaterial("AluminumAlloySeries5"), "sectionBigShellAl1");
|
||||
new G4PVPlacement(0, pos1, logicShellAl1, "sectionBigShellAl1", fMotherLogical, false, 0, true);
|
||||
G4Sphere* solidShell = new G4Sphere("NodeShell", 0, pRadius, 0, 360 * deg, 0, 139.5 * deg);
|
||||
G4LogicalVolume* logicShell = new G4LogicalVolume(solidShell, G4Material::GetMaterial("Vacuum"), "NodeShell");
|
||||
new G4PVPlacement(0, pos0, logicShell, "NodeShell", logicWorld, false, 0, true);
|
||||
|
||||
G4Tubs* solidShellTap = new G4Tubs("sectionBigShellTap", pRmaxBig - 55, pRmaxBig - 45, hzBig, 0, 360);
|
||||
G4LogicalVolume* logicShellTap = new G4LogicalVolume(
|
||||
solidShellTap, G4Material::GetMaterial("Taparan"), "sectionBigShellTap");
|
||||
new G4PVPlacement(0, pos1, logicShellTap, "sectionBigShellTap", fMotherLogical, false, 0, true);
|
||||
G4Sphere* solidShellAl1 = new G4Sphere("NodeShellAl1", pRadius - 2, pRadius, 0, 360 * deg, 0, 139.5 * deg);
|
||||
G4LogicalVolume* logicShellAl1 =
|
||||
new G4LogicalVolume(solidShellAl1, G4Material::GetMaterial("AluminumAlloySeries5"), "NodeShellAl1");
|
||||
new G4PVPlacement(0, pos0, logicShellAl1, "NodeShellAl1", logicShell, false, 0, true);
|
||||
|
||||
G4Tubs* solidShellAl2 = new G4Tubs("sectionBigShellAl2", pRmaxBigMid, pRmaxBigMid + 5, hzBig, 0, 360);
|
||||
G4LogicalVolume* logicShellAl2 = new G4LogicalVolume(
|
||||
solidShellAl2, G4Material::GetMaterial("AluminumAlloySeries5"), "sectionBigShellAl2");
|
||||
new G4PVPlacement(0, pos1, logicShellAl2, "sectionBigShellAl2", fMotherLogical, false, 0, true);
|
||||
G4Sphere* solidShellTap = new G4Sphere("NodeShellTap", pRadius - 55, pRadius - 45, 0, 360 * deg, 0, 139.5 * deg);
|
||||
G4LogicalVolume* logicShellTap =
|
||||
new G4LogicalVolume(solidShellTap, G4Material::GetMaterial("Taparan"), "NodeShellTap");
|
||||
new G4PVPlacement(0, pos0, logicShellTap, "NodeShellTap", logicShell, false, 0, true);
|
||||
|
||||
G4Sphere* solidShellAl2 = new G4Sphere("NodeShellAl2", pRadiusMid, pRadiusMid + 5, 0, 360 * deg, 0, 139.5 * deg);
|
||||
G4LogicalVolume* logicShellAl2 =
|
||||
new G4LogicalVolume(solidShellAl2, G4Material::GetMaterial("AluminumAlloySeries5"), "NodeShellAl2");
|
||||
new G4PVPlacement(0, pos0, logicShellAl2, "NodeShellAl2", logicShell, false, 0, true);
|
||||
|
||||
// 填充
|
||||
G4Tubs* solidMidTubs = new G4Tubs("sectionBigMidTubs", 0, pRmaxBigMid, hzBig, 0, 360);
|
||||
G4Box* solidMidBox = new G4Box("sectionBigMidBox", hxBigBox, hxBigBox, hzBig);
|
||||
G4SubtractionSolid* solidMid =
|
||||
new G4SubtractionSolid("sectionBigMid", solidMidTubs, solidMidBox);
|
||||
G4LogicalVolume* logicMid =
|
||||
new G4LogicalVolume(solidMid, G4Material::GetMaterial("G4_Al"), "sectionBigMid");
|
||||
new G4PVPlacement(0, pos1, logicMid, "sectionBigMid", fMotherLogical, false, 0, true);
|
||||
|
||||
G4Sphere* solidMid = new G4Sphere("NodeMid", pRadius2, pRadius, 0, 360 * deg, 0, 139.5 * deg);
|
||||
G4LogicalVolume* logicMid = new G4LogicalVolume(solidMid, G4Material::GetMaterial("midMaterial"), "NodeMid");
|
||||
new G4PVPlacement(0, pos0, logicMid, "NodeMid", logicWorld, false, 0, true);
|
||||
|
||||
// 空气
|
||||
G4Box* solidAir = new G4Box("sectionBigAirBox", hxBigBox, hxBigBox, hzBig);
|
||||
G4LogicalVolume* logicAir =
|
||||
new G4LogicalVolume(solidAir, G4Material::GetMaterial("G4_AIR"), "sectionBigAir");
|
||||
new G4PVPlacement(0, pos1, logicAir, "sectionBigAir", fMotherLogical, false, 0, true);
|
||||
G4Sphere* solidAir = new G4Sphere("NodeAir", 0, pRadius2, 0, 360 * deg, 0, 180 * deg);
|
||||
G4LogicalVolume* logicAir = new G4LogicalVolume(solidAir, G4Material::GetMaterial("G4_AIR"), "NodeAir");
|
||||
new G4PVPlacement(0, pos0, logicAir, "NodeAir", logicWorld, false, 0, true);
|
||||
}
|
||||
|
||||
// 尾部
|
||||
G4Tubs* solidTailAl1 = new G4Tubs("sectionBigTailAl1", 0, pRmaxBigMid, 2.5, 0, 360);
|
||||
G4LogicalVolume* logicTailAl1 = new G4LogicalVolume(
|
||||
solidTailAl1, G4Material::GetMaterial("AluminumAlloySeries5"), "sectionBigTailAl1");
|
||||
new G4PVPlacement(0, G4ThreeVector(0, 0, pos2 - 2.5), logicTailAl1, "sectionBigTailAl1", fMotherLogical, false, 0, true);
|
||||
static void ConstructSectionCons(G4String name, G4LogicalVolume* fMotherLogical, G4double zBias, G4double pRmax1,
|
||||
G4double pRmin1, G4double pRmax2, G4double pRmin2, G4double hz) {
|
||||
G4double pRminMid = pRmin1 - 10 * cm;
|
||||
G4double pRmaxMid = pRmax1 - 10 * cm;
|
||||
G4ThreeVector pos0 = G4ThreeVector();
|
||||
G4ThreeVector pos1 = G4ThreeVector(0, 0, zBias);
|
||||
|
||||
G4Tubs* solidTailTap = new G4Tubs("sectionBigTailTap", 0, pRmaxBigMid, 5, 0, 360);
|
||||
G4LogicalVolume* logicTailTap = new G4LogicalVolume(
|
||||
solidTailTap, G4Material::GetMaterial("Taparan"), "sectionBigTailTap");
|
||||
new G4PVPlacement(0, G4ThreeVector(0, 0, pos2 - 50), logicTailTap, "sectionBigTailTap", fMotherLogical, false, 0, true);
|
||||
// 大环境
|
||||
G4Tubs* solidWorld = new G4Tubs(name + "World", 0, pRmax1, hz, 0, 360);
|
||||
G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, G4Material::GetMaterial("Vacuum"), name + "World");
|
||||
new G4PVPlacement(0, pos1, logicWorld, name + "World", fMotherLogical, false, 0, true);
|
||||
|
||||
G4Tubs* solidTailAl2 = new G4Tubs("sectionBigTailAl2", 0, pRmaxBig, 1, 0, 360);
|
||||
G4LogicalVolume* logicTailAl2 = new G4LogicalVolume(
|
||||
solidTailAl2, G4Material::GetMaterial("AluminumAlloySeries5"), "sectionBigTailAl2");
|
||||
new G4PVPlacement(0, G4ThreeVector(0, 0, pos2 - 99), logicTailAl2, "sectionBigTailAl2", fMotherLogical, false, 0, true);
|
||||
// 外壳
|
||||
G4Cons* solidShell = new G4Cons(name + "Shell", 0, pRmax1, 0, pRmin1, hz, 0, 360);
|
||||
G4LogicalVolume* logicShell = new G4LogicalVolume(solidShell, G4Material::GetMaterial("Vacuum"), name + "Shell");
|
||||
new G4PVPlacement(0, pos0, logicShell, name + "Shell", logicWorld, false, 0, true);
|
||||
|
||||
return zBias + hzBig;
|
||||
G4Cons* solidShellAl1 = new G4Cons(name + "ShellAl1", pRmax1 - 2, pRmax1, pRmin1 - 2, pRmin1, hz, 0, 360);
|
||||
G4LogicalVolume* logicShellAl1 =
|
||||
new G4LogicalVolume(solidShellAl1, G4Material::GetMaterial("AluminumAlloySeries5"), name + "ShellAl1");
|
||||
new G4PVPlacement(0, pos0, logicShellAl1, name + "ShellAl1", logicShell, false, 0, true);
|
||||
|
||||
G4Cons* solidShellTap =
|
||||
new G4Cons(name + "ShellTap", pRmax1 - 55, pRmax1 - 45, pRmin1 - 55, pRmin1 - 45, hz, 0, 360);
|
||||
G4LogicalVolume* logicShellTap =
|
||||
new G4LogicalVolume(solidShellTap, G4Material::GetMaterial("Taparan"), name + "ShellTap");
|
||||
new G4PVPlacement(0, pos0, logicShellTap, name + "ShellTap", logicShell, false, 0, true);
|
||||
|
||||
G4Cons* solidShellAl2 = new G4Cons(name + "ShellAl2", pRmaxMid, pRmaxMid + 5, pRminMid, pRminMid + 5, hz, 0, 360);
|
||||
G4LogicalVolume* logicShellAl2 =
|
||||
new G4LogicalVolume(solidShellAl2, G4Material::GetMaterial("AluminumAlloySeries5"), name + "ShellAl2");
|
||||
new G4PVPlacement(0, pos0, logicShellAl2, name + "ShellAl2", logicShell, false, 0, true);
|
||||
|
||||
// 填充
|
||||
G4Cons* solidMidCons = new G4Cons(name + "MidCons", 0, pRmax1, 0, pRmin1, hz, 0, 360);
|
||||
G4Trd* solidMidTrd = new G4Trd(name + "MidTrd", pRmax2, pRmin2, pRmax2, pRmin2, hz);
|
||||
G4SubtractionSolid* solidMid = new G4SubtractionSolid(name + "Mid", solidMidCons, solidMidTrd);
|
||||
G4LogicalVolume* logicMid = new G4LogicalVolume(solidMid, G4Material::GetMaterial("midMaterial"), name + "Mid");
|
||||
new G4PVPlacement(0, pos0, logicMid, name + "Mid", logicWorld, false, 0, true);
|
||||
|
||||
// 空气
|
||||
G4Trd* solidAir = new G4Trd(name + "Air", pRmax2, pRmin2, pRmax2, pRmin2, hz);
|
||||
G4LogicalVolume* logicAir = new G4LogicalVolume(solidAir, G4Material::GetMaterial("G4_AIR"), name + "Air");
|
||||
new G4PVPlacement(0, pos0, logicAir, name + "Air", logicWorld, false, 0, true);
|
||||
}
|
||||
|
||||
static void ConstructSectionSmall(G4LogicalVolume* fMotherLogical, G4double zBias) {
|
||||
G4double pRmax = 2.8 / 2 * m;
|
||||
G4double hz = 5.18 / 2 * m;
|
||||
G4double hxBox = 1.5 / 2 * m;
|
||||
G4double pRmaxMid = pRmax - 10 * cm;
|
||||
G4ThreeVector pos0 = G4ThreeVector();
|
||||
G4ThreeVector pos1 = G4ThreeVector(0, 0, 8.5);
|
||||
|
||||
// 大环境
|
||||
G4Tubs* solidWorld = new G4Tubs("SmallWorld", 0, pRmax, hz, 0, 360);
|
||||
G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, G4Material::GetMaterial("Vacuum"), "SmallWorld");
|
||||
new G4PVPlacement(0, G4ThreeVector(0, 0, zBias + hz), logicWorld, "SmallWorld", fMotherLogical, false, 0, true);
|
||||
|
||||
// 外壳 2mm铝 + 10mm芳纶 + 5mm铝
|
||||
G4Tubs* solidShell = new G4Tubs("SmallShell", pRmaxMid, pRmax, hz, 0, 360);
|
||||
G4LogicalVolume* logicShell = new G4LogicalVolume(solidShell, G4Material::GetMaterial("Vacuum"), "SmallShell");
|
||||
new G4PVPlacement(0, pos1, logicShell, "SmallShell", logicWorld, false, 0, true);
|
||||
|
||||
G4Tubs* solidShellAl1 = new G4Tubs("SmallShellAl1", pRmax - 2, pRmax, hz, 0, 360);
|
||||
G4LogicalVolume* logicShellAl1 =
|
||||
new G4LogicalVolume(solidShellAl1, G4Material::GetMaterial("AluminumAlloySeries5"), "SmallShellAl1");
|
||||
new G4PVPlacement(0, pos0, logicShellAl1, "SmallShellAl1", logicShell, false, 0, true);
|
||||
|
||||
G4Tubs* solidShellTap = new G4Tubs("SmallShellTap", pRmax - 55, pRmax - 45, hz, 0, 360);
|
||||
G4LogicalVolume* logicShellTap =
|
||||
new G4LogicalVolume(solidShellTap, G4Material::GetMaterial("Taparan"), "SmallShellTap");
|
||||
new G4PVPlacement(0, pos0, logicShellTap, "SmallShellTap", logicShell, false, 0, true);
|
||||
|
||||
G4Tubs* solidShellAl2 = new G4Tubs("SmallShellAl2", pRmaxMid, pRmaxMid + 5, hz, 0, 360);
|
||||
G4LogicalVolume* logicShellAl2 =
|
||||
new G4LogicalVolume(solidShellAl2, G4Material::GetMaterial("AluminumAlloySeries5"), "SmallShellAl2");
|
||||
new G4PVPlacement(0, pos0, logicShellAl2, "SmallShellAl2", logicShell, false, 0, true);
|
||||
|
||||
// 填充
|
||||
G4Tubs* solidMidTubs = new G4Tubs("SmallMidTubs", 0, pRmaxMid, hz, 0, 360);
|
||||
G4Box* solidMidBox = new G4Box("SmallMidBox", hxBox, hxBox, hz);
|
||||
G4SubtractionSolid* solidMid = new G4SubtractionSolid("SmallMid", solidMidTubs, solidMidBox);
|
||||
G4LogicalVolume* logicMid = new G4LogicalVolume(solidMid, G4Material::GetMaterial("midMaterial"), "SmallMid");
|
||||
new G4PVPlacement(0, pos1, logicMid, "SmallMid", logicWorld, false, 0, true);
|
||||
|
||||
// 空气
|
||||
G4Box* solidAir = new G4Box("SmallAirBox", hxBox, hxBox, hz);
|
||||
G4LogicalVolume* logicAir = new G4LogicalVolume(solidAir, G4Material::GetMaterial("G4_AIR"), "SmallAir");
|
||||
new G4PVPlacement(0, pos1, logicAir, "SmallAir", logicWorld, false, 0, true);
|
||||
}
|
||||
|
||||
static void ConstructSectionBig(G4LogicalVolume* fMotherLogical, G4double zBias) {
|
||||
G4double pRmax = 4.2 / 2 * m;
|
||||
G4double hz = 6.72 / 2 * m;
|
||||
G4double hxBox = 2.4 / 2 * m;
|
||||
G4double pRmaxMid = pRmax - 10 * cm;
|
||||
G4ThreeVector pos0 = G4ThreeVector();
|
||||
G4ThreeVector pos1 = G4ThreeVector(0, 0, 8.5);
|
||||
|
||||
// 大环境
|
||||
G4Tubs* solidWorld = new G4Tubs("BigWorld", 0, pRmax, hz + 8.5, 0, 360);
|
||||
G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, G4Material::GetMaterial("Vacuum"), "BigWorld");
|
||||
new G4PVPlacement(0, G4ThreeVector(0, 0, -(zBias + hz + 8.5)), logicWorld, "BigWorld", fMotherLogical, false, 0,
|
||||
true);
|
||||
|
||||
// 外壳 2mm铝 + 10mm芳纶 + 5mm铝
|
||||
G4Tubs* solidShell = new G4Tubs("BigShell", pRmaxMid, pRmax, hz, 0, 360);
|
||||
G4LogicalVolume* logicShell = new G4LogicalVolume(solidShell, G4Material::GetMaterial("Vacuum"), "BigShell");
|
||||
new G4PVPlacement(0, pos1, logicShell, "BigShell", logicWorld, false, 0, true);
|
||||
|
||||
G4Tubs* solidShellAl1 = new G4Tubs("BigShellAl1", pRmax - 2, pRmax, hz, 0, 360);
|
||||
G4LogicalVolume* logicShellAl1 =
|
||||
new G4LogicalVolume(solidShellAl1, G4Material::GetMaterial("AluminumAlloySeries5"), "BigShellAl1");
|
||||
new G4PVPlacement(0, pos0, logicShellAl1, "BigShellAl1", logicShell, false, 0, true);
|
||||
|
||||
G4Tubs* solidShellTap = new G4Tubs("BigShellTap", pRmax - 55, pRmax - 45, hz, 0, 360);
|
||||
G4LogicalVolume* logicShellTap =
|
||||
new G4LogicalVolume(solidShellTap, G4Material::GetMaterial("Taparan"), "BigShellTap");
|
||||
new G4PVPlacement(0, pos0, logicShellTap, "BigShellTap", logicShell, false, 0, true);
|
||||
|
||||
G4Tubs* solidShellAl2 = new G4Tubs("BigShellAl2", pRmaxMid, pRmaxMid + 5, hz, 0, 360);
|
||||
G4LogicalVolume* logicShellAl2 =
|
||||
new G4LogicalVolume(solidShellAl2, G4Material::GetMaterial("AluminumAlloySeries5"), "BigShellAl2");
|
||||
new G4PVPlacement(0, pos0, logicShellAl2, "BigShellAl2", logicShell, false, 0, true);
|
||||
|
||||
// 填充
|
||||
G4Tubs* solidMidTubs = new G4Tubs("BigMidTubs", 0, pRmaxMid, hz, 0, 360);
|
||||
G4Box* solidMidBox = new G4Box("BigMidBox", hxBox, hxBox, hz);
|
||||
G4SubtractionSolid* solidMid = new G4SubtractionSolid("BigMid", solidMidTubs, solidMidBox);
|
||||
G4LogicalVolume* logicMid = new G4LogicalVolume(solidMid, G4Material::GetMaterial("midMaterial"), "BigMid");
|
||||
new G4PVPlacement(0, pos1, logicMid, "BigMid", logicWorld, false, 0, true);
|
||||
|
||||
// 空气
|
||||
G4Box* solidAir = new G4Box("BigAirBox", hxBox, hxBox, hz);
|
||||
G4LogicalVolume* logicAir = new G4LogicalVolume(solidAir, G4Material::GetMaterial("G4_AIR"), "BigAir");
|
||||
new G4PVPlacement(0, pos1, logicAir, "BigAir", logicWorld, false, 0, true);
|
||||
|
||||
// 尾部 5mm铝 + 10mm芳纶 + 2mm铝
|
||||
G4Tubs* solidTail = new G4Tubs("BigTail", 0, pRmax, 8.5, 0, 360);
|
||||
G4LogicalVolume* logicTail = new G4LogicalVolume(solidTail, G4Material::GetMaterial("Vacuum"), "BigTail");
|
||||
new G4PVPlacement(0, G4ThreeVector(0, 0, -(hz + 8.5)), logicTail, "BigTail", logicWorld, false, 0, true);
|
||||
|
||||
G4Tubs* solidTailAl1 = new G4Tubs("BigTailAl1", 0, pRmax, 2.5, 0, 360);
|
||||
G4LogicalVolume* logicTailAl1 =
|
||||
new G4LogicalVolume(solidTailAl1, G4Material::GetMaterial("AluminumAlloySeries5"), "BigTailAl1");
|
||||
new G4PVPlacement(0, G4ThreeVector(0, 0, 6), logicTailAl1, "BigTailAl1", logicTail, false, 0, true);
|
||||
|
||||
G4Tubs* solidTailTap = new G4Tubs("BigTailTap", 0, pRmax, 5, 0, 360);
|
||||
G4LogicalVolume* logicTailTap = new G4LogicalVolume(solidTailTap, G4Material::GetMaterial("Taparan"), "BigTailTap");
|
||||
new G4PVPlacement(0, G4ThreeVector(0, 0, -1.5), logicTailTap, "BigTailTap", logicTail, false, 0, true);
|
||||
|
||||
G4Tubs* solidTailAl2 = new G4Tubs("BigTailAl2", 0, pRmax, 1, 0, 360);
|
||||
G4LogicalVolume* logicTailAl2 =
|
||||
new G4LogicalVolume(solidTailAl2, G4Material::GetMaterial("AluminumAlloySeries5"), "BigTailAl2");
|
||||
new G4PVPlacement(0, G4ThreeVector(0, 0, -7.5), logicTailAl2, "BigTailAl2", logicTail, false, 0, true);
|
||||
}
|
||||
|
||||
G4VPhysicalVolume* DetectorConstruction::Construct() {
|
||||
G4double zBias = 0.815 * m;
|
||||
|
||||
// Define materials
|
||||
DefineMaterials();
|
||||
|
||||
// World
|
||||
G4Box* solidWorld = new G4Box("World", 3. * m, 3. * m, 10. * m);
|
||||
G4Box* solidWorld = new G4Box("World", 5. * m, 5. * m, 15. * m);
|
||||
G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, G4Material::GetMaterial("Vacuum"), "World");
|
||||
G4VPhysicalVolume* physicsWorld = new G4PVPlacement(0, G4ThreeVector(), logicWorld, "World", 0, false, 0, true);
|
||||
|
||||
// 节点舱
|
||||
ConstructSectionSphere(logicWorld, (5.18 + 0.33) * m);
|
||||
// 过渡段 1
|
||||
ConstructSectionCons("Trans1", logicWorld, 5.18 * m + 0.33 * m / 2, 2.8 * m / 2, 2.13 * m / 2, 1.5 * m / 2,
|
||||
1.22 * m / 2, 0.33 * m / 2);
|
||||
// 小柱段
|
||||
ConstructSectionSmall(logicWorld, 0);
|
||||
// 过渡段 2
|
||||
ConstructSectionCons("Trans2", logicWorld, -0.815 * m / 2, 4.2 * m / 2, 2.8 * m / 2, 2.4 * m / 2, 1.5 * m / 2,
|
||||
0.815 * m / 2);
|
||||
// 大柱段
|
||||
zBias = ConstrustSectionBig(logicWorld, zBias);
|
||||
ConstructSectionBig(logicWorld, 0.815 * m);
|
||||
|
||||
dataFile << logicWorld->GetMass() / kg << std::endl;
|
||||
|
||||
return physicsWorld;
|
||||
}
|
||||
|
@ -43,5 +43,20 @@ void DefineMaterials() {
|
||||
Taparan->AddElement(nist->FindOrBuildElement("N"), natoms = 2);
|
||||
Taparan->AddElement(nist->FindOrBuildElement("O"), natoms = 2);
|
||||
|
||||
// // 填充材质
|
||||
density = 0.23 * g / cm3;
|
||||
G4Material* midMaterial = new G4Material("midMaterial", density, ncomponents = 11);
|
||||
midMaterial->AddElementByMassFraction(nist->FindOrBuildElement("Al"), .3);
|
||||
midMaterial->AddElementByMassFraction(nist->FindOrBuildElement("Fe"), .25);
|
||||
midMaterial->AddElementByMassFraction(nist->FindOrBuildElement("C"), .1);
|
||||
midMaterial->AddElementByMassFraction(nist->FindOrBuildElement("O"), .1);
|
||||
midMaterial->AddElementByMassFraction(nist->FindOrBuildElement("H"), .02);
|
||||
midMaterial->AddElementByMassFraction(nist->FindOrBuildElement("N"), .03);
|
||||
midMaterial->AddElementByMassFraction(nist->FindOrBuildElement("Mg"), .1);
|
||||
midMaterial->AddElementByMassFraction(nist->FindOrBuildElement("Mn"), .04);
|
||||
midMaterial->AddElementByMassFraction(nist->FindOrBuildElement("Zn"), .03);
|
||||
midMaterial->AddElementByMassFraction(nist->FindOrBuildElement("Cr"), .015);
|
||||
midMaterial->AddElementByMassFraction(nist->FindOrBuildElement("Ti"), .015);
|
||||
|
||||
std::cout << *(G4Material::GetMaterialTable()) << std::endl;
|
||||
}
|
||||
|
22
vis.mac
22
vis.mac
@ -33,10 +33,26 @@
|
||||
|
||||
# 设置颜色
|
||||
/vis/geometry/set/visibility World 0 false
|
||||
/vis/geometry/set/colour sectionBigMid 0 0.631373 0.686275 0.733333 0.584314
|
||||
/vis/geometry/set/colour sectionBigAir 0 0.631373 0.686275 0.733333 0.584314
|
||||
/vis/geometry/set/visibility BigWorld 0 false
|
||||
/vis/geometry/set/colour BigMid 0 0.631373 0.686275 0.733333 0.584314
|
||||
/vis/geometry/set/colour BigAir 0 0.631373 0.686275 0.733333 0.584314
|
||||
/vis/geometry/set/visibility NodeWorld 0 false
|
||||
/vis/geometry/set/visibility NodeShell 0 false
|
||||
/vis/geometry/set/colour NodeMid 0 0.631373 0.686275 0.733333 0.584314
|
||||
/vis/geometry/set/colour NodeAir 0 0.631373 0.686275 0.733333 0.584314
|
||||
/vis/geometry/set/visibility SmallWorld 0 false
|
||||
/vis/geometry/set/colour SmallMid 0 0.631373 0.686275 0.733333 0.584314
|
||||
/vis/geometry/set/colour SmallAir 0 0.631373 0.686275 0.733333 0.584314
|
||||
/vis/geometry/set/visibility Trans1World 0 false
|
||||
/vis/geometry/set/visibility Trans1Shell 0 false
|
||||
/vis/geometry/set/colour Trans1Mid 0 0.631373 0.686275 0.733333 0.584314
|
||||
/vis/geometry/set/colour Trans1Air 0 0.631373 0.686275 0.733333 0.584314
|
||||
/vis/geometry/set/visibility Trans2World 0 false
|
||||
/vis/geometry/set/visibility Trans2Shell 0 false
|
||||
/vis/geometry/set/colour Trans2Mid 0 0.631373 0.686275 0.733333 0.584314
|
||||
/vis/geometry/set/colour Trans2Air 0 0.631373 0.686275 0.733333 0.584314
|
||||
/vis/viewer/set/style surface
|
||||
|
||||
# 坐标轴
|
||||
/vis/scene/add/scale # Simple scale line
|
||||
/vis/scene/add/axes # Simple axes: x=red, y=green, z=blue.
|
||||
/vis/scene/add/axes # Simple axes: x=red, y=green, z=blue.
|
||||
|
Loading…
Reference in New Issue
Block a user