Hi,
Indeed, but I’ve found it easier to define energy considering the photon wavelength, that’s why I’m using this curious definition.
Please consider my full geometry construction :
(the part after I get material properties isn’t usefull for my problem)
G4VPhysicalVolume* DetectorConstruction::Construct()
{
// refractive index definition
G4double energy[2] = {1.239841939 * eV / 0.9, 1.239841939 * eV / 0.2};
G4double rindexCore[2] = {1.5, 1.5};
G4double rindexClad[2] = {1.41, 1.41};
G4double rindexWorld[2] = {1.00, 1.00};
// Get nist material manager
G4NistManager* nist = G4NistManager::Instance();
// Definition of material properties table to check default material properties
G4MaterialPropertiesTable *pptSiO2_nist = new G4MaterialPropertiesTable();
G4MaterialPropertiesTable *pptSiO2 = new G4MaterialPropertiesTable();
// Materials to test
G4Material* SiO2_nist = nist->FindOrBuildMaterial("G4_SILICON_DIOXIDE");
G4Material* SiO2 = new G4Material("SiO2", 2.201 * g/cm3, 2);
SiO2->AddElement(nist->FindOrBuildElement("Si"), 1);
SiO2->AddElement(nist->FindOrBuildElement("O"), 2);
// Get the material properties
pptSiO2_table = SiO2->GetMaterialPropertiesTable();
pptSiO2_nist_table = SiO2_nist->GetMaterialPropertiesTable();
/*
// Fiber parameters
//
G4double coreRadius = 0.02*cm, cladRadius = 0.022*cm, coatRadius = 0.028*cm, height= 0.5*cm;
// Option to switch on/off checking of volumes overlaps
//
G4bool checkOverlaps = true;
//
// World
//
G4double world_sizeXY = 2.*coatRadius;
G4double world_sizeZ = 2*height;
G4double pi = 3.141592654;
G4Material* world_mat = nist->FindOrBuildMaterial("G4_AIR");
G4Box* solidWorld = new G4Box("World", 0.5 * world_sizeXY, 0.5 * world_sizeXY, 0.5 * world_sizeZ);
G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, world_mat, "World");
G4VPhysicalVolume* physWorld = new G4PVPlacement(0, G4ThreeVector(), logicWorld, "World", 0, false, 0, checkOverlaps);
G4MaterialPropertiesTable *mptWorld = new G4MaterialPropertiesTable();
mptWorld->AddProperty("RINDEX", energy, rindexWorld, 2, true, true);
world_mat->SetMaterialPropertiesTable(mptWorld);
//
// Fiber materials
//
G4Material* SiO2Core = new G4Material("SiO2Core", 2.201 * g/cm3, 2);
SiO2Core->AddElement(nist->FindOrBuildElement("Si"), 1);
SiO2Core->AddElement(nist->FindOrBuildElement("O"), 2);
G4Material* SiO2Clad = new G4Material("SiO2Clad", 2.201 * g/cm3, 2);
SiO2Clad->AddElement(nist->FindOrBuildElement("Si"), 1);
SiO2Clad->AddElement(nist->FindOrBuildElement("O"), 2);
G4Material* Aluminium = nist->FindOrBuildMaterial("G4_Al");
//
// Fiber coat
//
G4Tubs* fiberCoat = new G4Tubs("FiberCoat", 0 , coatRadius, 0.5*height, 0, 2*pi);
G4LogicalVolume* logicFiberCoat = new G4LogicalVolume(fiberCoat, Aluminium, "FiberCoat");
G4VPhysicalVolume* physFiberCoat = new G4PVPlacement(0, G4ThreeVector(), logicFiberCoat, "FiberCoat", logicWorld, false, 0, checkOverlaps);
//
// Fiber clad
//
G4Tubs* fiberClad = new G4Tubs("FiberClad", 0 , cladRadius, 0.5*height, 0, 2*pi);
G4LogicalVolume* logicFiberClad = new G4LogicalVolume(fiberClad, SiO2Clad, "FiberClad");
G4VPhysicalVolume* physFiberClad = new G4PVPlacement(0, G4ThreeVector(), logicFiberClad, "FiberClad", logicFiberCoat, false, 0, checkOverlaps);
G4MaterialPropertiesTable *mptClad = new G4MaterialPropertiesTable();
mptClad->AddProperty("RINDEX", energy, rindexClad, 2, true, true);
SiO2Clad->SetMaterialPropertiesTable(mptClad);
//
// Fiber core
//
G4Tubs* fiberCore = new G4Tubs("FiberCore", 0 , coreRadius, 0.5*height, 0, 2*pi);
G4LogicalVolume* logicFiberCore = new G4LogicalVolume(fiberCore, SiO2Core, "FiberCore");
G4VPhysicalVolume* physFiberCore = new G4PVPlacement(0, G4ThreeVector(), logicFiberCore, "FiberCore", logicFiberClad, false, 0, checkOverlaps);
G4MaterialPropertiesTable *mptCore = new G4MaterialPropertiesTable();
mptCore->AddProperty("RINDEX", energy, rindexCore, 2, true, true);
SiO2Core->SetMaterialPropertiesTable(mptCore);
*/
return physWorld;
}
The two pointers pptSiO2_table and pptSiO2_nist_table are null meaning no default properties are defined ?
Thank you four your help.