Import Geant4 10.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2018-12-07 15:15:39 +01:00
parent 6aa23be517
commit db49709b53
11370 changed files with 187480 additions and 160142 deletions
+12 -1
View File
@@ -1,4 +1,3 @@
$Id: History 98244 2016-07-04 17:21:15Z gcosmo $
--------------------------------------------------
=========================================================
@@ -15,6 +14,18 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
15-10-18 G. Cosmo (analysisShared-V10-04-02)
- Added missing include of G4SteateManager.hh in DetectorConstruction source.
04-07-18 I. Hrivnacova (analysisShared-V10-04-01)
- Fixed compilation error introduced in previous tag
03-07-18 I. Hrivnacova (analysisShared-V10-04-00)
- Macro & commands review:
- Removed obsolete /N03 top command directory
- Added protection against warnings issued from ReinitializeGeometry() if
called in PreInit phase
04-07-16 I. Hrivnacova (analysisShared-V10-02-01)
- Fixes for Doxygen documentation
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: ActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file ActionInitialization.hh
/// \brief Definition of the ActionInitialization class
@@ -27,7 +27,6 @@
/// \brief Definition of the DetectorConstruction class
//
//
// $Id: DetectorConstruction.hh 98244 2016-07-04 17:21:15Z gcosmo $
//
//
@@ -27,7 +27,6 @@
/// \brief Definition of the DetectorMessenger class
//
//
// $Id: DetectorMessenger.hh 98244 2016-07-04 17:21:15Z gcosmo $
//
//
@@ -60,7 +59,6 @@ class DetectorMessenger: public G4UImessenger
private:
DetectorConstruction* fDetector;
G4UIdirectory* fN03Dir;
G4UIdirectory* fDetDir;
G4UIcmdWithAString* fAbsMaterCmd;
G4UIcmdWithAString* fGapMaterCmd;
@@ -27,7 +27,6 @@
/// \brief Definition of the EventAction class
//
//
// $Id: EventAction.hh 98244 2016-07-04 17:21:15Z gcosmo $
//
//
@@ -27,7 +27,6 @@
/// \brief Definition of the PrimaryGeneratorAction class
//
//
// $Id: PrimaryGeneratorAction.hh 98244 2016-07-04 17:21:15Z gcosmo $
//
//
@@ -27,7 +27,6 @@
/// \brief Definition of the RunAction class
//
//
// $Id: RunAction.hh 98244 2016-07-04 17:21:15Z gcosmo $
//
//
@@ -27,7 +27,6 @@
/// \brief Definition of the SteppingAction class
//
//
// $Id: SteppingAction.hh 98244 2016-07-04 17:21:15Z gcosmo $
//
//
@@ -1,4 +1,3 @@
$Id: History 85773 2014-11-05 11:31:15Z ihrivnac $
--------------------------------------------------
=========================================================
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: ActionInitialization.cc 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file ActionInitialization.cc
/// \brief Implementation of the ActionInitialization class
@@ -27,7 +27,6 @@
/// \brief Implementation of the DetectorConstruction class
//
//
// $Id: DetectorConstruction.cc 101905 2016-12-07 11:34:39Z gunter $
//
//
@@ -45,6 +44,7 @@
#include "G4PVPlacement.hh"
#include "G4PVReplica.hh"
#include "G4StateManager.hh"
#include "G4GeometryManager.hh"
#include "G4PhysicalVolumeStore.hh"
#include "G4LogicalVolumeStore.hh"
@@ -308,7 +308,9 @@ void DetectorConstruction::SetAbsorberThickness(G4double val)
{
// change Absorber thickness and recompute the calorimeter parameters
fAbsorberThickness = val;
G4RunManager::GetRunManager()->ReinitializeGeometry();
if ( G4StateManager::GetStateManager()->GetCurrentState() != G4State_PreInit ) {
G4RunManager::GetRunManager()->ReinitializeGeometry();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -317,7 +319,9 @@ void DetectorConstruction::SetGapThickness(G4double val)
{
// change Gap thickness and recompute the calorimeter parameters
fGapThickness = val;
G4RunManager::GetRunManager()->ReinitializeGeometry();
if ( G4StateManager::GetStateManager()->GetCurrentState() != G4State_PreInit ) {
G4RunManager::GetRunManager()->ReinitializeGeometry();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -326,7 +330,9 @@ void DetectorConstruction::SetCalorSizeYZ(G4double val)
{
// change the transverse size and recompute the calorimeter parameters
fCalorSizeYZ = val;
G4RunManager::GetRunManager()->ReinitializeGeometry();
if ( G4StateManager::GetStateManager()->GetCurrentState() != G4State_PreInit ) {
G4RunManager::GetRunManager()->ReinitializeGeometry();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -334,7 +340,9 @@ void DetectorConstruction::SetCalorSizeYZ(G4double val)
void DetectorConstruction::SetNbOfLayers(G4int val)
{
fNbOfLayers = val;
G4RunManager::GetRunManager()->ReinitializeGeometry();
if ( G4StateManager::GetStateManager()->GetCurrentState() != G4State_PreInit ) {
G4RunManager::GetRunManager()->ReinitializeGeometry();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,6 @@
/// \brief Implementation of the DetectorMessenger class
//
//
// $Id: DetectorMessenger.cc 98244 2016-07-04 17:21:15Z gcosmo $
//
//
@@ -48,7 +47,6 @@
DetectorMessenger::DetectorMessenger( DetectorConstruction* Det)
: G4UImessenger(),
fDetector(Det),
fN03Dir(0),
fDetDir(0),
fAbsMaterCmd(0),
fGapMaterCmd(0),
@@ -57,45 +55,42 @@ DetectorMessenger::DetectorMessenger( DetectorConstruction* Det)
fSizeYZCmd(0),
fNbLayersCmd(0)
{
fN03Dir = new G4UIdirectory("/N03/");
fN03Dir->SetGuidance("UI commands of this example");
G4bool broadcast = false;
fDetDir = new G4UIdirectory("/N03/det/",broadcast);
fDetDir->SetGuidance("detector control");
fDetDir = new G4UIdirectory("/det/",broadcast);
fDetDir->SetGuidance("Detector control");
fAbsMaterCmd = new G4UIcmdWithAString("/N03/det/setAbsMat",this);
fAbsMaterCmd = new G4UIcmdWithAString("/det/setAbsMat",this);
fAbsMaterCmd->SetGuidance("Select Material of the Absorber.");
fAbsMaterCmd->SetParameterName("choice",false);
fAbsMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fGapMaterCmd = new G4UIcmdWithAString("/N03/det/setGapMat",this);
fGapMaterCmd = new G4UIcmdWithAString("/det/setGapMat",this);
fGapMaterCmd->SetGuidance("Select Material of the Gap.");
fGapMaterCmd->SetParameterName("choice",false);
fGapMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fAbsThickCmd = new G4UIcmdWithADoubleAndUnit("/N03/det/setAbsThick",this);
fAbsThickCmd = new G4UIcmdWithADoubleAndUnit("/det/setAbsThick",this);
fAbsThickCmd->SetGuidance("Set Thickness of the Absorber");
fAbsThickCmd->SetParameterName("Size",false);
fAbsThickCmd->SetRange("Size>=0.");
fAbsThickCmd->SetUnitCategory("Length");
fAbsThickCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fGapThickCmd = new G4UIcmdWithADoubleAndUnit("/N03/det/setGapThick",this);
fGapThickCmd = new G4UIcmdWithADoubleAndUnit("/det/setGapThick",this);
fGapThickCmd->SetGuidance("Set Thickness of the Gap");
fGapThickCmd->SetParameterName("Size",false);
fGapThickCmd->SetRange("Size>=0.");
fGapThickCmd->SetUnitCategory("Length");
fGapThickCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fSizeYZCmd = new G4UIcmdWithADoubleAndUnit("/N03/det/setSizeYZ",this);
fSizeYZCmd = new G4UIcmdWithADoubleAndUnit("/det/setSizeYZ",this);
fSizeYZCmd->SetGuidance("Set tranverse size of the calorimeter");
fSizeYZCmd->SetParameterName("Size",false);
fSizeYZCmd->SetRange("Size>0.");
fSizeYZCmd->SetUnitCategory("Length");
fSizeYZCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fNbLayersCmd = new G4UIcmdWithAnInteger("/N03/det/setNbOfLayers",this);
fNbLayersCmd = new G4UIcmdWithAnInteger("/det/setNbOfLayers",this);
fNbLayersCmd->SetGuidance("Set number of layers.");
fNbLayersCmd->SetParameterName("NbLayers",false);
fNbLayersCmd->SetRange("NbLayers>0 && NbLayers<500");
@@ -112,31 +107,31 @@ DetectorMessenger::~DetectorMessenger()
delete fAbsThickCmd; delete fGapThickCmd;
delete fSizeYZCmd;
delete fDetDir;
delete fN03Dir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
if( command == fAbsMaterCmd )
{ fDetector->SetAbsorberMaterial(newValue);}
if( command == fGapMaterCmd )
{ fDetector->SetGapMaterial(newValue);}
if( command == fAbsThickCmd )
{ fDetector->SetAbsorberThickness(fAbsThickCmd
->GetNewDoubleValue(newValue));}
if( command == fGapThickCmd )
{ fDetector->SetGapThickness(fGapThickCmd->GetNewDoubleValue(newValue));}
if( command == fSizeYZCmd )
{ fDetector->SetCalorSizeYZ(fSizeYZCmd->GetNewDoubleValue(newValue));}
if( command == fNbLayersCmd )
{ fDetector->SetNbOfLayers(fNbLayersCmd->GetNewIntValue(newValue));}
if( command == fAbsMaterCmd ) {
fDetector->SetAbsorberMaterial(newValue);
}
else if( command == fGapMaterCmd ) {
fDetector->SetGapMaterial(newValue);
}
else if( command == fAbsThickCmd ) {
fDetector
->SetAbsorberThickness(fAbsThickCmd->GetNewDoubleValue(newValue));
}
else if( command == fGapThickCmd ) {
fDetector->SetGapThickness(fGapThickCmd->GetNewDoubleValue(newValue));
}
else if( command == fSizeYZCmd ) {
fDetector->SetCalorSizeYZ(fSizeYZCmd->GetNewDoubleValue(newValue));
}
else if( command == fNbLayersCmd ) {
fDetector->SetNbOfLayers(fNbLayersCmd->GetNewIntValue(newValue));
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,6 @@
/// \brief Implementation of the EventAction class
//
//
// $Id: EventAction.cc 98244 2016-07-04 17:21:15Z gcosmo $
//
//
@@ -27,7 +27,6 @@
/// \brief Implementation of the PrimaryGeneratorAction class
//
//
// $Id: PrimaryGeneratorAction.cc 98244 2016-07-04 17:21:15Z gcosmo $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,6 @@
/// \brief Implementation of the RunAction class
//
//
// $Id: RunAction.cc 98244 2016-07-04 17:21:15Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,7 +27,6 @@
/// \brief Implementation of the SteppingAction class
//
//
// $Id: SteppingAction.cc 98244 2016-07-04 17:21:15Z gcosmo $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......