Skip to content

Commit

Permalink
feat: add front support to BarrelImaging Calorimeter (#608)
Browse files Browse the repository at this point in the history
### Briefly, what does this PR introduce?
Adds the 0.5 cm aluminum front support 

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

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

### Does this PR change default behavior?
No.

---------

Co-authored-by: akshaya <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 7, 2024
1 parent eaf7f80 commit 33f186f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 8 deletions.
2 changes: 1 addition & 1 deletion compact/definitions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ Service gaps in FW direction (before endcapP ECAL) and BW direction (before endc
<constant name="EcalEndcapN_rmin" value="9.*cm"/> <!-- Currently fix value hardcoded -->
<constant name="EcalEndcapN_rmax" value="63.*cm"/> <!-- Currently fix value hardcoded -->

<constant name="EcalBarrelRegion_thickness" value="38.*cm"/>
<constant name="EcalBarrelRegion_thickness" value="40.*cm"/>
<constant name="EcalBarrel_rmin" value="max(81.*cm, CentralTrackingRegion_rmax + BarrelPIDRegion_thickness + BarrelExtraSpace_thickness)"/> <!-- FIXME hardcoded max -->
<constant name="EcalBarrel_inner_margin" value="2*cm"/>
<constant name="EcalBarrel_rmax" value="EcalBarrel_rmin + EcalBarrelRegion_thickness"/>
Expand Down
13 changes: 8 additions & 5 deletions compact/ecal/barrel_interlayers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
<constant name="EcalBarrel_Calorimeter_offset"
value="(EcalBarrel_Calorimeter_zmax - EcalBarrel_Calorimeter_zmin)/2.0"/>

<constant name="EcalBarrel_Support_thickness" value="3*cm"/>
<constant name="EcalBarrel_FrontSupportThickness" value="0.5*cm"/>
<constant name="EcalBarrel_BackSupportThickness" value="3*cm"/>
<constant name="EcalBarrel_SiliconThickness" value="500*um"/>
<constant name="EcalBarrel_ElectronicsThickness" value="150*um"/>
<constant name="EcalBarrel_CopperThickness" value="100*um"/>
Expand Down Expand Up @@ -68,7 +69,7 @@
<constant name="EcalBarrel_RadiatorThickness" value="EcalBarrel_FiberZSpacing * 17"/>
<constant name="EcalBarrel_TotalFiberLayers_num" value="12"/>
<constant name="EcalBarrel_SectorRepeat" value="EcalBarrelSectorsN"/>
<constant name="EcalBarrel_AvailThickness" value="EcalBarrelRegion_thickness - EcalBarrel_Support_thickness"/>
<constant name="EcalBarrel_AvailThickness" value="EcalBarrelRegion_thickness - EcalBarrel_BackSupportThickness - EcalBarrel_FrontSupportThickness"/>

<constant name="EcalBarrel_ImagingLayerThickness" value="1.5*cm"/>

Expand Down Expand Up @@ -145,9 +146,11 @@
</module_component>
</module>

<support thickness="EcalBarrel_FrontSupportThickness" material="Aluminum" vis="EcalBarrelSupportVis"/>

<layer repeat="1" vis="EcalBarrelLayerVis"
thickness="EcalBarrel_ImagingLayerThickness"
space_before="0.*cm">
space_before="EcalBarrel_FrontSupportThickness">
<barrel_envelope
inner_r="EcalBarrel_rmin - EcalBarrel_Stave_thickness"
outer_r="EcalBarrel_rmin + EcalBarrel_Stave_thickness"
Expand Down Expand Up @@ -237,7 +240,7 @@
<sectors vis="EcalBarrelSectorVis"/>
<layer repeat="EcalBarrelImagingLayers_num-1" vis="EcalBarrelLayerVis"
space_between="EcalBarrel_ImagingLayerThickness + EcalBarrel_SpaceBetween"
space_before="EcalBarrel_ImagingLayerThickness + EcalBarrel_SpaceBetween/2.">
space_before="EcalBarrel_FrontSupportThickness + EcalBarrel_ImagingLayerThickness + EcalBarrel_SpaceBetween/2.">
<slice material="SciFiPb_PbGlue" thickness="EcalBarrel_RadiatorThickness" vis="EcalBarrelFiberLayerVis">
<fiber material="SciFiPb_Scintillator"
sensitive="yes"
Expand Down Expand Up @@ -270,7 +273,7 @@
</slice>
</layer>

<support thickness="EcalBarrel_Support_thickness" material="Aluminum" vis="EcalBarrelSupportVis"/>
<support thickness="EcalBarrel_BackSupportThickness" material="Aluminum" vis="EcalBarrelSupportVis"/>
</detector>
</detectors>

Expand Down
27 changes: 25 additions & 2 deletions src/BarrelCalorimeterImaging_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ using namespace dd4hep;

typedef ROOT::Math::XYPoint Point;

// geometry helpers
static void buildSupport(Detector& desc, Volume& mother, xml_comp_t x_support,
const std::tuple<double, double, double, double>& dimensions);

// barrel ecal layers contained in an assembly
static Ref_t create_detector(Detector& desc, xml_h e, SensitiveDetector sens)
{
Expand Down Expand Up @@ -176,8 +180,10 @@ static Ref_t create_detector(Detector& desc, xml_h e, SensitiveDetector sens)
}
}
}

// Loop over the sets of layer elements in the detector.
if (x_detector.hasChild(_Unicode(support))) {
buildSupport(desc, sector_volume, x_detector.child(_Unicode(support)), {inner_r, layer_pos_z, x_dimensions.z(), half_dphi});
}
//Loop over the sets of layer elements in the detector.
int layer_num = 1;
for (xml_coll_t i_layer(x_detector, _U(layer)); i_layer; ++i_layer) {
xml_comp_t x_layer = i_layer;
Expand Down Expand Up @@ -399,4 +405,21 @@ static Ref_t create_detector(Detector& desc, xml_h e, SensitiveDetector sens)
return sdet;
}

// simple aluminum sheet cover
// dimensions: (inner r, position in z, length, phi)
static void buildSupport(Detector& desc, Volume& sector_volume, xml_comp_t x_support,
const std::tuple<double, double, double, double>& dimensions)
{
auto [inner_r, pos_z, sector_length, hphi] = dimensions;
double support_thickness = getAttrOrDefault(x_support, _Unicode(thickness), 0.5 * cm);
auto material = desc.material(x_support.materialStr());
double trd_y = sector_length / 2.;
double trd_x1_support = std::tan(hphi) * pos_z;
double trd_x2_support = std::tan(hphi) * (pos_z + support_thickness);

Trapezoid s_shape(trd_x1_support, trd_x2_support, trd_y, trd_y, support_thickness / 2.);
Volume s_vol("support_layer", s_shape, material);
s_vol.setVisAttributes(desc.visAttributes(x_support.visStr()));
sector_volume.placeVolume(s_vol, Position(0.0, 0.0, pos_z + support_thickness / 2.));
}
DECLARE_DETELEMENT(epic_EcalBarrelImaging, create_detector)

0 comments on commit 33f186f

Please sign in to comment.