Import Geant4 11.0.0 source tree
This commit is contained in:
committed by
Ben Morgan
parent
6399a014b6
commit
80e2389dd8
+33
-26
@@ -24,43 +24,50 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3aActionInitialization.cc
|
||||
/// \brief Implementation of the B3aActionInitialization class
|
||||
/// \file ActionInitialization.cc
|
||||
/// \brief Implementation of the B3a::ActionInitialization class
|
||||
|
||||
#include "B3aActionInitialization.hh"
|
||||
#include "B3aRunAction.hh"
|
||||
#include "B3aEventAction.hh"
|
||||
#include "B3PrimaryGeneratorAction.hh"
|
||||
#include "B3StackingAction.hh"
|
||||
#include "ActionInitialization.hh"
|
||||
#include "RunAction.hh"
|
||||
#include "EventAction.hh"
|
||||
#include "PrimaryGeneratorAction.hh"
|
||||
#include "StackingAction.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
using namespace B3;
|
||||
|
||||
B3aActionInitialization::B3aActionInitialization()
|
||||
: G4VUserActionInitialization()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B3aActionInitialization::~B3aActionInitialization()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B3aActionInitialization::BuildForMaster() const
|
||||
namespace B3a
|
||||
{
|
||||
SetUserAction(new B3aRunAction);
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
ActionInitialization::ActionInitialization()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
ActionInitialization::~ActionInitialization()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void ActionInitialization::BuildForMaster() const
|
||||
{
|
||||
SetUserAction(new RunAction);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B3aActionInitialization::Build() const
|
||||
void ActionInitialization::Build() const
|
||||
{
|
||||
B3aRunAction* runAction = new B3aRunAction();
|
||||
RunAction* runAction = new RunAction();
|
||||
SetUserAction(runAction);
|
||||
|
||||
SetUserAction(new B3aEventAction(runAction));
|
||||
SetUserAction(new B3PrimaryGeneratorAction);
|
||||
SetUserAction(new B3StackingAction);
|
||||
SetUserAction(new EventAction(runAction));
|
||||
SetUserAction(new PrimaryGeneratorAction);
|
||||
SetUserAction(new StackingAction);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
}
|
||||
|
||||
+14
-10
@@ -24,10 +24,10 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3DetectorConstruction.cc
|
||||
/// \brief Implementation of the B3DetectorConstruction class
|
||||
/// \file DetectorConstruction.cc
|
||||
/// \brief Implementation of the B3::DetectorConstruction class
|
||||
|
||||
#include "B3DetectorConstruction.hh"
|
||||
#include "DetectorConstruction.hh"
|
||||
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4Box.hh"
|
||||
@@ -45,23 +45,24 @@
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
namespace B3
|
||||
{
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B3DetectorConstruction::B3DetectorConstruction()
|
||||
: G4VUserDetectorConstruction(),
|
||||
fCheckOverlaps(true)
|
||||
DetectorConstruction::DetectorConstruction()
|
||||
{
|
||||
DefineMaterials();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B3DetectorConstruction::~B3DetectorConstruction()
|
||||
DetectorConstruction::~DetectorConstruction()
|
||||
{ }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B3DetectorConstruction::DefineMaterials()
|
||||
void DetectorConstruction::DefineMaterials()
|
||||
{
|
||||
G4NistManager* man = G4NistManager::Instance();
|
||||
|
||||
@@ -79,7 +80,7 @@ void B3DetectorConstruction::DefineMaterials()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4VPhysicalVolume* B3DetectorConstruction::Construct()
|
||||
G4VPhysicalVolume* DetectorConstruction::Construct()
|
||||
{
|
||||
// Gamma detector Parameters
|
||||
//
|
||||
@@ -249,7 +250,7 @@ G4VPhysicalVolume* B3DetectorConstruction::Construct()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B3DetectorConstruction::ConstructSDandField()
|
||||
void DetectorConstruction::ConstructSDandField()
|
||||
{
|
||||
G4SDManager::GetSDMpointer()->SetVerboseLevel(1);
|
||||
|
||||
@@ -271,3 +272,6 @@ void B3DetectorConstruction::ConstructSDandField()
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
}
|
||||
|
||||
+15
-12
@@ -24,11 +24,11 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3aEventAction.cc
|
||||
/// \brief Implementation of the B3aEventAction class
|
||||
/// \file EventAction.cc
|
||||
/// \brief Implementation of the B3a::EventAction class
|
||||
|
||||
#include "B3aEventAction.hh"
|
||||
#include "B3aRunAction.hh"
|
||||
#include "EventAction.hh"
|
||||
#include "RunAction.hh"
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Event.hh"
|
||||
@@ -39,28 +39,28 @@
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
namespace B3a
|
||||
{
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B3aEventAction::B3aEventAction(B3aRunAction* runAction)
|
||||
: G4UserEventAction(),
|
||||
fRunAction(runAction),
|
||||
fCollID_cryst(-1),
|
||||
fCollID_patient(-1)
|
||||
EventAction::EventAction(RunAction* runAction)
|
||||
: fRunAction(runAction)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B3aEventAction::~B3aEventAction()
|
||||
EventAction::~EventAction()
|
||||
{ }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B3aEventAction::BeginOfEventAction(const G4Event* /*evt*/)
|
||||
void EventAction::BeginOfEventAction(const G4Event* /*evt*/)
|
||||
{ }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B3aEventAction::EndOfEventAction(const G4Event* evt )
|
||||
void EventAction::EndOfEventAction(const G4Event* evt )
|
||||
{
|
||||
//Hits collections
|
||||
//
|
||||
@@ -105,3 +105,6 @@ void B3aEventAction::EndOfEventAction(const G4Event* evt )
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
}
|
||||
|
||||
+14
-7
@@ -24,19 +24,22 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3PhysicsList.cc
|
||||
/// \brief Implementation of the B3PhysicsList class
|
||||
/// \file PhysicsList.cc
|
||||
/// \brief Implementation of the B3::PhysicsList class
|
||||
|
||||
#include "B3PhysicsList.hh"
|
||||
#include "PhysicsList.hh"
|
||||
|
||||
#include "G4DecayPhysics.hh"
|
||||
#include "G4EmStandardPhysics.hh"
|
||||
#include "G4RadioactiveDecayPhysics.hh"
|
||||
|
||||
namespace B3
|
||||
{
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B3PhysicsList::B3PhysicsList()
|
||||
: G4VModularPhysicsList(){
|
||||
PhysicsList::PhysicsList()
|
||||
{
|
||||
SetVerboseLevel(1);
|
||||
|
||||
// Default physics
|
||||
@@ -51,13 +54,17 @@ B3PhysicsList::B3PhysicsList()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B3PhysicsList::~B3PhysicsList()
|
||||
PhysicsList::~PhysicsList()
|
||||
{
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B3PhysicsList::SetCuts()
|
||||
void PhysicsList::SetCuts()
|
||||
{
|
||||
G4VUserPhysicsList::SetCuts();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
}
|
||||
+12
-8
@@ -24,10 +24,10 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the B3PrimaryGeneratorAction class
|
||||
/// \file PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the B3::PrimaryGeneratorAction class
|
||||
|
||||
#include "B3PrimaryGeneratorAction.hh"
|
||||
#include "PrimaryGeneratorAction.hh"
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Event.hh"
|
||||
@@ -39,11 +39,12 @@
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
namespace B3
|
||||
{
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B3PrimaryGeneratorAction::B3PrimaryGeneratorAction()
|
||||
: G4VUserPrimaryGeneratorAction(),
|
||||
fParticleGun(nullptr)
|
||||
PrimaryGeneratorAction::PrimaryGeneratorAction()
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
fParticleGun = new G4ParticleGun(n_particle);
|
||||
@@ -61,14 +62,14 @@ B3PrimaryGeneratorAction::B3PrimaryGeneratorAction()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B3PrimaryGeneratorAction::~B3PrimaryGeneratorAction()
|
||||
PrimaryGeneratorAction::~PrimaryGeneratorAction()
|
||||
{
|
||||
delete fParticleGun;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B3PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
G4ParticleDefinition* particle = fParticleGun->GetParticleDefinition();
|
||||
if (particle == G4ChargedGeantino::ChargedGeantino()) {
|
||||
@@ -101,3 +102,6 @@ void B3PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
}
|
||||
|
||||
|
||||
+18
-13
@@ -24,11 +24,11 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3aRunAction.cc
|
||||
/// \brief Implementation of the B3aRunAction class
|
||||
/// \file RunAction.cc
|
||||
/// \brief Implementation of the B3a::RunAction class
|
||||
|
||||
#include "B3aRunAction.hh"
|
||||
#include "B3PrimaryGeneratorAction.hh"
|
||||
#include "RunAction.hh"
|
||||
#include "PrimaryGeneratorAction.hh"
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Run.hh"
|
||||
@@ -36,12 +36,14 @@
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
using namespace B3;
|
||||
|
||||
namespace B3a
|
||||
{
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B3aRunAction::B3aRunAction()
|
||||
: G4UserRunAction(),
|
||||
fGoodEvents(0),
|
||||
fSumDose(0.)
|
||||
RunAction::RunAction()
|
||||
{
|
||||
//add new units for dose
|
||||
//
|
||||
@@ -63,12 +65,12 @@ B3aRunAction::B3aRunAction()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B3aRunAction::~B3aRunAction()
|
||||
RunAction::~RunAction()
|
||||
{ }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B3aRunAction::BeginOfRunAction(const G4Run* run)
|
||||
void RunAction::BeginOfRunAction(const G4Run* run)
|
||||
{
|
||||
G4cout << "### Run " << run->GetRunID() << " start." << G4endl;
|
||||
|
||||
@@ -82,7 +84,7 @@ void B3aRunAction::BeginOfRunAction(const G4Run* run)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B3aRunAction::EndOfRunAction(const G4Run* run)
|
||||
void RunAction::EndOfRunAction(const G4Run* run)
|
||||
{
|
||||
G4int nofEvents = run->GetNumberOfEvent();
|
||||
if (nofEvents == 0) return;
|
||||
@@ -94,8 +96,8 @@ void B3aRunAction::EndOfRunAction(const G4Run* run)
|
||||
// Run conditions
|
||||
// note: There is no primary generator action object for "master"
|
||||
// run manager for multi-threaded mode.
|
||||
const B3PrimaryGeneratorAction* generatorAction
|
||||
= static_cast<const B3PrimaryGeneratorAction*>(
|
||||
const PrimaryGeneratorAction* generatorAction
|
||||
= static_cast<const PrimaryGeneratorAction*>(
|
||||
G4RunManager::GetRunManager()->GetUserPrimaryGeneratorAction());
|
||||
G4String partName;
|
||||
if (generatorAction)
|
||||
@@ -132,3 +134,6 @@ void B3aRunAction::EndOfRunAction(const G4Run* run)
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
}
|
||||
|
||||
+12
-6
@@ -24,28 +24,31 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3StackingAction.cc
|
||||
/// \brief Implementation of the B3StackingAction class
|
||||
/// \file StackingAction.cc
|
||||
/// \brief Implementation of the B3::StackingAction class
|
||||
|
||||
#include "B3StackingAction.hh"
|
||||
#include "StackingAction.hh"
|
||||
|
||||
#include "G4Track.hh"
|
||||
#include "G4NeutrinoE.hh"
|
||||
|
||||
namespace B3
|
||||
{
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B3StackingAction::B3StackingAction()
|
||||
StackingAction::StackingAction()
|
||||
{ }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B3StackingAction::~B3StackingAction()
|
||||
StackingAction::~StackingAction()
|
||||
{ }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4ClassificationOfNewTrack
|
||||
B3StackingAction::ClassifyNewTrack(const G4Track* track)
|
||||
StackingAction::ClassifyNewTrack(const G4Track* track)
|
||||
{
|
||||
//keep primary particle
|
||||
if (track->GetParentID() == 0) return fUrgent;
|
||||
@@ -56,3 +59,6 @@ B3StackingAction::ClassifyNewTrack(const G4Track* track)
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user