Skip to content

Commit

Permalink
nHCal fix rotated segmentation (#748)
Browse files Browse the repository at this point in the history
### Briefly, what does this PR introduce?


### What kind of change does this PR introduce?
- [ ] Bug fix (issue #__)
- [ ] New feature (issue #__)
- [ ] Documentation update
- [x] Other: Fix rotated segmentation for backward HCal

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

Tests have been performed

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

### Does this PR change default behavior?

---------

Signed-off-by: lkosarz <[email protected]>
Signed-off-by: Kosarzewski <[email protected]>
Co-authored-by: Wouter Deconinck <[email protected]>
Co-authored-by: Kosarzewski <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dmitry Kalinkin <[email protected]>
  • Loading branch information
5 people authored Jun 21, 2024
1 parent 83ac323 commit 8a9a3da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compact/hcal/backward.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</documentation>

<constant name="HcalEndcapNSingleLayerThickness"
value="HcalEndcapNSteelThickness + HcalEndcapNPolystyreneThickness"/>
value="HcalEndcapNSteelThickness + HcalEndcapNPolystyreneThickness + HcalEndcapNLayerGap"/>
<constant name="HcalEndcapNLayer_NRepeat" value="floor(HcalEndcapN_length / HcalEndcapNSingleLayerThickness)"/>
<constant name="HcalEndcapN_thickness" value="HcalEndcapNLayer_NRepeat * HcalEndcapNSingleLayerThickness"/>
</define>
Expand Down
4 changes: 4 additions & 0 deletions configurations/backward_hcal_only.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
features:
hcal:
backward:
backward_endcap_flux:
5 changes: 3 additions & 2 deletions src/PolyhedraEndcapCalorimeter2_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
string s_name = _toString(s_num, "slice%d");
double s_thick = x_slice.thickness();
Material s_mat = description.material(x_slice.materialStr());
Volume s_vol(s_name, PolyhedraRegular(numsides, rmin, rmax, s_thick), s_mat);
Volume s_vol(s_name, PolyhedraRegular(numsides, M_PI / numsides, rmin, rmax, s_thick), s_mat);

s_vol.setVisAttributes(description.visAttributes(x_slice.visStr()));
sliceZ += s_thick / 2;
PlacedVolume s_phv = l_vol.placeVolume(s_vol, Position(0, 0, sliceZ));
PlacedVolume s_phv = l_vol.placeVolume(
s_vol, Transform3D(RotationZYX(-M_PI / numsides, 0, 0), Position(0, 0, sliceZ)));
s_phv.addPhysVolID("slice", s_num);
if (x_slice.isSensitive()) {
sens.setType("calorimeter");
Expand Down

0 comments on commit 8a9a3da

Please sign in to comment.