-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved electron beam pipe modelling #691
Conversation
…odified detectors to fit the outgoing h-beam pipe
…ard sub-systems to fit the outgoing h-beam pipe (cone-shape). Rebuilt magnets. Some geometry parameters are hard-coded (should be fixed).
for more information, see https://pre-commit.ci
9a507a8
to
490c56c
Compare
<id>system:8</id> | ||
</readout> | ||
</readouts> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is supposed to go into the official geometry. Why do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @veprbl ,
Thanks for your comment. The motivation for making the luminosity monitor exit window sensitive to radiation is that we have to study this element (a simple aluminum block) and check if it will survive under a high flux of synchrotron radiation photons. So far, the preliminary study showed that at 18 GeV, 0.227 A electron beam, the window will melt in 2 hours. So, we have to think about additional cooling. Therefore, I would suggest keeping this part of the code to collect deposited energy in that element.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/magnetVacuumFF.cpp
Outdated
@@ -144,7 +144,7 @@ static Ref_t create_detector(Detector& det, xml_h e, SensitiveDetector /* sens * | |||
// -->the volume will be calculated at the end | |||
//------------------------------------------- | |||
|
|||
double endOfCentralBeamPipe_z = 445.580*dd4hep::cm; //extracted from central_beampipe.xml, line 64 | |||
double endOfCentralBeamPipe_z = 560.00*dd4hep::cm; // <-- extracted from central_beampipe.xml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get this from the geometry instead of copying the value and hardcoding it? (I know, not your fault it was already hardcoded, but might as well fix it while we're at it. Also, maybe this should be done in #665.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fine. That's the one part of my magnet volume code which is done that way since we didn't have the numbers somewhere to be grabbed dynamically. @nat93 can you add the change to magnetVacuumFF.cpp to grab the number from line 147 from the central_beampipe.xml line 43?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compact/far_backward/magnets.xml
Outdated
<pipe id="0" name="Pipe_to_Q1eR" | ||
xcenter="0" zcenter="(Center_Beampipe_End + Q1eR_CenterPosition+Q1eR_Length/2)/2" | ||
length="Center_Beampipe_End - (Q1eR_CenterPosition+Q1eR_Length/2)" theta="0" | ||
rout1="Center_Beampipe_Rad" rout2="Q1eR_InnerRadius"> | ||
<pipe id="0" name="Pipe_0" | ||
xcenter="0" zcenter="-7342.0 * mm + (Center_Beampipe_End + 7342.0 * mm)/2" | ||
length="Center_Beampipe_End + 7342.0 * mm" theta="0" | ||
rout1="Center_Beampipe_Rad" rout2="(111.40/2 + 2) * mm"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should avoid changing parametrized values into hard-coded values that are then used in multiple places. (Applies file-wide.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is true. However, I would suggest keeping the beam pipe geometry separated from the magnet geometry because they have different sources (i.e., the beam pipe model is from the vacuum and background groups, magnets -- lattice and magnet groups). Also, the inner radius of magnets should not always follow the beam pipe radius.
I can create beam pipe global variables in the central-beam pipe XML file to be used here. What do you think @wdconinc ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if we need them all as global variables in the central beam pipe; they can be local variables in the far_backward and far_forward sections, right?
<constant name="B2BeR_Length" value="5.500075391030 * m"/> | ||
<constant name="B2BeR_CenterPosition" value="-15.000075390000 * m + B2BeR_Length/2"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do the microns matter here?
<constant name="B2BeR_Length" value="5.500075391030 * m"/> | |
<constant name="B2BeR_CenterPosition" value="-15.000075390000 * m + B2BeR_Length/2"/> | |
<constant name="B2BeR_Length" value="5.5 * m"/> | |
<constant name="B2BeR_CenterPosition" value="-15.0 * m + B2BeR_Length/2"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, I simply follow the lattice file v6.2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are following a specific lattice version, we should mention this in one of the comments somewhere, with a reference for where one can find this lattice version (even if not publicly accessible).
<constant name="ForwardRICHRegion_tan1" value="CentralTrackingRegionP_tan * 0.88" /> | ||
<constant name="ForwardRICHRegion_tan2" value="Eta3_6_tan * 0.89" /> | ||
<constant name="ForwardRICHRegion_tan1" value="CentralTrackingRegionP_tan * 1.20" /> | ||
<constant name="ForwardRICHRegion_tan2" value="Eta3_6_tan * 1.20" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes the shape of the dRICH and can't get merged without TIC review and approval.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please ping the relevant experts? Because we cannot use the actual beam pipe due to overlaps with dRICH.
compact/central_beampipe.xml
Outdated
<zplane z="BeampipeDownstreamStraightLength" OD="BeampipeOD"/> | ||
<zplane z="4484.25 * mm" OD="BeampipeOD"/> | ||
<zplane_vac z="670.00 * mm" OD="60.00 * mm"/> | ||
<zplane_vac z="755.00 * mm" OD="60.00 * mm"/> | ||
<zplane_vac z="755.00 * mm" OD="62.00 * mm"/> | ||
<zplane_vac z="4300.00 * mm" OD="62.00 * mm"/> | ||
<zplane_vac z="4450.00 * mm" OD="44.00 * mm"/> | ||
<zplane_vac z="4460.00 * mm" OD="44.00 * mm"/> | ||
<zplane_vac z="4660.00 * mm" OD="54.00 * mm"/> | ||
<zplane_vac z="5100.00 * mm" OD="54.00 * mm"/> | ||
|
||
<zplane_mat z="670.00 * mm" OD="(62.00 + 1.0 * 2) * mm"/> | ||
<zplane_mat z="(670.00 + 1.0) * mm" OD="(62.00 + 1.0 * 2) * mm"/> | ||
<zplane_mat z="(670.00 + 1.0) * mm" OD="(60.00 + 1.0 * 2) * mm"/> | ||
<zplane_mat z="(755.00 - 1.0) * mm" OD="(60.00 + 1.0 * 2) * mm"/> | ||
<zplane_mat z="(755.00 - 1.0) * mm" OD="(62.00 + 1.0 * 2) * mm"/> | ||
<zplane_mat z="4300.00 * mm" OD="(62.00 + 1.0 * 2) * mm"/> | ||
<zplane_mat z="4450.00 * mm" OD="(44.00 + 1.0 * 2) * mm"/> | ||
<zplane_mat z="4460.00 * mm" OD="(44.00 + 1.0 * 2) * mm"/> | ||
<zplane_mat z="4660.00 * mm" OD="(54.00 + 1.0 * 2) * mm"/> | ||
<zplane_mat z="5100.00 * mm" OD="(54.00 + 1.0 * 2) * mm"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really like the duplication of all z and many of the OD values here. Can we approach this conceptually different so it doesn't require this level of duplication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This now also adds another methodology to define beampipes: we can still use <zplane>
but now we have <zplane_mat>
and <zplane_vac>
. We may want to have one way, which sensibly defaults back to the previous behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Thanks. I will think about this.
src/IP6BeamPipe.cpp
Outdated
@@ -201,6 +233,121 @@ static Ref_t create_detector(Detector& det, xml_h e, SensitiveDetector /* sens * | |||
return std::make_pair<Volume, Volume>({"v_" + name + "_matter", matter, m_Al}, | |||
{"v_" + name + "_vacuum", vacuum, m_Vacuum}); | |||
}; | |||
//--------------------------------------------------------------------------------- | |||
// Create downstream volumes | |||
auto create_volumes_2 = [&](const std::string& name, xml::Component& x_pipe1, xml::Component& x_pipe2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not duplicate the API here, but make the original one work reliably in both use cases. This code duplication doubles maintenance burden.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I will try to merge them.
src/IP6BeamPipe.cpp
Outdated
// _________/...... | ||
// ................ | ||
|
||
auto zplane_to_polycones_2 = [](xml::Component& x_pipe) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not duplicate the API here, but make the original one work reliably in both use cases. This code duplication doubles maintenance burden.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I will try to merge them.
<constant name="ForwardTOFRegion_minR" value="8*cm" /> | ||
<constant name="ForwardTOFRegion_minR" value="10*cm" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to detector envelope volumes require updates to the detector parameter table first, along with TIC review and approval (https://eic.jlab.org/Geometry/Detector/Detector-20240117135224.html indicates 8 cm).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I wrote, we cannot fit the actual beam pipe in the current detector. Please let me know the procedure to get it approved. Do you know who should be contacted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current procedure is to send an email with requests for changes to the detector parameter table to the detector parameter table maintainers, the project's experiment contacts, collaboration leadership, and the specific detector contacts. I will send you their emails instead of posting them here.
<constant name="ForwardMPGDMod1_rmin" value="7.014*cm" /> | ||
<constant name="ForwardMPGDMod2_rmin" value="7.014*cm"/> | ||
<constant name="ForwardMPGDMod1_rmin" value="8.014*cm" /> | ||
<constant name="ForwardMPGDMod2_rmin" value="9.014*cm"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to detector envelope volumes require updates to the detector parameter table first, along with TIC review and approval.
…stead of hardcoding in src/magnetVacuumFF.cpp
for more information, see https://pre-commit.ci
…in compact/far_backward/definitions.xml
…c_sr_background_study Pull from the main branch
for more information, see https://pre-commit.ci
…nts for the central beam pipe.
…c_sr_background_study integrate the remote changes
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…c_sr_background_study integrate the remote changes
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…c_sr_background_study Merge from git before push
for more information, see https://pre-commit.ci
Formatted, merged main, conflicts resolved in favor of feature branch. |
Update my local branch
Briefly, what does this PR introduce?
It contains the improved geometry of the central and far-backward beam pipes. In addition, some overlaps between ePIC and the new beam pipe are fixed by changing the detector components' inner radius (this has to be approved by detector experts).
What kind of change does this PR introduce?
Please check if this PR fulfills the following:
Does this PR introduce breaking changes? What changes might users need to make to their code?
We must check how the modified subsystem geometries affect detector performance (angular acceptance, resolution, etc.).
Does this PR change default behavior?
Yes. Now, we should have a more accurate beam pipe with an enlarged inner radius of subsystems in the forward direction to fit the new beam pipe. This may affect detector background rates.
Things to be done
Still, the materials of the beam pipes (by default, aluminum) are wrong, except for the IP beam pipe. The next step would be to fix this issue (it should be stainless steel with a copper coating).
References
Machine lattice file v6.2: esr-ring-norad.tfs and esr-survey-doug.tfs
Electron beam pipe vacuum geometry (from the EIC vacuum group): detector_chamber_211004.pdf and STL file
Detector geometry file - Apr 2024: EPIC Envelope - 04-03-2024.pdf
Updated detector geometry table - Apr 2024: Detector-20240426