File indexing completed on 2025-02-23 09:20:43
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 #include "B02DetectorConstruction.hh"
0032
0033 #include "G4Box.hh"
0034 #include "G4Colour.hh"
0035 #include "G4LogicalVolume.hh"
0036 #include "G4Material.hh"
0037 #include "G4PVPlacement.hh"
0038 #include "G4PhysicalConstants.hh"
0039 #include "G4SystemOfUnits.hh"
0040 #include "G4ThreeVector.hh"
0041 #include "G4Tubs.hh"
0042 #include "G4Types.hh"
0043 #include "G4VisAttributes.hh"
0044 #include "globals.hh"
0045
0046
0047 #include "G4IStore.hh"
0048
0049
0050 #include "G4MultiFunctionalDetector.hh"
0051 #include "G4PSNofCollision.hh"
0052 #include "G4PSPopulation.hh"
0053 #include "G4PSTrackCounter.hh"
0054 #include "G4PSTrackLength.hh"
0055 #include "G4SDManager.hh"
0056 #include "G4SDParticleFilter.hh"
0057
0058
0059
0060 B02DetectorConstruction::B02DetectorConstruction() : G4VUserDetectorConstruction()
0061 {
0062 ;
0063 }
0064
0065
0066
0067 B02DetectorConstruction::~B02DetectorConstruction()
0068 {
0069 ;
0070 }
0071
0072
0073
0074 G4VPhysicalVolume* B02DetectorConstruction::Construct()
0075 {
0076 G4double pos_x;
0077 G4double pos_y;
0078 G4double pos_z;
0079
0080 G4double density, pressure, temperature;
0081 G4double A;
0082 G4int Z;
0083
0084 G4String name, symbol;
0085 G4double z;
0086 G4double fractionmass;
0087
0088 A = 1.01 * g / mole;
0089 G4Element* elH = new G4Element(name = "Hydrogen", symbol = "H", Z = 1, A);
0090
0091 A = 12.01 * g / mole;
0092 G4Element* elC = new G4Element(name = "Carbon", symbol = "C", Z = 6, A);
0093
0094 A = 16.00 * g / mole;
0095 G4Element* elO = new G4Element(name = "Oxygen", symbol = "O", Z = 8, A);
0096
0097 A = 22.99 * g / mole;
0098 G4Element* elNa = new G4Element(name = "Natrium", symbol = "Na", Z = 11, A);
0099
0100 A = 200.59 * g / mole;
0101 G4Element* elHg = new G4Element(name = "Hg", symbol = "Hg", Z = 80, A);
0102
0103 A = 26.98 * g / mole;
0104 G4Element* elAl = new G4Element(name = "Aluminium", symbol = "Al", Z = 13, A);
0105
0106 A = 28.09 * g / mole;
0107 G4Element* elSi = new G4Element(name = "Silicon", symbol = "Si", Z = 14, A);
0108
0109 A = 39.1 * g / mole;
0110 G4Element* elK = new G4Element(name = "K", symbol = "K", Z = 19, A);
0111
0112 A = 69.72 * g / mole;
0113 G4Element* elCa = new G4Element(name = "Calzium", symbol = "Ca", Z = 31, A);
0114
0115 A = 55.85 * g / mole;
0116 G4Element* elFe = new G4Element(name = "Iron", symbol = "Fe", Z = 26, A);
0117
0118 density = universe_mean_density;
0119 pressure = 3.e-18 * pascal;
0120 temperature = 2.73 * kelvin;
0121 G4Material* Galactic = new G4Material(name = "Galactic", z = 1., A = 1.01 * g / mole, density,
0122 kStateGas, temperature, pressure);
0123
0124 density = 2.03 * g / cm3;
0125 G4Material* Concrete = new G4Material("Concrete", density, 10);
0126 Concrete->AddElement(elH, fractionmass = 0.01);
0127 Concrete->AddElement(elO, fractionmass = 0.529);
0128 Concrete->AddElement(elNa, fractionmass = 0.016);
0129 Concrete->AddElement(elHg, fractionmass = 0.002);
0130 Concrete->AddElement(elAl, fractionmass = 0.034);
0131 Concrete->AddElement(elSi, fractionmass = 0.337);
0132 Concrete->AddElement(elK, fractionmass = 0.013);
0133 Concrete->AddElement(elCa, fractionmass = 0.044);
0134 Concrete->AddElement(elFe, fractionmass = 0.014);
0135 Concrete->AddElement(elC, fractionmass = 0.001);
0136
0137
0138
0139
0140
0141
0142
0143 G4double innerRadiusCylinder = 0 * cm;
0144
0145 G4double outerRadiusCylinder = 100 * cm;
0146
0147
0148 G4double heightCylinder = 100 * cm;
0149 G4double startAngleCylinder = 0 * deg;
0150 G4double spanningAngleCylinder = 360 * deg;
0151
0152 G4Tubs* worldCylinder = new G4Tubs("worldCylinder", innerRadiusCylinder, outerRadiusCylinder,
0153 heightCylinder, startAngleCylinder, spanningAngleCylinder);
0154
0155
0156
0157 G4LogicalVolume* worldCylinder_log =
0158 new G4LogicalVolume(worldCylinder, Galactic, "worldCylinder_log");
0159
0160 name = "shieldWorld";
0161 fWorldVolume = new G4PVPlacement(0, G4ThreeVector(0, 0, 0), worldCylinder_log, name, 0, false, 0);
0162
0163
0164
0165 G4double innerRadiusShield = 0 * cm;
0166 G4double outerRadiusShield = 100 * cm;
0167 G4double heightShield = 90 * cm;
0168 G4double startAngleShield = 0 * deg;
0169 G4double spanningAngleShield = 360 * deg;
0170
0171 G4Tubs* aShield = new G4Tubs("aShield", innerRadiusShield, outerRadiusShield, heightShield,
0172 startAngleShield, spanningAngleShield);
0173
0174
0175
0176 G4LogicalVolume* aShield_log = new G4LogicalVolume(aShield, Concrete, "aShield_log");
0177
0178 G4VisAttributes* pShieldVis = new G4VisAttributes(G4Colour(0.0, 0.0, 1.0));
0179 pShieldVis->SetForceSolid(true);
0180 aShield_log->SetVisAttributes(pShieldVis);
0181
0182
0183
0184 name = "concreteShield";
0185
0186 pos_x = 0 * cm;
0187 pos_y = 0 * cm;
0188 pos_z = 0;
0189
0190 new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z), aShield_log, name, worldCylinder_log,
0191 false, 0);
0192
0193 return fWorldVolume;
0194 }
0195
0196
0197
0198 G4VPhysicalVolume* B02DetectorConstruction::GetWorldVolume()
0199 {
0200 return fWorldVolume;
0201 }
0202
0203