Re: possible bug in TG4OpticalPhysics.cxx (geant4 vmc v2.8)

From: Ivana Hrivnacova <Ivana.Hrivnacova_at_cern.ch>
Date: Tue, 11 May 2010 10:22:21 +0200


Hi Corey,

The bug is already fixed in the development version; the new tag, v 2.9 including this fix, will be released soon (I hope still during this week).
We can also make a patched version for 2.8 including this fix, if needed.

Thank you for pointing at this problem.

Best regards,

Ivana

Corey Reed wrote:
> Hi,
>
> I was using Geant4 VMC version 2.8 with emStandard+optical, when I
> noticed (from the output of /mcPhysics/dumpAllProcess):
>
> Particle: opticalphoton
> Process Name Transportation : Type[Transportation] : SubType[-1]
> Process Name OpAbsorption : Type[Optical] : SubType[31]
> Process Name OpAbsorption : Type[Optical] : SubType[31]
> Process Name OpAbsorption : Type[Optical] : SubType[31]
> Process Name StepLimiter : Type[NotDefined] : SubType[-1]
>
> I thought it was strange that absorption was listed 3 times.
>
> A quick look at TG4OpticalPhysics.cxx reveals what seems to be an easily
> fixable bug inside TG4OpticalPhysics::ConstructProcess
>
> if ( particleName == "opticalphoton" ) {
> for ( G4int i=kAbsorption; i<=kBoundary; i++ ) {
> // Absorption, Raileigh, Boundary
> if ( fProcessActivation[i] )
> processManager->AddDiscreteProcess(fProcesses[kAbsorption]);
> }
> }
>
> should probably be this instead:
>
> if ( particleName == "opticalphoton" ) {
> for ( G4int i=kAbsorption; i<=kBoundary; i++ ) {
> // Absorption, Raileigh, Boundary
> if ( fProcessActivation[i] )
> processManager->AddDiscreteProcess(fProcesses[i]);
> }
> }
>
>
> This change produces the more expected output:
>
> Particle: opticalphoton
> Process Name Transportation : Type[Transportation] : SubType[-1]
> Process Name OpAbsorption : Type[Optical] : SubType[31]
> Process Name OpRayleigh : Type[Optical] : SubType[33]
> Process Name OpBoundary : Type[Optical] : SubType[32]
> Process Name StepLimiter : Type[NotDefined] : SubType[-1]

-- 
==============================================================
e-mail:  Ivana.Hrivnacova_at_cern.ch
address: Institut de Physique Nucléaire, 91406 Orsay, France
phone:   +33 169156594
==============================================================
Received on Tue May 11 2010 - 10:22:25 CEST

This archive was generated by hypermail 2.2.0 : Tue May 11 2010 - 23:25:01 CEST