Message: Re: Optical boundary process and absorption at boundary Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Optical boundary process and absorption at boundary 

Forum: Processes Involving Optical Photons
Date: 15 Aug, 2008
From: Kay Ulbrich <Kay Ulbrich>

Hello Peter,

thank you very much for another detailed answer.

Actually, I went into the stepping and decided to use a somewhat different approach not involving killing the track, but counting the number of reflections (so one can use the same simulated data for different assumptions about the absorption probability). But the important point of course is the criteria when to increase the number of reflections (or alternatively kill the track based on a certain absorption probability).

I describe, what I have done in the following and it would be nice to get a feedback.

The geometry is such, that every photon passing the boundary of the volume is lost. So the only processes, which leave them in the volume are

* TotalInternalReflection
* FresnelReflection

In G4UserSteppingAction::UserSteppingAction(const G4Step* Step)

I do (excerpts, *fTheTrack is the actual track):

------------------------------------------------------------------------------------------------------------------------
fEndPoint = Step->GetPostStepPoint();
  fEndVol = fEndPoint->GetPhysicalVolume();
  if(!fEndVol)
    return;

  fStartPoint = Step->GetPreStepPoint();
  fStartVol = fStartPoint->GetPhysicalVolume();

if(fEndPoint->GetStepStatus() == fGeomBoundary) {
    fBoundaryProc = dynamic_cast<G4OpBoundaryProcess *>(ExistsProcess("OpBoundary",  fTheTrack));
    if(fBoundaryProc) {
      fBoundaryStatus = fBoundaryProc->GetStatus();
      if(fBoundaryStatus == TotalInternalReflection || fBoundaryStatus == FresnelReflection)
	IncNofReflections();
      else if(fBoundaryStatus == FresnelRefraction) 
	fTheTrack->SetTrackStatus(fStopButAlive);
     }
 }
------------------------------------------------------------------------------------------------------------------------

The function ExistsProcess(...) loops over the track's process vector and looks, whether the named process is in it. IncNofReflections() does, what it sounds like.

The if-clause "else if(fBoundaryStatus == FresnelRefraction)" serves to abandon tracks having left the volume of interest, which may speed up the program a little and makes the picture in visual mode less crowded.

Would I have to add a check for fTheTrack->GetStepLength()>kCarTolerance/2 here, too?

Thanks a lot for advice!

Kay

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

1 None: Re: Optical boundary process and absorption at boundary   (Kay Ulbrich - 15 Aug, 2008)
2 Feedback: Re: Optical boundary process and absorption at boundary   (Gumplinger Peter - 15 Aug, 2008)
 Add Message Add Message
to: "Re: Optical boundary process and absorption at boundary"

 Subscribe Subscribe

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