Skip to content
Snippets Groups Projects
Commit 3826a84f authored by Marshall Scott's avatar Marshall Scott
Browse files

altered gem max radius so not to overlap with hcal

parent 6a3a3ed5
No related branches found
No related tags found
No related merge requests found
Pipeline #8056 failed
This commit is part of merge request !12. Comments created here will be created in the context of that merge request.
...@@ -44,8 +44,7 @@ ...@@ -44,8 +44,7 @@
</comment> </comment>
<detector id="ci_GEM_id" name="ci_GEM" type="ci_GEM" insideTrackingVolume="false" vis="ci_GEMVis"> <detector id="ci_GEM_id" name="ci_GEM" type="ci_GEM" insideTrackingVolume="false" vis="ci_GEMVis">
<material name="Ar10CO2"/> <material name="Ar10CO2"/>
<dimensions rmin="ci_GEM_rin" rmax="ci_GEM_rout" z_length="ci_GEM_sizez" z_offset="ci_GEM_shiftz" z="ci_GEM_posz" x="ci_GEM_posx" number="ci_GEM_nlayers"/> <dimensions rmin="ci_GEM_rin" rmax="ci_GEM_rout" z_length="ci_GEM_sizez" z_offset="ci_GEM_shiftz" z="ci_GEM_posz" x="ci_GEM_posx" number="ci_GEM_nlayers" rmax1="ci_HCAL_lay_rin -1*cm"/>
<layer id="0" z="-ci_GEM_sizez * 0.5 + (5 + 3. * 0) * cm" inner_r="ci_GEM_rin + (1. + 0.5 * 0) * cm" outer_r="ci_GEM_rout + (-25. + 2. * 0) * cm" dz="1 * cm" /> <layer id="0" z="-ci_GEM_sizez * 0.5 + (5 + 3. * 0) * cm" inner_r="ci_GEM_rin + (1. + 0.5 * 0) * cm" outer_r="ci_GEM_rout + (-25. + 2. * 0) * cm" dz="1 * cm" />
<layer id="1" z="-ci_GEM_sizez * 0.5 + (5 + 3. * 1) * cm" inner_r="ci_GEM_rin + (1. + 0.5 * 1) * cm" outer_r="ci_GEM_rout + (-25. + 2. * 1) * cm" dz="1 * cm" /> <layer id="1" z="-ci_GEM_sizez * 0.5 + (5 + 3. * 1) * cm" inner_r="ci_GEM_rin + (1. + 0.5 * 1) * cm" outer_r="ci_GEM_rout + (-25. + 2. * 1) * cm" dz="1 * cm" />
<layer id="2" z="-ci_GEM_sizez * 0.5 + (5 + 3. * 2) * cm" inner_r="ci_GEM_rin + (1. + 0.5 * 2) * cm" outer_r="ci_GEM_rout + (-25. + 2. * 2) * cm" dz="1 * cm" /> <layer id="2" z="-ci_GEM_sizez * 0.5 + (5 + 3. * 2) * cm" inner_r="ci_GEM_rin + (1. + 0.5 * 2) * cm" outer_r="ci_GEM_rout + (-25. + 2. * 2) * cm" dz="1 * cm" />
......
...@@ -121,15 +121,16 @@ ...@@ -121,15 +121,16 @@
<include ref="compact/hcal.xml"/> <include ref="compact/hcal.xml"/>
<include ref="compact/forward_rich.xml"/> <include ref="compact/forward_rich.xml"/>
<include ref="compact/ce_mrich.xml"/> <include ref="compact/ce_mrich.xml"/>
<include ref="compact/ci_HCAL.xml"/> <include ref="compact/ci_HCAL.xml"/>
<include ref="compact/ci_GEM.xml"/> <include ref="compact/ci_GEM.xml"/>
<!-- <!--
<include ref="compact/roman_pots.xml"/> <include ref="compact/roman_pots.xml"/>
--> -->
<!--
<include ref="eic/forward_ion_beamline.xml"/> <include ref="eic/forward_ion_beamline.xml"/>
-->
<detectors> <detectors>
......
...@@ -19,6 +19,7 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens ...@@ -19,6 +19,7 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
double X = dims.x(); double X = dims.x();
double Z = dims.z(); double Z = dims.z();
int Nlayers = dims.number(); int Nlayers = dims.number();
double HCAL_rmin = dims.rmax1(); // Maximum radius that the layer can be
Material mat = desc.material(detElem.materialStr()); Material mat = desc.material(detElem.materialStr());
Material vac = desc.material("Vacuum"); Material vac = desc.material("Vacuum");
...@@ -30,8 +31,10 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens ...@@ -30,8 +31,10 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
for (xml_coll_t li(detElem,_U(layer)); li; ++li){ for (xml_coll_t li(detElem,_U(layer)); li; ++li){
xml_comp_t x_layer = li; xml_comp_t x_layer = li;
std::string layer_name = detName + _toString(x_layer.id(), "_layer%d"); std::string layer_name = detName + _toString(x_layer.id(), "_layer%d");
double outer_r = x_layer.outer_r();
if (outer_r > HCAL_rmin){outer_r = HCAL_rmin;}
Volume layer_vol(layer_name, Tube(x_layer.inner_r(), x_layer.outer_r(), x_layer.dz()), mat); Volume layer_vol(layer_name, Tube(x_layer.inner_r(), outer_r, x_layer.dz()), mat);
layer_vol.setVisAttributes(desc.visAttributes(detElem.visStr())); layer_vol.setVisAttributes(desc.visAttributes(detElem.visStr()));
Position layer_pos(0, 0, x_layer.z()); Position layer_pos(0, 0, x_layer.z());
PlacedVolume layer_phv = detVol.placeVolume(layer_vol, layer_pos); PlacedVolume layer_phv = detVol.placeVolume(layer_vol, layer_pos);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment