Skip to content

Commit 2a1faff

Browse files
committed
Implement the triangular-APEX case in APEX::ConstructSiPMSAndBoard()
1 parent debea7b commit 2a1faff

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

source/geometries/APEX.cc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,8 @@ namespace nexus{
577577
G4RotationMatrix* sipm_rot = new G4RotationMatrix();
578578
G4ThreeVector base_pos;
579579

580-
if(board_position_code_==1) // Board in the middle of a large face
580+
// Board in the middle of a large face, only applicable to the shape_code_==0 case
581+
if(board_position_code_==1 && shape_code_==0)
581582
{
582583
sipm_rot->rotateX(0.0*deg);
583584
base_pos.set(
@@ -633,7 +634,7 @@ namespace nexus{
633634
phsensor_id += 1;
634635
}
635636

636-
if(board_position_code_>=3)
637+
if(board_position_code_>=3 && shape_code_==0)
637638
{
638639
G4RotationMatrix* sipm_rot_2 = new G4RotationMatrix();
639640
G4ThreeVector base_pos_2;
@@ -694,7 +695,8 @@ namespace nexus{
694695
G4RotationMatrix* board_rot = new G4RotationMatrix();
695696
G4ThreeVector board_pos;
696697

697-
if(board_position_code_==1) // Board in the middle of a large face
698+
// Board in the middle of a large face, only applicable to the shape_code_==0 case
699+
if(board_position_code_==1 && shape_code_==0)
698700
{
699701
board_rot->rotateX(90.0*deg);
700702
board_pos.set(
@@ -745,7 +747,7 @@ namespace nexus{
745747
true
746748
);
747749

748-
if(board_position_code_>=3)
750+
if(board_position_code_>=3 && shape_code_==0)
749751
{
750752
G4RotationMatrix* board_rot_2 = new G4RotationMatrix();
751753
G4ThreeVector board_pos_2;
@@ -1537,7 +1539,8 @@ namespace nexus{
15371539
G4RotationMatrix* rot = new G4RotationMatrix();
15381540
G4ThreeVector pos;
15391541

1540-
if(board_position_code_==1) // Board in the middle of a large face
1542+
// Board in the middle of a large face
1543+
if(board_position_code_==1)
15411544
{
15421545
rot->rotateX(-90.0*deg);
15431546
pos.set(

source/geometries/APEX.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,19 @@ namespace nexus {
102102
///< 4 -> Broadcom AFBR-S4N44P044M (2x2 SiPM array)
103103
///< Any other integer -> PerfectSiPMMPPC (100% efficiency)
104104
G4int num_phsensors_; ///< Number of photosensors per board
105-
G4int board_position_code_; ///< Integer signalling where to place the SiPM boards. In any case, the boards are arranged parallely to the APEX sides which are plate_length_ long.
105+
G4int board_position_code_; ///< Integer signalling where to place the SiPM boards. This parameter only makes a difference if shape_code_ is set to 0.
106+
///< In such case, it can take the following values:
106107
///< 1 -> One board facing the middle of one of the two largest WLS plate faces.
107108
///< 2 -> One board facing one of the smallest WLS plate faces.
108109
///< Any other integer -> One board facing each one of the smallest WLS plate faces (two boards in total).
109-
G4bool align_lower_edges_of_plate_and_SiPMs_; ///< This parameter only makes a difference if board_position_code_ is set to 2 or 3. If set to true, the lower edges of the WLS plate and the SiPMs are aligned.
110-
///< If set to false, then the center (along the plate_thickn_ dimension) of the SiPMs is aligned with the center of the WLS plate
111-
G4double gap_; ///< Gap between the photosensors and the WLS plate. A negative gap can help modelate the immersion of the SiPMs into the dimples. Be careful not to collide the SiPMs into the plate.
110+
///< In any case, the boards are arranged parallely to the APEX sides which are plate_length_ long. If shape_code_ is set
111+
///< to 1, then only one board, facing the base of the triangular WLS plate, is placed.
112+
G4bool align_lower_edges_of_plate_and_SiPMs_; ///< If shape_code_ is set to 0, then this parameter only makes a difference if board_position_code_ is set to a value other
113+
///< than 1. If shape_code_ is set to 1, then this parameter always applies. If set to true, the lower edges of the WLS plate
114+
///< and the SiPMs are aligned. If set to false, then the center (along the plate_thickn_ dimension) of the SiPMs is aligned
115+
///< with the center of the WLS plate
116+
G4double gap_; ///< Gap between the photosensors and the WLS plate. A negative gap can help modelate the immersion of the SiPMs into the dimples.
117+
///< Be careful not to collide the SiPMs into the plate.
112118
G4bool ref_phsensors_supports_; ///< Whether photosensors supports are reflective (the FR4 box that supports the SiPM)
113119
/// Dimples may be used in the future, but not for now ----------------------------------------------------------------------------------------------------
114120
/// For the moment, APEX will use cryo glue so that SiPMs are in optical contact with the plate. ----------------------------------------------------------

0 commit comments

Comments
 (0)