Aby kod był przejrzysty definicja własności
materiałowych powinna mieć miejsce w funkcji
MyDetectorConstruction::DefineMaterials()
W pliku
src/MyDetectorConstruction.cc (zmiany kolorem
czerwonym)
.......................................................................................................................
void MyDetectorConstruction::DefineMaterials()
{
----------------------------------------------------------------------------------------------
// Dump material information
G4cout << *(G4Material::GetMaterialTable()) <<
G4endl;
const
G4int NUMENTRIES = 9;
G4double Scnt_PP[NUMENTRIES] = { 6.6*eV, 6.7*eV, 6.8*eV, 6.9*eV,
7.0*eV, 7.1*eV, 7.2*eV, 7.3*eV, 7.4*eV };
G4double Scnt_FAST[NUMENTRIES] = { 0.000134, 0.004432, 0.053991,
0.241971, 0.398942, 0.000134, 0.004432, 0.053991, 0.241971 };
G4double Scnt_SLOW[NUMENTRIES] = { 0.000010, 0.000020, 0.000030,
0.004000, 0.008000, 0.005000, 0.020000, 0.001000, 0.000010 };
G4MaterialPropertiesTable*
Scnt_MPT = new G4MaterialPropertiesTable();
Scnt_MPT->AddProperty("FASTCOMPONENT",
Scnt_PP, Scnt_FAST, NUMENTRIES);
Scnt_MPT->AddProperty("SLOWCOMPONENT",
Scnt_PP, Scnt_SLOW, NUMENTRIES);
Scnt_MPT->AddConstProperty("SCINTILLATIONYIELD",
5000./MeV);
Scnt_MPT->AddConstProperty("RESOLUTIONSCALE",
2.0);
Scnt_MPT->AddConstProperty("FASTTIMECONSTANT",
1.*ns);
Scnt_MPT->AddConstProperty("SLOWTIMECONSTANT",
10.*ns);
Scnt_MPT->AddConstProperty("YIELDRATIO",
0.8);
PbWO4->SetMaterialPropertiesTable(Scnt_MPT);
PbWO4->GetMaterialPropertiesTable()->DumpTable();
}