Skip to content

Commit

Permalink
Allow enabling DNA physics list for specific regions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexis-pereda committed May 25, 2023
1 parent c64675e commit bafa8cd
Show file tree
Hide file tree
Showing 2 changed files with 17 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
16 changes: 13 additions & 3 deletions source/physics/src/GatePhysicsList.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#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 @@ -111,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 @@ -185,6 +190,8 @@ GatePhysicsList::~GatePhysicsList()
if((*vect)[i]) G4cout<<"Process= "<<(*vect)[i]->GetProcessName()<< Gateendl;
}
}*/

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

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

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

mLoadState++;
}
//-----------------------------------------------------------------------------------------
Expand Down Expand Up @@ -467,11 +477,8 @@ void GatePhysicsList::ConstructParticle()
// Construct hybridino
G4Hybridino::HybridinoDefinition();



//Construct G4DNA particles


G4DNAGenericIonsManager* dnagenericIonsManager;
dnagenericIonsManager=G4DNAGenericIonsManager::Instance();
dnagenericIonsManager->GetIon("hydrogen");
Expand All @@ -483,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 bafa8cd

Please sign in to comment.