Import Geant4 10.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-12-09 12:35:28 +01:00
parent 4ec577e5c4
commit a3452e42ac
3514 changed files with 210500 additions and 89628 deletions
+6 -6
View File
@@ -1,4 +1,4 @@
//$Id: .README.txt 94957 2016-01-08 13:27:26Z gcosmo $
//$Id: .README.txt 99559 2016-09-27 07:02:21Z gcosmo $
///\file "B3/.README.txt"
///\brief Example B3 README page
@@ -91,15 +91,15 @@
At the end of event, the values acummulated in B3aEventAction are passed
in B3aRunAction and summed over the whole run (see B3aEventAction::EndOfevent()).
In multi-threading mode the data accumulated in G4Parameter objects per
In multi-threading mode the data accumulated in G4Accumulable objects per
workers is merged to the master in B3aRunAction::EndOfRunAction() and the final
result is printed on the screen.
G4Parameter<> type instead of G4double and G4int types is used for the B3aRunAction
G4Accumulable<> type instead of G4double and G4int types is used for the B3aRunAction
data members in order to facilitate merging of the values accumulated on workers
to the master. Currently the parameters have to be registered to G4ParametersManager
and G4ParametersManager::Merge() has to be called from the users code. This is planned
to be further simplified with a closer integration of G4Parameter classes in
to the master. Currently the accumulables have to be registered to G4AccumulablesManager
and G4AccumulablesManager::Merge() has to be called from the users code. This is planned
to be further simplified with a closer integration of G4Accumulable classes in
the Geant4 kernel next year.
B3b:
+3 -3
View File
@@ -23,10 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: exampleB3a.cc 94031 2015-11-05 11:54:38Z ihrivnac $
// $Id: exampleB3a.cc 100941 2016-11-03 11:14:13Z gcosmo $
//
/// \file exampleB3.cc
/// \brief Main program of the B3 example
/// \file exampleB3a.cc
/// \brief Main program of the B3a example
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
+5 -7
View File
@@ -4,7 +4,7 @@
############################################
*************************************************************
Geant4 version Name: geant4-10-03-beta-01 (30-June-2016)
Geant4 version Name: geant4-10-03 (9-December-2016)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
@@ -41,14 +41,14 @@ Registered model factories:
drawByCharge
drawByOriginVolume
drawByParticleID
drawByTouchedVolume
drawByEncounteredVolume
Registered filter factories:
attributeFilter
chargeFilter
originVolumeFilter
particleFilter
touchedVolumeFilter
encounteredVolumeFilter
You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
@@ -205,16 +205,14 @@ Checking overlaps for volume Patient ... OK!
G4SDManager::AddNewCollection : the collection <crystal/edep> is registered at 1
New sensitive detector <crystal> is registered at /
G4SDManager::AddNewCollection : the collection <patient/dose> is registered at 2
New sensitive detector <patient> is registered at /
#
/run/beamOn 10000
### Run 0 start.
--------------------End of Global Run-----------------------
The run was 10000 events Nb of 'good' e+ annihilations: 1249
Total dose in patient : 290.467 picoGy
The run was 10000 events Nb of 'good' e+ annihilations: 1242
Total dose in patient : 289.201 picoGy
------------------------------------------------------------
Graphics systems deleted.
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3aRunAction.hh 94031 2015-11-05 11:54:38Z ihrivnac $
// $Id: B3aRunAction.hh 99559 2016-09-27 07:02:21Z gcosmo $
//
/// \file B3aRunAction.hh
/// \brief Definition of the B3aRunAction class
@@ -32,7 +32,7 @@
#define B3aRunAction_h 1
#include "G4UserRunAction.hh"
#include "G4Parameter.hh"
#include "G4Accumulable.hh"
#include "globals.hh"
/// Run action class
@@ -50,8 +50,8 @@ class B3aRunAction : public G4UserRunAction
void SumDose(G4double dose) { fSumDose += dose; };
private:
G4Parameter<G4int> fGoodEvents;
G4Parameter<G4double> fSumDose;
G4Accumulable<G4int> fGoodEvents;
G4Accumulable<G4double> fSumDose;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3DetectorConstruction.cc 71079 2013-06-10 20:37:11Z ihrivnac $
// $Id: B3DetectorConstruction.cc 101905 2016-12-07 11:34:39Z gunter $
//
/// \file B3DetectorConstruction.cc
/// \brief Implementation of the B3DetectorConstruction class
@@ -237,8 +237,8 @@ G4VPhysicalVolume* B3DetectorConstruction::Construct()
// Visualization attributes
//
logicRing->SetVisAttributes (G4VisAttributes::Invisible);
logicDetector->SetVisAttributes (G4VisAttributes::Invisible);
logicRing->SetVisAttributes (G4VisAttributes::GetInvisible());
logicDetector->SetVisAttributes (G4VisAttributes::GetInvisible());
// Print materials
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
@@ -257,6 +257,7 @@ void B3DetectorConstruction::ConstructSDandField()
// declare crystal as a MultiFunctionalDetector scorer
//
G4MultiFunctionalDetector* cryst = new G4MultiFunctionalDetector("crystal");
G4SDManager::GetSDMpointer()->AddNewDetector(cryst);
G4VPrimitiveScorer* primitiv1 = new G4PSEnergyDeposit("edep");
cryst->RegisterPrimitive(primitiv1);
SetSensitiveDetector("CrystalLV",cryst);
@@ -264,6 +265,7 @@ void B3DetectorConstruction::ConstructSDandField()
// declare patient as a MultiFunctionalDetector scorer
//
G4MultiFunctionalDetector* patient = new G4MultiFunctionalDetector("patient");
G4SDManager::GetSDMpointer()->AddNewDetector(patient);
G4VPrimitiveScorer* primitiv2 = new G4PSDoseDeposit("dose");
patient->RegisterPrimitive(primitiv2);
SetSensitiveDetector("PatientLV",patient);
+14 -14
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3aRunAction.cc 94031 2015-11-05 11:54:38Z ihrivnac $
// $Id: B3aRunAction.cc 99559 2016-09-27 07:02:21Z gcosmo $
//
/// \file B3aRunAction.cc
/// \brief Implementation of the B3aRunAction class
@@ -33,7 +33,7 @@
#include "G4RunManager.hh"
#include "G4Run.hh"
#include "G4ParameterManager.hh"
#include "G4AccumulableManager.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
@@ -41,8 +41,8 @@
B3aRunAction::B3aRunAction()
: G4UserRunAction(),
fGoodEvents("GoodEvents", 0),
fSumDose("SumDose", 0.)
fGoodEvents(0),
fSumDose(0.)
{
//add new units for dose
//
@@ -56,10 +56,10 @@ B3aRunAction::B3aRunAction()
new G4UnitDefinition("nanogray" , "nanoGy" , "Dose", nanogray);
new G4UnitDefinition("picogray" , "picoGy" , "Dose", picogray);
// Register parameter to the parameter manager
G4ParameterManager* parameterManager = G4ParameterManager::Instance();
parameterManager->RegisterParameter(fGoodEvents);
parameterManager->RegisterParameter(fSumDose);
// Register accumulable to the accumulable manager
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
accumulableManager->RegisterAccumulable(fGoodEvents);
accumulableManager->RegisterAccumulable(fSumDose);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -73,9 +73,9 @@ void B3aRunAction::BeginOfRunAction(const G4Run* run)
{
G4cout << "### Run " << run->GetRunID() << " start." << G4endl;
// reset parameters to their initial values
G4ParameterManager* parameterManager = G4ParameterManager::Instance();
parameterManager->Reset();
// reset accumulables to their initial values
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
accumulableManager->Reset();
//inform the runManager to save random number seed
G4RunManager::GetRunManager()->SetRandomNumberStore(false);
@@ -88,9 +88,9 @@ void B3aRunAction::EndOfRunAction(const G4Run* run)
G4int nofEvents = run->GetNumberOfEvent();
if (nofEvents == 0) return;
// Merge parameters
G4ParameterManager* parameterManager = G4ParameterManager::Instance();
parameterManager->Merge();
// Merge accumulables
G4AccumulableManager* accumulableManager = G4AccumulableManager::Instance();
accumulableManager->Merge();
// Run conditions
// note: There is no primary generator action object for "master"
+3 -3
View File
@@ -23,10 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: exampleB3b.cc 94031 2015-11-05 11:54:38Z ihrivnac $
// $Id: exampleB3b.cc 100941 2016-11-03 11:14:13Z gcosmo $
//
/// \file exampleB3.cc
/// \brief Main program of the B3 example
/// \file exampleB3b.cc
/// \brief Main program of the B3b example
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
+5 -7
View File
@@ -4,7 +4,7 @@
############################################
*************************************************************
Geant4 version Name: geant4-10-03-beta-01 (30-June-2016)
Geant4 version Name: geant4-10-03 (9-December-2016)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
@@ -41,14 +41,14 @@ Registered model factories:
drawByCharge
drawByOriginVolume
drawByParticleID
drawByTouchedVolume
drawByEncounteredVolume
Registered filter factories:
attributeFilter
chargeFilter
originVolumeFilter
particleFilter
touchedVolumeFilter
encounteredVolumeFilter
You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
@@ -205,9 +205,7 @@ Checking overlaps for volume Patient ... OK!
G4SDManager::AddNewCollection : the collection <crystal/edep> is registered at 1
New sensitive detector <crystal> is registered at /
G4SDManager::AddNewCollection : the collection <patient/dose> is registered at 2
New sensitive detector <patient> is registered at /
#
/run/beamOn 10000
### Run 0 start.
@@ -215,8 +213,8 @@ New sensitive detector <patient> is registered at /
---> end of event: 0
--------------------End of Global Run-----------------------
The run was 10000 events Nb of 'good' e+ annihilations: 1249
Total dose in patient : 290.467 picoGy
The run was 10000 events Nb of 'good' e+ annihilations: 1242
Total dose in patient : 289.201 picoGy
------------------------------------------------------------
Graphics systems deleted.
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3DetectorConstruction.cc 71079 2013-06-10 20:37:11Z ihrivnac $
// $Id: B3DetectorConstruction.cc 101905 2016-12-07 11:34:39Z gunter $
//
/// \file B3DetectorConstruction.cc
/// \brief Implementation of the B3DetectorConstruction class
@@ -237,8 +237,8 @@ G4VPhysicalVolume* B3DetectorConstruction::Construct()
// Visualization attributes
//
logicRing->SetVisAttributes (G4VisAttributes::Invisible);
logicDetector->SetVisAttributes (G4VisAttributes::Invisible);
logicRing->SetVisAttributes (G4VisAttributes::GetInvisible());
logicDetector->SetVisAttributes (G4VisAttributes::GetInvisible());
// Print materials
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
@@ -257,6 +257,7 @@ void B3DetectorConstruction::ConstructSDandField()
// declare crystal as a MultiFunctionalDetector scorer
//
G4MultiFunctionalDetector* cryst = new G4MultiFunctionalDetector("crystal");
G4SDManager::GetSDMpointer()->AddNewDetector(cryst);
G4VPrimitiveScorer* primitiv1 = new G4PSEnergyDeposit("edep");
cryst->RegisterPrimitive(primitiv1);
SetSensitiveDetector("CrystalLV",cryst);
@@ -264,6 +265,7 @@ void B3DetectorConstruction::ConstructSDandField()
// declare patient as a MultiFunctionalDetector scorer
//
G4MultiFunctionalDetector* patient = new G4MultiFunctionalDetector("patient");
G4SDManager::GetSDMpointer()->AddNewDetector(patient);
G4VPrimitiveScorer* primitiv2 = new G4PSDoseDeposit("dose");
patient->RegisterPrimitive(primitiv2);
SetSensitiveDetector("PatientLV",patient);
+11 -1
View File
@@ -1,4 +1,4 @@
$Id: History 97070 2016-05-24 08:49:17Z gcosmo $
$Id: History 101659 2016-11-21 09:02:47Z gcosmo $
--------------------------------------------------
=========================================================
@@ -15,6 +15,16 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
19/11/16 A. Dotti (exampleB3-V10-02-04)
- explicit set of SD to manager
02/11/16 I. Hrivnacova (exampleB3-V10-02-03)
- Fixed comments for Doxygen
- Removed obsolete B3b/exampleB3.cc
26/09/16 I. Hrivnacova (exampleB3-V10-02-02)
- Updated for renaming G4Parameter in G4Accumulable
24/05/16 I. Hrivnacova (exampleB3-V10-02-01)
- Fixed compiler warning introduced in the previous update
+6 -6
View File
@@ -1,4 +1,4 @@
$Id: README 94957 2016-01-08 13:27:26Z gcosmo $
$Id: README 99559 2016-09-27 07:02:21Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -92,15 +92,15 @@ $Id: README 94957 2016-01-08 13:27:26Z gcosmo $
At the end of event, the values acummulated in B3aEventAction are passed
in B3aRunAction and summed over the whole run (see B3aEventAction::EndOfevent()).
In multi-threading mode the data accumulated in G4Parameter objects per
In multi-threading mode the data accumulated in G4Accumulable objects per
workers is merged to the master in B3aRunAction::EndOfRunAction() and the final
result is printed on the screen.
G4Parameter<> type instead of G4double and G4int types is used for the B3aRunAction
G4Accumulable<> type instead of G4double and G4int types is used for the B3aRunAction
data members in order to facilitate merging of the values accumulated on workers
to the master. Currently the parameters have to be registered to G4ParametersManager
and G4ParametersManager::Merge() has to be called from the users code. This is planned
to be further simplified with a closer integration of G4Parameter classes in
to the master. Currently the accumulables have to be registered to G4AccumulablesManager
and G4AccumulablesManager::Merge() has to be called from the users code. This is planned
to be further simplified with a closer integration of G4Accumulable classes in
the Geant4 kernel next year.
B3b: