How to get material properties?


I’m working on photons transport in optical fiber core.
I got different behaviour for optical photons transport in fiber’s core and clad made of silicon dioxide.
I define Silicone dioxide for both clad and core in the same way and I then set different refractive index but whether I define SiO2 using



SiO2 = new G4Material(“SiO2”, 2.2, 2);
SiO2->AddElement(nist->FindOrBuildMaterial(“Si”), 1)
SiO2->AddElement(nist->FindOrBuildMaterial(“O”), 2)

the photons behaviour is rather different.

In the first case (SiO2_builtin definition) photons seems to get absorbed after few mm within fiber’s core or clad with no reflexion at the clad/core boundary and in the other case (SiO2 definition) photons propagates and get reflected at the clad/core boundary.

I’ve tried to check the property table for both materials:

G4MaterialProperties *pptSiO2_table = new G4MaterialPropertiesTable();
pptSiO2_table = SiO2->GetMaterialPropertiesTable();
G4MaterialProperties *pptSiO2_nist_table = new G4MaterialPropertiesTable();
pptSiO2_nist_table = SiO2_nist->GetMaterialPropertiesTable();

but in each cases the pptSiO2_table pointer printf as 0 and I can’t call the GetProperties() function

Could someone tell me how to access the material properties or tell me if “G4_/Material/” types have default materials properties that would disable optical photons transport ?

Thanks for your help

By default materials don’t have a material properties table. The table needs to be added manually. See the optical examples, e.g. extended/optical/OpNovice.

It is possible to add the refractive index for fused silica, and 3 other common materials, from an internal table. It is done for example here:

with the values given here:

Hi, Thank you for your answer.

But how do you explain the different optical photon behaviour in each cases ?

Could you post how you define the material properties tables.

Hi sure,

I define the material properties table this way :

Well, that’s not defining a material properties table. Have a look at the examples e.g. here:
and documentation, here:

Indeed, my bad, well the way I defined my material properties table is not different from the cases you juste send me :

That’s a strange way of defining energy! This has been posted a few times in the forum, with a similar problem. IIRC, the issue was sorting the energies from lowest to highest, which you’ve done. Still, it might be useful to check previous posts. There may be an issue with wherever you’re getting that code from.

I’m still confused as to what you are doing though. What (classes) are SiO2clad and SiO2core? Why do you assign MPT to them, then call e.g.

If you still have an issue, please post all the relevant MPT code, as text not an image (so I can comment on it).


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);

  // 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);
  // 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);
  return physWorld;

The two pointers pptSiO2_table and pptSiO2_nist_table are null meaning no default properties are defined ?

Thank you four your help.

That is correct. You will need to define MPT and assign them to the materials, as you do with e.g. SiO2clad.

Hi, OK thank you for your help