Message: problems with optical surfaces Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question problems with optical surfaces 

Forum: Processes Involving Optical Photons
Date: 16 Sep, 2009
From: moritz v. sivers <moritz v. sivers>

Hello everyone.

I'm having a few problems with my geant4 simulation. It is based on the example N06 and I'm simulating a cylindrical scintillator next to a small cylinder functioning as a light detector that are enclosed together in a reflective housing. the housing is also of cylindrical shape filled with air and put into the experimental hall, also filled with air. To specify the reflectivity of the housing I constructed a logical border surface of the dielectric-metal type between it and the experimental hall. However the simulation ignores this and photons are always reflected (Spike reflection when set to polished, Lobe reflection when set to ground) even at a reflectivity of zero.

The second problem I have is that my light detector does not count hits. It is specified as a sensitive detector and the surface was constructed as a dielectric-metal logical skin surface, here the specified reflectivity and efficiency work, and running the simulation I can see that absorbed photons are specified as detected. However they are not counted as hits in my hits collection. Strangely, photons that are reflected from the light detector are counted as hits (with zero energy deposition).

Finally I've got another question whether it's possible to specify different properties for different parts of a surface although they are surrounded by the same volume, because I want to give only the top surface of my cylindrical scintillator a certain roughness, while the other sides remain polished. Currently I'm doing this by creating another cylinder on top of my scintillator and defining a logical border surface between those.

I have installed version 4.9.2 with Patch01.

This is my DetectorConstruction class (sorry I couldn't attach the file properly)

#include "ExN06DetectorConstruction.hh"
#include "LenaPMTSD.hh" //
#include "G4SDManager.hh" //
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "G4Element.hh"
#include "G4ElementTable.hh"
#include "G4LogicalBorderSurface.hh"
#include "G4LogicalSkinSurface.hh"
#include "G4Box.hh"
#include "G4LogicalVolume.hh"
#include "G4RotationMatrix.hh"
#include "G4ThreeVector.hh"
#include "G4Transform3D.hh"
#include "G4PVPlacement.hh"
#include "G4OpBoundaryProcess.hh"
#include "G4Tubs.hh"

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

ExN06DetectorConstruction::ExN06DetectorConstruction()
{
  expHall_x = expHall_y = expHall_z = 0.15*m;

}

// ....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

  ExN06DetectorConstruction::~ExN06DetectorConstruction(){;}

// ....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

  G4VPhysicalVolume* ExN06DetectorConstruction::Construct()
{

// ------------- Materials -------------

  G4double a, z, density;
  G4int nelements, natoms;

// Air 
// 
  G4Element* N = new G4Element("Nitrogen", "N", z=7 , a=14.01*g/mole);
  G4Element* O = new G4Element("Oxygen"  , "O", z=8 , a=16.00*g/mole);

  G4Material* Air = new G4Material("Air", density=1.29*mg/cm3, nelements=2);
  Air->AddElement(N, 70.*perCent);
  Air->AddElement(O, 30.*perCent);

// CaWO 
//
  G4Element* Ca = new G4Element("Calcium", "Ca", z=20, a=40.078*g/mole);
  G4Element* W = new G4Element("Tungsten", "W", z=74, a=183.84*g/mole);

  G4Material* CaWO = new G4Material("CaWO", density=6.06*g/cm3, nelements=3);
  CaWO->AddElement(Ca, natoms=1);
  CaWO->AddElement(W, natoms=1);
  CaWO->AddElement(O, natoms=4);

// Vacuum 
//
  G4Material* Vacuum = new G4Material("Vacuum", density=1.e-17*g/cm3, nelements=2);
  Vacuum->AddElement(N, 70.*perCent);
  Vacuum->AddElement(O, 30.*perCent);

// Al2O3 
//
  G4Element* Al = new G4Element("Aluminium", "Al", z=13 , a=26.982*g/mole);

  G4Material* Al2O3 = new G4Material("Al2O3", density=4.03*g/cm3, nelements=2);
  Al2O3->AddElement(Al, natoms=2);
  Al2O3->AddElement(O, natoms=3);

// VM2000 (Polyethylen) //

  G4Element* C = new G4Element("Carbon", "C", z=6 , a=12.011*g/mole);
  G4Element* H = new G4Element("Hydrogen", "H", z=1 , a=1.008*g/mole);

  G4Material* VM2000 = new G4Material("VM2000", density=0.9*g/cm3, nelements=2);
  VM2000->AddElement(C, natoms=2);
  VM2000->AddElement(H, natoms=4);

//
// ------------ Generate & Add Material Properties Table ------------
//
  const G4int nEntries = 32;

  G4double PhotonEnergy[nEntries] =
            { 2.034*eV, 2.068*eV, 2.103*eV, 2.139*eV,
              2.177*eV, 2.216*eV, 2.256*eV, 2.298*eV,
              2.341*eV, 2.386*eV, 2.433*eV, 2.481*eV,
              2.532*eV, 2.585*eV, 2.640*eV, 2.697*eV,
              2.757*eV, 2.820*eV, 2.885*eV, 2.954*eV,
              3.026*eV, 3.102*eV, 3.181*eV, 3.265*eV,
              3.353*eV, 3.446*eV, 3.545*eV, 3.649*eV,
              3.760*eV, 3.877*eV, 4.002*eV, 4.136*eV };

// CaWO 
//	      
  G4double RefractiveIndex1[nEntries] =
             { 1.92, 1.92, 1.92, 1.92,
	       1.92, 1.92, 1.92, 1.92,  
	       1.93, 1.93, 1.93, 1.93	, 
	       1.94, 1.94, 1.94, 1.94, 
	       1.95, 1.95, 1.95, 1.95,
               1.96, 1.96, 1.96, 1.96,  
	       1.97, 1.97, 1.97, 1.98, 
               1.99, 1.99, 1.99, 1.99};

  G4double Absorption1[nEntries] =
           {3.448*m,  4.082*m,  6.329*m,  9.174*m, 12.346*m, 13.889*m, //
           15.152*m, 17.241*m, 18.868*m, 20.000*m, 26.316*m, 35.714*m,
           45.455*m, 47.619*m, 52.632*m, 52.632*m, 55.556*m, 52.632*m,
           52.632*m, 47.619*m, 45.455*m, 41.667*m, 37.037*m, 33.333*m,
           30.000*m, 28.500*m, 27.000*m, 24.500*m, 22.000*m, 19.500*m,
           17.500*m, 14.500*m };

  G4double ScintilFast[nEntries] =
            { 0.01, 0.05, 0.10, 0.15, 
	      0.20, 0.25, 0.30, 0.35, 
	      0.40, 0.45, 0.50, 0.55, 
	      0.60, 0.65, 0.70, 0.75, 
	      0.80, 0.90, 0.99, 1.00, 
	      0.99, 0.90, 0.80, 0.70, 
	      0.60, 0.50, 0.40, 0.30,
              0.20, 0.10, 0.10, 0.01 };
  G4double ScintilSlow[nEntries] =
             { 0.01, 0.05, 0.10, 0.15, 
	      0.20, 0.25, 0.30, 0.35, 
	      0.40, 0.45, 0.50, 0.55, 
	      0.60, 0.65, 0.70, 0.75, 
	      0.80, 0.90, 0.99, 1.00, 
	      0.99, 0.90, 0.80, 0.70, 
	      0.60, 0.50, 0.40, 0.30,
              0.20, 0.10, 0.10, 0.01 };
  G4MaterialPropertiesTable* myMPT1 = new G4MaterialPropertiesTable();
  myMPT1->AddProperty("RINDEX",       PhotonEnergy, RefractiveIndex1,nEntries);
  myMPT1->AddProperty("ABSLENGTH",    PhotonEnergy, Absorption1,     nEntries);
  myMPT1->AddProperty("FASTCOMPONENT",PhotonEnergy, ScintilFast,     nEntries);
  myMPT1->AddProperty("SLOWCOMPONENT",PhotonEnergy, ScintilSlow,     nEntries);

  myMPT1->AddConstProperty("SCINTILLATIONYIELD",15./MeV);
  myMPT1->AddConstProperty("RESOLUTIONSCALE",1.0);
  myMPT1->AddConstProperty("FASTTIMECONSTANT", 1000.*ns);
  myMPT1->AddConstProperty("SLOWTIMECONSTANT",500000.*ns);
  myMPT1->AddConstProperty("YIELDRATIO",0.99);

  CaWO->SetMaterialPropertiesTable(myMPT1);

// Air 
//
  G4double RefractiveIndex2[nEntries] =
            { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00 };

  G4MaterialPropertiesTable* myMPT2 = new G4MaterialPropertiesTable();
  myMPT2->AddProperty("RINDEX", PhotonEnergy, RefractiveIndex2, nEntries);

  Air->SetMaterialPropertiesTable(myMPT2);

// Vacuum 
//
  G4double RefractiveIndex3[nEntries] =
            { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
              1.00, 1.00, 1.00, 1.00 };

  G4MaterialPropertiesTable* myMPT3 = new G4MaterialPropertiesTable();
  myMPT3->AddProperty("RINDEX", PhotonEnergy, RefractiveIndex3, nEntries);

  Vacuum->SetMaterialPropertiesTable(myMPT3);

//VM2000  
//
 G4double RefractiveIndex4[nEntries] =
            { 1.5, 1.52,  1.53, 1.54,  1.55,
              1.5,  1.6, 1.6,  1.6, 1.6,
              1.6, 1.61, 1.6,   1.63, 1.66,
              1.66, 1.66, 1.66, 1.66, 1.67,
              1.68, 1.68,  1.68, 1.68,  1.69,
              1.69, 1.69,  1.69, 1.70,  1.70,
              1.71,   1.71};

  G4MaterialPropertiesTable* myMPT4 = new G4MaterialPropertiesTable();
  myMPT4->AddProperty("RINDEX", PhotonEnergy, RefractiveIndex4, nEntries);

  VM2000->SetMaterialPropertiesTable(myMPT4);

// Al2O3 
//
  G4double RefractiveIndex5[nEntries] =
            { 1.77, 1.77, 1.77, 1.77, 
	      1.77, 1.77, 1.77, 1.77, 
	      1.78, 1.78, 1.78, 1.78, 
	      1.78, 1.78, 1.78, 1.78, 
	      1.78, 1.78, 1.78, 1.78, 
	      1.79, 1.79, 1.79, 1.79, 
	      1.80, 1.80, 1.80, 1.80,
              1.81, 1.81, 1.81, 1.81 };

   G4double Absorption5[nEntries] =
           {3.448*m,  4.082*m,  6.329*m,  9.174*m, 12.346*m, 13.889*m, 
           15.152*m, 17.241*m, 18.868*m, 20.000*m, 26.316*m, 35.714*m,
           45.455*m, 47.619*m, 52.632*m, 52.632*m, 55.556*m, 52.632*m,
           52.632*m, 47.619*m, 45.455*m, 41.667*m, 37.037*m, 33.333*m,
           30.000*m, 28.500*m, 27.000*m, 24.500*m, 22.000*m, 19.500*m,
           17.500*m, 14.500*m };

  G4MaterialPropertiesTable* myMPT5 = new G4MaterialPropertiesTable();
  myMPT5->AddProperty("RINDEX", PhotonEnergy, RefractiveIndex5, nEntries);
  myMPT5->AddProperty("ABSLENGTH",    PhotonEnergy, Absorption5,     nEntries);

  Vacuum->SetMaterialPropertiesTable(myMPT5);

// ------------- Volumes --------------

// The experimental Hall //

  G4Box* expHall_box = new G4Box("World",expHall_x,expHall_y,expHall_z);

  G4LogicalVolume* expHall_log
    = new G4LogicalVolume(expHall_box,Air,"World",0,0,0);

  G4VPhysicalVolume* expHall_phys
    = new G4PVPlacement(0,G4ThreeVector(),expHall_log,"World",0,false,0);

// reflective housing //

    G4double innerRadiusCC = 0.*cm;
    G4double outerRadiusCC = 5.*cm;
    G4double hightCC = 6.*cm;
    G4double startAngleCC = 0.*deg;
    G4double spanningAngleCC = 360.*deg;

  G4Tubs* reflHousing_tubs = new G4Tubs("Housing",
 		        innerRadiusCC,
			outerRadiusCC,
			hightCC,
			startAngleCC,
			spanningAngleCC);

  G4LogicalVolume* reflHousing_log
    = new G4LogicalVolume(reflHousing_tubs,Air,"Housing",0,0,0);

  G4VPhysicalVolume* reflHousing_phys =
      new G4PVPlacement(0,G4ThreeVector(),reflHousing_log,"Housing",
                        expHall_log,false,0);

// scintillating crystal //

    G4double innerRadius = 0.*cm;
    G4double outerRadius = 4.*cm;
    G4double hight = 4.*cm;
    G4double startAngle = 0.*deg;
    G4double spanningAngle = 360.*deg;

    G4Tubs* crystal_tubs = new G4Tubs("Crystal", 
                                       innerRadius,
    				       outerRadius,
				       hight,
				       startAngle,
					spanningAngle);

    G4LogicalVolume* crystal_log
      = new G4LogicalVolume(crystal_tubs,CaWO,"Crystal",0,0,0);

    G4VPhysicalVolume* crystal_phys
      = new G4PVPlacement(0,G4ThreeVector(),crystal_log,"Crystal",
                        reflHousing_log,false,0);

// the light detector //

   G4double innerRadiusLd = 0.*cm;
   G4double outerRadiusLd = 4.*cm;
   G4double hightLd = 0.025*cm;
   G4double startAngleLd = 0.*deg;
   G4double spanningAngleLd = 360.*deg;

   G4Tubs* light_detector_tubs =
	new G4Tubs("light_detector", 
		    innerRadiusLd,
	 	    outerRadiusLd,
		    hightLd,
		    startAngleLd,
		    spanningAngleLd);

  light_detector_log =
	new G4LogicalVolume(light_detector_tubs,Al2O3,"light_detector",0,0,0);

  G4VPhysicalVolume* light_detector_phys =
    	 new G4PVPlacement(0,G4ThreeVector(0*cm,0*cm,-4.5*cm),light_detector_log,"light_detector",
                        reflHousing_log,false,0);

// rough side of crystal //

   G4double innerRadiusrS = 0.*cm;
   G4double outerRadiusrS = 4.*cm;
   G4double hightrS = 0.1*cm;
   G4double startAnglerS = 0.*deg;
   G4double spanningAnglerS = 360.*deg;

   G4Tubs* roughSide_tubs =
	new G4Tubs("rough_Side", 
		    innerRadiusrS,
	 	    outerRadiusrS,
		    hightrS,
		    startAnglerS,
		    spanningAnglerS);

  G4LogicalVolume* roughSide_log =
	new G4LogicalVolume(roughSide_tubs,Air,"rough_Side",0,0,0);

  G4VPhysicalVolume* roughSide_phys =
    	 new G4PVPlacement(0,G4ThreeVector(0*cm,0*cm,-4.1*cm),roughSide_log,"roughSide",
                        reflHousing_log,false,0);

//	------------- Surfaces --------------
//
// crystal rough surface  
//
  G4OpticalSurface* OpCrystalSurface = new G4OpticalSurface("CrystalSurface");
  OpCrystalSurface->SetType(dielectric_dielectric);
  OpCrystalSurface->SetFinish(ground);
  OpCrystalSurface->SetModel(glisur);
  OpCrystalSurface->SetPolish(0.1);

  G4LogicalBorderSurface* CrystalSurface = 
                                 new G4LogicalBorderSurface("CrystalSurface",
                                 crystal_phys,roughSide_phys,OpCrystalSurface);

// housing surface  
//
  G4OpticalSurface* OpHousingSurface = new G4OpticalSurface("HousingSurface",glisur,polished,dielectric_metal);

  G4LogicalBorderSurface* HousingSurface = 
	  new G4LogicalBorderSurface("HousingSurface", reflHousing_phys,expHall_phys,OpHousingSurface);

// light detector surface //

  G4OpticalSurface* OpDetectorSurface= new G4OpticalSurface("DetectorSurface",glisur,polished,dielectric_metal);

	  G4LogicalSkinSurface* DetectorSurface = new G4LogicalSkinSurface("DetectorSurface",light_detector_log,OpDetectorSurface);

// -----------Generate & Add Material Properties Table attached to the optical surfaces---------
//
  const G4int num = 2;
  G4double Ephoton[num] = {2.034*eV, 4.136*eV};

// housing surface 
//
  G4double ReflectivityRHS[num] = {0.0, 0.0};

  G4MaterialPropertiesTable* myST2 = new G4MaterialPropertiesTable();

  myST2->AddProperty("REFLECTIVTY", Ephoton, ReflectivityRHS, num);

  OpHousingSurface->SetMaterialPropertiesTable(myST2);

// light detector surface //

  G4double ReflectivityLD[num] = {.08, .08};
  G4double EfficiencyLD[num]   = {1.0, 1.0};

  G4MaterialPropertiesTable *myST3 = new G4MaterialPropertiesTable();

  myST3->AddProperty("REFLECTIVITY", Ephoton, ReflectivityLD, num);
  myST3->AddProperty("EFFICIENCY",   Ephoton, EfficiencyLD,   num);

  OpDetectorSurface->SetMaterialPropertiesTable(myST3);

// sensitive detector //

  G4SDManager* SDman = G4SDManager::GetSDMpointer();

    G4String PMTSDname = "light_detector_sd";
    LenaPMTSD* aPMTSD = new LenaPMTSD( PMTSDname);
    aPMTSD->SetType(0);
    SDman->AddNewDetector( aPMTSD );

// always return the physical World 
  return expHall_phys;
}

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Feedback: Re: problems with optical surfaces   (Gumplinger Peter - 18 Sep, 2009)
(_ Ok: Re: problems with optical surfaces   (moritz v. sivers - 23 Sep, 2009)
 Add Message Add Message
to: "problems with optical surfaces"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews