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
+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"