MIDSX 0.1
A x-ray transport code system for dosimetry
Loading...
Searching...
No Matches
surface_tally.h
1#ifndef MIDSX_SURFACE_TALLY_H
2#define MIDSX_SURFACE_TALLY_H
3
4#include "tally_data.h"
5#include "surface_quantity_container.h"
6
7
14public:
15 virtual ~SurfaceTally() = default;
21 void processMeasurements(TempSurfaceTallyData& temp_surface_tally_data);
22
29protected:
30 Eigen::Vector3d norm_;
31
32 TempSurfaceTallyData temp_surface_tally_data_;
33 SurfaceQuantityContainer surface_quantities_;
34
35 bool willPassThrough();
36
37 double calculateEntranceCosine();
38 virtual double calculateIntersectionParameter(double entrance_cosine) = 0;
39 Eigen::Vector3d calculateIntersectionPoint(double t);
40 static bool isPhotonParallelToPlane(double entrance_cosine);
41 bool isOutOfRange(double t);
42 virtual bool isOutsideOfSurface(const Eigen::Vector3d& intersection_point) = 0;
43};
44
49public:
58 DiscSurfaceTally(Eigen::Vector3d center, Eigen::Vector3d norm, double radius, const SurfaceQuantityContainer& quantities);
59private:
60 Eigen::Vector3d center_;
61 double radius_;
62
63 void setArea();
64
65 double calculateIntersectionParameter(double entrance_cosine) override;
66 bool isOutsideOfSurface(const Eigen::Vector3d& intersection_point) override;
67};
68
73public:
82 RectangularSurfaceTally(Eigen::Vector3d corner, Eigen::Vector3d edge1, Eigen::Vector3d edge2, const SurfaceQuantityContainer& quantities);
83private:
84 Eigen::Vector3d corner_;
85 Eigen::Vector3d edge1_;
86 Eigen::Vector3d edge2_;
87 double edge1_dot_edge1_;
88 double edge2_dot_edge2_;
89
90 void handleOrthogonalEdges();
91 void setArea();
92 void setBasisDotProducts();
93
94 bool areEdgesOrthogonal();
95
96 double calculateIntersectionParameter(double entrance_cosine) override;
97 bool isOutsideOfSurface(const Eigen::Vector3d& intersection_point) override;
98};
99
100#endif //MIDSX_SURFACE_TALLY_H
Class which represents a disc surface tally.
DiscSurfaceTally(Eigen::Vector3d center, Eigen::Vector3d norm, double radius, const SurfaceQuantityContainer &quantities)
Constructor for the DiscSurfaceTally class.
Class which represents a rectangular surface tally.
RectangularSurfaceTally(Eigen::Vector3d corner, Eigen::Vector3d edge1, Eigen::Vector3d edge2, const SurfaceQuantityContainer &quantities)
Constructor for the RectangularSurfaceTally class.
Class which represents a container for surface quantities.
Virtual class which represents a surface tally.
void processMeasurements(TempSurfaceTallyData &temp_surface_tally_data)
Processes the measurements for a TempSurfaceTallyData object.
SurfaceQuantityContainer & getSurfaceQuantityContainer()
Gets the SurfaceQuantityContainer object for the surface tally.
Struct which represents the temporary data for a surface tally.
Definition tally_data.h:24