Skip to content
Snippets Groups Projects
Commit d7445e7e authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

Fix ecal support on outside surface

parent 7e2a2331
No related branches found
No related tags found
No related merge requests found
<lccdd> <lccdd>
<display>
<vis name="EcalBarrelEnvelope_vis" alpha="0.9" r="0.99" g="0.5" b="0" showDaughters="true" visible="false" />
<vis name="EcalBarrelStave_vis" alpha="0.9" r="0.99" g="0.5" b="0" showDaughters="true" visible="false" />
</display>
<define> <define>
<comment> <comment>
--------------------------------------- ---------------------------------------
EM Calorimeter Parameters with AstroPix EM Calorimeter Parameters with AstroPix
...@@ -56,25 +59,26 @@ ...@@ -56,25 +59,26 @@
type="athena_EcalBarrel" type="athena_EcalBarrel"
readout="EcalBarrelHits" readout="EcalBarrelHits"
calorimeterType="EM_BARREL" calorimeterType="EM_BARREL"
vis="EcalBarrelEnvelope_vis"
offset="EcalBarrel_offset"> offset="EcalBarrel_offset">
<dimensions numsides="EcalBarrel_ModRepeat" <dimensions numsides="EcalBarrel_ModRepeat"
rmin="EcalBarrel_rmin" rmin="EcalBarrel_rmin"
z="EcalBarrel_length"/> z="EcalBarrel_length"/>
<staves vis="EcalBarrelVis"> <staves vis="EcalBarrelStave_vis">
<support inside="true" material="Aluminum" <support inside="true" material="Aluminum" vis="AnlOrange"
thickness="EcalBarrel_Support_thickness" thickness="EcalBarrel_Support_thickness"
n_beams="3" grid_size="25.0*cm" > n_beams="3" grid_size="25.0*cm" >
</support> </support>
</staves> </staves>
<layer repeat="EcalBarrel_ReadoutLayerNumber"> <layer repeat="EcalBarrel_ReadoutLayerNumber" vis="AnlBlue">
<slice material="Silicon" thickness="EcalBarrel_SiliconThickness" sensitive="yes" limits="cal_limits"/> <slice material="Silicon" thickness="EcalBarrel_SiliconThickness" sensitive="yes" limits="cal_limits" vis="AnlGray"/>
<slice material="Silicon" thickness="EcalBarrel_ElectronicsThickness"/> <slice material="Silicon" thickness="EcalBarrel_ElectronicsThickness" vis="AnlGold"/>
<slice material="Copper" thickness="EcalBarrel_CopperThickness"/> <slice material="Copper" thickness="EcalBarrel_CopperThickness" vis="AnlGray"/>
<slice material="Kapton" thickness="EcalBarrel_KaptonThickness"/> <slice material="Kapton" thickness="EcalBarrel_KaptonThickness" vis="AnlGold"/>
<slice material="Epoxy" thickness="EcalBarrel_EpoxyThickness"/> <slice material="Epoxy" thickness="EcalBarrel_EpoxyThickness" vis="AnlGray"/>
<slice material="CarbonFiber" thickness="EcalBarrel_CarbonThickness"/> <slice material="CarbonFiber" thickness="EcalBarrel_CarbonThickness" vis="AnlGold"/>
<slice material="TungstenDens24" thickness="EcalBarrel_TungstenThickness"/> <slice material="TungstenDens24" thickness="EcalBarrel_TungstenThickness" vis="AnlGray"/>
<slice material="Air" thickness="EcalBarrel_LayerSpacing - EcalBarrel_TungstenThickness"/> <slice material="Air" thickness="EcalBarrel_LayerSpacing - EcalBarrel_TungstenThickness" vis="AnlGold"/>
</layer> </layer>
</detector> </detector>
</detectors> </detectors>
......
...@@ -72,7 +72,9 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s ...@@ -72,7 +72,9 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
Volume mod_vol("stave",trd,air); Volume mod_vol("stave",trd,air);
double l_pos_z = -(layering.totalThickness() / 2) - support_thickness/2.0; double l_pos_z = -(layering.totalThickness() / 2) - support_thickness/2.0;
double trd_x2_support = trd_x1; //double trd_x2_support = trd_x1;
double trd_x1_support = (2 * std::tan(hphi) * outer_r - dx- support_thickness)/2 - tolerance;
Solid support_frame_s; Solid support_frame_s;
// optional stave support // optional stave support
if(x_staves.hasChild("support")){ if(x_staves.hasChild("support")){
...@@ -80,13 +82,15 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s ...@@ -80,13 +82,15 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
// is the support on the inside surface? // is the support on the inside surface?
bool is_inside_support = getAttrOrDefault<bool>(x_support, _Unicode(inside), true); bool is_inside_support = getAttrOrDefault<bool>(x_support, _Unicode(inside), true);
// number of "beams" running the length of the stave. // number of "beams" running the length of the stave.
int n_beams = getAttrOrDefault<int>(x_support, _Unicode(n_beams), 3); int n_beams = getAttrOrDefault<int>(x_support, _Unicode(n_beams), 3);
trd_x2_support = (2 * std::tan(hphi) * (inner_r + support_thickness)) / 2 - tolerance; double beam_thickness = support_thickness / 4.0; // maybe a parameter later...
double grid_size = getAttrOrDefault(x_support, _Unicode(grid_size), 25.0 * cm); trd_x1_support = (2 * std::tan(hphi) * (outer_r - support_thickness + beam_thickness)) / 2 - tolerance;
double beam_width = 2.0*trd_x2_support/(n_beams+1); // quick hack to make some gap between T beams double grid_size = getAttrOrDefault(x_support, _Unicode(grid_size), 25.0 * cm);
double beam_thickness = support_thickness/4.0; double beam_width = 2.0 * trd_x1_support / (n_beams + 1); // quick hack to make some gap between T beams
double cross_beam_thickness = support_thickness/4.0; double cross_beam_thickness = support_thickness/4.0;
double trd_x1_support = (2 * std::tan(hphi) * (inner_r + beam_thickness)) / 2 - tolerance; //double trd_x1_support = (2 * std::tan(hphi) * (inner_r + beam_thickness)) / 2 - tolerance;
double trd_x2_support = trd_x2;
int n_cross_supports = std::floor((trd_y1-cross_beam_thickness)/grid_size); int n_cross_supports = std::floor((trd_y1-cross_beam_thickness)/grid_size);
...@@ -105,32 +109,33 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s ...@@ -105,32 +109,33 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
} }
support_array_start_s = support_array_start_s =
UnionSolid(support_array_start_s, beam_hori_s, UnionSolid(support_array_start_s, beam_hori_s,
Position(-1.5 * 0.5*(trd_x1+trd_x2_support) / n_beams, 0, -support_thickness / 2.0 + beam_thickness / 2.0)); Position(-1.8 * 0.5*(trd_x1+trd_x2_support) / n_beams, 0, -support_thickness / 2.0 + beam_thickness / 2.0));
support_array_start_s = support_array_start_s =
UnionSolid(support_array_start_s, beam_hori_s, UnionSolid(support_array_start_s, beam_hori_s,
Position(1.5 * 0.5*(trd_x1+trd_x2_support) / n_beams, 0, -support_thickness / 2.0 + beam_thickness / 2.0)); Position(1.8 * 0.5*(trd_x1+trd_x2_support) / n_beams, 0, -support_thickness / 2.0 + beam_thickness / 2.0));
support_array_start_s = support_array_start_s =
UnionSolid(support_array_start_s, beam_vert_s, Position(-1.5 * 0.5*(trd_x1+trd_x2_support) / n_beams, 0, 0)); UnionSolid(support_array_start_s, beam_vert_s, Position(-1.8 * 0.5*(trd_x1+trd_x2_support) / n_beams, 0, 0));
support_array_start_s = support_array_start_s =
UnionSolid(support_array_start_s, beam_vert_s, Position(1.5 * 0.5*(trd_x1+trd_x2_support) / n_beams, 0, 0)); UnionSolid(support_array_start_s, beam_vert_s, Position(1.8 * 0.5*(trd_x1+trd_x2_support) / n_beams, 0, 0));
support_frame_s = support_array_start_s; support_frame_s = support_array_start_s;
Material support_mat = description.material(x_support.materialStr()); Material support_mat = description.material(x_support.materialStr());
Volume support_vol("support_frame_v", support_frame_s, support_mat); Volume support_vol("support_frame_v", support_frame_s, support_mat);
support_vol.setVisAttributes(description.visAttributes(x_support.visStr())); support_vol.setVisAttributes(description,x_support.visStr());
// figure out how to best place // figure out how to best place
auto pv = mod_vol.placeVolume(support_vol, Position(0.0, 0.0, l_pos_z + support_thickness / 2.0)); //auto pv = mod_vol.placeVolume(support_vol, Position(0.0, 0.0, l_pos_z + support_thickness / 2.0));
auto pv = mod_vol.placeVolume(support_vol, Position(0.0, 0.0, -l_pos_z - support_thickness / 2.0));
} }
l_pos_z += support_thickness; //l_pos_z += support_thickness;
sens.setType("calorimeter"); sens.setType("calorimeter");
{ // ===== buildBarrelStave(description, sens, module_volume) ===== { // ===== buildBarrelStave(description, sens, module_volume) =====
// Parameters for computing the layer X dimension: // Parameters for computing the layer X dimension:
double stave_z = trd_y1; double stave_z = trd_y1;
double tan_hphi = std::tan(hphi); double tan_hphi = std::tan(hphi);
double l_dim_x = trd_x2_support; // Starting X dimension for the layer. double l_dim_x = trd_x1; // Starting X dimension for the layer.
// Loop over the sets of layer elements in the detector. // Loop over the sets of layer elements in the detector.
int l_num = 1; int l_num = 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment