Error when giving Properties to material

Hello,

I am currently having this error when trying to give my BGO scintillator its optical properties.

Terminal sais

*** G4Exception : mat205
      issued by : G4MaterialPropertiesTable::AddProperty()
Attempting to create a new material property key FASTCOMPONENT without setting
createNewKey parameter of AddProperty to true.
*** Fatal Exception *** core dump ***
 **** Track information is not available at this moment
 **** Step information is not available at this moment

when I run the script. I have tried to debug my code in order to find where the error could be but I do not see anything strange, hope you can help me. I attach a screenshot of my code:

// BGO
    G4Material *BGO = nist->FindOrBuildMaterial("G4_BGO");
    
    // BGO Optical Properties (MPT)
    // Declare the MPT 
    G4MaterialPropertiesTable *BGO_mpt = new G4MaterialPropertiesTable();    
    
    // Define the energy region for optical properties
    G4double BGO_energy[3] = {1.0*eV, 2.5*eV, 5.9*eV}; //Not know how it works
    // Relative intensity of scintillation light over specified energy range
    G4double BGO_SCINT[3] = {1., 1., 1.};
    // Refractive index of BGO
    G4double BGO_RINDEX[3] = {2.15, 2.15, 2.15};
    // Absorption length of BGO for optical photons
    G4double BGO_ABSL[3] = {10*m, 10*m, 10*m}; //Not know how it works
    
    // Add properties to the MPT
    BGO_mpt->AddProperty("FASTCOMPONENT", BGO_energy, BGO_SCINT, 3);
    BGO_mpt->AddProperty("RINDEX", BGO_energy, BGO_RINDEX, 3);
    BGO_mpt->AddProperty("ABSLENGTH", BGO_energy, BGO_ABSL, 3);
    
    BGO_mpt->AddConstProperty("SCINTILLATIONYIELD", 8/keV);
    BGO_mpt->AddConstProperty("RESOLUTIONSCALE", 1.0);
    BGO_mpt->AddConstProperty("FASTTIMECONSTANT", 1000.*ns);
    BGO_mpt->AddConstProperty("YIELDRATIO", 1.0);    
    
    // Attach material porperties table to the material
    BGO->SetMaterialPropertiesTable(BGO_mpt);

Thanks in advance!

1 Like

Are you running version Geant4 11.0.0? If so, it does not support FASTCOMPONENT and SLOWCOMPONENT. They were last used in version 10.7.3. Instead there can be up to three components with names SCINTILLATIONCOMPONENT1, SCINTILLATIONCOMPONENT2, SCINTILLATIONCOMPONENT3.

1 Like

Thanks!

I also had to replace FASTTIMECONSTANT with SCINTILLATIONTIMECONSTANT1 and YIELDRATIO with SCINTILLATIONYIELD1.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.