Message: Re: Any example of using G4 DNA process? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Any example of using G4 DNA process? 

Forum: Medical Applications
Re: None Any example of using G4 DNA process?
Date: 23 Mar, 2008
From: Maria Grazia Pia <Maria Grazia Pia>

Hi Gao,

Sorry for my delayed provision of the example I promised you: 
for the last few days I have been busy at developing new Geant4 
microdosimetry processes indeed!

An example of PhysicsList implementation involving Geant4-DNA processes 
is enclosed below. 

I am not sure whether the hadrontherapy example environment would be the most
appropriate to exercise it at the present stage. In fact, the microdosimetry
(Geant4-DNA) processes are all discrete processes, while the complex mass 
model of the hadrontherapy example currently requires conventional 
continuous-discrete processes - namely ionisation for electrons, 
protons and ions - to describe the interaction of primary and secondary
particles in the various materials present in the set-up. The collaboration of
continuous-discrete and purely discrete ionisation in the same simulation 
environment implies significant design issues, that are currently 
under study; exercising both continuous-discrete and discrete ionisation
in the current hadrontherapy set-up is prone to produce incorrect 
results while an appropriate design solution is still under investigation.
It may be worthwhile stressing that the design issues concerned
are at the level of Geant4 kernel, not just user application ones. 

Therefore, if you wish to exercise the microdosimetry (Geant4-DNA) 
processes at the present stage, I suggest you to do so in a simple 
experimental configuration distinct from the complexity of a hadrontherapy 
beam line configuration, where you can focus on studying
microdosimetry effects only and do not need to deal with the issue of
continuous-discrete ionisation at the same time. This two-stage approach
would anyway be advised due to the CPU-intensive requirements of 
microdosimetry simulation, as Dr. Incerti pointed out in his previous posting.

If you need indeed to expose your nanosphere microdosimetry set-up to the radiation 
environment resulting from a complex hadrontherapy beam line configuration, 
I would rather suggest you to produce a so-called "phase-space generator" 
as a primary event generator for your microdosimetry simulation. 
You can easily develop a phase-space generator from the current hadrontherapy example, 
if you need it: for instance, by storing in a file the impact coordinates 
and four-momenta of all the particles reaching the boundary of your microdosimetry 
set-up in a first stage of the simulation, and using this result of the first 
simulation stage as an input to a primary event generator in a second 
simulation stage, that would shoot particles into your microdosimetry 
set-up based on the phase-space distribution of the first stage.

I also remind you that the current Geant4-DNA processes concern only particle
interactions in liquid water. Models for other materials are currently
under development  - for instance, I terminated just yesterday the development 
of a set of new models for 13 other materials, that will go into next 
Geant4 release; nevertheless, due to the complexity of physics modelling
at such low energies, it would realistically take quite some time before
Geant4 could provide microdosimetry simulation capabilities for all 
the materials encountered in complex mass models. Specialized simulation
set-ups are advised while still in the early phases of development in
this physics domain.

Hope it helps.

Happy Easter!

Maria Grazia

---- Example of PhysicsList implementation involving microdosimetry processes ----
Please beware that this is just an example to provide guidance for usage: 
not necessarily a solution for any applications!

// ********************************************************************
// * License and Disclaimer                                           *
// *                                                                  *
// * The  Geant4 software  is  copyright of the Copyright Holders  of *
// * the Geant4 Collaboration.  It is provided  under  the terms  and *
// * conditions of the Geant4 Software License,  included in the file *
// * LICENSE and available at .  These *
// * include a list of copyright holders.                             *
// *                                                                  *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work  make  any representation or  warranty, express or implied, *
// * regarding  this  software system or assume any liability for its *
// * use.  Please see the license in the file  LICENSE  and URL above *
// * for the full disclaimer and the limitation of liability.         *
// *                                                                  *
// * This  code  implementation is the result of  the  scientific and *
// * technical work of the GEANT4 collaboration.                      *
// * By using,  copying,  modifying or  distributing the software (or *
// * any work based  on the software)  you  agree  to acknowledge its *
// * use  in  resulting  scientific  publications,  and indicate your *
// * acceptance of all terms of the Geant4 Software license.          *
// ********************************************************************
// ------------------------------------------------------------

#include "Tst20PhysicsList.hh"
#include "G4DNAGenericIonsManager.hh"

#include "Tst20PhysicsListMessenger.hh"

