Message: Re: Optical photons propagating at c instead of group velocity Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Agree Re: Optical photons propagating at c instead of group velocity 

Forum: Processes Involving Optical Photons
Re: Sad Optical photons propagating at c instead of group velocity (Douglas Roberts)
Date: 08 Jan, 2012
From: Gumplinger Peter <Gumplinger Peter>

Thanks Doug!

Glad you discovered this bug so promptly after the 9.5 release. I am very embarrassed, unfortunately, that its there and the effect so blatant - wasting your time.

I'll file a bug report for the records. In the meantime, and until a workable fix is found, I can only suggest that you move to 9.4.p03 (because 9.4.p02 is similarly buggy - but for an entirely different reason).

The reason why the working version 9.4.p03 wasn't carried over to 9.5 can be found at:

https://indico.fnal.gov/contributionDisplay.py?sessionId=18&contribId=41&confId=4535

Looks like in 9.5:

mat=fpTouchable->GetVolume()->GetLogicalVolume()->GetMaterial(); groupvel = mat->GetMaterialPropertiesTable()->GetProperty("GROUPVEL"); velocity = groupvel->Value(current_momentum);

in G4Track::CalculateVelocityForOpticalPhoton() calculates the velocity of the PreStepPoint and not, as expected, that of the PostStepPoint. Thus, the velocity after refraction is wrong.

But it gets worse!

G4ParticleChange::UpdateStepForPostStep

has this line in it:

if (!isVelocityChanged)theVelocityChange = pStep->GetTrack()->CalculateVelocity();

what this means is that every other type of optical photon step also triggers CalculateVelocityForOpticalPhoton.

That includes the zero-step-length reallocation step. It too triggers CalculateVelocityForOpticalPhoton. This now calculates and sets the velocity of the outside medium.

The attached macro shows this for vanilla /examples/novice/N06

We changed too many lines of code in four different directories (processes/transportation, track, tracking and /processes/optical) and got it wrong.

Peter

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2012/01/08/17.29-73271-optPhoton.txt

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

1 More: Re: Optical photons propagating at c instead of group velocity   (Gumplinger Peter - 24 Jan, 2012)
 Add Message Add Message
to: "Re: Optical photons propagating at c instead of group velocity"

 Subscribe Subscribe

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