-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOptickEnv
More file actions
76 lines (68 loc) · 2.63 KB
/
OptickEnv
File metadata and controls
76 lines (68 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash -l
export GEOM=OpticksTest # Geometry name
#source env.sh
export RNG_SEED=0
export RNG_OFFSET=0
export SProf__WRITE=0
## Opticks settings
export OPTICKS_MAX_PHOTON=200000000 # Max Amount of photons
export OPTICKS_MAX_SLOT=$OPTICKS_MAX_PHOTON
export OPTICKS_PROPAGATE_EPSILON=0.06
export OPTICKS_PROPAGATE_EPSILON0=0.06
export OPTICKS_MAX_BOUNCE=50
export OPTICKS_INTEGRATION_MODE=3 # Running both GPU and CPU simulation
export OPTICKS_EVENT_MODE=Minimal # Hits or Minimal Prefered. Hits will create .npy files in /tmp/user/opticks/GEOM/NEXUS_CRAB/nexus/ALL
### Opticks Detector Identification (Boundary Names for Identifying small number of detectors)
## Skipahead is used for offseting the random generator values so photons produce per event is not repeated
if [ -z ${SKIPAHEAD+x} ]; then
echo " SKIPAHEAD is not set";
#echo "Setting SKIPAHEAD to 100k";
SKIPAHEAD=$OPTICKS_MAX_PHOTON
echo "Setting SKIPAHEAD to ${SKIPAHEAD}"
sleep 2
fi
export OPTICKS_EVENT_SKIPAHEAD=$OPTICKS_MAX_PHOTON
### --- Curand File Generation is no longer needed by latests version of opticks ---
# Lets Check if Curand file present if not then create it
##
#CurandBinPath=$HOME/.opticks/rngcache/RNG/QCurandState_${OPTICKS_MAX_PHOTON}_0_0.bin
#echo $CurandBinPath
#if ! test -f $CurandBinPath; then
# echo "Creating Curand Binary File .."
# echo "$CurandBinPath"
# sleep 2 ## Delay 2s so user knows we are creating curand file
# export OPTICKS_QUDARAP_RNGMAX=$OPTICKS_MAX_PHOTON/1000000
# qudarap-
# qudarap-prepare-installation
#fi
### ---------------------------------------------------------------------
## default setting of the opticks
#export OPTICKS_RG_MODE="simulate" # Simulate or Render
#export OPTICKS_HIT_MASK="SD" # getting hits SD is Surface Detect This can be changed to other flags SA, Surface Absorbtion etc.
## for debugging purposeses
#export QSim=INFO
#export SEvt=INFO
#export QEvent=INFO
#export G4CXOpticks=INFO
#export U4=INFO
#export SSim=INFO
#export CSGImport=INFO
#export U4Material=INFO
#export X4PhysicalVolume=INFO
#export U4VolumeMaker=INFO
#export X4Geo=INFO
#export SSim__stree_level=1
#export GBndLib=INFO
#export ShimG4OpAbsorption=INFO
#export G4CXOpticks__simulate_saveEvent=0
export G4CXOpticks__setGeometry_saveGeometry=$HOME/.opticks/GEOM/$GEOM
export G4CXOpticks__saveGeometry_saveGGeo=0
export GGeo__postDirectTranslation_save=0
#export IDPath=$G4CXOpticks__setGeometry_saveGeometry
#export PIDX=100
#export CFBASE=$HOME/.opticks/GEOM/$GEOM
echo "RNG_Offset -->$RNG_OFSEET"
echo "RNG SEED --> $RNG_SEED"
echo "SKIPAHEAD--> $OPTICKS_EVENT_SKIPAHEAD"
echo "MaxPhoton--> $OPTICKS_MAX_PHOTON"
sleep 2