Message: Problems with the G4OpticalSurfaces Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Sad Problems with the G4OpticalSurfaces 

Keywords: Problems with implementing G4OpticalSurface for multiple tubes.
Forum: Processes Involving Optical Photons
Date: 11 Jun, 2003
From: Rohit Nambyar <rohitn@iastate.edu>

Hello:

I am having a problem with G4OpticalSurfaces in my Detector geometry. I 
have created a Spaghetti Calorimeter, with the help of G4Box and placing 
multiple G4Tubs into the box, with the help of G4UnionSolid and G4PVPlacement. 

The tubes are made of Air and the Box is made up of Lead(Pb). I wanted to make 
the inside of the tube to be reflective using G4OpticalSurface, so that
it would reflect the optical photons that are going into the box. But for some
reason the tubes do not seem to be reflecting the opticalphotons. The 
Opticalphotons just seem to stop (maybe it gets absorbed) when they touch 
the walls of the tube. 

I have tried both the methods of using G4LogicalSkinSurface and G4LogicalBorderSurface,
but with no success at all. I tried to implement the G4logicalSkinSurface
with only one tube in the box, and the opticalphotons were being reflected in the tube quite
normally. 

I suspect that my problem is because I am using multiple tubes,and for some reason the
the G4OpticalSurfaces is not working with multiple tubes. Each 'Tube'
is actually a cylinder, with 0 inner radius and fixed outer radius.

If you could please help with this problem I am having, Or tell me why the
Optical properties work, when there is only one tube in the box and does
not work when there are multiple tubes in the box. Thanks in advance, your help is 
greatly appreciated.

Thank you

Rohit Nambyar

Here is the necesarry code snippets that show the problem that I am having.



// Here  materials and the reflective properties being generated.
// I have already defined the materials Air, Water, Pb, Vacuum above 
// in the program.
//------------ Generate & Add Material Properties Table ------------
  
  const G4int NUMENTRIES = 32;

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

  G4double RINDEX1[NUMENTRIES] =
            { 1.3435, 1.344,  1.3445, 1.345,  1.3455,
              1.346,  1.3465, 1.347,  1.3475, 1.348,
              1.3485, 1.3492, 1.35,   1.3505, 1.351,
              1.3518, 1.3522, 1.3530, 1.3535, 1.354,
              1.3545, 1.355,  1.3555, 1.356,  1.3568,
              1.3572, 1.358,  1.3585, 1.359,  1.3595,
              1.36,   1.3608};
  
  G4double n = 1.001;
  G4double RINDEX2[NUMENTRIES] = {n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n};
  
  n = 1.00;
  G4double RINDEX3[NUMENTRIES] = {n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n};
  G4double R = 0.9;
  G4double Reflectivity[NUMENTRIES]= {R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R};
	       
  G4MaterialPropertiesTable *myMPT1 = new G4MaterialPropertiesTable();
  myMPT1->AddProperty("RINDEX", PPCKOV, RINDEX1, NUMENTRIES);

  Water->SetMaterialPropertiesTable(myMPT1);
  
  G4MaterialPropertiesTable *myMPT2 = new G4MaterialPropertiesTable();
  G4MaterialPropertiesTable *myMPT3 = new G4MaterialPropertiesTable();
  
  myMPT2->AddProperty("RINDEX", PPCKOV, RINDEX2, NUMENTRIES);  
  myMPT3->AddProperty("RINDEX", PPCKOV, RINDEX3, NUMENTRIES);

  Air->SetMaterialPropertiesTable(myMPT2);
  Vacuum->SetMaterialPropertiesTable(myMPT3); 

  G4MaterialPropertiesTable *mirror_mt = new G4MaterialPropertiesTable();
  mirror_mt->AddProperty("REFLECTIVITY",PPCKOV,Reflectivity,NUMENTRIES);

  G4MaterialPropertiesTable *mirror_mt_sd= new G4MaterialPropertiesTable();
  mirror_mt_sd->AddProperty("REFLECTIVITY",PPCKOV,Reflectivity,NUMENTRIES);

// Here is the box where the tubes are inserted later on.
/-----------------------------------
//  Carrier ==> The Lead Box
//-----------------------------------

  G4double CarrierX = 22.*cm; 
  G4Box* solidCarrier = new G4Box("Carrier",CarrierX/2,CalorSizeY/2,CalorSizeZ/2);
  G4LogicalVolume* logicCarrier = new G4LogicalVolume(solidCarrier ,Pb, "Carrier",0,0,0);  // Material = Air "Tracker"
  G4VPhysicalVolume*  physiCarrier = new G4PVPlacement(0,                 // no rotation
  				                       positionTracker,   // at (x,y,z)
				  		       "Carrier",         // its name
				                       logicCarrier,      // its logical volume
				                       physiTracker,      // its mother  volume
				                       false,             // no boolean operations
				                       0);                // no particular field 

 // Here are the optical properties of the box.
  G4OpticalSurface* OpCarrierSurface = new G4OpticalSurface("CarrierSurface",unified,polished,dielectric_metal);
  G4LogicalBorderSurface* CarrierSurface = new G4LogicalBorderSurface("CarrierSurface",
				                                      physiCarrier,physiWorld,
				                                      physiCarrier,physiTracker,
 				                                      OpCarrierSurface);
  OpCarrierSurface->SetMaterialPropertiesTable(mirror_mt);

// Here are the tubes themselves
//------------------------------------------
//   Rods
//------------------------------------------

 // These are the tubes that are placed inside the box!
 
  G4int num;
  G4double Radius;
  G4double step;
  G4double delta;

  num = 1;             // The number of tubes being placed in the y direction.
  delta = 13.8*mm;     // The distance between the tubes in the y axis direction.
  step = delta;
  Radius = 2.*mm;

  G4Tubs* s_rod;
  G4LogicalVolume* l_rod;
  G4VPhysicalVolume* ph_rod;

  G4VSolid* temp; G4VSolid* temp2;
  G4VSolid* temp1; G4VSolid* rods_1;G4VSolid* rods_2;

  G4RotationMatrix rot;
  rot.rotateY(0.0*deg);

// Rods 1
//----begin----

  s_rod = new G4Tubs("Rod",0.,Radius,15.*cm/*CarrierX/2*/,0.*rad,2*pi*rad);
  temp = s_rod;

  G4int k;
  for(k=1;k<=num;k++)
  {
     temp2 = new G4UnionSolid("dva",s_rod,temp,G4Transform3D(rot,G4ThreeVector(0.*mm,delta,0.*mm)));
     temp = temp2;
  }
  
  rods_1=temp;
  
  G4VSolid* s_layer;
  G4VSolid* temp3;
  s_layer=temp; 
  temp3=temp;
  
  for(k=1;k<=20;k++)
  {
     temp2 = new G4UnionSolid("Detector",s_layer,temp3,G4Transform3D(rot,G4ThreeVector(10.*mm,0.*mm,0.*mm)));
     temp3=temp2;
  }
  
  l_rod = new G4LogicalVolume(temp3,Air,"Rod"); // Here I am changing the material of the rod from Pb to Air.
  ph_rod = new G4PVPlacement( 0,G4ThreeVector(-CarrierX/2+1.*cm,-90.,0.),"Rod",l_rod,physiCarrier,false,0);
    
  
// Here is where I am defining the optical properties of the tubes. And 
// Here is where the problem is. Am I implementing the G4LogicalSkinSurface
// or the G4LogicalBorderSurface. As you can see I have tried both methods
// but both give me the same problems. I will show you how I have implemented both
// of course when I test the code I comment the other one out.
   

  
  G4OpticalSurface* SkinSurface = new G4OpticalSurface("SkinSurf",unified,polished,dielectric_metal);
 
// HERE ARE THE TWO THINGS I HAVE TRIED ANF FAILED AT IMPLEMENTING. 
// 1). Using the G4LogicalSkinSurface  
  G4LogicalSkinSurface* CavitySkin = new G4LogicalSkinSurface("CavitySkin",l_rod,SkinSurface);
  
// 2). Using the G4logicalBorderSurfa=ce  
  G4LogicalBorderSurface* RodSurface = new G4LogicalBorderSurface("AbsSurface",physiCarrier,ph_rod,OpRodSurface);
  
  SkinSurface->SetMaterialPropertiesTable(mirror_mt);



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

1 None: Re: Problems with the G4OpticalSurfaces   (Peter Gumplinger - 11 Jul, 2003)
(_ Question: Re: Problems with the G4OpticalSurfaces   (Meiling Yu - 28 Jul, 2003)
(_ Disagree: Re: Problems with the G4OpticalSurfaces   (Peter Gumplinger - 28 Jul, 2003)
(_ None: Re: Problems with the G4OpticalSurfaces   (Meiling Yu - 28 Jul, 2003)
 Add Message Add Message
to: "Problems with the G4OpticalSurfaces"

 Subscribe Subscribe

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