Skip to content

Commit

Permalink
Make BIC configurable, add optional setup with 6 layers. (#773)
Browse files Browse the repository at this point in the history
### Briefly, what does this PR introduce?
Add an optional setup with a BIC configuration that has all six silicon
layers instrumented (versus the current default where only four out of
six slots are instrumented). This fully instrumented setup is needed to
do further layer optimization studies.

### 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?

### Does this PR change default behavior?

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
sly2j and pre-commit-ci[bot] authored Aug 22, 2024
1 parent 194702e commit f8f39a1
Show file tree
Hide file tree
Showing 17 changed files with 161 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux-eic-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
- run: |
source install/bin/thisepic.sh
sed -i 's%\(<fiber\|<lens\)%<comment>\1%g; s%\(/fiber>\|/lens>\)%\1</comment>%g' \
${DETECTOR_PATH}/compact/ecal/barrel_interlayers.xml \
${DETECTOR_PATH}/compact/ecal/bic_default.xml \
${DETECTOR_PATH}/compact/ecal/forward_scfi.xml \
${DETECTOR_PATH}/compact/far_forward/ZDC_Ecal_WSciFi.xml \
${DETECTOR_PATH}/compact/pid/mrich.xml
Expand Down
63 changes: 57 additions & 6 deletions compact/ecal/barrel_interlayers.xml → compact/ecal/bic/bic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
</comment>
<comment>
To change the number of imaging layer slots from, e.g., 9 to 6,
change EcalBarrelImagingLayers_nMax variable
change EcalBarrelImagingLayers_nMax variable. Note that this does NOT change the
number of silicon frames, as each silicon frame and layer is placed manually.

This file assumes the EcalBarrel_enable_staves_N variables have been defined to allow
changing the configuration by enabling/disabling staves
</comment>
<!-- Number of imaging layer slots -->
<constant name="EcalBarrelImagingLayers_num" value="6"/>
Expand Down Expand Up @@ -160,7 +164,8 @@
thickness="EcalBarrel_Stave_thickness"
angle="EcalBarrel_StaveTilt_angle"
module="AstroPix_Module"
vis="EcalBarrelStaveVis">
vis="EcalBarrelStaveVis"
enable="EcalBarrel_enable_staves_1">
<xy_layout
dx="EcalBarrel_AstroPix_width + EcalBarrel_AstroPix_margin"
dy="EcalBarrel_AstroPix_length + EcalBarrel_AstroPix_margin"
Expand All @@ -172,11 +177,42 @@
thickness="EcalBarrel_ImagingLayerThickness"
space_before="EcalBarrel_ScFiLayerThickness_Imaging + EcalBarrel_SpaceBetween">
<frame material="CarbonFiber" fill="Air" thickness="EcalBarrel_CarbonFrameThickness" height="EcalBarrel_ImagingLayerThickness" vis="EcalBarrelSliceVis"/>
<stave repeat="6"
width="EcalBarrel_Stave_width"
length="EcalBarrel_Stave_length"
thickness="EcalBarrel_Stave_thickness"
angle="EcalBarrel_StaveTilt_angle"
module="AstroPix_Module"
vis="EcalBarrelStaveVis"
enable="EcalBarrel_enable_staves_2">
<xy_layout
dx="EcalBarrel_AstroPix_width + EcalBarrel_AstroPix_margin"
dy="EcalBarrel_AstroPix_length + EcalBarrel_AstroPix_margin"
/>
</stave>
</layer>

<layer repeat="2" vis="EcalBarrelLayerVis"
<layer repeat="1" vis="EcalBarrelLayerVis"
thickness="EcalBarrel_ImagingLayerThickness"
space_before="EcalBarrel_ScFiLayerThickness_Imaging + EcalBarrel_SpaceBetween">
<frame material="CarbonFiber" fill="Air" thickness="EcalBarrel_CarbonFrameThickness" height="EcalBarrel_ImagingLayerThickness" vis="EcalBarrelSliceVis"/>
<stave repeat="6"
width="EcalBarrel_Stave_width"
length="EcalBarrel_Stave_length"
thickness="EcalBarrel_Stave_thickness"
angle="-EcalBarrel_StaveTilt_angle"
module="AstroPix_Module"
vis="EcalBarrelStaveVis"
enable="EcalBarrel_enable_staves_3">
<xy_layout
dx="EcalBarrel_AstroPix_width + EcalBarrel_AstroPix_margin"
dy="EcalBarrel_AstroPix_length + EcalBarrel_AstroPix_margin"
/>
</stave>
</layer>

<layer repeat="1" vis="EcalBarrelLayerVis"
thickness="EcalBarrel_ImagingLayerThickness"
space_between="EcalBarrel_ScFiLayerThickness_Imaging + EcalBarrel_SpaceBetween"
space_before="EcalBarrel_ScFiLayerThickness_Imaging + EcalBarrel_SpaceBetween">
<frame material="CarbonFiber" fill="Air" thickness="EcalBarrel_CarbonFrameThickness" height="EcalBarrel_ImagingLayerThickness" vis="EcalBarrelSliceVis"/>
<stave repeat="6"
Expand All @@ -185,7 +221,8 @@
thickness="EcalBarrel_Stave_thickness"
angle="-EcalBarrel_StaveTilt_angle"
module="AstroPix_Module"
vis="EcalBarrelStaveVis">
vis="EcalBarrelStaveVis"
enable="EcalBarrel_enable_staves_4">
<xy_layout
dx="EcalBarrel_AstroPix_width + EcalBarrel_AstroPix_margin"
dy="EcalBarrel_AstroPix_length + EcalBarrel_AstroPix_margin"
Expand All @@ -197,6 +234,19 @@
thickness="EcalBarrel_ImagingLayerThickness"
space_before="EcalBarrel_ScFiLayerThickness_Imaging + EcalBarrel_SpaceBetween">
<frame material="CarbonFiber" fill="Air" thickness="EcalBarrel_CarbonFrameThickness" height="EcalBarrel_ImagingLayerThickness" vis="EcalBarrelSliceVis"/>
<stave repeat="7"
width="EcalBarrel_Stave_width"
length="EcalBarrel_Stave_length"
thickness="EcalBarrel_Stave_thickness"
angle="-EcalBarrel_StaveTilt_angle"
module="AstroPix_Module"
vis="EcalBarrelStaveVis"
enable="EcalBarrel_enable_staves_5">
<xy_layout
dx="EcalBarrel_AstroPix_width + EcalBarrel_AstroPix_margin"
dy="EcalBarrel_AstroPix_length + EcalBarrel_AstroPix_margin"
/>
</stave>
</layer>

<layer repeat="EcalBarrelImagingLayers_num-5" vis="EcalBarrelLayerVis"
Expand All @@ -210,7 +260,8 @@
thickness="EcalBarrel_Stave_thickness"
angle="EcalBarrel_StaveTilt_angle"
module="AstroPix_Module"
vis="EcalBarrelStaveVis">
vis="EcalBarrelStaveVis"
enable="EcalBarrel_enable_staves_6">
<xy_layout
dx="EcalBarrel_AstroPix_width + EcalBarrel_AstroPix_margin"
dy="EcalBarrel_AstroPix_length + EcalBarrel_AstroPix_margin"
Expand Down
22 changes: 22 additions & 0 deletions compact/ecal/bic_6layers.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- SPDX-License-Identifier: LGPL-3.0-or-later -->
<!-- Copyright (C) 2024 Sylvester Joosten -->
<lccdd>

<info name="bic_default"
title="Default ePIC BIC configuration with 4 AstroPix layers"
author="@sly2j"
url="https://github.com/sly2j"
status="development"
version="1.0"
><comment/></info>

<define>
<constant name="EcalBarrel_enable_staves_1" value="1"/>
<constant name="EcalBarrel_enable_staves_2" value="1"/>
<constant name="EcalBarrel_enable_staves_3" value="1"/>
<constant name="EcalBarrel_enable_staves_4" value="1"/>
<constant name="EcalBarrel_enable_staves_5" value="1"/>
<constant name="EcalBarrel_enable_staves_6" value="1"/>
</define>
<include ref="bic/bic.xml"/>
</lccdd>
22 changes: 22 additions & 0 deletions compact/ecal/bic_default.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- SPDX-License-Identifier: LGPL-3.0-or-later -->
<!-- Copyright (C) 2024 Sylvester Joosten -->
<lccdd>

<info name="bic_default"
title="Default ePIC BIC configuration with 4 AstroPix layers"
author="@sly2j"
url="https://github.com/sly2j"
status="development"
version="1.0"
><comment/></info>

<define>
<constant name="EcalBarrel_enable_staves_1" value="1"/>
<constant name="EcalBarrel_enable_staves_2" value="0"/>
<constant name="EcalBarrel_enable_staves_3" value="1"/>
<constant name="EcalBarrel_enable_staves_4" value="1"/>
<constant name="EcalBarrel_enable_staves_5" value="0"/>
<constant name="EcalBarrel_enable_staves_6" value="1"/>
</define>
<include ref="bic/bic.xml"/>
</lccdd>
2 changes: 1 addition & 1 deletion configurations/calorimeters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ features:
ecal:
forward_homogeneous:
forward_insert_homogeneous:
barrel_interlayers:
bic_default:
backward_PbWO4:
hcal:
lfhcal_with_space_for_insert:
Expand Down
2 changes: 1 addition & 1 deletion configurations/craterlake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ features:
ecal:
forward_homogeneous:
forward_insert_homogeneous:
barrel_interlayers:
bic_default:
backward_PbWO4:
solenoid:
hcal:
Expand Down
2 changes: 1 addition & 1 deletion configurations/craterlake_10x100.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ features:
ecal:
forward_homogeneous:
forward_insert_homogeneous:
barrel_interlayers:
bic_default:
backward_PbWO4:
solenoid:
hcal:
Expand Down
2 changes: 1 addition & 1 deletion configurations/craterlake_10x275.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ features:
ecal:
forward_homogeneous:
forward_insert_homogeneous:
barrel_interlayers:
bic_default:
backward_PbWO4:
solenoid:
hcal:
Expand Down
2 changes: 1 addition & 1 deletion configurations/craterlake_18x110_Au.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ features:
ecal:
forward_homogeneous:
forward_insert_homogeneous:
barrel_interlayers:
bic_default:
backward_PbWO4:
solenoid:
hcal:
Expand Down
2 changes: 1 addition & 1 deletion configurations/craterlake_18x275.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ features:
ecal:
forward_homogeneous:
forward_insert_homogeneous:
barrel_interlayers:
bic_default:
backward_PbWO4:
solenoid:
hcal:
Expand Down
2 changes: 1 addition & 1 deletion configurations/craterlake_5x41.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ features:
ecal:
forward_homogeneous:
forward_insert_homogeneous:
barrel_interlayers:
bic_default:
backward_PbWO4:
solenoid:
hcal:
Expand Down
38 changes: 38 additions & 0 deletions configurations/craterlake_bic_6layers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
ebeam: 10
pbeam: 100
features:
beampipe:
tracking:
definitions_craterlake:
vertex_barrel:
silicon_barrel:
mpgd_barrel:
support_service_craterlake:
mpgd_outerbarrel:
mpgd_forward_endcap:
mpgd_backward_endcap:
silicon_disks:
tof_barrel:
tof_endcap:
pid:
dirc:
pfrich:
drich:
ecal:
forward_homogeneous:
forward_insert_homogeneous:
bic_6layers:
backward_PbWO4:
solenoid:
hcal:
lfhcal_with_space_for_insert:
forward_insert:
barrel_gdml:
barrel_flux_return:
forward_endcap_flux:
backward:
backward_endcap_flux:
far_forward:
default:
far_backward:
default:
2 changes: 1 addition & 1 deletion configurations/craterlake_no_bhcal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ features:
ecal:
forward_homogeneous:
forward_insert_homogeneous:
barrel_interlayers:
bic_default:
backward_PbWO4:
solenoid:
hcal:
Expand Down
2 changes: 1 addition & 1 deletion configurations/full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ features:
ecal:
forward_homogeneous:
forward_insert_homogeneous:
barrel_interlayers:
bic_default:
backward_PbWO4:
solenoid:
hcal:
Expand Down
2 changes: 1 addition & 1 deletion configurations/imaging_only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ features:
fields:
marco:
ecal:
barrel_interlayers:
bic_default:
2 changes: 1 addition & 1 deletion configurations/inner_detector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ features:
tof_barrel:
tof_endcap:
ecal:
barrel_interlayers:
bic_default:
backward_PbWO4:
pid:
dirc:
Expand Down
12 changes: 10 additions & 2 deletions src/BarrelCalorimeterImaging_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,18 @@ static Ref_t create_detector(Detector& desc, xml_h e, SensitiveDetector sens) {
// Set region, limitset, and vis of layer.
layer_volume.setAttributes(desc, x_layer.regionStr(), x_layer.limitsStr(), x_layer.visStr());

// Loop over the staves for this layer.
// Loop over the staves for this layer, if the tray is enabled
int stave_num = 1;
for (xml_coll_t i_stave(x_layer, _U(stave)); i_stave; ++i_stave) {
xml_comp_t x_stave = i_stave;
// Check if we enabled this silicon tray (actual silicon detector in the slots) at the top level
// allowing us to easily disable layers in the XML file without needing multiple
// copies of the XML file
if (getAttrOrDefault(x_stave, _Unicode(enable), 1) == 0) {
// disabled
continue;
}

int stave_repeat = x_stave.repeat();
double stave_thick = x_stave.thickness();
double stave_dim_x = x_stave.width() / 2.0;
Expand Down Expand Up @@ -361,7 +369,7 @@ static Ref_t create_detector(Detector& desc, xml_h e, SensitiveDetector sens) {
}
}

// Place frame
// Place frame if defined.
if (layer_has_frame) {
xml_comp_t x_frame = x_layer.child(_Unicode(frame));
double frame_height = x_frame.height();
Expand Down

0 comments on commit f8f39a1

Please sign in to comment.