Message: surface properties of copies of physical volumes Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question surface properties of copies of physical volumes 

Forum: Processes Involving Optical Photons
Date: 19 Jul, 2010
From: <Mike>

Hello,

I created a detector consisting of several cells. At first I created a cell with its logical volume, than I created a physical volume like in the following code.

G4VPhysicalVolume* det_phys;   
for (G4int j = 0; j < 10; j++)
    {
	yTlate=-det/2+j*length;
	for (G4int i = 0; i < 10; i++)
	{
	    xTlate=-det/2+i*length;
	    copyNo=j*10+i+1;

	     det_phys = new G4PVPlacement(0,G4ThreeVector(xTlate,yTlate,0),det_log,"det_cell",     
                                 expHall_log,false,copyNo);
	}
    }

After creating an optical surface between det_phys and another physical volume (box_phys), which tuches one hole side of det_phys:

 G4OpticalSurface* Opdetphys = new G4OpticalSurface("detphys");

  G4LogicalBorderSurface* Surfacedetphys = 
                                 new G4LogicalBorderSurface("detphys",
                                 box_phys,det_phys,Surfacedetphys);

and setting the optical properties of the surface

Opdetphys->SetModel(..); Opdetphys->SetType(..); Opdetphys->SetFinish(..);

only the cell with the last copyNo in the loop, created in det_phys = new G4PVPlacement, uses this optical surface property. The other cells are using the default surface property. My intention is that all cells adopt this surface property.

Does someone know if the code should work this way or not? If not, what would be the simplest way to program a code which works?

Thanks a lot

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

1 Feedback: Re: surface properties of copies of physical volumes   (Gumplinger Peter - 19 Jul, 2010)
(_ Feedback: Re: surface properties of copies of physical volumes   (Mike - 20 Jul, 2010)
 Add Message Add Message
to: "surface properties of copies of physical volumes"

 Subscribe Subscribe

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