Multiple Optical Surface

Hi,

I’m trying to understand if I wrote correctly this part of work about optical surface. I have a Cylinder (white) of Teflon, a Integrating sphere (blue) of water and a spherical cap (green) of Olive Oil.

So, the surface that i need are Teflon-Water and Water-Oil and Oil Teflon, right? If this is right, i wrote that code:

//first surface
  G4OpticalSurface* OpTeflonWaterSurface = new G4OpticalSurface("TeflonWaterSurface");
  

	 OpTeflonWaterSurface->SetType(dielectric_dielectric);
	 OpTeflonWaterSurface->SetModel(unified);
	 OpTeflonWaterSurface->SetFinish(groundfrontpainted);

 //Superficie di contatto tra Cilindro (teflon) e sfera integratrice (acqua)
 /*G4LogicalBorderSurface* TeflonWaterSurface =*/ new
    G4LogicalBorderSurface("LSB_TeflonWaterSurface", physSferaIntegratrice, physCilindro, OpTeflonWaterSurface);

  
  G4MaterialPropertiesTable* TEFLON_MPT = new G4MaterialPropertiesTable();


  std::vector<G4double> energy = {3.98*eV, 4.00*eV, 4.02*eV, 4.04*eV, 4.06*eV, 4.08*eV, 4.10*eV, 4.12*eV, 4.14*eV, 4.16*eV, 4.18*eV, 4.20*eV, 4.22*eV, 4.24*eV, 4.26*eV, 4.28*eV, 4.30*eV, 4.32*eV, 4.34*eV, 4.36*eV, 4.38*eV, 4.40*eV, 4.42*eV, 4.44*eV, 4.46*eV, 4.48*eV, 4.50*eV, 4.52*eV, 4.54*eV, 4.56*eV, 4.58*eV, 4.60*eV, 4.62*eV, 4.64*eV, 4.66*eV, 4.68*eV, 4.70*eV, 4.72*eV, 4.74*eV, 4.76*eV, 4.78*eV, 4.80*eV, 4.82*eV, 4.84*eV, 4.86*eV, 4.88*eV, 4.90*eV, 4.92*eV, 4.94*eV, 4.96*eV};
  std::vector<G4double> reflectivity = {0.984, 0.984, 0.984, 0.983, 0.983, 0.983, 0.983, 0.982, 0.982, 0.981, 0.980, 0.980, 0.979, 0.979, 0.978, 0.978, 0.977, 0.977, 0.976, 0.976, 0.975, 0.974, 0.974, 0.973, 0.973, 0.972, 0.972, 0.971, 0.971, 0.97, 0.970, 0.969, 0.968, 0.968, 0.967, 0.967, 0.966, 0.966, 0.964, 0.964, 0.963, 0.963, 0.962, 0.961, 0.961, 0.960, 0.960, 0.959, 0.959, 0.959};
  std::vector<G4double> trasmittance = {0.016, 0.016, 0.016, 0.017, 0.017, 0.017, 0.017, 0.018, 0.018, 0.019, 0.02, 0.02, 0.021, 0.021, 0.022, 0.022, 0.023, 0.023, 0.024, 0.024, 0.025, 0.026, 0.026, 0.027, 0.027, 0.028, 0.028, 0.029, 0.029, 0.03, 0.03, 0.031, 0.032, 0.032, 0.033, 0.033, 0.034, 0.034, 0.036, 0.036, 0.037, 0.037, 0.038, 0.039, 0.039, 0.04, 0.04, 0.041, 0.041, 0.041};
  std::vector<G4double> rindex_teflon = {1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 1.3};
  std::vector<G4double> absorption = {1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um, 1.0*um};       


  TEFLON_MPT->AddProperty("RINDEX", energy, rindex_teflon);
  TEFLON_MPT->AddProperty("ABSLENGTH", energy, absorption);
  TEFLON_MPT->AddProperty("REFLECTIVITY", energy, reflectivity);
  TEFLON_MPT->AddProperty("TRANSMITTANCE", energy, trasmittance);


  teflon_mat->SetMaterialPropertiesTable(TEFLON_MPT);
  
  OpTeflonWaterSurface->SetMaterialPropertiesTable(TEFLON_MPT);
  
  
  G4MaterialPropertiesTable* Water_MPT = new G4MaterialPropertiesTable();


  std::vector<G4double> rindex_water = {1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34, 1.34};
  std::vector<G4double> absorption_water = {344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm};
  //std::vector<G4double> reflectivity_water = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; 
  //std::vector<G4double> trasmittance_water = {100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100}; 
  
  
  Water_MPT->AddProperty("RINDEX", energy, rindex_water);
  Water_MPT->AddProperty("ABSLENGTH", energy, absorption_water);
  //Water_MPT->AddProperty("REFLECTIVITY", energy, reflectivity_water);
  //Water_MPT->AddProperty("TRANSMITTANCE", energy, trasmittance_water);
  
  
  water_mat->SetMaterialPropertiesTable(Water_MPT);

  OpTeflonWaterSurface->SetMaterialPropertiesTable(Water_MPT);


   //second surface
  G4OpticalSurface* PolWaterSurface = new G4OpticalSurface("PolWaterSurface");

  //Superficie di contatto tra calotta inquinante (olio) e sfera integratrice (acqua)
 /*G4LogicalBorderSurface* PolWaterSurface =*/ new
    G4LogicalBorderSurface("LSB_PolWaterSurface", physSferaIntegratrice, physCalotta_Olio_oliva, PolWaterSurface);
  

  PolWaterSurface->SetType(dielectric_dielectric);
  PolWaterSurface->SetModel(unified);
  PolWaterSurface->SetFinish(polished); //controllare se dalambertiano o speculare


  std::vector<G4double> rindex_olio_oliva = {1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47, 1.47};
  std::vector<G4double> absorption_olio_oliva = {344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm, 344.8*cm};
  //std::vector<G4double> reflectivity_olio_oliva = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; 
  //std::vector<G4double> trasmittance_olio_oliva = {100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100}; 

  
  G4MaterialPropertiesTable* Olio_MPT = new G4MaterialPropertiesTable();

  Olio_MPT->AddProperty("RINDEX", energy, rindex_olio_oliva);
  Olio_MPT->AddProperty("ABSLENGTH", energy, absorption_olio_oliva);
  //Olio_MPT->AddProperty("REFLECTIVITY", energy, reflectivity_olio_oliva);
  //Olio_MPT->AddProperty("TRANSMITTANCE", energy, trasmittance_olio_oliva);

  Olio_Oliva->SetMaterialPropertiesTable(Olio_MPT);

  PolWaterSurface->SetMaterialPropertiesTable(Olio_MPT);
  PolWaterSurface->SetMaterialPropertiesTable(Water_MPT);

  
  //third surface
  G4OpticalSurface* OpTeflonOilSurface = new G4OpticalSurface("TeflonOilSurface");
  

   OpTeflonWaterSurface->SetType(dielectric_dielectric);
   OpTeflonWaterSurface->SetModel(unified);
   OpTeflonWaterSurface->SetFinish(groundfrontpainted);

 //Superficie di contatto tra Cilindro (teflon) e sfera integratrice (acqua)
 /*G4LogicalBorderSurface* TeflonWaterSurface =*/ new
    G4LogicalBorderSurface("LSB_TeflonOilSurface", physCalotta_Olio_oliva, physCilindro, OpTeflonOilSurface);


  OpTeflonOilSurface->SetMaterialPropertiesTable(Olio_MPT);
  OpTeflonOilSurface->SetMaterialPropertiesTable(TEFLON_MPT);

It is right? Of course, from oil to water, or viceversa, the model is polished in order to take into account only the snell equation.