Import Geant4 7.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 11:11:55 +02:00
parent e083ffb441
commit 516dbf1a58
5914 changed files with 202605 additions and 71141 deletions
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: ExN07CalorHit.cc,v 1.2 2003/05/21 22:01:17 asaim Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "ExN07CalorHit.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: ExN07CalorimeterSD.cc,v 1.2 2003/05/21 22:01:17 asaim Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "ExN07CalorimeterSD.hh"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: ExN07DetectorConstruction.cc,v 1.3 2003/04/08 15:47:00 asaim Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: ExN07DetectorConstruction.cc,v 1.4 2004/11/17 03:07:30 kurasige Exp $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -330,3 +330,23 @@ void ExN07DetectorConstruction::SetNumberOfLayers(G4int nl)
G4RunManager::GetRunManager()->GeometryHasBeenModified();
}
void ExN07DetectorConstruction::CreateMaterial(G4String materialChoice)
{
if ( G4Material::GetMaterial(materialChoice) != 0) return;
G4double a,z,density;
if (materialChoice == "Silicon"){
new G4Material("Silicon", z=14., a= 28.09*g/mole, density= 2.33*g/cm3);
} else if (materialChoice =="Iron"){
new G4Material("Iron", z=26., a=55.85*g/mole, density=7.87*g/cm3);
} else if (materialChoice =="ArgonGas"){
new G4Material("ArgonGas",z=18., a= 39.95*g/mole, density=1.782*mg/cm3);
} else if (materialChoice =="He"){
new G4Material("He", z=2., a=4.0*g/mole, density=0.1786e-03*g/cm3);
}
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: ExN07DetectorMessenger.cc,v 1.2 2003/04/08 15:47:00 asaim Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: ExN07DetectorMessenger.cc,v 1.3 2004/11/17 03:07:30 kurasige Exp $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "ExN07DetectorMessenger.hh"
@@ -42,6 +42,11 @@ ExN07DetectorMessenger::ExN07DetectorMessenger(
N07Dir = new G4UIdirectory("/N07/");
N07Dir->SetGuidance("UI commands of this example");
AddMaterCmd = new G4UIcmdWithAString("/N07/addMat",this);
AddMaterCmd->SetGuidance("Add Material");
AddMaterCmd->SetParameterName("choice",false);
AddMaterCmd->AvailableForStates(G4State_PreInit);
G4String matList;
const G4MaterialTable* matTbl = G4Material::GetMaterialTable();
for(size_t i=0;i<G4Material::GetNumberOfMaterials();i++)
@@ -81,6 +86,7 @@ ExN07DetectorMessenger::ExN07DetectorMessenger(
ExN07DetectorMessenger::~ExN07DetectorMessenger()
{
delete AddMaterCmd;
delete AbsMaterCmd;
delete GapMaterCmd;
delete numLayerCmd;
@@ -91,16 +97,33 @@ ExN07DetectorMessenger::~ExN07DetectorMessenger()
void ExN07DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
if( command == AbsMaterCmd )
{ ExN07Detector->SetAbsorberMaterial(newValue);}
else if( command == GapMaterCmd )
{ ExN07Detector->SetGapMaterial(newValue);}
else if( command == numLayerCmd )
{ ExN07Detector->SetNumberOfLayers(numLayerCmd->GetNewIntValue(newValue));}
else if( command == SerialCmd )
{ ExN07Detector->SetSerialGeometry(SerialCmd->GetNewBoolValue(newValue));}
else if( command == verboseCmd )
{ ExN07EventAction::SetVerboseLevel(verboseCmd->GetNewIntValue(newValue));}
if( command == AddMaterCmd ){
ExN07Detector->CreateMaterial(newValue);
// update candidate list
G4String matList;
const G4MaterialTable* matTbl = G4Material::GetMaterialTable();
for(size_t i=0;i<G4Material::GetNumberOfMaterials();i++){
matList += (*matTbl)[i]->GetName();
matList += " ";
}
GapMaterCmd->SetCandidates(matList);
AbsMaterCmd->SetCandidates(matList);
} else if( command == AbsMaterCmd ) {
ExN07Detector->SetAbsorberMaterial(newValue);
} else if( command == GapMaterCmd ){
ExN07Detector->SetGapMaterial(newValue);
} else if( command == numLayerCmd ) {
ExN07Detector->SetNumberOfLayers(numLayerCmd->GetNewIntValue(newValue));
} else if( command == SerialCmd ) {
ExN07Detector->SetSerialGeometry(SerialCmd->GetNewBoolValue(newValue));
}else if( command == verboseCmd ) {
ExN07EventAction::SetVerboseLevel(verboseCmd->GetNewIntValue(newValue));
}
}
G4String ExN07DetectorMessenger::GetCurrentValue(G4UIcommand * command)
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: ExN07EventAction.cc,v 1.5 2003/06/16 16:50:07 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "ExN07EventAction.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: ExN07GapParameterisation.cc,v 1.2 2003/05/28 11:24:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "ExN07GapParameterisation.hh"
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: ExN07PhysicsList.cc,v 1.4 2003/10/24 12:42:10 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "ExN07PhysicsList.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: ExN07PrimaryGeneratorAction.cc,v 1.1 2003/03/10 01:43:36 asaim Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "ExN07PrimaryGeneratorAction.hh"
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: ExN07Run.cc,v 1.3 2003/04/09 23:20:59 asaim Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "ExN07Run.hh"
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: ExN07RunAction.cc,v 1.3 2003/04/09 23:20:59 asaim Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "ExN07RunAction.hh"
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: ExN07VisManager.cc,v 1.2 2003/11/13 15:11:55 johna Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#ifdef G4VIS_USE