Problem 1185

Summary: G4Track::GetVelocity returns c_light
Product: Geant4 Reporter: antonino.sergi
Component: trackAssignee: kurasige
Status: RESOLVED FIXED    
Severity: major CC: asai, kurasige
Priority: P5    
Version: 9.4   
Hardware: All   
OS: All   

Description antonino.sergi 2011-03-31 16:28:34 CEST
The new optimization of this method, advertised in the release notes, conflicts with the simulation of Cherenkov effect in media with very low refractive index (gases).

In our case, the simulation of the NA62 RICH detector, the threshold for Cherenkov effect for a pion is around 12.5GeV and const G4double G4Track::maxT = 100.0, above which GetVelocity returns c_light, is actually too low: it means that at ~13.9GeV the pion is assumed with beta=1.
The dynamic range of our RICH is designed to be between 15GeV and 35GeV, looking at pions and muons, but we had test beams at higher energies.

This optimization really clashes with the simulation of a gas based RICH, also because the value of beta has to be precise; I'm not sure if the granularity of the table of velocities, now used for T<100, is good enough, because there are regions of the dynamic range (close to the threshold) where the sensitivity to variations in beta is really strong.

Before release 9.4 it was working properly.
Comment 1 kurasige 2011-04-01 11:57:55 CEST
Dear Antonio,

  Thank you for reporting the problem.
  It was my fault not to take account cases of Cherenkov effect in media with very low refractive index.
 
In the current design, velocity is set to c_light if (1-beta) < 5x10^-5 (T>100). If we set T<1000, velocity is set to c_light if (1-beta) < 5x10^-7 
With NBIN=300, the precision of (1-beta) is about 10% close to threshold. The precision about 5% with NBIN=500 and the precision about 3% with NBIN=1000. Large NBIN affects performances though the effects  depend on application. 

My proposal is 
- Set TMAX = 1000 and NBIN = 500 in default
- Provide methods (static method in G4Track) to define TMIN, TMAX and NBIN for application of Cherenkov effect in media with very low refractive index.

Please let me know whether above proposal make sense for your case.

Regards,
    Hisaya
Comment 2 antonino.sergi 2011-04-01 12:45:04 CEST
Maybe it's simpler to have a static function to enable the original calculation of the velocity; it could be in combination with what you propose, so that the user can choose between accuracy and performance, or compromise.

cheers
tonino
Comment 3 kurasige 2011-04-02 07:50:58 CEST
I've committed bug fix tag of track-V09-04-01 which will be included in patch release.
Comment 4 antonino.sergi 2011-04-04 09:26:45 CEST
(In reply to comment #3)
> I've committed bug fix tag of track-V09-04-01 which will be included in patch
> release.

Can you tell me when this fix will be deployed? Will it be included in the current p01 or will we have to wait for p02?

We usually use the afs binaries here at CERN. Can you give me some date or some suggestion how to have access to the fix as soon as possible?