G4VModularPhysicsList* GeantFastSimConfig::getPhysicsList() { // we pass the ownership to Geant4Simulation which will register it in G4RunManager and will be deleted in ~G4RunManager() G4VModularPhysicsList* physicsList = new FTFP_BERT; // Coupled transportation enables calculation of particle trajectory in envelopes with fast sim models attached G4PhysicsListHelper::GetPhysicsListHelper()->UseCoupledTransportation(); // Attach Fast Simulation Process (will take over normal transportation if FastSimModel triggered physicsList->RegisterPhysics(new FastSimPhysics); return physicsList; }
G4VModularPhysicsList* G4FastSimPhysicsList::getPhysicsList() { // ownership passed to G4SimSvc which will register it in G4RunManager. To be deleted in ~G4RunManager() G4VModularPhysicsList* physicsList = m_physicsListTool->getPhysicsList(); // Coupled transportation enables calculation of particle trajectory in envelopes with fast sim models attached G4PhysicsListHelper::GetPhysicsListHelper()->UseCoupledTransportation(); // Attach Fast Simulation Process (will take over normal transportation if FastSimModel triggered physicsList->RegisterPhysics(new sim::FastSimPhysics); return physicsList; }
/// Extend physics list from factory: G4VUserPhysicsList* Geant4PhysicsListActionSequence::extensionList() { G4VModularPhysicsList* physics = ( m_extends.empty() ) ? new EmptyPhysics() : G4PhysListFactory().GetReferencePhysList(m_extends); // Register all physics constructors with the physics list constructPhysics(physics); // Ensure the particles and processes declared are also invoked. // Hence: Create a special physics constructor doing so. // Ownership is transferred to the physics list. // Do not delete this pointer afterwards.... physics->RegisterPhysics(new ParticlePhysics(this,physics)); return physics; }