Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 44 additions & 16 deletions MC/config/examples/epos4/epos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,33 @@
# in order not to print useless information on stdout (a z-*optns*.mtr file will be created)

optns="example"
seed=$RANDOM
seed=$(od -An -N2 -tu2 /dev/urandom | tr -d ' ')
EPOS4=""

if [ -z "$EPO4VSN" ]; then
echo "Error: EPO4VSN environment variable is not set"
exit 1
fi

if [ "$EPO4VSN" = "4.0.0" ]; then
EPOS4="$EPOS4_ROOT/epos4/scripts/epos"
export LIBDIR=$EPOS4_ROOT/epos4/bin
else
EPOS4="$EPOS4_ROOT/bin/epos"
fi

# Check if the environment variable EPO4 is set (mandatory with o2dpg-sim-tests on CI machines)
# If not, set all the EPOS4 related variables, most likely they are unset as well.
if [ -z "${EPO4}" ]; then
export OPT=./
export HTO=./
export CHK=./
if [ "$EPO4VSN" = "4.0.0" ]; then
export EPO4=$EPOS4_ROOT/epos4/
else
export EPO4=$EPOS4_ROOT/
fi
fi

while test $# -gt 0 ; do
case $1 in
Expand All @@ -18,24 +44,26 @@ done

if [ ! -f $optns.optns ]; then
echo "Error: Options file $optns.optns not found"
exit 1
exit 2
fi

if [ $seed -eq 0 ]; then
echo "Seed can't be 0, random number will be used"
seed=$RANDOM
if grep -Fq "set ihq 1" $optns.optns; then
if [ -z "$EPO4HQVSN" ]; then
# Error: EPOS4HQ version not found
exit 3
else
# Running with EPOS4HQ
if [ -z "${EPO4HQ}" ]; then
export EPO4HQ=$EPOS4HQ_ROOT/
fi
EPOS4="$EPO4HQ/bin/eposhq"
fi
fi

# Check if the environment variable EPO4 is set (mandatory with o2dpg-sim-tests on CI machines)
# If not, set all the EPOS4 related variables, most likely they are unset as well.
if [ -z "${EPO4}" ]; then
export EPO4=$EPOS4_ROOT/epos4/
export LIBDIR=$EPOS4_ROOT/epos4/bin
export EPO4VSN=4.0.0
export OPT=./
export HTO=./
export CHK=./
if [ $seed -eq 0 ]; then
# Seed can't be 0, random number will be used
seed=$(od -An -N2 -tu2 /dev/urandom | tr -d ' ')
fi

# Or filters the stdout with only HepMC2 useful data
$EPOS4_ROOT/epos4/scripts/epos -hepstd -s $seed $optns | sed -n 's/^\(HepMC::\|[EAUWVP] \)/\1/p'
# OR filters the stdout with only HepMC useful data
$EPOS4 -hepstd -s $seed $optns | sed -n 's/^\(HepMC::\|[EAUWVP] \)/\1/p'
2 changes: 1 addition & 1 deletion MC/config/examples/epos4/generator/example.optns
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set laproj 1 !projectile atomic number
set maproj 1 !projectile mass number
set latarg 1 !target atomic number
set matarg 1 !target mass number
set ecms 13000 !sqrt(s)_pp
set ecms 13600 !sqrt(s)_pp
set istmax 25 !max status considered for storage

ftime on !string formation time non-zero
Expand Down
33 changes: 33 additions & 0 deletions MC/config/examples/epos4/generator/examplehq.optns
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
!--------------------------------------------------------------------
! proton-proton collision no hydro no hadronic cascade
!--------------------------------------------------------------------

!---------------------------------------
! Define run
!---------------------------------------

application hadron !hadron-hadron, hadron-nucleus, or nucleus-nucleus
set laproj 1 !projectile atomic number
set maproj 1 !projectile mass number
set latarg 1 !target atomic number
set matarg 1 !target mass number
set ecms 13600 !sqrt(s)_pp
set istmax 25 !max status considered for storage

ftime on !string formation time non-zero
!suppressed decays:
nodecays
110 20 2130 -2130 2230 -2230 1130 -1130 1330 -1330 2330 -2330 3331 -3331
end

set ninicon 1 !number of initial conditions used for hydro evolution
core full !core/corona activated
hydro hlle !hydro activated
eos x3ff !eos activated (epos standard EoS)
hacas full !hadronic cascade activated (UrQMD)
set nfreeze 1 !number of freeze out events per hydro event
set modsho 1 !printout every modsho events
set centrality 0 !0=min bias
set ihepmc 2 !HepMC output enabled on stdout
set nfull 10 !Total number of events to be generated
set ihq 1 !Enable EPOS4HQ
3 changes: 2 additions & 1 deletion MC/config/examples/ini/GeneratorEPOS4.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ funcName=generateEPOS4("${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/generat
cmd=${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/epos.sh -i cfg
bMaxSwitch=none

# Set to version 2 if EPOS4.0.0 is used
[HepMC]
version=2
version=3
11 changes: 11 additions & 0 deletions MC/config/examples/ini/GeneratorEPOS4HQ.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#---> GeneratorEPOS4
[GeneratorExternal]
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/generator_EPOS4.C
funcName=generateEPOS4("${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/generator/examplehq.optns", 2147483647)

[GeneratorFileOrCmd]
cmd=${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/epos.sh -i cfg
bMaxSwitch=none

[HepMC]
version=3