#include "G4ParticleDefinition.hh"
#include "G4ProductionCutsTable.hh"
#include "G4ProcessManager.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4ios.hh"

#include "G4LowEnergyCompton.hh"
#include "G4LowEnergyGammaConversion.hh"
#include "G4LowEnergyPhotoElectric.hh"
#include "G4LowEnergyRayleigh.hh"

// e+
#include "G4MultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"

#include "G4LowEnergyIonisation.hh"
#include "G4LowEnergyBremsstrahlung.hh"

#include "G4Decay.hh"

#include "G4FinalStateProduct.hh"
#include "G4DNAProcess.hh"

#include "G4CrossSectionExcitationEmfietzoglou.hh"
#include "G4FinalStateExcitationEmfietzoglou.hh"

#include "G4CrossSectionElasticScreenedRutherford.hh"
#include "G4FinalStateElasticScreenedRutherford.hh"
#include "G4FinalStateElasticBrennerZaider.hh"

#include "G4CrossSectionExcitationBorn.hh"
#include "G4FinalStateExcitationBorn.hh"

#include "G4CrossSectionIonisationBorn.hh"
#include "G4FinalStateIonisationBorn.hh"

#include "G4CrossSectionIonisationRudd.hh"
#include "G4FinalStateIonisationRudd.hh"

#include "G4CrossSectionExcitationMillerGreen.hh"
#include "G4FinalStateExcitationMillerGreen.hh"

#include "G4CrossSectionChargeDecrease.hh"
#include "G4FinalStateChargeDecrease.hh"

#include "G4CrossSectionChargeIncrease.hh"
#include "G4FinalStateChargeIncrease.hh"

#include "G4CrossSectionKill.hh"
#include "G4FinalStateKill.hh"

// Processes

typedef G4DNAProcess<G4CrossSectionElasticScreenedRutherford,G4FinalStateElasticScreenedRutherford> ElasticScreenedRutherford;
typedef G4DNAProcess<G4CrossSectionElasticScreenedRutherford,G4FinalStateElasticBrennerZaider> ElasticBrennerZaider;
typedef G4DNAProcess<G4CrossSectionExcitationEmfietzoglou,G4FinalStateExcitationEmfietzoglou> ExcitationEmfietzoglou;
typedef G4DNAProcess<G4CrossSectionExcitationBorn,G4FinalStateExcitationBorn> ExcitationBorn;
typedef G4DNAProcess<G4CrossSectionIonisationBorn,G4FinalStateIonisationBorn> IonisationBorn;
typedef G4DNAProcess<G4CrossSectionIonisationRudd,G4FinalStateIonisationRudd> IonisationRudd;
typedef G4DNAProcess<G4CrossSectionExcitationMillerGreen,G4FinalStateExcitationMillerGreen> ExcitationMillerGreen;
typedef G4DNAProcess<G4CrossSectionChargeDecrease,G4FinalStateChargeDecrease> ChargeDecrease;
typedef G4DNAProcess<G4CrossSectionChargeIncrease,G4FinalStateChargeIncrease> ChargeIncrease;
typedef G4DNAProcess<G4CrossSectionKill,G4FinalStateKill> KillBelowThreshold;

Tst20PhysicsList::Tst20PhysicsList(): G4VUserPhysicsList()
  defaultCutValue = 1000. * nanometer;
  cutForGamma     = defaultCutValue;
  cutForElectron  = defaultCutValue;
  cutForPositron  = defaultCutValue;
  cutForProton    = defaultCutValue;
  // SetVerboseLevel(1);
  physicsListMessenger = new Tst20PhysicsListMessenger(this);

  delete physicsListMessenger;

void Tst20PhysicsList::ConstructParticle()
  // In this method, static member functions should be called
  // for all particles which you want to use.
  // This ensures that objects of these particle types will be
  // created in the program. 


void Tst20PhysicsList::ConstructBosons()
  // gamma

void Tst20PhysicsList::ConstructLeptons()
  // leptons

void Tst20PhysicsList::ConstructBarions()
  //  baryons

  // Geant4-DNA

  G4DNAGenericIonsManager* genericIonsManager;
  genericIonsManager = G4DNAGenericIonsManager::Instance();

void Tst20PhysicsList::ConstructProcess()

