I just installed Geant4-v11.2.1 on WSL2 (windows11 home). Everything seems to be working fine, but I was looking for /control/matScan and I realised it is not there.
Was it removed? Did I miss some flag during compiling?
I have no quick way to probe whether it is in fact installed in the system but I can see the command in the source code. The file ./source/run/src/G4MatScanMessenger.cc contains the command, so as long as you #include "G4MatScanMessenger.hh" in your application it should be fine.
I tried this on another machine (macOS ventura) and if I run the example I have the /control/matScan command in the interactive mode.
Next week I will try to #include "G4MatScanMessenger.hh" and recompile the example, but it seems weird be cause on the other machine it works. Do you have any idea on this?
If the header is missing, that would explain it… otherwise the only thing that comes to mind is that maybe you are issuing the command in a wrong state? from the code it seems like the command is available only in G4State_Idle.