9#include <simulation/kernel/PhysicsList.h>
10#include <framework/logging/Logger.h>
11#include <framework/gearbox/Unit.h>
13#include <CLHEP/Units/SystemOfUnits.h>
15#include <G4UnitsTable.hh>
16#include <G4OpticalPhysics.hh>
17#include <G4PhysListFactory.hh>
19#include <simulation/kernel/ExtPhysicsConstructor.h>
20#include <G4ParticleTable.hh>
21#include <G4ParticleDefinition.hh>
25using namespace Simulation;
28PhysicsList::PhysicsList(
const string& physicsListName) : G4VModularPhysicsList()
30 defaultCutValue = 0.7 * CLHEP::mm;
33 G4PhysListFactory physListFactory;
34 G4VModularPhysicsList* physList = NULL;
36 if (physListFactory.IsReferencePhysList(physicsListName)) physList = physListFactory.GetReferencePhysList(physicsListName);
37 if (physList == NULL) B2FATAL(
"Could not load the physics list " << physicsListName);
40 G4VPhysicsConstructor* regPhys =
const_cast<G4VPhysicsConstructor*
>(physList->GetPhysics(0));
41 while (regPhys != NULL) {
42 B2DEBUG(10,
"RegisterPhysics: " << regPhys->GetPhysicsName());
43 RegisterPhysics(regPhys);
44 regPhys =
const_cast<G4VPhysicsConstructor*
>(physList->GetPhysics(iPhysList++));
59 B2INFO(
"B4PhysicsList::SetCuts, CutLength: " << G4BestUnit(defaultCutValue,
"Length"));
82 defaultCutValue = (productionCut /
Unit::mm) * CLHEP::mm;
88 RegisterPhysics(
new G4OpticalPhysics());
@ c_Debug
Debug: for code development.
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
Define geant4e-specific physics.
void setProductionCutValue(double productionCut)
Sets the production cut value.
void SetCuts()
Sets the Cuts on the physics list.
virtual ~PhysicsList()
The PhysicsList destructor.
void registerOpticalPhysicsList()
Registers the optical physics list.
static const double mm
[millimeters]
Abstract base class for different kinds of events.