73 :fTarget_diameter(0),fIsotopeName(0),fIsotopeZ(0),fIsotopeN(0),fIsotopeA(0),
74 fElementName(0),fElementSymbole(0),fElementNComponents(0),fElementAbundance(0),
75 fNaturalElementName(0),fNaturalMaterialFractionMass(0), fDensity_target(0),
76 fTarget_NComponents(0), fMaterialFractionMass(0),fIsotopeNameFoil(0),
77 fIsotopeZFoil(0),fIsotopeNFoil(0),fIsotopeAFoil(0), fElementNameFoil(0),
78 fElementSymboleFoil(0),fElementNComponentsFoil(0),fElementAbundanceFoil(0),
79 fNaturalElementNameFoil(0),fNaturalMaterialFractionMassFoil(0),
80 fDensity_foil(0), fFoil_NComponents(0), fMaterialFractionMassFoil(0),
81 fTarget_thickness(0), fFoil_thickness(0), fTarget_Material(0), fFoil_Material(0),
82 fZ_foil_position(0), fSolidFoil(nullptr),fLogicFoil(nullptr), fPhysFoil(nullptr),
84 fLayer_z_position_PART3(0), fPhysLayer_PART3(nullptr), fPhysTube_PART3(nullptr),
85 fTube_outerRadius_PART4(0), fTube_length_PART4(0),fLayer_z_position_PART4(0),
86 fPhysTube_PART4(nullptr), fPhysLayer_PART4(nullptr),
87 fLayer1_z_position_PART4(0),fPhysLayer1_PART4(nullptr),
88 fLogicTarget(nullptr), fTarget_z_position(0),fSolidTarget(nullptr),
90 fLayer1_z_position_PART5(0), fPhysLayer1_PART5(nullptr),
91 fLayer2_z_position_PART5(0), fPhysLayer2_PART5(nullptr),
92 fLayer3_z_position_PART5(0),fPhysLayer3_PART5(nullptr),
93 fRegionTarget(nullptr), fRegionFoil(nullptr), fTargetVolume(0), fFoilVolume(0)
117 G4bool checkOverlaps =
true;
169 G4double vacuum_atomic_number, vacuum_mass_of_mole, vacuum_density,vacuum_pressure,vacuum_temperature;
170 vacuum_atomic_number = 1.;
171 vacuum_mass_of_mole = 1.008*
g/
mole;
172 vacuum_density = 1.e-30*
g/
cm3;
173 vacuum_pressure = 1.e-8*
bar;
174 vacuum_temperature = 293.*
kelvin;
176 vacuum_mass_of_mole, vacuum_density,
183 G4double helium_Z, helium_A, helium_density, helium_pressure, helium_temperature;
186 helium_density = 0.1785e-3*
g/
cm3;
187 helium_pressure = 2.*
bar;
188 helium_temperature = 293.*
kelvin;
286 G4double layer1_hz_PART1 = 0.5*layer1_length_PART1;
289 =
new G4Tubs(
"Layer1_PART1",
290 layer1_innerRadius_PART1,
291 layer1_outerRadius_PART1,
300 G4double layer2_hz_PART1 = 0.5*layer2_length_PART1;
303 =
new G4Tubs(
"Layer2_PART1",
304 layer2_innerRadius_PART1,
305 layer2_outerRadius_PART1,
313 G4double z_layer_translation_PART1 = layer2_length_PART1-layer1_length_PART1;
315 G4Transform3D transform_layer_PART1(rot_layer_PART1,placement_layer_PART1);
317 G4UnionSolid* solidLayer_PART1 =
new G4UnionSolid(
"Layer_PART1", solidLayer2_PART1, solidLayer1_PART1, transform_layer_PART1);
341 G4double tube_length_PART1 = layer2_length_PART1;
345 G4double tube_hz_PART1 = 0.5*tube_length_PART1;
348 =
new G4Tubs(
"Tube_PART1",
349 tube_innerRadius_PART1,
350 tube_outerRadius_PART1,
388 G4double layer_hz_PART2 = 0.5*layer_length_PART2;
391 =
new G4Tubs(
"Layer_PART2",
392 layer_innerRadius_PART2,
393 layer_outerRadius_PART2,
404 G4double layer_z_position_PART2 = tube_length_PART1 + 0.5*layer_length_PART2;
424 G4double tube_length_PART2 = layer_length_PART2;
428 G4double tube_hz_PART2 = 0.5*tube_length_PART2;
431 =
new G4Tubs(
"Tube_PART2",
432 tube_innerRadius_PART2,
433 tube_outerRadius_PART2,
461 G4double hexagone_length = layer_length_PART2 ;
463 G4int numZPlanes = 2;
464 const G4double zPlane[]={-0.5*hexagone_length,0.5*hexagone_length};
557 G4double layer_hz_PART3 = 0.5*layer_length_PART3;
560 =
new G4Tubs(
"Layer_PART3",
561 layer_innerRadius_PART3,
562 layer_outerRadius_PART3,
592 G4double tube_length_PART3 = layer_length_PART3;
596 G4double tube_hz_PART3 = 0.5*tube_length_PART3;
599 =
new G4Tubs(
"Tube_PART3",
600 tube_innerRadius_PART3,
601 tube_outerRadius_PART3,
639 G4double layer2_hz_PART4 = 0.5*layer2_length_PART4;
642 =
new G4Cons(
"Layer2_PART4",
653 G4double layer3_length_PART4 = layer1_length_PART4-layer2_length_PART4;
656 G4double layer3_hz_PART4 = 0.5*layer3_length_PART4;
659 =
new G4Tubs(
"Layer3_PART4",
660 layer3_innerRadius_PART4,
661 layer3_outerRadius_PART4,
669 G4double z_layer_translation_PART4 = 0.5*(layer2_length_PART4+layer3_length_PART4);
671 G4Transform3D transform_layer_PART4(rot_layer_PART4,placement_layer_PART4);
673 G4UnionSolid* solidLayer_PART4 =
new G4UnionSolid(
"Layer_PART1", solidLayer2_PART4, solidLayer3_PART4, transform_layer_PART4);
702 G4double layer1_hz_PART4 = 0.5*layer1_length_PART4;
705 =
new G4Tubs(
"Layer1_PART4",
706 layer1_innerRadius_PART4,
707 layer1_outerRadius_PART4,
746 =
new G4Tubs(
"Tube_PART4",
747 tube_innerRadius_PART4,
829 G4double layer1_hz_PART5 = 0.5*layer1_length_PART5;
832 =
new G4Tubs(
"Layer1_PART5",
833 layer1_innerRadius_PART5,
834 layer1_outerRadius_PART5,
864 G4double layer2_hz_PART5 = 0.5*layer2_length_PART5;
867 =
new G4Tubs(
"Layer2_PART5",
868 layer2_innerRadius_PART5,
869 layer2_outerRadius_PART5,
899 G4double layer3_hz_PART5 = 0.5*layer3_length_PART5;
902 =
new G4Tubs(
"Layer3_PART5",
903 layer3_innerRadius_PART5,
904 layer3_outerRadius_PART5,
914 fLayer3_z_position_PART5 = tube_length_PART1 + layer_length_PART2 +
fFoil_thickness + layer_length_PART3 +layer2_length_PART4+layer3_length_PART4 + layer2_length_PART5 + 0.5*layer3_length_PART5;
1084 G4int counterElement = 0;
1087 std::ptrdiff_t
const sizeElementName =
fElementName.size();
1091 if(sizeElementName!=0){
1094 if(nElements != sizeElementName + sizeNaturalElementName){
1099 for(
int i = 0; i<sizeElementName ; i++){
1107 std::ptrdiff_t
const sizeIsotopeName =
fIsotopeName.size();
1117 elementi->
AddIsotope(isotopeij,fElementAbundance[j]);
1119 if((1.-checkAbundance)>1
E-5){
1120 G4cout <<
"Error : the total abundance of isotopes in your target's element " <<
fElementName[i] <<
" is equal to " << checkAbundance <<
". It must be equal to 1." <<
G4endl;
1124 counterElement = counterElement + fElementNComponents[i];
1125 material->
AddElement(elementi, fMaterialFractionMass[i]);
1131 if(sizeNaturalElementName!=0){
1132 for(
int i=0;i<sizeNaturalElementName;i++){
1136 material->
AddElement(element, fNaturalMaterialFractionMass[i]);
1140 if((1.-checkFractionMass)>1
E-5){
1141 G4cout <<
"Error : the sum of the fraction mass of each element in the target is equal to " << checkFractionMass <<
". It must be equal to 1." <<
G4endl;
1146 G4cout <<
"You succesfully changed the material of the target." <<
G4endl;
1153 for(
int i = 0; i<sizeMaterial;i++){
1160 for(
int j=0; j<sizeIsotope; j++){
1207 else{
G4cout <<
"This material wasn't found in the NIST list." <<
G4endl; }
1307 G4int counterElement = 0;
1314 if(sizeElementName!=0){
1316 if(nElements != sizeElementName + sizeNaturalElementName){
1320 for(
int i = 0; i<sizeElementName ; i++){
1338 elementi->
AddIsotope(isotopeij,fElementAbundanceFoil[j]);
1340 if((1.-checkAbundance)>1
E-5){
1341 G4cout <<
"Error : the total abundance of isotopes in your foil's element " <<
fElementNameFoil[i] <<
" is equal to " << checkAbundance <<
". It must be equal to 1." <<
G4endl;
1345 counterElement = counterElement + fElementNComponentsFoil[i];
1346 material->
AddElement(elementi, fMaterialFractionMassFoil[i]);
1351 if(sizeNaturalElementName!=0){
1352 for(
int i=0;i<sizeNaturalElementName;i++){
1356 material->
AddElement(element, fNaturalMaterialFractionMassFoil[i]);
1360 if((1.-checkFractionMass)>1
E-5){
1361 G4cout <<
"Error : the sum of the fraction mass of each element in the foil is equal to " << checkFractionMass <<
". It must be equal to 1." <<
G4endl;
1366 G4cout <<
"You succesfully changed the material of the foil." <<
G4endl;
1372 for(
int i = 0; i<sizeMaterial;i++){
1378 for(
int j=0; j<sizeIsotope; j++){
1420 else{
G4cout <<
"This material wasn't found in the NIST list." <<
G4endl; }
1470 fFoil_thickness = foilThickness;
1494 G4cout <<
"The new thickness of the foil is " << fFoil_thickness <<
" mm." <<
G4endl;