From e23d8064adaf86154fb9add5bfef48069f74d303 Mon Sep 17 00:00:00 2001 From: Paola Ferrario Date: Fri, 13 Sep 2024 12:49:46 +0200 Subject: [PATCH] Add Fano factor and ionization energy to GXe properties --- source/materials/MaterialProperties.cc | 8 +++++--- source/physics/IonizationClustering.cc | 16 +++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/source/materials/MaterialProperties.cc b/source/materials/MaterialProperties.cc index dca2c352e1..dc56ea469f 100644 --- a/source/materials/MaterialProperties.cc +++ b/source/materials/MaterialProperties.cc @@ -647,12 +647,14 @@ namespace materialprops { // CONST PROPERTIES mpt->AddConstProperty("SCINTILLATIONYIELD", sc_yield); - mpt->AddConstProperty("RESOLUTIONSCALE", 1.0); - mpt->AddConstProperty("SCINTILLATIONTIMECONSTANT1", 4.5 * ns); - mpt->AddConstProperty("SCINTILLATIONTIMECONSTANT2", 100. * ns); + mpt->AddConstProperty("RESOLUTIONSCALE", 1.0); + mpt->AddConstProperty("SCINTILLATIONTIMECONSTANT1", 4.5 * ns); + mpt->AddConstProperty("SCINTILLATIONTIMECONSTANT2", 100. * ns); mpt->AddConstProperty("SCINTILLATIONYIELD1", .1); mpt->AddConstProperty("SCINTILLATIONYIELD2", .9); mpt->AddConstProperty("ATTACHMENT", e_lifetime, 1); + mpt->AddConstProperty("IONIZATIONENERGY", 22.4 * eV, 1); + mpt->AddConstProperty("FANOFACTOR", .15, 1); return mpt; } diff --git a/source/physics/IonizationClustering.cc b/source/physics/IonizationClustering.cc index 565e16d4ce..5b707bac76 100644 --- a/source/physics/IonizationClustering.cc +++ b/source/physics/IonizationClustering.cc @@ -109,15 +109,13 @@ namespace nexus { // and N is the average number of charges. // Fetch the W_i and F from the material properties table - //G4MaterialPropertiesTable* mpt = - // track.GetMaterial()->GetMaterialPropertiesTable(); - //if (!mpt) - // return G4VRestDiscreteProcess::PostStepDoIt(track, step); - - //G4double ioni_energy = mpt->GetConstProperty("IONIZATIONENERGY"); - //G4double fano_factor = mpt->GetConstProperty("FANOFACTOR"); - G4double ioni_energy = 22.4 * eV; - G4double fano_factor = .15; + G4MaterialPropertiesTable* mpt = + track.GetMaterial()->GetMaterialPropertiesTable(); + if (!mpt) + return G4VRestDiscreteProcess::PostStepDoIt(track, step); + + G4double ioni_energy = mpt->GetConstProperty("IONIZATIONENERGY"); + G4double fano_factor = mpt->GetConstProperty("FANOFACTOR"); G4double mean = energy_dep / ioni_energy;