Skip to content

Commit

Permalink
Merge branch 'main' into LFHCAL-HcalEndcapP
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl authored Mar 5, 2024
2 parents 4814316 + c228cbf commit 246189a
Show file tree
Hide file tree
Showing 14 changed files with 556 additions and 1,551 deletions.
131 changes: 130 additions & 1 deletion .github/workflows/linux-eic-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ jobs:
- build
strategy:
matrix:
detector_config: [epic_craterlake_no_bhcal, epic_bhcal]
detector_config: [epic_craterlake]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -582,6 +582,135 @@ jobs:
pattern: ${{ matrix.detector_config }}_views_*
delete-merged: true

npsim-gun:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
particle: [pi, e]
detector_config: [epic_craterlake]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build-gcc-full-eic-shell
path: install/
- uses: cvmfs-contrib/github-action-cvmfs@v4
- name: Produce simulation files
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
setup: install/setup.sh
run: |
npsim --compactFile ${DETECTOR_PATH}/${{ matrix.detector_config }}.xml -G --random.seed 1 --gun.particle "${{ matrix.particle }}-" --gun.momentumMin "1*GeV" --gun.momentumMax "20*GeV" --gun.distribution "uniform" -N 100 --outputFile sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root -v WARNING
- uses: actions/upload-artifact@v4
with:
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
path: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
if-no-files-found: error
- name: Download previous artifact
id: download_previous_artifact
uses: dawidd6/action-download-artifact@v3
with:
branch: ${{ github.event.pull_request.base.ref || github.ref_name }}
path: ref/
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
workflow_conclusion: ""
if_no_artifact_found: warn
- name: Compare to previous artifacts
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
setup: install/setup.sh
run: |
export PYTHONPATH=$HOME/.local/lib/python3.10/site-packages:$PYTHONPATH
mkdir capybara-reports
shopt -s nullglob
capybara bara ref/sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root* sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
mv capybara-reports sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}
touch .sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}
- uses: actions/upload-artifact@v4
with:
name: sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.capy
path: |
.sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}
sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}/
if-no-files-found: error

npsim-dis:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
beam: [5x41, 10x100, 18x275]
minq2: [1, 1000]
detector_config: [epic_craterlake]
exclude:
- beam: 5x41
minq2: 1000
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build-gcc-full-eic-shell
path: install/
- uses: cvmfs-contrib/github-action-cvmfs@v4
- name: Produce simulation files
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
setup: install/setup.sh
run: |
url=root://dtn-eic.jlab.org//work/eic2/EPIC/EVGEN/DIS/NC/${{matrix.beam}}/minQ2=${{matrix.minq2}}/pythia8NCDIS_${{matrix.beam}}_minQ2=${{matrix.minq2}}_beamEffects_xAngle=-0.025_hiDiv_1.hepmc3.tree.root
npsim --compactFile ${DETECTOR_PATH}/${{ matrix.detector_config }}.xml -N 100 --inputFiles ${url} --random.seed 1 --outputFile sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4hep.root -v WARNING
- uses: actions/upload-artifact@v4
with:
name: sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4hep.root
path: sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4hep.root
if-no-files-found: error
- name: Download previous artifact
id: download_previous_artifact
uses: dawidd6/action-download-artifact@v3
with:
branch: ${{ github.event.pull_request.base.ref || github.ref_name }}
path: ref/
name: sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4hep.root
workflow_conclusion: ""
if_no_artifact_found: warn
- name: Compare to previous artifacts
uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
setup: install/setup.sh
run: |
pip install 'pygithub>=2' 'bokeh>=3'
export PYTHONPATH=$HOME/.local/lib/python3.10/site-packages:$PYTHONPATH
mkdir capybara-reports
shopt -s nullglob
capybara bara ref/sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4hep.root* sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.edm4hep.root
mv capybara-reports sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}
touch .sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}
- uses: actions/upload-artifact@v4
with:
name: sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}.capy
path: |
.sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}
sim_dis_${{matrix.beam}}_minQ2=${{matrix.minq2}}_${{ matrix.detector_config }}/
if-no-files-found: error

