Skip to content

Commit 75e522d

Browse files
committed
Define the APEX::GetTriangularPlatePrismBase() method
1 parent fcdac64 commit 75e522d

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

source/geometries/APEX.cc

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,6 +1727,52 @@ namespace nexus{
17271727
return G4ThreeVector(x_pos, y_pos, z_pos);
17281728
}
17291729

1730+
std::vector<G4TwoVector> APEX::GetTriangularPlatePrismBase() const{
1731+
1732+
std::vector<G4TwoVector> prism_base;
1733+
// plate_length_ (resp. plate_width_) is the base (resp. height) of
1734+
// the triangle. The 2D polygon which we are creating in the XY plane
1735+
// is the following:
1736+
//
1737+
// +y
1738+
// /\
1739+
// |
1740+
// |B
1741+
// x
1742+
// / | \
1743+
// |
1744+
// -x <--------------/----+----\------------------> +x
1745+
// |
1746+
// /________|________\
1747+
// A | C
1748+
// |
1749+
// |
1750+
// v
1751+
// -y
1752+
//
1753+
// where the horizontal line (parallel to the x axis) which goes from
1754+
// point A to point C is, the base of the isosceles triangle. It is
1755+
// important to note two things:
1756+
//
1757+
// 1) The triangle is centered about the Y-axis, while point A (or
1758+
// C) is placed at a vertical distance of plate_width_/2 from
1759+
// the origin of coordinates.
1760+
//
1761+
// 2) After extrusion in the Z direction, we will need to rotate
1762+
// the triangle 90º degrees about the X-axis, so that the
1763+
// thickness dimension of the plate is set along the Y-axis,
1764+
// as for the rectangular plate case.
1765+
1766+
// Point A of the sketch above
1767+
prism_base.push_back(G4TwoVector(-1.*plate_length_/2., -1.*plate_width_/2.));
1768+
// Point B of the sketch above
1769+
prism_base.push_back(G4TwoVector(0., plate_width_/2.));
1770+
// Point C of the sketch above
1771+
prism_base.push_back(G4TwoVector(plate_length_/2., -1.*plate_width_/2.));
1772+
1773+
return prism_base;
1774+
}
1775+
17301776
G4bool APEX::GeometryIsIllFormed() ///< The only check to make is that the sipm thickness should be bigger or equal to the
17311777
///< reflective foil thickness. Otherwise, the SiPM surface may not make it to the WLS
17321778
///< plate surface depending on whether the board height is bigger or smaller than the sipm

source/geometries/APEX.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#define APEX_H
33

44
#include "GeometryBase.h"
5+
// Forward declaration of G4TwoVector (i.e. 'class G4TwoVector;')
6+
// gives a compilation error which I don't know how to debug right now.
7+
#include <G4TwoVector.hh>
58

69
class G4VPhysicalVolume;
710
class G4MaterialPropertiesTable;
@@ -53,6 +56,9 @@ namespace nexus {
5356
// reflective foil.
5457

5558
G4ThreeVector GenerateVertex(const G4String&) const;
59+
std::vector<G4TwoVector> GetTriangularPlatePrismBase() const; ///< Returns the triangular polygon, as a function of the plate_length_ and
60+
///< plate_width_ attributes, which could be extruded to form the triangular
61+
///< WLS plate, in case shape_code_==1.
5662
G4bool GeometryIsIllFormed(); ///< Checks whether the specified geometry, up to the given parameters, is feasible
5763

5864
private:

0 commit comments

Comments
 (0)