Problem 2456 - Wrong MaxBetaChange value in the Cerenkov process in Geant4 11.0
Summary: Wrong MaxBetaChange value in the Cerenkov process in Geant4 11.0
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/electromagnetic/xrays (show other problems)
Version: other
Hardware: All All
: P4 normal
Assignee: Daren Sawkey
URL:
Depends on:
Blocks:
 
Reported: 2021-12-17 11:39 CET by Ivana Hrivnacova
Modified: 2022-01-18 23:20 CET (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Ivana Hrivnacova 2021-12-17 11:39:42 CET
We get very small steps (1e-15) from the Cerenkov process in the VMC tests and so we found out that there is a problem with setting the MaxBetaChange parameter, where a unit perCent is added in G4Cerenkov::SetMaxBetaChangePerStep() and the updated value is passed back to G4OpticalParameters.

This method is however call at the initialization phase for all particles via call to Initialise() called by G4Cerenkov::PreparePhysicsTable():
  SetMaxBetaChangePerStep(params->GetCerenkovMaxBetaChange());

With each call, the perCent is applied again, and the final value is of order 1e-106. The control printing added in G4Cerenkov::PreparePhysicsTable():

   Initialise();
+  // control printing
+  G4cout << "Initialise for " << particle.GetParticleName() << G4endl;
+  G4cout << "fMaxBetaChange: " << fMaxBetaChange << G4endl;

gives:

    Initialise for B+
    fMaxBetaChange: 0.01
    Initialise for B-
    fMaxBetaChange: 0.0001
    ...
    Initialise for xi_c+
    fMaxBetaChange: 1e-106

To fix this, the unit should be applied in the cerenkov/setMaxBetaChange command and removed from the setter in Cerenkov process.
Comment 1 Vladimir.Ivantchenko 2022-01-05 16:02:16 CET
Hi Daren,

I have switched this bug to you. It is fixed in master but we need a backport to patch. Please, make backport only to the xray library and do not to EM utils. Technically, backports to several categories block possibilities for other backports. I personally prepare patches in each sub-library separately, better if one persons is responsible for one sub-library.

Vladimir
Comment 2 Daren Sawkey 2022-01-18 23:20:06 CET
The backport patch MR to xrays is now submitted.