celeritas icon indicating copy to clipboard operation
celeritas copied to clipboard

Support nonuniform Rayleigh scattering cross section grid (Geant4 11.2)

Open amihashemi opened this issue 1 year ago • 4 comments

An error message occurs related to energy inconsistencies/format in Celeritas when I run atlas-tilecal-integration, it seems that the max/min energies of what is used in ValuedGridBuilder are not equal and breaks the simulation. Here is the excerpt of the error message:

Some /vis commands (optionally) take a string to specify colour.
"/vis/list" to see available colours.
### Adding tracking cuts for neutron  TimeCut(ns)= 10000  KinEnergyCut(MeV)= 0
G4WT1 > Using
G4WT0 > Using
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
See commands in /vis/modeling/trajectories/ for other options.
### Run 0 starts.
SharedParams.cc:212: status: Initializing Celeritas shared data
status: Transferring data from Geant4
status: Loading external elemental data
status: Converting Geant4 geometry
status: Initializing tracking information
/jet/home/amirreza/celeritas-GPU/celeritas/src/celeritas/phys/ProcessBuilder.cc:234: warning: Omitting coulomb_scat from physics process list
ExceptionConverter.cc:152: critical: The following error is from: Particle ID=0, process 'rayleigh, material ID=0

-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : celer0001
      issued by : /jet/home/amirreza/celeritas-GPU/celeritas/src/celeritas/grid/ValueGridBuilder.cc:118
Lower and upper energy grids have inconsistent spacing: log delta E for lower grid is 1.39434 log(MeV) per bin but upper is 1.38778
*** Fatal Exception *** core dump ***
 **** Track information is not available at this moment
 **** Step information is not available at this moment

-------- EEEE -------- G4Exception-END --------- EEEE -------


*** G4Exception: Aborting execution ***
srun: error: v023: task 0: Aborted (core dumped)

I tried different Geant4 11.2 and 11.0.3 with physics list FTFP_BERT. FYI, I can not install Celeritas properly with the Geant4.10.7.P03 as it is suggested in the atlas-tilecal-integration. The problem seems to be simple to fix as it seems to be format inconsistency between Geant4 codes, I appreciate if you take a look and keep me updated. Thanks!

amihashemi avatar Jan 25 '24 15:01 amihashemi

Hi @amihashemi, yes, unfortunately this is a known issue in Geant4 11.1+ (see #588). A workaround for now is to turn off Rayleigh scattering using the ignore_processes option in the accel SetupOptions, i.e.:

so.ignore_processes = {"CoulombScat", "Rayl"};

amandalund avatar Jan 25 '24 16:01 amandalund

Oh boo, I realize that fix was only if we used our custom physics list. If you're able to adjust the grid spacing in your current physics list, then implementing this change should allow you to work around it.

sethrj avatar Jan 25 '24 17:01 sethrj

ok great, thanks Amanda and Seth, I tried Amanda's suggestion, it worked out I will try the other option too. Thanks for the help!

amihashemi avatar Jan 25 '24 17:01 amihashemi

I think the issue still needs to be fundamentally fixed though 😅 so I'm reopening

sethrj avatar Jan 25 '24 18:01 sethrj