-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Briefly, what does this PR introduce? This RP introduces fully configurable B0 ECAL geometry, allowing the setup coordinates of every single crystal. During the iteration with the designers, the B0 ECAL position was optimized and moved forward (downstream from the IP) by 15 cm. As a consequence, the B0 tracker position was rearranged, introducing a larger space between detector layers. In addition, a B0 exit window is added to the simulation to make a more realistic detector response ![image](https://github.com/user-attachments/assets/accb4ac3-55f9-4026-865c-76838dd109d2) ### What kind of change does this PR introduce? - [ ] Bug fix (issue #__) - [ ] New feature (issue #__) - [ ] Documentation update - [X] Other: B0 ECAL geometry update ### Please check if this PR fulfills the following: - [X] Tests for the changes have been added - [ ] Documentation has been added / updated - [X] Changes have been communicated to collaborators https://indico.bnl.gov/event/24923/contributions/97007/attachments/57475/98683/2024_09_24_B0_Geometry_update.pdf ### Does this PR introduce breaking changes? What changes might users need to make to their code? no ### Does this PR change default behavior? Slight change in B0 detector performance can be anticipated (better resolution in reconstructed tracks, and improved acceptance of B0 ECAL. --------- 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
1 parent
0b12ea3
commit 48a5603
Showing
8 changed files
with
251 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// SPDX-License-Identifier: LGPL-3.0-or-later | ||
// Copyright (C) 2022 Dhevan Gangadharan | ||
|
||
#include "DD4hep/DetFactoryHelper.h" | ||
#include "DD4hep/Printout.h" | ||
#include "DD4hep/Shapes.h" | ||
#include "DDRec/DetectorData.h" | ||
#include "DDRec/Surface.h" | ||
#include "XML/Layering.h" | ||
#include <XML/Helper.h> | ||
|
||
using namespace std; | ||
using namespace dd4hep; | ||
|
||
static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector /*sens*/) { | ||
|
||
xml_det_t x_det = e; | ||
xml_comp_t x_dim = x_det.dimensions(); | ||
xml_comp_t x_pos = x_det.position(); | ||
xml_comp_t x_rot = x_det.rotation(); | ||
// | ||
string det_name = x_det.nameStr(); | ||
string mat_name = dd4hep::getAttrOrDefault<string>(x_det, _U(material), "StainlessSteel"); | ||
// | ||
double sizeR = x_dim.r(); | ||
double sizeZ = x_dim.z(); | ||
double sizeR_el = x_dim.x(); | ||
double sizeR_had = x_dim.y(); | ||
double posX = x_pos.x(); | ||
double posY = x_pos.y(); | ||
double posZ = x_pos.z(); | ||
double rotX = x_rot.x(); | ||
double rotY = x_rot.y(); | ||
double rotZ = x_rot.z(); | ||
|
||
Tube tube(0.0, sizeR, sizeZ); | ||
Tube tube_el(0.0, sizeR_el, sizeZ); | ||
Tube tube_had(0.0, sizeR_had, sizeZ); | ||
SubtractionSolid exit_window(tube, tube_had, Position(0.0, 0.0, 0.0)); | ||
exit_window = SubtractionSolid(exit_window, tube_el, Position(-posX, 0.0, 0.0)); | ||
|
||
Volume vol(det_name + "_vol_ExitWindow", exit_window, description.material(mat_name)); | ||
vol.setVisAttributes(description.visAttributes(x_det.visStr())); | ||
|
||
Transform3D pos(RotationZYX(rotX, rotY, rotZ), Position(posX, posY, posZ)); | ||
|
||
DetElement det(det_name, x_det.id()); | ||
Volume motherVol = description.pickMotherVolume(det); | ||
PlacedVolume phv = motherVol.placeVolume(vol, pos); | ||
|
||
det.setPlacement(phv); | ||
|
||
return det; | ||
} | ||
|
||
DECLARE_DETELEMENT(B0Window, create_detector) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters