Message: Re: set environment variable Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Idea Re: set environment variable 

Forum: Physics List
Re: Question set environment variable (sergi)
Date: 30 May, 2013
From: Zach Hartwig <Zach Hartwig>

Hi Sergi,

If your main goal with Geant4 is to simulate fast neutron (<20 MeV) interactions with a target materials (such as boron) then your most robust option for adding physics to your simulation is to use one of the prebuilt Geant4 physics list. such as QGSP_BERT_HP, QGSP_BIC_HP, or FTFP_BERT_HP, all of which have the HP neutron models included. These models are heavily validated by the G4 collaboration and ensure that the mix of particles, processes, and production cuts are set correctly. You can add one of these lists in main file:

  ...
  #include "QGSP_BIC_HP.hh"
  ...
  int main(){
  ...
  RunManager->SetUserInitialization(new QGSP_BIC_HP);
  ...
  }

However, it may be that your use case requires customized physics beyond these lists.

Secondly, if I understand your post correctly, you want to examine your environment to determine if the variable for HP neutron data is set. If so, the variable you want to look for is "G4NEUTRONHPDATA", which is used by the G4 source code to locate the HP data set. This variable should be set by you (as you point out) to the location of your HP data set, or alternatively, it can be set using the $G4INSTALL/share/Geant4.X.X.X/geant4make/geant4make.sh script.

If you are a Linux user, type on the command line (or better, place in your .bashrc to have it done automatically for each terminal)

(csh shell)
  setenv G4NEUTRONHPDATA /path/to/G4NDL

(bash shell)
  export G4NEUTRONHPDATA=/path/to/G4NDL

Hope that helps.

~ZSH

 Add Message Add Message
to: "Re: set environment variable"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]