merge-npsim-capybara:
runs-on: ubuntu-latest
needs:
- npsim-gun
- npsim-dis
steps:
- uses: actions/upload-artifact/merge@v4
with:
name: capybara-report
pattern: |
*.capy
delete-merged: true

build-artifacts-page:
runs-on: ubuntu-latest
needs:
Expand Down
31 changes: 22 additions & 9 deletions compact/definitions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -608,15 +608,28 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc
<comment> HcalEndcapN needs to clear the straight beampipe with 1 * crossing angle + its radius of 22.25 mm </comment>
<constant name="HcalEndcapN_rmin" value="max((HcalEndcapN_zmin + HcalEndcapN_length) * tan(abs(CrossingAngle)) + 22.25 * mm, 14.0 * cm)"/>

<constant name="HcalBarrel_thickness" value="93.0*cm"/> <!-- ref: as-built CAD, plus a little room for the longer half-plates -->
<constant name="HcalBarrel_rmin" value="Solenoid_rmax"/>
<constant name="HcalBarrel_rmax" value="HcalBarrel_rmin + HcalBarrel_thickness"/>
<constant name="HcalBarrelForward_zmax" value="ForwardServiceGap_zmin"/>
<constant name="HcalBarrelBackward_zmax" value="BackwardServiceGap_zmin"/>
<constant name="HcalBarrel_length" value="HcalBarrelForward_zmax + HcalBarrelBackward_zmax"/>
<constant name="HcalBarrel_offset" value="(HcalBarrelForward_zmax - HcalBarrelBackward_zmax)/2"/>
<constant name="HcalEndcapN_rmax" value="min(HcalBarrel_rmax, 267.0 * cm)"/>
<constant name="HcalEndcapP_rmax" value="HcalBarrel_rmax"/>
<documentation>
## Barrel HCAL Parameters

Hard-coded numbers are taken from the 3D model for the sPHENIX HCAL, see:

https://github.com/eic/epic-data/tree/main/barrel_HCAL_gdml

for 3D model files and FreeCAD projects.
</documentation>

<constant name="HcalBarrel_thickness" value="86.18*cm"/>
<constant name="HcalBarrel_rmin1" value="183.85*cm"/>
<constant name="HcalBarrel_rmin2" value="HcalBarrel_rmin1 + 10.4*cm"/>
<constant name="HcalBarrel_rmax" value="HcalBarrel_rmin1 + HcalBarrel_thickness"/>
<constant name="HcalBarrelForward_zmax" value="319.625*cm"/>
<constant name="HcalBarrelBackward_zmax" value="HcalBarrelForward_zmax"/>
<constant name="HcalBarrel_length2" value="HcalBarrelForward_zmax + HcalBarrelBackward_zmax"/>
<constant name="HcalBarrel_length1" value="319.0*cm"/>
<constant name="HcalBarrel_offset" value="(HcalBarrelForward_zmax - HcalBarrelBackward_zmax)/2"/>

<constant name="HcalEndcapN_rmax" value="min(HcalBarrel_rmax, 267.0 * cm)"/>
<constant name="HcalEndcapP_rmax" value="HcalBarrel_rmax"/>

