Skip to content

Commit

Permalink
Merge branch 'main' into tof_new_gemo
Browse files Browse the repository at this point in the history
  • Loading branch information
ssedd1123 authored Oct 17, 2024
2 parents 9fc43eb + 21add61 commit 268a3db
Show file tree
Hide file tree
Showing 18 changed files with 266 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>
1 change: 1 addition & 0 deletions configurations/inner_detector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ features:
tof_barrel:
tof_endcap:
ecal:
forward_homogeneous:
bic_default:
backward_PbWO4:
pid:
Expand Down
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 268a3db

Please sign in to comment.