77 auto nistManager = G4NistManager::Instance();
78 nistManager->FindOrBuildMaterial(
"G4_Pb");
84 new G4Material(
"liquidArgon", z=18.,
a= 39.95*g/mole, density= 1.390*g/cm3);
88 new G4Material(
"Galactic", z=1.,
a=1.01*g/mole,density= universe_mean_density,
89 kStateGas, 2.73*kelvin, 3.e-18*pascal);
92 G4cout << *(G4Material::GetMaterialTable()) << G4endl;
100 G4int nofLayers = 10;
101 G4double absoThickness = 10.*mm;
102 G4double gapThickness = 5.*mm;
103 G4double calorSizeXY = 10.*cm;
105 auto layerThickness = absoThickness + gapThickness;
106 auto calorThickness = nofLayers * layerThickness;
107 auto worldSizeXY = 1.2 * calorSizeXY;
108 auto worldSizeZ = 1.2 * calorThickness;
111 auto defaultMaterial = G4Material::GetMaterial(
"Galactic");
112 auto absorberMaterial = G4Material::GetMaterial(
"G4_Pb");
113 auto gapMaterial = G4Material::GetMaterial(
"liquidArgon");
115 if ( ! defaultMaterial || ! absorberMaterial || ! gapMaterial ) {
116 G4ExceptionDescription msg;
117 msg <<
"Cannot retrieve materials already defined.";
118 G4Exception(
"DetectorConstruction::DefineVolumes()",
119 "MyCode0001", FatalException, msg);
127 worldSizeXY/2, worldSizeXY/2, worldSizeZ/2);
148 =
new G4Box(
"Calorimeter",
149 calorSizeXY/2, calorSizeXY/2, calorThickness/2);
171 calorSizeXY/2, calorSizeXY/2, layerThickness/2);
192 calorSizeXY/2, calorSizeXY/2, absoThickness/2);
201 G4ThreeVector(0., 0., -gapThickness / 2),
214 calorSizeXY/2, calorSizeXY/2, gapThickness/2);
223 G4ThreeVector(0., 0., absoThickness / 2),
236 <<
"------------------------------------------------------------" << G4endl
237 <<
"---> The calorimeter is " << nofLayers <<
" layers of: [ "
238 << absoThickness/mm <<
"mm of " << absorberMaterial->GetName()
240 << gapThickness/mm <<
"mm of " << gapMaterial->GetName() <<
" ] " << G4endl
241 <<
"------------------------------------------------------------" << G4endl;
246 worldLV->SetVisAttributes(G4VisAttributes::GetInvisible());