3 #include <fwk/CentralConfig.h>
4 #include <utl/ErrorLogger.h>
5 #include <utl/Reader.h>
6 #include <utl/MathConstants.h>
9 #include <G4RunManager.hh>
10 #include <G4RegionStore.hh>
14 #include <G4LogicalVolume.hh>
15 #include <G4ThreeVector.hh>
16 #include <G4PVPlacement.hh>
17 #include <G4Transform3D.hh>
18 #include <G4RotationMatrix.hh>
19 #include <G4VisAttributes.hh>
20 #include <G4Colour.hh>
21 #include <G4Material.hh>
22 #include <G4Element.hh>
23 #include <G4MaterialPropertiesTable.hh>
26 #define MD_THETASIM_MAX 80*utl::degree
27 #define MD_SIM_AREA 30*utl::m2
28 #define MD_LARGE_SIDE 12*utl::m
32 using namespace GroundPropagatorAG;
34 SoilConstruction::SoilConstruction ( G4double grammage ) :
35 fSoilGrammage( grammage )
42 INFO(
"\n++++\nGetting parameters from XML file...");
47 std::vector<G4double> vWorldSize;
51 std::vector<G4double> vSoilSampleA;
52 std::vector<G4double> vSoilSampleB;
53 std::vector<G4double> vSoilSampleC;
62 for(
size_t i = 0; i < vSoilSampleA.size(); ++i )
63 SampleA += vSoilSampleA[i];
64 SampleA /= vSoilSampleA.size();
67 for(
size_t i = 0; i < vSoilSampleB.size(); ++i )
68 SampleB += vSoilSampleB[i];
69 SampleB /= vSoilSampleB.size();
72 for(
size_t i = 0; i < vSoilSampleC.size(); ++i )
73 SampleC += vSoilSampleC[i];
74 SampleC /= vSoilSampleC.size();
77 G4cerr <<
"SampleA " << SampleA/(
utl::g/
utl::cm3) <<
" g/cm3" << G4endl;
78 G4cerr <<
"SampleB " << SampleB/(
utl::g/
utl::cm3) <<
" g/cm3" << G4endl;
79 G4cerr <<
"SampleC " << SampleC/(
utl::g/
utl::cm3) <<
" g/cm3" << G4endl;
90 G4cerr <<
"Radius " << Radius/
utl::m <<
" (m)" << G4endl;
130 G4ThreeVector placement;
131 INFO(
"\n++++\nCreating World");
141 G4Colour
blue ( 0, 0, -1 );
142 G4VisAttributes *fLogicalWorldVisAtt =
new G4VisAttributes ( blue );
146 INFO(
"\n++++\nCreating Soil");
151 G4double soil_pos_x = 0.0 *
utl::m;
152 G4double soil_pos_y = 0.0 *
utl::m;
154 placement = G4ThreeVector ( soil_pos_x, soil_pos_y, soil_pos_z );
156 G4Colour brown ( 0.7, 0.4, 0.1 );
157 G4VisAttributes *fLogicalSoilVisAtt =
new G4VisAttributes ( brown );
166 INFO(
"\n++++\nCreating materials...");
185 SiO2->AddElement (
Si, natoms = 1 );
186 SiO2->AddElement (
O , natoms = 2 );
189 Al2O3->AddElement (
Al, natoms = 2 );
190 Al2O3->AddElement (
O , natoms = 3 );
193 Fe2O3->AddElement (
Fe, natoms = 2 );
194 Fe2O3->AddElement (
O , natoms = 3 );
197 TiO2->AddElement (
Ti, natoms = 1 );
198 TiO2->AddElement (
O , natoms = 2 );
201 CaO->AddElement (
Ca, natoms = 1 );
202 CaO->AddElement (
O , natoms = 1 );
205 MgO->AddElement (
Mg, natoms = 1 );
206 MgO->AddElement (
O , natoms = 1 );
209 K2O->AddElement (
K, natoms = 2 );
210 K2O->AddElement (
O , natoms = 1 );
213 Na2O->AddElement (
Na, natoms = 2 );
214 Na2O->AddElement (
O , natoms = 1 );
G4LogicalVolume * fLogicalSoil
G4double fSoilGrammage
Parameters.
#define INFO(message)
Macro for logging informational messages.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
Class representing a document branch.
G4VPhysicalVolume * fPhysicalSoil
G4double fWorld_Side_X
Geometry.
void GetData(bool &b) const
Overloads of the GetData member template function.
G4Material * fWorldMaterial
void CreateMaterials()
Materials.
Main configuration utility.
G4VPhysicalVolume * fPhysicalWorld
G4VPhysicalVolume * Construct()
G4LogicalVolume * fLogicalWorld
Volumes.
G4Material * fSoilMaterial
utl::Branch GetTopBranch(const std::string &id)
Get top branch for moduleConfigLink with given id (XML files)
static const G4Colour blue(0.0, 0.0, 1.0)