diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5b9ffb10e2c54885ab2fdfa4f9d9fb468e6238d6..4044e00cc99b38be9077a4fe7ba4d803cd1da846 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -131,7 +131,8 @@ dump_geometry: - sed -i '/forward_ion_beamline/d' ${DETECTOR_PATH}/athena.xml - sed -i '/beampipe_hadron_B0/d' ${DETECTOR_PATH}/athena.xml - sed -i '/B0_/d' ${DETECTOR_PATH}/athena.xml - - sed -i '/far_forward/d' ${DETECTOR_PATH}/athena.xml + - sed -i '/far_forward_offM/d' ${DETECTOR_PATH}/athena.xml + - sed -i '/far_forward_detectors/d' ${DETECTOR_PATH}/athena.xml - sed -i '/roman_pots/d' ${DETECTOR_PATH}/athena.xml - sed -i '/inner_vacuum_FF_magnets/d' ${DETECTOR_PATH}/athena.xml - dd_web_display --output geo/detector_geo.root ${DETECTOR_PATH}/athena.xml diff --git a/athena.xml b/athena.xml index 300992c23ab7e182b6dd137e89957eb200949c18..8ef1ae0c3f4fa1065b55f169d27ed1ccdccc57fd 100644 --- a/athena.xml +++ b/athena.xml @@ -34,6 +34,7 @@ These files have only a define tags. </documentation> <include ref="ip6/ip6_defs.xml" /> + <include ref="ip6/far_forward_fields_275.xml" /> <include ref="compact/definitions.xml" /> </define> diff --git a/bin/set_beam_energy b/bin/set_beam_energy new file mode 100755 index 0000000000000000000000000000000000000000..cd75bb3a542e56263973b536f83bfcadacddd760 --- /dev/null +++ b/bin/set_beam_energy @@ -0,0 +1,75 @@ +#!/bin/bash + +function print_the_help { + echo "USAGE: --ebeam E --pbeam E -c compact.xml" + echo "REQUIRED ARGUMENTS:" + echo " -h|--help Print this message" + echo " --ebeam Electron beam energy (5, 10 or 18)" + echo " --pbeam Ion beam energy (41, 100 or 275)" + echo " -c|--compact Compact file to set beam energy for" + exit +} + +EBEAM= +PBEAM= +COMPACT= + +while [ $# -gt 0 ] +do + key="$1" + case $key in + -h|--help) + print_the_help + ;; + --ebeam) + EBEAM=$2 + shift + shift + ;; + --pbeam) + PBEAM=$2 + shift + shift + ;; + -c|--compact) + COMPACT=$2 + shift + shift + ;; + *) # unknown option + echo "unknown option" + exit 1 + ;; + esac +done + +echo "Setting beam energies to $EBEAM on $PBEAM for $COMPACT" + +if [ -z $COMPACT ]; then + echo "Error: no compact file given, use -h for help" + exit 1 +fi +if [ -z $EBEAM ]; then + echo "Error: --ebeam argument missing, use -h for help" + exit 1 +fi +if [ -z $PBEAM ]; then + echo "Error: --pbeam argument missing, use -h for help" + exit 1 +fi + +if [[ $PBEAM != "41" && $PBEAM != "100" && $PBEAM != "275" ]]; then + echo "Error: Ion beam energy should be 41, 100, or 275 GeV" + exit 1 +fi +if [[ $EBEAM != 5 && $EBEAM != 10 && $EBEAM != 18 ]]; then + echo "Error: Electron beam energy should be 5, 10, or 18 GeV" + exit 1 +fi +if [ ! -f ${COMPACT} ]; then + echo "Error: Compact file ${COMPACT} does not exist" + exit 1 +fi + +sed -i "s?far_forward_fields_.\{2,3\}.xml?far_forward_fields_${PBEAM}.xml?" athena.xml +sed -i "s?far_backward_fields_.\{1,2\}.xml?far_backward_fields_${EBEAM}.xml?" athena.xml diff --git a/compact/subsystem_views/calorimeters.xml b/compact/subsystem_views/calorimeters.xml index 7e52ee1c6686440bbcefdfb253251cb2877d37dc..81386563f184eebe48dc53474ce999b1fda1f43d 100644 --- a/compact/subsystem_views/calorimeters.xml +++ b/compact/subsystem_views/calorimeters.xml @@ -34,6 +34,7 @@ These files have only a define tags. </documentation> <include ref="ip6/ip6_defs.xml" /> + <include ref="ip6/far_forward_fields_275.xml" /> <include ref="compact/definitions.xml" /> </define> diff --git a/compact/subsystem_views/dirc_only.xml b/compact/subsystem_views/dirc_only.xml index cdcd1dd4a1d5f0364c028b6871a572235dd41067..a60d413bd6bd56870df92fa5742a9059d844b4fb 100644 --- a/compact/subsystem_views/dirc_only.xml +++ b/compact/subsystem_views/dirc_only.xml @@ -34,6 +34,7 @@ These files have only a define tags. </documentation> <include ref="ip6/ip6_defs.xml" /> + <include ref="ip6/far_forward_fields_275.xml" /> <include ref="compact/definitions.xml" /> </define> diff --git a/compact/subsystem_views/inner_detector.xml b/compact/subsystem_views/inner_detector.xml index df19d69ae2f43d149664652a237ed0c0c32933d1..9031454a023ec85223c883691273e7cc6041cb7c 100644 --- a/compact/subsystem_views/inner_detector.xml +++ b/compact/subsystem_views/inner_detector.xml @@ -34,6 +34,7 @@ These files have only a define tags. </documentation> <include ref="ip6/ip6_defs.xml" /> + <include ref="ip6/far_forward_fields_275.xml" /> <include ref="compact/definitions.xml" /> </define> diff --git a/compact/subsystem_views/inner_tracking_only.xml b/compact/subsystem_views/inner_tracking_only.xml index c0b5ff5b0aba3d91530c96c7e828b33ef3db6503..9b0bb13e5f542d94842b87ff987358f9267deb3e 100644 --- a/compact/subsystem_views/inner_tracking_only.xml +++ b/compact/subsystem_views/inner_tracking_only.xml @@ -34,6 +34,7 @@ These files have only a define tags. </documentation> <include ref="ip6/ip6_defs.xml" /> + <include ref="ip6/far_forward_fields_275.xml" /> <include ref="compact/definitions.xml" /> </define> diff --git a/compact/subsystem_views/pid_only.xml b/compact/subsystem_views/pid_only.xml index 07d265938edd6a80b9c216c81e174257e59ca918..c5103a4a46a61d6ce46d47edcf9e2b143c79f529 100644 --- a/compact/subsystem_views/pid_only.xml +++ b/compact/subsystem_views/pid_only.xml @@ -34,6 +34,7 @@ These files have only a define tags. </documentation> <include ref="ip6/ip6_defs.xml" /> + <include ref="ip6/far_forward_fields_275.xml" /> <include ref="compact/definitions.xml" /> </define> diff --git a/compact/subsystem_views/tracking_only.xml b/compact/subsystem_views/tracking_only.xml index 0f4825046f506c906f383cfc5e2b9b0199c8ff5b..1f23d873de60e8b13fe4bf6683ee768b3edfc52d 100644 --- a/compact/subsystem_views/tracking_only.xml +++ b/compact/subsystem_views/tracking_only.xml @@ -34,6 +34,7 @@ These files have only a define tags. </documentation> <include ref="ip6/ip6_defs.xml" /> + <include ref="ip6/far_forward_fields_275.xml" /> <include ref="compact/definitions.xml" /> </define> diff --git a/compact/subsystem_views/vertex_only.xml b/compact/subsystem_views/vertex_only.xml index 1c2f4b6904ecc5505a0fb73a3652974b64a18f29..20852f15a9168a44220ff34fbbf3a4aa6677a5a7 100644 --- a/compact/subsystem_views/vertex_only.xml +++ b/compact/subsystem_views/vertex_only.xml @@ -34,6 +34,7 @@ These files have only a define tags. </documentation> <include ref="ip6/ip6_defs.xml" /> + <include ref="ip6/far_forward_fields_275.xml" /> <include ref="compact/definitions.xml" /> </define>