Skip to content

Commit

Permalink
Merge pull request OpenGATE#610 from OpenGATE/dnaphysicslists
Browse files Browse the repository at this point in the history
DNA physics lists and DNA Activator from G4
  • Loading branch information
tbaudier authored Jun 2, 2023
2 parents 91e410c + bafa8cd commit 3b095bc
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
4 changes: 4 additions & 0 deletions source/physics/include/GatePhysicsList.hh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "GateVProcess.hh"
#include "GateUserLimits.hh"

class G4EmDNAPhysicsActivator;

//class GateVProcess;
class GatePhysicsListMessenger;
class GatePhysicsList: public G4VModularPhysicsList
Expand Down Expand Up @@ -140,6 +142,8 @@ protected:
G4double mLowEnergyRangeLimit;

G4EmParameters *emPar;

G4EmDNAPhysicsActivator* emDNAActivator;
};


Expand Down
48 changes: 45 additions & 3 deletions source/physics/src/GatePhysicsList.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@
#include "G4EmLivermorePhysics.hh"
#include "G4EmPenelopePhysics.hh"
#include "G4EmDNAPhysics.hh"
#include "G4EmDNAPhysics_option1.hh"
#include "G4EmDNAPhysics_option2.hh"
#include "G4EmDNAPhysics_option3.hh"
#include "G4EmDNAPhysics_option4.hh"
#include "G4EmDNAPhysics_option5.hh"
#include "G4EmDNAPhysics_option6.hh"
#include "G4EmDNAPhysics_option7.hh"
#include "G4EmDNAPhysics_option8.hh"
#include "G4EmDNAPhysicsActivator.hh"
#include "G4LossTableManager.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4RadioactiveDecayPhysics.hh"
Expand Down Expand Up @@ -103,6 +112,10 @@ GatePhysicsList::GatePhysicsList(): G4VModularPhysicsList()
#if G4VERSION_MAJOR >= 10 && G4VERSION_MINOR >= 5
mUseICRU90Data = false;
#endif

// used to conditionally activate DNA physics list in specific regions
// while using other em physics list elsewhere
emDNAActivator = new G4EmDNAPhysicsActivator;
}
//-----------------------------------------------------------------------------------------

Expand Down Expand Up @@ -177,6 +190,8 @@ GatePhysicsList::~GatePhysicsList()
if((*vect)[i]) G4cout<<"Process= "<<(*vect)[i]->GetProcessName()<< Gateendl;
}
}*/

delete emDNAActivator;
}
//-----------------------------------------------------------------------------------------

Expand Down Expand Up @@ -277,6 +292,9 @@ void GatePhysicsList::ConstructProcess()
}
*/

// Construct G4 DNA activator process
emDNAActivator->ConstructProcess();

mLoadState++;
}
//-----------------------------------------------------------------------------------------
Expand Down Expand Up @@ -342,6 +360,30 @@ void GatePhysicsList::ConstructPhysicsList(G4String name)
if (mUserPhysicListName == "emDNAphysics") {
pl = new G4EmDNAPhysics();
}
if (mUserPhysicListName == "emDNAphysics_option1") {
pl = new G4EmDNAPhysics_option1;
}
if (mUserPhysicListName == "emDNAphysics_option2") {
pl = new G4EmDNAPhysics_option2;
}
if (mUserPhysicListName == "emDNAphysics_option3") {
pl = new G4EmDNAPhysics_option3;
}
if (mUserPhysicListName == "emDNAphysics_option4") {
pl = new G4EmDNAPhysics_option4;
}
if (mUserPhysicListName == "emDNAphysics_option5") {
pl = new G4EmDNAPhysics_option5;
}
if (mUserPhysicListName == "emDNAphysics_option6") {
pl = new G4EmDNAPhysics_option6;
}
if (mUserPhysicListName == "emDNAphysics_option7") {
pl = new G4EmDNAPhysics_option7;
}
if (mUserPhysicListName == "emDNAphysics_option8") {
pl = new G4EmDNAPhysics_option8;
}

#ifdef GATE_USE_OPTICAL
if (mUserPhysicListName == "optical") {
Expand Down Expand Up @@ -435,11 +477,8 @@ void GatePhysicsList::ConstructParticle()
// Construct hybridino
G4Hybridino::HybridinoDefinition();



//Construct G4DNA particles


G4DNAGenericIonsManager* dnagenericIonsManager;
dnagenericIonsManager=G4DNAGenericIonsManager::Instance();
dnagenericIonsManager->GetIon("hydrogen");
Expand All @@ -451,6 +490,9 @@ void GatePhysicsList::ConstructParticle()
dnagenericIonsManager->GetIon("iron");
dnagenericIonsManager->GetIon("oxygen");

// Construct G4 DNA activator particles
emDNAActivator->ConstructParticle();

//Construct positroniums
GateParaPositronium::ParaPositroniumDefinition();
GateOrthoPositronium::OrthoPositroniumDefinition();
Expand Down

0 comments on commit 3b095bc

Please sign in to comment.