Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B03DetectorConstruction.cc,v 1.7 2002/04/19 10:54:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: B03DetectorConstruction.cc,v 1.10 2002/11/22 17:47:58 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "g4std/strstream"
|
||||
@@ -40,21 +40,12 @@
|
||||
#include "G4Colour.hh"
|
||||
#include "PhysicalConstants.h"
|
||||
|
||||
// for importance biasing
|
||||
#include "G4IStore.hh"
|
||||
|
||||
B03DetectorConstruction::B03DetectorConstruction()
|
||||
{;}
|
||||
|
||||
B03DetectorConstruction::~B03DetectorConstruction()
|
||||
{;}
|
||||
|
||||
G4VIStore* B03DetectorConstruction::GetIStore()
|
||||
{
|
||||
if (!fIStore) G4Exception("B03DetectorConstruction::fIStore empty!");
|
||||
return fIStore;
|
||||
}
|
||||
|
||||
G4VPhysicalVolume* B03DetectorConstruction::Construct()
|
||||
{
|
||||
char line[255];
|
||||
@@ -92,7 +83,6 @@ G4VPhysicalVolume* B03DetectorConstruction::Construct()
|
||||
A = 28.09*g/mole;
|
||||
G4Element* elSi = new G4Element(name="Silicon", symbol="Si", Z=14, A);
|
||||
|
||||
|
||||
A = 39.1*g/mole;
|
||||
G4Element* elK = new G4Element(name="K" ,symbol="K" , Z=19 , A);
|
||||
|
||||
@@ -122,119 +112,72 @@ G4VPhysicalVolume* B03DetectorConstruction::Construct()
|
||||
Concrete->AddElement(elFe , fractionmass= 0.014);
|
||||
Concrete->AddElement(elC , fractionmass= 0.001);
|
||||
|
||||
density = 0.0203*g/cm3;
|
||||
G4Material* LightConcrete = new G4Material("LightConcrete", density, 10);
|
||||
LightConcrete->AddElement(elH , fractionmass= 0.01);
|
||||
LightConcrete->AddElement(elO , fractionmass= 0.529);
|
||||
LightConcrete->AddElement(elNa , fractionmass= 0.016);
|
||||
LightConcrete->AddElement(elHg , fractionmass= 0.002);
|
||||
LightConcrete->AddElement(elAl , fractionmass= 0.034);
|
||||
LightConcrete->AddElement(elSi , fractionmass= 0.337);
|
||||
LightConcrete->AddElement(elK , fractionmass= 0.013);
|
||||
LightConcrete->AddElement(elCa , fractionmass= 0.044);
|
||||
LightConcrete->AddElement(elFe , fractionmass= 0.014);
|
||||
LightConcrete->AddElement(elC , fractionmass= 0.001);
|
||||
|
||||
G4Material *WorldMaterial = Galactic;
|
||||
|
||||
/////////////////////////////
|
||||
// world cylinder volume
|
||||
////////////////////////////
|
||||
|
||||
// world solid
|
||||
|
||||
G4double innerRadiusCylinder = 0*cm;
|
||||
G4double outerRadiusCylinder = 100*cm;
|
||||
G4double hightCylinder = 15.001*cm;
|
||||
G4double outerRadiusCylinder = 101*cm; // dont't have scoring
|
||||
// cells coinside eith world volume boundary
|
||||
G4double hightCylinder = 105*cm;
|
||||
G4double startAngleCylinder = 0*deg;
|
||||
G4double spanningAngleCylinder = 360*cm;
|
||||
G4double spanningAngleCylinder = 360*deg;
|
||||
|
||||
G4Tubs *worldCylinder = new G4Tubs("worldCylinder",
|
||||
innerRadiusCylinder,
|
||||
outerRadiusCylinder,
|
||||
hightCylinder,
|
||||
startAngleCylinder,
|
||||
spanningAngleCylinder);
|
||||
innerRadiusCylinder,
|
||||
outerRadiusCylinder,
|
||||
hightCylinder,
|
||||
startAngleCylinder,
|
||||
spanningAngleCylinder);
|
||||
|
||||
// logical world
|
||||
|
||||
G4LogicalVolume *worldCylinder_log =
|
||||
new G4LogicalVolume(worldCylinder, WorldMaterial, "worldCylinder_log");
|
||||
new G4LogicalVolume(worldCylinder, Galactic, "worldCylinder_log");
|
||||
|
||||
G4VisAttributes * WorldVisAtt
|
||||
= new G4VisAttributes(G4Colour(0.0,0.0,1.0));
|
||||
WorldVisAtt->SetVisibility(true);
|
||||
worldCylinder_log->SetVisAttributes(WorldVisAtt);
|
||||
|
||||
// physical world
|
||||
name = "shieldWorld";
|
||||
G4PVPlacement *pWorldVolume = new
|
||||
G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
|
||||
name, 0, false, 0);
|
||||
|
||||
name = "worldCylinder_phys";
|
||||
G4VPhysicalVolume* worldCylinder_phys =
|
||||
new G4PVPlacement(0, G4ThreeVector(0,0,0), worldCylinder_log,
|
||||
name, 0, false, 0);
|
||||
|
||||
G4std::vector< G4VPhysicalVolume * > physvolumes;
|
||||
physvolumes.push_back(worldCylinder_phys);
|
||||
|
||||
///////////////////////////////////////////////
|
||||
// shield cylinder for (cells 2-4)
|
||||
////////////////////////////////////////////////
|
||||
// creating 1 slobs of 180 cm thick concrete
|
||||
|
||||
G4double innerRadiusShield = 0*cm;
|
||||
G4double outerRadiusShield = 100*cm;
|
||||
G4double hightShield = 5*cm;
|
||||
G4double hightShield = 90*cm;
|
||||
G4double startAngleShield = 0*deg;
|
||||
G4double spanningAngleShield = 360*cm;
|
||||
G4double spanningAngleShield = 360*deg;
|
||||
|
||||
G4Tubs *aShield = new G4Tubs("aShield",
|
||||
innerRadiusShield,
|
||||
outerRadiusShield,
|
||||
hightShield,
|
||||
startAngleShield,
|
||||
spanningAngleShield);
|
||||
innerRadiusShield,
|
||||
outerRadiusShield,
|
||||
hightShield,
|
||||
startAngleShield,
|
||||
spanningAngleShield);
|
||||
|
||||
// logical shield
|
||||
|
||||
G4LogicalVolume *aShield_log =
|
||||
new G4LogicalVolume(aShield, Concrete, "aShield_log");
|
||||
|
||||
// physical shield
|
||||
|
||||
G4VisAttributes * shieldVisAtt
|
||||
= new G4VisAttributes(G4Colour(0.0,1.0,1.0));
|
||||
shieldVisAtt->SetVisibility(true);
|
||||
shieldVisAtt->SetForceSolid(false);
|
||||
aShield_log->SetVisAttributes(shieldVisAtt);
|
||||
|
||||
// physical shields
|
||||
|
||||
// physical shields for cell 2 to 4
|
||||
for(G4int i=0; i<3; i++) {
|
||||
if (i+2<10) sprintf(line,"cell: 0%d, shield",i+2);
|
||||
else sprintf(line,"cell: %d, shield",i+2);
|
||||
G4String name(line);
|
||||
pos_x = 0*cm;
|
||||
pos_y = 0*cm;
|
||||
pos_z = -10*cm+(10*cm)*i;
|
||||
physvolumes.
|
||||
push_back(new G4PVPlacement(0, G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aShield_log, name, worldCylinder_log,
|
||||
false, 0));
|
||||
}
|
||||
|
||||
fIStore = new G4IStore(*worldCylinder_phys);
|
||||
// for the world volume repnum is -1 !!!!!!!!!!!!!!!!!!!!!!!
|
||||
G4int n = 0;
|
||||
for (G4std::vector<G4VPhysicalVolume *>::iterator it = physvolumes.begin();
|
||||
it != physvolumes.end(); it++) {
|
||||
G4double i = pow(2., n++);
|
||||
G4cout << "Going to assign importance: " << i << ", to volume"
|
||||
<< (*it)->GetName() << G4endl;
|
||||
if (*it == worldCylinder_phys) {
|
||||
// repnum -1
|
||||
fIStore->AddImportanceRegion(i, **it, -1);
|
||||
}
|
||||
fIStore->AddImportanceRegion(i, **it);
|
||||
}
|
||||
|
||||
name = "ConcreateBlock";
|
||||
|
||||
return worldCylinder_phys;
|
||||
pos_x = 0*cm;
|
||||
pos_y = 0*cm;
|
||||
pos_z = 0*cm;
|
||||
G4VPhysicalVolume *pvol =
|
||||
new G4PVPlacement(0,
|
||||
G4ThreeVector(pos_x, pos_y, pos_z),
|
||||
aShield_log,
|
||||
name,
|
||||
worldCylinder_log,
|
||||
false,
|
||||
0);
|
||||
|
||||
return pWorldVolume;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user