GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » R3BRoot » Installation and Compilation » Physics List change (Physics List change)
Physics List change [message #23177] Tue, 23 October 2018 16:23 Go to next message
C. A. Douma is currently offline  C. A. Douma
Messages: 88
Registered: September 2015
Location: Groningen
continuous participant
From: *kvi-cart.rug.nl
Dear all,

Can anyone tell me how I should change the run_sim.C macro if I want to
modify the Geant4 physics list?

I also have tried to switch to Geant3. Then, the macro crashes.
(runtime seg-fault error).

I particulary like Geant3 for visualization of the geometries,
since with Geant3 the detectors have colors, while they are
mostly black, and brown for Geant4. Does anyone know how
I can run a simulation under Geant3?

Thanks in advance!
Christiaan Douma.
Re: Physics List change [message #23181 is a reply to message #23177] Tue, 23 October 2018 17:31 Go to previous messageGo to next message
Jan Mayer is currently offline  Jan Mayer
Messages: 20
Registered: August 2015
occasional visitor
From: *dip0.t-ipconnect.de
The code in gconfig/g4Config.C reads the environment variable PHYSICSLIST via
gSystem->Getenv("PHYSICSLIST")
and falls back to QGSP_INCLXX_HP if not set.
You can set this enviroment variable from inside a macro with
gSystem->Setenv()
(or similar), or from the outside in the bash
PHYSICSLIST=FTFP_BERT root -l mymacro.C

The later is also helpful when iterating over physics lists, see my neutron cross section example.

I have also had problems with Geant3 before, however I couldn't find a solution fast enough - I just stopped using it, its probably my system/installation.
However you don't really seem to be interested in Geant3, but in nicer colors.

There should be options to set the color of the objects, both before creation (in the geometry creating macros) and afterwards by getting the right pointer.
I haven't tried that yet, but https://root.cern.ch/doc/master/classTGeoManager should be able to help you.
Re: Physics List change [message #23183 is a reply to message #23181] Wed, 24 October 2018 13:38 Go to previous messageGo to next message
C. A. Douma is currently offline  C. A. Douma
Messages: 88
Registered: September 2015
Location: Groningen
continuous participant
From: *kvi-cart.rug.nl
Thank you for this information, Jan.

Where is g4Config.C loaded? I do not see how this macro communicates with run_sim.C.

Can I also add multiple modules to the PHYISICSLIST environment variable?
For example, my VETO physics list uses both ion_inclxx and qscp_bert (and a few more modules).

Is your neutron cross section example how you calculated figure 6.4 in your thesis?
If so, do all of the lines in this figure only use one single physics list module?

Christiaan.
Re: Physics List change [message #23188 is a reply to message #23183] Wed, 24 October 2018 14:09 Go to previous message
Jan Mayer is currently offline  Jan Mayer
Messages: 20
Registered: August 2015
occasional visitor
From: *ikp.uni-koeln.de
C. A. Douma wrote on Wed, 24 October 2018 13:38
Where is g4Config.C loaded? I do not see how this macro communicates with run_sim.C.

The path & name is hardcoded in FairRoot itself and it will be loaded automatically.

C. A. Douma wrote on Wed, 24 October 2018 13:38
Can I also add multiple modules to the PHYISICSLIST environment variable?
For example, my VETO physics list uses both ion_inclxx and qscp_bert (and a few more modules).

This makes no sense to me. Are neutrons with <1GeV energy handled by incl or bert?
Support for custom physics lists has been removed. One of the predefined lists from Geant4 should be able to do everything you want - I recommend just going with the default.

Also see:
https://github.com/Geant4/geant4/blob/master/source/physics_lists/lists/ include/QGSP_INCLXX_HP.hh
https://github.com/Geant4/geant4/blob/master/source/physics_lists/lists/ include/INCLXXPhysicsListHelper.icc


C. A. Douma wrote on Wed, 24 October 2018 13:38
Is your neutron cross section example how you calculated figure 6.4 in your thesis?
If so, do all of the lines in this figure only use one single physics list module?

(For the others: In this figure I compare the Julian's RIKEN efficiency values to simulations with different physics lists.)
The macro to reproduce this Figure is different, but also uses the physis lists environment variable.
While there are 20+ lists avilable in Geant4, this quickly collapses: "The simulated values solely depend on the model for the low energy hadronic interactions,
i.e., QGSP_BERT behaves like FTFP_BERT [...] This reduces the comparison to [...] BERT, BIC, and INCLXX." (Page 52 of my thesis)
Previous Topic: FairRoot installation error
Next Topic: FairSoft compilation error
Goto Forum:
  


Current Time: Tue Nov 26 20:44:59 CET 2024

Total time taken to generate the page: 0.00437 seconds