Skip to content
Snippets Groups Projects
Commit b35e1187 authored by Adrien Matta's avatar Adrien Matta :skull_crossbones:
Browse files

* Fixed proper initialisation of Drift Electron Physics

        - This caused a crash whan the simulation was not provided a
          physics list option file
parent 824b2bb5
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ PhysicsList::PhysicsList() : G4VUserPhysicsList(){
m_EmList = "Option4";
defaultCutValue = 1*mm;//0.2*mm;
opticalPhysicsList = NULL;
driftElectronPhysicsList = NULL;
ReadConfiguration("PhysicsListOption.txt");
G4LossTableManager::Instance();
SetVerboseLevel(0);
......@@ -116,8 +116,8 @@ PhysicsList::PhysicsList() : G4VUserPhysicsList(){
opticalPhysicsList->SetTrackSecondariesFirst(kCerenkov,true);
}
// Drift electron for gazeous detector simulation
if(m_DriftElectronPhysics){
driftElectronPhysicsList = new G4DriftElectronPhysics(0);
driftElectronPhysicsList->SetMaxNumDriftElectronPerStep(1e6);
}
......@@ -213,7 +213,7 @@ void PhysicsList::ConstructParticle(){
}
if(driftElectronPhysicsList){
if(m_DriftElectronPhysics){
((G4VPhysicsConstructor*) driftElectronPhysicsList)->ConstructParticle();
}
......@@ -291,7 +291,7 @@ void PhysicsList::AddStepMax(){
}
/////////////////////////////////////////////////////////////////////////////
void PhysicsList::AddParametrisation(){
/*
G4FastSimulationManagerProcess* drift =
new G4FastSimulationManagerProcess("DriftElectron");
......@@ -307,7 +307,7 @@ void PhysicsList::AddParametrisation(){
if(particle->GetParticleName()=="e-")
pmanager->AddDiscreteProcess(drift);
}
}*/
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment