| Summary: | OpBoundaryProcess doesn't behave as claimed in the manual | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | ob214 |
| Component: | processes/optical | Assignee: | gum |
| Status: | CLOSED FIXED | ||
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | other | ||
| Hardware: | PC | ||
| OS: | Linux | ||
|
Description
ob214
2003-01-04 19:57:53 CET
(1) If you specify the UNIFIED model, define an optical surface with an index of refraction, and the "backpainted" surface finish, two boundary effects are simulated. The first is between the original medium and the thin surface layer. The second is Lambertian reflection off the 'paint' at the far side of the thin layer. It is not possible to simulate a thin film between two dielectric media by simply specifying an optical surface. In such a case, the thin film has to be defined as a true G4 volume and give it an index of refraction. The G4Navigator will then track the optical photon across two boundaries: n1 | n_layer | n2 (or again n1). For example, if you wanted to simulate the silicon oil between the PMT glass and your scintillator, you'd have to define the silicon oil film as a true G4 volume. I agree, the documentation should be more precise and clearly state that 'backpainted' finish assumes that a metallic paint (Lambertian Reflection) is the second boundary. (2) It is true that the thin layer index is only used when the second material has no index define, else the second material's index is used. I agree, the optical surface index could probably take precedence instead without ill effect. (3) I also agree that by requiring the index of refraction be different on both sides of an intersection, an unnecessary complication arises when an array of crystals touch, each of which is wrapped but the wrapping and thin layer are not implemented as physical G4 volumes but as part of an optical surface. - The check is there to bypass the process in cases where the index of refraction is equal on both sides of the boundary. Unless I can think of a problem, I shall change the code so that the process returns only if, in addition, no optical surface was defined as you have suggested. (4) Thanks for pointing out that Rindex2 can be undefined if the user didn't specify an index for the second medium and didn't specify one for the thin layer. As a general comment, another solution to your present problem would be to allow for a thin air space between your different (wrapped) crystals by placing slightly smaller volumes into an array. In this case, the G4Navigator would find the air space with no index defined, and use the optical surface as expected. Down to the allowed precision of the G4Navigator, there probably is a thin air space between crystal cases. I have adopted the following logic:
Material1 -> Rindex1
if(!Rindex1) kill the photon - return (as before)
Defaults (as before)
--------------------
theModel = glisur;
theFinish = polished;
G4OpticalSurfaceType type = dielectric_dielectric;
if(OpticalSurface){
type = OpticalSurface->GetType();
theModel = OpticalSurface->GetModel();
theFinish = OpticalSurface->GetFinish();
if(theFinish == ...backpainted){
OpticalSurface -> Rindex2
if(!Rindex2) kill the photon - return
}
}
if (type == dielectric_dielectric){
if(theFinish == 'polished' || 'ground') {
// e.g. no 'paint' and not 'dielectric_metal'
if(Material1 == Material2)return
Material2 -> Rindex2
if(!Rindex2)kill photon - return
}
}
|