void Tst20PhysicsList::ConstructEM()

  while( (*theParticleIterator)() )
      G4ParticleDefinition* particle = theParticleIterator->value();
      G4ProcessManager* processManager = particle->GetProcessManager();
      G4String particleName = particle->GetParticleName();
      if (particleName == "gamma") 
	  processManager->AddDiscreteProcess(new G4LowEnergyCompton);
	  processManager->AddDiscreteProcess(new G4LowEnergyGammaConversion);
	  processManager->AddDiscreteProcess(new G4LowEnergyPhotoElectric);	
	  processManager->AddDiscreteProcess(new G4LowEnergyRayleigh);	  
      else if (particleName == "e-") 
	  // DNA
	  processManager->AddDiscreteProcess(new ExcitationEmfietzoglou);
	  processManager->AddDiscreteProcess(new ElasticScreenedRutherford);
	  processManager->AddDiscreteProcess(new ElasticBrennerZaider);
	  processManager->AddDiscreteProcess(new IonisationBorn);
	  processManager->AddDiscreteProcess(new IonisationBorn);
	  processManager->AddDiscreteProcess(new KillBelowThreshold);
      else if (particleName == "e+") 
	  processManager->AddProcess(new G4MultipleScattering,-1, 1,1);
	  processManager->AddProcess(new G4eIonisation,      -1, 2,2);
	  processManager->AddProcess(new G4eBremsstrahlung,   -1,-1,3);
	  processManager->AddProcess(new G4eplusAnnihilation,  0,-1,4);	
      else if (particleName == "proton") 
	  processManager->AddDiscreteProcess(new ExcitationMillerGreen);
	  processManager->AddDiscreteProcess(new ExcitationBorn);
	  processManager->AddDiscreteProcess(new IonisationRudd);
	  processManager->AddDiscreteProcess(new IonisationBorn);
	  processManager->AddDiscreteProcess(new ChargeDecrease);
      else if (particleName == "hydrogen") 
	  processManager->AddDiscreteProcess(new IonisationRudd);
	  processManager->AddDiscreteProcess(new ChargeIncrease);
      else if (particleName == "alpha") 
	  processManager->AddDiscreteProcess(new ExcitationMillerGreen);
	  processManager->AddDiscreteProcess(new IonisationRudd);
	  processManager->AddDiscreteProcess(new ChargeDecrease);   
      else if (particleName == "alpha+") 
	  processManager->AddDiscreteProcess(new ExcitationMillerGreen);
	  processManager->AddDiscreteProcess(new IonisationRudd);
	  processManager->AddDiscreteProcess(new ChargeDecrease);
	  processManager->AddDiscreteProcess(new ChargeIncrease);    
      else if (particleName == "helium") 
	  processManager->AddDiscreteProcess(new ExcitationMillerGreen);
	  processManager->AddDiscreteProcess(new IonisationRudd);
	  processManager->AddDiscreteProcess(new ChargeIncrease);

void Tst20PhysicsList::ConstructGeneral()
  // Add Decay Process
  G4Decay* theDecayProcess = new G4Decay();
  while( (*theParticleIterator)() )
      G4ParticleDefinition* particle = theParticleIterator->value();
      G4ProcessManager* processManager = particle->GetProcessManager();
      if (theDecayProcess->IsApplicable(*particle)) 
	  processManager ->AddProcess(theDecayProcess);
	  // set ordering for PostStepDoIt and AtRestDoIt
	  processManager ->SetProcessOrdering(theDecayProcess, idxPostStep);
	  processManager ->SetProcessOrdering(theDecayProcess, idxAtRest);

void Tst20PhysicsList::SetCuts()
  if (verboseLevel >0)
    G4cout << "PhysicsList::SetCuts:";
    G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
  // set cut values for gamma at first and for e- second and next for e+,
  // because some processes for e+/e- need cut values for gamma 
  SetCutValue(cutForGamma, "gamma");
  SetCutValue(cutForElectron, "e-");
  SetCutValue(cutForPositron, "e+");
  // set cut values for proton and anti_proton before all other hadrons
  // because some processes for hadrons need cut values for proton/anti_proton 
  SetCutValue(cutForProton, "proton");
  SetCutValue(cutForProton, "anti_proton");
  if (verboseLevel>0) DumpCutValuesTable();

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Thank you so much!   ( - 23 Mar, 2008)
(_ None: Re: Thank you so much!   (Maria Grazia Pia - 23 Mar, 2008)
(_ Question: Re: Thank you so much!   ( - 28 Mar, 2008)
 Add Message Add Message
to: "Re: Any example of using G4 DNA process?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]