Skip to content

Commit

Permalink
Update sensor geometry for rp (#791)
Browse files Browse the repository at this point in the history
### Briefly, what does this PR introduce?

This PR introduces changing RP geometry for the various beam energies,
and updates the sensor size for the AC-LGADs to what we are planning to
build.

### 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:
- [ x] Tests for the changes have been added (see PDF)
- [ x] Documentation has been added / updated
- [x ] Changes have been communicated to collaborators

Changes will be presented at meetings on Monday and Tuesday (Oct 14th
and 15th)

See slides here:
https://www.dropbox.com/scl/fi/43mhwxeyvluku0w1ojqfr/new_roman_pots_geometry_10_9_2024.pdf?rlkey=w0wc0gzrk4d03e8uh9w8s0tq5&dl=0

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

No changes to user code needed, but users need to be careful to select
the correct geometry when running dd4hep AND EICrecon.
(https://chat.epic-eic.org/main/pl/rptqecge1jyctkkwa1454zy1mw)

I will hopefully address this issue in a PR immediately following this
one.

### Does this PR change default behavior?

Yes, the low-pT acceptances at the Roman pots will be much closer to
reality now, and will vary with beam energy, as they should.

---------

Co-authored-by: Alexander Jentsch <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
(cherry picked from commit 21add61)
  • Loading branch information
ajentsch authored and veprbl committed Oct 16, 2024
1 parent 4c6c58a commit a753b36
Show file tree
Hide file tree
Showing 17 changed files with 265 additions and 117 deletions.
8 changes: 4 additions & 4 deletions compact/display.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@


<vis name="FFTrackerVis" ref="AnlRed" />
<vis name="FFTrackerSupportVis" ref="AnlBlue" visible="true" showDaughters="false" />
<vis name="FFTrackerShieldingVis" ref="AnlGray" visible="true" showDaughters="false" />
<vis name="FFTrackerServiceVis" ref="AnlGold" visible="true" showDaughters="false" />
<vis name="FFTrackerSupportVis" ref="AnlBlue" visible="true" showDaughters="true" />
<vis name="FFTrackerShieldingVis" ref="AnlLightGray" visible="true" showDaughters="true" />
<vis name="FFTrackerServiceVis" ref="AnlGold" visible="true" showDaughters="true" />
<vis name="FFTrackerLayerVis" ref="TrackerVis" visible="true" showDaughters="true" />
<vis name="FFTrackerModuleVis" ref="FFTrackerLayerVis" visible="true" showDaughters="true" />
<vis name="FFTrackerSurfaceVis" ref="FFTrackerLayerVis" visible="true" showDaughters="true" />
<comment> For shielded modules by default just display to module instead of 6 layers </comment>
<vis name="FFTrackerShieldedModuleVis" ref="FFTrackerModuleVis" visible="true" showDaughters="false" />
<vis name="FFTrackerShieldedModuleVis" ref="FFTrackerModuleVis" visible="true" showDaughters="true" />

<comment>
Luminosity Visualisation
Expand Down
182 changes: 96 additions & 86 deletions compact/far_forward/roman_pots_eRD24_design.xml

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions compact/fields/beamline_10x100.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,14 @@
<constant name="Q0EF_BMax" value="0.0*tesla"/>
<constant name="Q1EF_BMax" value="0.0*tesla"/>

<comment>
These are the ten-sigma cuts for the Roman pots, translated to the physical layout we currently have.
They are not perfectly ten-sigma for reasons of physical geometry.
</comment>

<constant name="offset_central_RP_section" value ="0.71*cm"/>
<constant name="offset_intermediate_1_RP_section" value ="0.55*cm"/>
<constant name="offset_intermediate_2_RP_section" value ="0.0*cm"/>
<constant name="offset_outer_RP_section" value ="0.0*cm"/>

</define>
12 changes: 12 additions & 0 deletions compact/fields/beamline_10x110_H2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,16 @@
<constant name="Q0EF_BMax" value="0.0*tesla"/>
<constant name="Q1EF_BMax" value="0.0*tesla"/>

<comment>
These are the ten-sigma cuts for the Roman pots, translated to the physical layout we currently have.
They are not perfectly ten-sigma for reasons of physical geometry.

Nuclei currently based on nearest per-nucleon proton energy (needs eventual update from machine).
</comment>

<constant name="offset_central_RP_section" value ="0.71*cm"/>
<constant name="offset_intermediate_1_RP_section" value ="0.55*cm"/>
<constant name="offset_intermediate_2_RP_section" value ="0.0*cm"/>
<constant name="offset_outer_RP_section" value ="0.0*cm"/>

</define>
10 changes: 10 additions & 0 deletions compact/fields/beamline_10x275.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,14 @@
<constant name="Q0EF_BMax" value="0.0*tesla"/>
<constant name="Q1EF_BMax" value="0.0*tesla"/>

<comment>
These are the ten-sigma cuts for the Roman pots, translated to the physical layout we currently have.
They are not perfectly ten-sigma for reasons of physical geometry.
</comment>

<constant name="offset_central_RP_section" value ="0.27*cm"/>
<constant name="offset_intermediate_1_RP_section" value ="0.0*cm"/>
<constant name="offset_intermediate_2_RP_section" value ="0.0*cm"/>
<constant name="offset_outer_RP_section" value ="0.0*cm"/>

</define>
12 changes: 12 additions & 0 deletions compact/fields/beamline_18x110_Au.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,16 @@
<constant name="Q0EF_BMax" value="0.0*tesla"/>
<constant name="Q1EF_BMax" value="0.0*tesla"/>

<comment>
These are the ten-sigma cuts for the Roman pots, translated to the physical layout we currently have.
They are not perfectly ten-sigma for reasons of physical geometry.

Nuclei currently based on nearest per-nucleon proton energy (needs eventual update from machine).
</comment>

<constant name="offset_central_RP_section" value ="0.71*cm"/>
<constant name="offset_intermediate_1_RP_section" value ="0.55*cm"/>
<constant name="offset_intermediate_2_RP_section" value ="0.0*cm"/>
<constant name="offset_outer_RP_section" value ="0.0*cm"/>

</define>
12 changes: 12 additions & 0 deletions compact/fields/beamline_18x110_H2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,16 @@
<constant name="Q0EF_BMax" value="0.0*tesla"/>
<constant name="Q1EF_BMax" value="0.0*tesla"/>

<comment>
These are the ten-sigma cuts for the Roman pots, translated to the physical layout we currently have.
They are not perfectly ten-sigma for reasons of physical geometry.

Nuclei currently based on nearest per-nucleon proton energy (needs eventual update from machine).
</comment>

<constant name="offset_central_RP_section" value ="0.71*cm"/>
<constant name="offset_intermediate_1_RP_section" value ="0.55*cm"/>
<constant name="offset_intermediate_2_RP_section" value ="0.0*cm"/>
<constant name="offset_outer_RP_section" value ="0.0*cm"/>

</define>
12 changes: 12 additions & 0 deletions compact/fields/beamline_18x110_He3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,16 @@
<constant name="Q0EF_BMax" value="0.0*tesla"/>
<constant name="Q1EF_BMax" value="0.0*tesla"/>

<comment>
These are the ten-sigma cuts for the Roman pots, translated to the physical layout we currently have.
They are not perfectly ten-sigma for reasons of physical geometry.

Nuclei currently based on nearest per-nucleon proton energy (needs eventual update from machine).
</comment>

<constant name="offset_central_RP_section" value ="0.71*cm"/>
<constant name="offset_intermediate_1_RP_section" value ="0.55*cm"/>
<constant name="offset_intermediate_2_RP_section" value ="0.0*cm"/>
<constant name="offset_outer_RP_section" value ="0.0*cm"/>

</define>
12 changes: 12 additions & 0 deletions compact/fields/beamline_18x110_Pb.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,16 @@
<constant name="Q0EF_BMax" value="0.0*tesla"/>
<constant name="Q1EF_BMax" value="0.0*tesla"/>

<comment>
These are the ten-sigma cuts for the Roman pots, translated to the physical layout we currently have.
They are not perfectly ten-sigma for reasons of physical geometry.

Nuclei currently based on nearest per-nucleon proton energy (needs eventual update from machine).
</comment>

<constant name="offset_central_RP_section" value ="0.71*cm"/>
<constant name="offset_intermediate_1_RP_section" value ="0.55*cm"/>
<constant name="offset_intermediate_2_RP_section" value ="0.0*cm"/>
<constant name="offset_outer_RP_section" value ="0.0*cm"/>

</define>
11 changes: 11 additions & 0 deletions compact/fields/beamline_18x275.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,15 @@
<constant name="Q0EF_BMax" value="0.0*tesla"/>
<constant name="Q1EF_BMax" value="0.0*tesla"/>

<comment>
These are the ten-sigma cuts for the Roman pots, translated to the physical layout we currently have.
They are not perfectly ten-sigma for reasons of physical geometry.
</comment>

<constant name="offset_central_RP_section" value ="0.27*cm"/>
<constant name="offset_intermediate_1_RP_section" value ="0.0*cm"/>
<constant name="offset_intermediate_2_RP_section" value ="0.0*cm"/>
<constant name="offset_outer_RP_section" value ="0.0*cm"/>


</define>
10 changes: 10 additions & 0 deletions compact/fields/beamline_5x100.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,14 @@
<constant name="Q0EF_BMax" value="0.0*tesla"/>
<constant name="Q1EF_BMax" value="0.0*tesla"/>

<comment>
These are the ten-sigma cuts for the Roman pots, translated to the physical layout we currently have.
They are not perfectly ten-sigma for reasons of physical geometry.
</comment>

<constant name="offset_central_RP_section" value ="0.71*cm"/>
<constant name="offset_intermediate_1_RP_section" value ="0.55*cm"/>
<constant name="offset_intermediate_2_RP_section" value ="0.0*cm"/>
<constant name="offset_outer_RP_section" value ="0.0*cm"/>

</define>
12 changes: 12 additions & 0 deletions compact/fields/beamline_5x110_H2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,16 @@
<constant name="Q0EF_BMax" value="0.0*tesla"/>
<constant name="Q1EF_BMax" value="0.0*tesla"/>

<comment>
These are the ten-sigma cuts for the Roman pots, translated to the physical layout we currently have.
They are not perfectly ten-sigma for reasons of physical geometry.

Nuclei currently based on nearest per-nucleon proton energy (needs eventual update from machine).
</comment>

<constant name="offset_central_RP_section" value ="0.71*cm"/>
<constant name="offset_intermediate_1_RP_section" value ="0.55*cm"/>
<constant name="offset_intermediate_2_RP_section" value ="0.0*cm"/>
<constant name="offset_outer_RP_section" value ="0.0*cm"/>

</define>
10 changes: 10 additions & 0 deletions compact/fields/beamline_5x41.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,14 @@
<constant name="Q0EF_BMax" value="0.0*tesla"/>
<constant name="Q1EF_BMax" value="0.0*tesla"/>

<comment>
These are the ten-sigma cuts for the Roman pots, translated to the physical layout we currently have.
They are not perfectly ten-sigma for reasons of physical geometry.
</comment>

<constant name="offset_central_RP_section" value ="2.96*cm"/>
<constant name="offset_intermediate_1_RP_section" value ="2.75*cm"/> <!-- rough extrapolation -->
<constant name="offset_intermediate_2_RP_section" value ="1.80*cm"/> <!-- rough extrapolation -->
<constant name="offset_outer_RP_section" value ="0.0*cm"/>

</define>
12 changes: 12 additions & 0 deletions compact/fields/beamline_5x41_H2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,16 @@
<constant name="Q0EF_BMax" value="0.0*tesla"/>
<constant name="Q1EF_BMax" value="0.0*tesla"/>

<comment>
These are the ten-sigma cuts for the Roman pots, translated to the physical layout we currently have.
They are not perfectly ten-sigma for reasons of physical geometry.

Nuclei currently based on nearest per-nucleon proton energy (needs eventual update from machine).
</comment>

<constant name="offset_central_RP_section" value ="2.96*cm"/>
<constant name="offset_intermediate_1_RP_section" value ="2.75*cm"/> <!-- rough extrapolation -->
<constant name="offset_intermediate_2_RP_section" value ="1.80*cm"/> <!-- rough extrapolation -->
<constant name="offset_outer_RP_section" value ="0.0*cm"/>

</define>
12 changes: 12 additions & 0 deletions compact/fields/beamline_5x41_He3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,16 @@
<constant name="Q0EF_BMax" value="0.0*tesla"/>
<constant name="Q1EF_BMax" value="0.0*tesla"/>

<comment>
These are the ten-sigma cuts for the Roman pots, translated to the physical layout we currently have.
They are not perfectly ten-sigma for reasons of physical geometry.

Nuclei currently based on nearest per-nucleon proton energy (needs eventual update from machine).
</comment>

<constant name="offset_central_RP_section" value ="2.96*cm"/>
<constant name="offset_intermediate_1_RP_section" value ="2.75*cm"/> <!-- rough extrapolation -->
<constant name="offset_intermediate_2_RP_section" value ="1.80*cm"/> <!-- rough extrapolation -->
<constant name="offset_outer_RP_section" value ="0.0*cm"/>

</define>
12 changes: 12 additions & 0 deletions compact/fields/beamline_5x41_He4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,16 @@
<constant name="Q0EF_BMax" value="0.0*tesla"/>
<constant name="Q1EF_BMax" value="0.0*tesla"/>

<comment>
These are the ten-sigma cuts for the Roman pots, translated to the physical layout we currently have.
They are not perfectly ten-sigma for reasons of physical geometry.

Nuclei currently based on nearest per-nucleon proton energy (needs eventual update from machine).
</comment>

<constant name="offset_central_RP_section" value ="2.96*cm"/>
<constant name="offset_intermediate_1_RP_section" value ="2.75*cm"/> <!-- rough extrapolation -->
<constant name="offset_intermediate_2_RP_section" value ="1.80*cm"/> <!-- rough extrapolation -->
<constant name="offset_outer_RP_section" value ="0.0*cm"/>

</define>
33 changes: 6 additions & 27 deletions src/ForwardRomanPot_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
for (xml_coll_t mi(x_det, _U(module)); mi; ++mi, ++m_id) {
xml_comp_t x_mod = mi;
string m_nam = x_mod.nameStr();
double mod_width = getAttrOrDefault<double>(x_mod, _U(width), 3.2 * cm);
double mod_height = getAttrOrDefault<double>(x_mod, _U(height), 3.2 * cm);
double mod_width = getAttrOrDefault<double>(x_mod, _U(width), 1.6 * cm);
double mod_height = getAttrOrDefault<double>(x_mod, _U(height), 1.6 * cm);
double mod_total_thickness = 0.;

xml_coll_t ci(x_mod, _U(module_component));
Expand All @@ -42,9 +42,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s

Box m_solid(mod_width / 2.0, mod_height / 2.0, mod_total_thickness / 2.0);
Volume m_volume(m_nam, m_solid, vacuum);
//set to AnlGold temporarily for future RP troubleshooting
//m_volume.setVisAttributes(description.visAttributes(x_mod.visStr()));
m_volume.setVisAttributes(description.visAttributes("AnlGold"));
m_volume.setVisAttributes(description.visAttributes(x_mod.visStr()));

double comp_z_pos = -mod_total_thickness / 2.0;
int n_sensor = 1;
Expand Down Expand Up @@ -99,8 +97,8 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
double nx = getAttrOrDefault<double>(x_array, _Unicode(nx), 1);
double ny = getAttrOrDefault<double>(x_array, _Unicode(ny), 1);
double dz = getAttrOrDefault<double>(x_array, _Unicode(dz), 0 * mm);
double arr_width = getAttrOrDefault<double>(x_array, _Unicode(width), 3.2 * cm);
double arr_height = getAttrOrDefault<double>(x_array, _Unicode(height), 3.2 * cm);
double arr_width = getAttrOrDefault<double>(x_array, _Unicode(width), 1.6 * cm);
double arr_height = getAttrOrDefault<double>(x_array, _Unicode(height), 1.6 * cm);
std::string arr_module = getAttrOrDefault<std::string>(x_array, _Unicode(module), "");
// TODO: add check here
auto arr_vol = modules[arr_module];
Expand All @@ -120,6 +118,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
if (x_pos) {
arr_pos += Position(x_pos.x(0), x_pos.y(0), x_pos.z(0));
}

DetElement mod_de(ma_de, ma_name + std::string("_mod") + std::to_string(i_mod), i_mod);
pv = ma_vol.placeVolume(arr_vol, arr_pos);
pv.addPhysVolID("module", i_mod);
Expand All @@ -128,12 +127,6 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
PlacedVolume sens_pv = sensVols[ic];
DetElement comp_de(mod_de, std::string("de_") + sens_pv.volume().name(), ic + 1);
comp_de.setPlacement(sens_pv);
// Acts::ActsExtension* sensorExtension = new Acts::ActsExtension();
//// sensorExtension->addType("sensor", "detector");
// comp_de.addExtension<Acts::ActsExtension>(sensorExtension);
//// comp_de.setAttributes(description, sens_pv.volume(),
/// x_layer.regionStr(), / x_layer.limitsStr(), /
/// xml_det_t(xmleles[m_nam]).visStr());
}
}
}
Expand All @@ -159,11 +152,9 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
xml_comp_t x_comp = ci;
xml_comp_t c_pos = x_comp.position(false);

// string ma_name = x_comp.nameStr();
string comp_assembly = getAttrOrDefault<std::string>(x_comp, _Unicode(assembly), "");

auto comp_vol = module_assemblies[comp_assembly];
// auto de = ;
auto comp_de =
module_assembly_delements[comp_assembly].clone(comp_assembly + std::to_string(l_num));
if (c_pos) {
Expand All @@ -175,25 +166,13 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
comp_de.setPlacement(pv);
layer.add(comp_de);
i_assembly++;
// DetElement det = module > 1 ? stave.clone(_toString(module,"stave%d"))
// : stave; Transform3D trafo(RotationZYX(0, rotY, rotX),
// Translation3D(-posX, -posY, 0)); PlacedVolume pv =
// envelopeVolume.placeVolume(sectVolume,trafo);
//// Not a valid volID: pv.addPhysVolID("stave", 0);
// pv.addPhysVolID("module", module);
// det.setPlacement(pv);
// parent.add(det);
}
pv = assembly.placeVolume(l_vol, l_pos);
pv.addPhysVolID("layer", l_num);
}

// pv = description.pickMotherVolume(sdet).placeVolume(assembly,
// Position(pos.x(), pos.y(), pos.z()));
Transform3D posAndRot(RotationZYX(rot.z(), rot.y(), rot.x()),
Position(pos.x(), pos.y(), pos.z()));
// pv = description.pickMotherVolume(sdet).placeVolume(assembly,
// Position(pos.x(), pos.y(), pos.z()));
pv = description.pickMotherVolume(sdet).placeVolume(assembly, posAndRot);
pv.addPhysVolID("system", x_det.id()); // Set the subdetector system ID.
sdet.setPlacement(pv);
Expand Down

0 comments on commit a753b36

Please sign in to comment.