<constant name="FluxEndcapN_collar_rmax" value="326.2*cm"/>
<constant name="FluxEndcapN_collar_rmin" value="269.0*cm"/>
Expand Down
14 changes: 10 additions & 4 deletions compact/ecal/barrel_interlayers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@
</comment>
<!-- Number of imaging layer slots -->
<constant name="EcalBarrelImagingLayers_nMax" value="6"/>
<comment>
Active part of the calorimeter is
215 cm long in e-going
221.5 cm long in p-going
-42 cm offset
</comment>
<constant name="EcalBarrel_Calorimeter_zmin"
value="min(258.75*cm, EcalBarrelBackward_zmax)"/>
value="min(260.25*cm, EcalBarrelBackward_zmax)"/>
<constant name="EcalBarrel_Calorimeter_zmax"
value="min(181.25*cm, EcalBarrelForward_zmax)"/>
<constant name="EcalBarrel_Readout_zmin" value="273.75*cm"/>
<constant name="EcalBarrel_Readout_zmax" value="196.25*cm"/>
value="min(176.25*cm, EcalBarrelForward_zmax)"/>
<constant name="EcalBarrel_Readout_zmin" value="275.25*cm"/>
<constant name="EcalBarrel_Readout_zmax" value="191.25*cm"/>
<constant name="EcalBarrel_Calorimeter_length"
value="EcalBarrel_Calorimeter_zmax + EcalBarrel_Calorimeter_zmin"/>
<constant name="EcalBarrel_Calorimeter_offset"
Expand Down
4 changes: 2 additions & 2 deletions compact/fields/beamline_10x100.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<constant name="B0PF_GradientMax" value="-8.12238283*tesla/m"/>
<constant name="B0APF_GradientMax" value="0.0*tesla/m"/>
<constant name="Q1APF_GradientMax" value="-44.08979*tesla/m"/>
<constant name="Q1BPF_GradientMax" value="0.0*tesla/m"/> <!-- need to check with Scott on this one -->
<constant name="Q1BPF_GradientMax" value="0.0*tesla/m"/>
<constant name="Q2PF_GradientMax" value="12.7764668*tesla/m"/>
<constant name="B1PF_GradientMax" value="0.0*tesla/m"/>
<constant name="B1APF_GradientMax" value="0.0*tesla/m"/>
Expand All @@ -44,7 +44,7 @@
<constant name="Q1EF_GradientMax" value="2.127596364*tesla/m"/>

<constant name="B0PF_Bmax" value="1.1840539*tesla"/>
<constant name="B0APF_Bmax" value="1.1588921*tesla"/> <!-- need to check with Scott on this one -->
<constant name="B0APF_Bmax" value="-1.1588921*tesla"/>
<constant name="Q1APF_Bmax" value="0.0*tesla"/>
<constant name="Q1BPF_Bmax" value="0.0*tesla"/>
<constant name="Q2PF_Bmax" value="0.0*tesla"/>
Expand Down
4 changes: 2 additions & 2 deletions compact/fields/beamline_5x100.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<constant name="B0PF_GradientMax" value="-8.12238283*tesla/m"/>
<constant name="B0APF_GradientMax" value="0.0*tesla/m"/>
<constant name="Q1APF_GradientMax" value="-44.08979*tesla/m"/>
<constant name="Q1BPF_GradientMax" value="0.0*tesla/m"/> <!-- need to check with Scott on this one -->
<constant name="Q1BPF_GradientMax" value="0.0*tesla/m"/>
<constant name="Q2PF_GradientMax" value="12.7764668*tesla/m"/>
<constant name="B1PF_GradientMax" value="0.0*tesla/m"/>
<constant name="B1APF_GradientMax" value="0.0*tesla/m"/>
Expand All @@ -44,7 +44,7 @@
<constant name="Q1EF_GradientMax" value="2.127596364*tesla/m"/>

<constant name="B0PF_Bmax" value="1.1840539*tesla"/>
<constant name="B0APF_Bmax" value="1.1588921*tesla"/> <!-- need to check with Scott on this one -->
<constant name="B0APF_Bmax" value="-1.1588921*tesla"/>
<constant name="Q1APF_Bmax" value="0.0*tesla"/>
<constant name="Q1BPF_Bmax" value="0.0*tesla"/>
<constant name="Q2PF_Bmax" value="0.0*tesla"/>
Expand Down
Loading

0 comments on commit 246189a

Please sign in to comment.