Import Geant4 10.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 12:08:39 +02:00
parent 286caacf06
commit c9b32a6c0a
5770 changed files with 1050949 additions and 367105 deletions
@@ -23,14 +23,12 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B1DetectorConstruction.cc 69587 2013-05-08 14:26:03Z gcosmo $
// $Id: B1DetectorConstruction.cc 80449 2014-04-22 08:35:50Z gcosmo $
//
/// \file B1DetectorConstruction.cc
/// \brief Implementation of the B1DetectorConstruction class
#include "B1DetectorConstruction.hh"
#include "B1SteppingAction.hh"
// use of stepping action to set the accounting volume
#include "G4RunManager.hh"
#include "G4NistManager.hh"
@@ -46,7 +44,8 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1DetectorConstruction::B1DetectorConstruction()
: G4VUserDetectorConstruction()
: G4VUserDetectorConstruction(),
fScoringVolume(0)
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -119,8 +118,7 @@ G4VPhysicalVolume* B1DetectorConstruction::Construct()
//
// Shape 1
//
//
G4Material* shape1_mat = nist->FindOrBuildMaterial("G4_A-150_TISSUE");
G4ThreeVector pos1 = G4ThreeVector(0, 2*cm, -7*cm);
@@ -133,29 +131,6 @@ G4VPhysicalVolume* B1DetectorConstruction::Construct()
new G4Cons("Shape1",
shape1_rmina, shape1_rmaxa, shape1_rminb, shape1_rmaxb, shape1_hz,
shape1_phimin, shape1_phimax);
/*
// Full sphere shape
G4double shape1_rmax = 4*cm;
G4Orb* solidShape1 =
new G4Orb("Shape1", //its name
shape1_rmax); //its size
// Sphere shape
G4double shape1_rmin = 0*cm, shape1_rmax = 4*cm;
G4double shape1_thetamin = 0.*deg, shape1_thetamax = 180.*deg;
G4double shape1_phimin = 0.*deg, shape1_phimax = 360.*deg;
G4Sphere* solidShape1 =
new G4Sphere("Shape1", //its name
shape1_rmin, shape1_rmax, //its size
shape1_phimin, shape1_phimax, //phi angle
shape1_thetamin, shape1_thetamax); //theta angle
// Box shape
G4double shape1_dx = 8*cm, shape1_dy = 8*cm, shape1_dz = 8*cm;
G4Box* solidShape1 =
new G4Box("Shape1", //its name
0.5*shape1_dx, 0.5*shape1_dy, 0.5*shape1_dz); //its size
*/
G4LogicalVolume* logicShape1 =
new G4LogicalVolume(solidShape1, //its solid
@@ -177,17 +152,6 @@ G4VPhysicalVolume* B1DetectorConstruction::Construct()
//
G4Material* shape2_mat = nist->FindOrBuildMaterial("G4_BONE_COMPACT_ICRU");
G4ThreeVector pos2 = G4ThreeVector(0, -1*cm, 7*cm);
/*
// Shape 2 - conical section shape
G4double shape2_rmina = 0.*cm, shape2_rmaxa = 5.*cm;
G4double shape2_rminb = 0.*cm, shape2_rmaxb = 8.*cm;
G4double shape2_hz = 3.*cm;
G4double shape2_phimin = 0.*deg, shape2_phimax = 360.*deg;
G4Cons* solidShape2 =
new G4Cons("Shape2",
shape2_rmina, shape2_rmaxa, shape2_rminb, shape2_rmaxb, shape2_hz,
shape2_phimin, shape2_phimax);
*/
// Trapezoid shape
G4double shape2_dxa = 12*cm, shape2_dxb = 12*cm;
@@ -212,13 +176,9 @@ G4VPhysicalVolume* B1DetectorConstruction::Construct()
0, //copy number
checkOverlaps); //overlaps checking
// Set scoring volume to stepping action
// (where we will account energy deposit)
// Set Shape2 as scoring volume
//
B1SteppingAction* steppingAction = B1SteppingAction::Instance();
////steppingAction->SetVolume(logicShape1);
steppingAction->SetVolume(logicShape2);
fScoringVolume = logicShape2;
//
//always return the physical World