<div dir="ltr"><div dir="ltr">Dear Gabriele,<div><br></div><div>I would like to submit a basic bug fix for G4.10.04.p02 G4ParallelWorldProcess method StartTracking in G4ParallelWorldProcess.cc. The bug is that opticalPhoton particles (Cerenkov radiation in the particular case I am studying) are assigned the incorrect speed of propagation on the first step if they are generated in a mass-containing volume in a parallel geometry, and layered mass geometry is turned on. Under these conditions, the opticalPhoton travels at the wrong speed of light for the first step (corresponds to the volume on the default mass layer), after which it undergoes OpBoundary process and the speed for all following steps is computed for the correct medium. Only the first step is problematic. But this is a big problem in the case of a DIRC, where the first step can be 1 m or more in length. I am a developer of the simulation for the GlueX experiment at Jefferson Lab, which is using one of the original DIRC detectors from BaBar. My proposed patch follows below. It only affects the algorithm if layered_mass_geometry is turned on. The "layered mass geometry" feature was introduced in G4.9.6, and is essential for the GlueX geometry description.</div><div><br></div><div>-Richard Jones, University of Connecticut</div><div><br></div><div><div>*** G4ParallelWorldProcess.cc-orig<span style="white-space:pre">        </span>Sat Nov 24 06:44:43 2018</div><div>--- G4ParallelWorldProcess.cc<span style="white-space:pre"> </span>Sat Nov 24 06:44:12 2018</div><div>***************</div><div>*** 151,156 ****</div><div>--- 151,162 ----</div><div>    {</div><div>      G4StepPoint* realWorldPostStepPoint = trk->GetStep()->GetPostStepPoint();</div><div>      SwitchMaterial(realWorldPostStepPoint);</div><div>+     G4StepPoint *realWorldPreStepPoint = trk->GetStep()->GetPreStepPoint();</div><div>+     SwitchMaterial(realWorldPreStepPoint);</div><div>+     G4double velocity = trk->CalculateVelocity();</div><div>+     realWorldPostStepPoint->SetVelocity(velocity);</div><div>+     realWorldPreStepPoint->SetVelocity(velocity);</div><div>+     trk->SetVelocity(velocity);</div><div>    }</div><div>    *(fpHyperStep->GetPreStepPoint()) = *(fpHyperStep->GetPostStepPoint());</div><div>  }</div></div><div><br></div></div></div>