Skip to content

Commit

Permalink
Implement lumi dipole B mapping (#527)
Browse files Browse the repository at this point in the history
### Briefly, what does this PR introduce?

Implement lumi dipole B mapping and modify source code to treat R-Z and
X-Y-Z coordinate systems.


### What kind of change does this PR introduce?
- [ ] Bug fix (issue #__)
- [x ] New feature (issue #__)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [ ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?

### Does this PR change default behavior?

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dmitry Kalinkin <[email protected]>
  • Loading branch information
3 people authored Oct 17, 2023
1 parent a1e66cc commit 737f84f
Show file tree
Hide file tree
Showing 4 changed files with 429 additions and 254 deletions.
41 changes: 38 additions & 3 deletions compact/far_backward/lumi/lumi_magnets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,55 @@ Construct the sweeper and analyzer dipole magnets for the luminosity subsystem.
Detailed field map to be inserted later.
</comment>


<fields>

<comment> Ideal fields </comment>
<comment>
<field name="LumiSweeperField" type="MultipoleMagnet">
<position x="LumiSweepMag_X" y="LumiSweepMag_Y" z="LumiSweepMag_Z"/>
<rotation x="0" y="0" z="0"/>
<shape type="Box" dx="LumiMag_DX_InnerBox/2.0" dy="LumiMag_DY_InnerBox/2.0" dz="LumiMag_DZ/2.0"/>
<coefficient coefficient="0" skew="LumiSweepMag_B"/>
<coefficient coefficient="0" skew="LumiSweepIdealMag_B"/>
</field>

<field name="LumiSpectrometerField" type="MultipoleMagnet">
<field name="LumiAnalyzerField" type="MultipoleMagnet">
<position x="LumiAnalyzerMag_X" y="LumiAnalyzerMag_Y" z="LumiAnalyzerMag_Z"/>
<rotation x="0" y="0" z="0"/>
<shape type="Box" dx="LumiMag_DX_InnerBox/2.0" dy="LumiMag_DY_InnerBox/2.0" dz="LumiMag_DZ/2.0"/>
<coefficient coefficient="0" skew="LumiAnalyzerMag_B"/>
<coefficient coefficient="0" skew="LumiAnalyzerIdealMag_B"/>
</field>
</comment>

<comment> Calculated fields </comment>
<field type="epic_FieldMapB" name="LumiSweeperField" field_type="magnetic" coord_type="BxByBz"
field_map="fieldmaps/LumiDipoleMapping_2023_09_15_XYZ_coords_cm_T.txt"
url="https://github.com/eic/epic-data/raw/5a6bc4cd583fb3330bce475cf25b599661b902ee/LumiDipoleMapping_2023_09_15_XYZ_coords_cm_T.txt"
cache="$DETECTOR_PATH:/opt/detector"
scale="1.0">
<dimensions>
<X step="0.5*cm" min="-7.5*cm" max="7.5*cm" />
<Y step="2.0*cm" min="-34*cm" max="34*cm" />
<Z step="2.0*cm" min="-80*cm" max="80*cm" />
<translationCoord x="LumiSweepMag_X" y="LumiSweepMag_Y" z="LumiSweepMag_Z" />
<rotationField x="0" y="0" z="0" />
</dimensions>
</field>

<field type="epic_FieldMapB" name="LumiAnalyzerField" field_type="magnetic" coord_type="BxByBz"
field_map="fieldmaps/LumiDipoleMapping_2023_09_15_XYZ_coords_cm_T.txt"
url="https://github.com/eic/epic-data/raw/5a6bc4cd583fb3330bce475cf25b599661b902ee/LumiDipoleMapping_2023_09_15_XYZ_coords_cm_T.txt"
cache="$DETECTOR_PATH:/opt/detector"
scale="1.0">
<dimensions>
<X step="0.5*cm" min="-7.5*cm" max="7.5*cm" />
<Y step="2.0*cm" min="-34*cm" max="34*cm" />
<Z step="2.0*cm" min="-80*cm" max="80*cm" />
<translationCoord x="LumiAnalyzerMag_X" y="LumiAnalyzerMag_Y" z="LumiAnalyzerMag_Z" />
<rotationField x="0" y="0" z="0" />
</dimensions>
</field>

</fields>

</lccdd>
10 changes: 5 additions & 5 deletions compact/fields/marco.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

<lccdd>
<fields>
<field type="epic_FieldMapBrBz" name="GlobalSolenoid" field_type="magnetic"
<field type="epic_FieldMapB" name="GlobalSolenoid" field_type="magnetic" coord_type="BrBz"
field_map="fieldmaps/MARCO_v.6.4.1.1.3_1.7T_Magnetic_Field_Map_2022_11_14_rad_coords_cm_T.txt"
url="https://github.com/eic/epic-data/raw/64b7ca6306b138b7f000e696c82bd8f72db1da56/MARCO_v.6.4.1.1.3_1.7T_Magnetic_Field_Map_2022_11_14_rad_coords_cm_T.txt"
cache="$DETECTOR_PATH:/opt/detector"
scale="1.0">
<dimensions>
<transverse step="2.0*cm" rmin="0*cm" rmax="998*cm" />
<longitudinal step="2.0*cm" zmin="-800*cm" zmax="798*cm" />
<translation x="0.0*cm" y="0.0*cm" z="0.0*cm" />
<rotation x="0" y="0" z="0" />
<R step="2.0*cm" min="0*cm" max="998*cm" />
<Z step="2.0*cm" min="-800*cm" max="798*cm" />
<translationCoord x="0.0*cm" y="0.0*cm" z="0.0*cm" />
<rotationField x="0" y="0" z="0" />
</dimensions>
</field>
</fields>
Expand Down
Loading

0 comments on commit 737f84f

Please sign in to comment.