File indexing completed on 2026-04-10 07:50:27
0001 usage(){ cat << EOU
0002 FewPMT.sh
0003 ==========
0004
0005 This geomscript may depending on GEOM be sourced for example from::
0006
0007 u4/tests/U4SimtraceTest.sh
0008 u4/tests/U4SimulateTest.sh
0009 g4cx/tests/G4CXTest.sh
0010
0011
0012 Moved LAYOUT control here to be in common
0013 between U4SimulateTest.sh and U4SimtraceTest.sh
0014
0015
0016 What to to do after changing geometry config
0017 ----------------------------------------------
0018
0019 1. rerun U4SimtraceTest intersect geometries with::
0020
0021 ./viz.sh runboth
0022
0023 2. rerun U4SimulateTest simulation results with::
0024
0025 ./cf.sh
0026
0027
0028 Which config where ?
0029 ----------------------
0030
0031 Any geometry specific config belongs here.
0032 Photon generation while depending on geometry for targetting
0033 is sufficiently independent to make it better handled separately.
0034
0035 +-------------------+------------------------------+
0036 | input envvars | |
0037 +===================+==============================+
0038 | VERSION | 0/1 |
0039 +-------------------+------------------------------+
0040 | POM | 0/1 traditional/multifilm |
0041 +-------------------+------------------------------+
0042
0043 +-------------------+------------------------------+
0044 | output envvars | |
0045 +===================+==============================+
0046 | LAYOUT | one_pmt/two_pmt |
0047 +-------------------+------------------------------+
0048 | Many envvars | Config geometry and fakes |
0049 +-------------------+------------------------------+
0050
0051 EOU
0052 }
0053
0054 version=1
0055 pom=1
0056
0057 layout=one_pmt
0058
0059 VERSION=${VERSION:-$version}
0060 POM=${POM:-$pom}
0061 LAYOUT=${LAYOUT:-$layout}
0062
0063 export LAYOUT
0064
0065 case $VERSION in
0066 0) version_desc="N=0 unnatural geometry : FastSim/jPOM" ;;
0067 1) version_desc="N=1 natural geometry : CustomBoundary" ;;
0068 esac
0069
0070 case $POM in
0071 0) pom_desc="POM:$POM traditional stop at photocathode : PMT with no innards" ;;
0072 1) pom_desc="POM:$POM allow photons into PMT which has innards" ;;
0073 esac
0074
0075 fastcover=Cheese
0076
0077
0078
0079 export hama_FastCoverMaterial=$fastcover
0080 export nnvt_FastCoverMaterial=$fastcover
0081
0082 export hama_UsePMTOpticalModel=$pom
0083 export nnvt_UsePMTOpticalModel=$pom
0084
0085 export hama_UsePMTNaturalGeometry=$version
0086 export nnvt_UsePMTNaturalGeometry=$version
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097 geomlist=xjfcLogical
0098
0099 export FewPMT_GEOMList=$geomlist
0100
0101
0102
0103
0104
0105
0106
0107 delta=1
0108 export Tub3inchPMTV3Manager__VIRTUAL_DELTA_MM=$delta
0109
0110
0111
0112
0113
0114 magic=0.1
0115
0116 export HamamatsuMaskManager__MAGIC_virtual_thickness_MM=$magic
0117 export NNVTMaskManager__MAGIC_virtual_thickness_MM=$magic
0118
0119
0120
0121
0122 vars="BASH_SOURCE VERSION version_desc POM pom_desc GEOM FewPMT_GEOMList LAYOUT "
0123 for var in $vars ; do printf "%-30s : %s \n" "$var" "${!var}" ; done
0124
0125
0126 aspect=1.7777777777777
0127
0128
0129
0130 case $LAYOUT in
0131 one_pmt) loc="upper right" ;;
0132 *) loc="skip" ;;
0133 esac
0134 export LOC=${LOC:-$loc}
0135
0136
0137 if [ "$LAYOUT" == "one_pmt" ]; then
0138
0139 export U4VolumeMaker_WrapRockWater_Rock_HALFSIDE=220
0140 export U4VolumeMaker_WrapRockWater_Water_HALFSIDE=210
0141 export U4VolumeMaker_WrapRockWater_BOXSCALE=$aspect,$aspect,1
0142
0143 elif [ "$LAYOUT" == "two_pmt" ]; then
0144
0145 export U4VolumeMaker_WrapAroundItem_Rock_HALFSIDE=310
0146 export U4VolumeMaker_WrapAroundItem_Water_HALFSIDE=300
0147 export U4VolumeMaker_WrapAroundItem_Rock_BOXSCALE=$aspect,1,1
0148 export U4VolumeMaker_WrapAroundItem_Water_BOXSCALE=$aspect,1,1
0149
0150 export ${GEOM}_GEOMWrap=AroundCircle
0151
0152 export U4VolumeMaker_MakeTransforms_AroundCircle_radius=250
0153 export U4VolumeMaker_MakeTransforms_AroundCircle_numInRing=2
0154 export U4VolumeMaker_MakeTransforms_AroundCircle_fracPhase=0
0155
0156 else
0157 echo $BASH_SOURCE LAYOUT $LAYOUT not handled
0158 fi
0159
0160
0161 export CEGS=16:0:9:10
0162
0163
0164 if [ "$VERSION" == "0" ]; then
0165
0166
0167 ModelTriggerSimple=0
0168 ModelTriggerBuggy=1
0169 ModelTrigger_IMPL=$ModelTriggerSimple
0170
0171
0172 export junoPMTOpticalModel__PIDX_ENABLED=1
0173 export junoPMTOpticalModel__ModelTrigger_IMPL=$ModelTrigger_IMPL
0174 export G4FastSimulationManagerProcess_ENABLE=1
0175
0176
0177
0178
0179
0180 fi
0181
0182
0183
0184 export PMTSimParamData_BASE=$HOME/.opticks/GEOM/V1J009/CSGFoundry/SSim/extra/jpmt
0185
0186
0187