alcap-org / g4sim

Simulation toolkit based on Geant4 and ROOT
http://wuchen1106.github.io/g4sim/
2 stars 2 forks source link

Should we move simulation environment variables into a macro? #16

Closed AndrewEdmonds11 closed 10 years ago

AndrewEdmonds11 commented 10 years ago

Currently we have these environment variables set in alcap/setenv.sh:

export PHYSICSLIST=QGSP_BERT           # QGSP_BERT;QGSP_BERT_HP;QGSP_BERT_noRadi;QGSP_BERT_HP_noRadi

#for configuration cards
export MATERIALLISTROOT=material_list
export MAGFIELDCARDROOT=mag/MagField_none
export OUTCARDROOT=output/output_default
export GEOCARDROOT=geometry_1217
export GENFILEROOT=gen/gen_mum_up

#for directories
export MACROSROOT=$MYG4SIMWORKROOT/macros
export MACROSCOMMONROOT=$MACROSROOT/common
export CONFIGUREROOT=$MYG4SIMWORKROOT/configure/
export MYG4SIMDATAROOT="$MYG4SIMWORKROOT/data/"
export CONFIGUREDATAROOT=$MYG4SIMDATAROOT
export MYG4SIMFIELDMAPSROOT="$MYG4SIMWORKROOT/fieldMaps/"
export FIELDMAPSROOT=$MYG4SIMFIELDMAPSROOT
export OFILENAMEROOT=$MYG4SIMWORKROOT/output/raw_g4sim.root
export RUNNAMEROOT=TEST
export LOGFILEROOT=$MYG4SIMWORKROOT/runlog/logfile

For the purposes of reducing the number of environment scripts we have to run, I think we should move this into the input macro.

Other advantages of changing are that the user then has to know what geometry and generator is being used. And also it solves the problem where we have the geometry constructed twice (once with the default defined above and again when you run /g4sim/det/ReloadGeo in your own input macro)

Does anyone else have an opinion?

AndrewEdmonds11 commented 10 years ago

Actually, I'll just leave it as it is and move the variables that are set in alcap/setenv.sh to env.sh