Ignore:
Timestamp:
Jun 14, 2010, 3:54:58 PM (14 years ago)
Author:
garnier
Message:

geant4.9.4 beta rc0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/advanced/hadrontherapy/src/HadrontherapyPhysicsList.cc

    r1230 r1313  
    7676//                        and local physic for ion-ion enelastic processes)
    7777
     78#include "G4RunManager.hh"
     79#include "G4Region.hh"
     80#include "G4RegionStore.hh"
    7881#include "HadrontherapyPhysicsList.hh"
    7982#include "HadrontherapyPhysicsListMessenger.hh"
     
    8689#include "LocalINCLIonIonInelasticPhysic.hh"         // Physic dedicated to the ion-ion inelastic processes using INCL/ABLA
    8790
    88 // Physic lists (contained inside the Geant4 distribution)
     91// Physic lists (contained inside the Geant4 source code, in the 'physicslists folder')
    8992#include "G4EmStandardPhysics_option3.hh"
    9093#include "G4EmLivermorePhysics.hh"
     
    173176{
    174177  // transportation
    175   //
    176178  AddTransportation();
    177179
    178180  // electromagnetic physics list
    179   //
    180181  emPhysicsList->ConstructProcess();
    181182  em_config.AddModels();
    182183
    183184  // decay physics list
    184   //
    185185  decPhysicsList->ConstructProcess();
    186186
     
    207207  //   ELECTROMAGNETIC MODELS
    208208  /////////////////////////////////////////////////////////////////////////////
    209 
    210   if (name == "standard_opt3") {
     209    if (name == "standard_opt3") {
    211210    emName = name;
    212211    delete emPhysicsList;
    213212    emPhysicsList = new G4EmStandardPhysics_option3();
     213    G4RunManager::GetRunManager() -> PhysicsHasBeenModified();
    214214    G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmStandardPhysics_option3" << G4endl;
    215215
     
    218218    delete emPhysicsList;
    219219    emPhysicsList = new G4EmLivermorePhysics();
     220    G4RunManager::GetRunManager()-> PhysicsHasBeenModified();
    220221    G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmLivermorePhysics" << G4endl;
    221222
     
    308309  SetCutValue(cutForPositron, "e+");
    309310
     311  // Set cuts for detector
     312  SetDetectorCut(defaultCutValue);
    310313  if (verboseLevel>0) DumpCutValuesTable();
    311314}
     
    331334  SetParticleCuts(cutForPositron, G4Positron::Positron());
    332335}
     336
     337void HadrontherapyPhysicsList::SetDetectorCut(G4double cut)
     338{
     339
     340  G4String regionName = "DetectorLog";
     341  G4Region* region = G4RegionStore::GetInstance()->GetRegion(regionName);
     342
     343  G4ProductionCuts* cuts = new G4ProductionCuts ;
     344  cuts -> SetProductionCut(cut,G4ProductionCuts::GetIndex("gamma"));
     345  cuts -> SetProductionCut(cut,G4ProductionCuts::GetIndex("e-"));
     346  cuts -> SetProductionCut(cut,G4ProductionCuts::GetIndex("e+"));
     347  region -> SetProductionCuts(cuts);
     348}
     349
Note: See TracChangeset for help on using the changeset viewer.