Problem 1040

Summary: problem detecting optical photons in G4 9.2
Product: Geant4 Reporter: Roberto Stroili <roberto.stroili>
Component: processes/scoringAssignee: gum
Status: RESOLVED FIXED    
Severity: trivial CC: gum
Priority: P5    
Version: 9.2   
Hardware: PC   
OS: Linux   

Description Roberto Stroili 2009-01-13 15:34:03 CET
I just migrated to G4 9.2 and I found a problem on a simulation I'm developing.
I'm developing a simulation to study time resolutions in optical devices, the simulation was working eith G4 9.1 with patches 1, 2 and 3, since I switched to 9.2 I don't get any photon detected, if I look at the boundary status on the sensitive detector I get Absorbed (code 8) while running with previous releases of G4 I get Detection(code 9), the boundary status come from:

  //find the boundary process only once
  if ( !boundary ) {
    G4ProcessManager* pm
    = theStep->GetTrack()->GetDefinition()->GetProcessManager();
    G4int nprocesses = pm->GetProcessListLength();
    G4ProcessVector* pv = pm->GetProcessList();
    G4int i;
    for ( i = 0;i < nprocesses;i++ ) {
      if ( ( *pv ) [i]->GetProcessName() == "OpBoundary" ) {
        boundary = ( G4OpBoundaryProcess* ) ( *pv ) [i];
        break;
      }
    }
  }

and then

  boundaryStatus = boundary->GetStatus();


The code I wrote is mainly based on the example LXe, I tested also this example and I see the same behaviour, no photons detected in the PM's.
I'm running on Fedora10 with gcc 4.3.2 (both the working 9.1.p0x amd the non working 9.2), the build of the two releases was done exactly in the same way:

  ./Configure -build -e -d -O -D g4install=`pwd` -D g4include=`pwd`/include \
        -D g4clhep_base_dir=$CLHEP_BASE_DIR -D g4lib_build_static=y \
        -D g4lib_use_static=y -D g4global=y -D g4granular=n -D g4data=$g4data \
        -D g4vis_use_openglx=y -D g4vis_use_openglxm=y -D g4debug=y \
        -DG4VERBOSE


best regards

   Roberto
Comment 1 gum 2009-01-15 03:21:01 CET
Thanks Robert,

for your thorough bug report. Turns out a line was left in the code which should have been commented out. Sorry, for this plunder!

If you have access to your sources, please comment out this line:

http://www-geant4.kek.jp/lxr/source/processes/optical/src/G4OpBoundaryProcess.cc#L597

The fix in the distributed code will have to wait for the first patch.

Thanks again, Peter