MIDSX 0.1
A x-ray transport code system for dosimetry
Loading...
Searching...
No Matches
photon_interactions.h
1#ifndef MCXRAYTRANSPORT_PHOTON_INTERACTIONS_H
2#define MCXRAYTRANSPORT_PHOTON_INTERACTIONS_H
3
4#include "interaction_data.h"
5#include "constants.h"
6#include "probability_dist.h"
7#include "particle_interaction_behavior.h"
8
9// forward declarations to avoid circular dependencies
10class Particle;
11
12namespace PhotonInteractionHelpers {
13 Eigen::MatrixXd mergeMatrices(std::vector<Eigen::MatrixXd>& matrices);
14 Eigen::MatrixXd getBlockByRowValue(Eigen::MatrixXd& matrix, double rowStartValue, double rowEndValue, int column);
15 }
16
21public:
31 double interact(Particle& photon, Material& material) override;
32};
33
38public:
48 double interact(Particle& photon, Material& material) override;
49};
50
55public:
67 double interact(Particle& photon, Material& material) override;
68private:
69 static bool isR1Accepted(double k, double random_number_1);
70 static double getChiIfR1Accepted(double k, double random_number_2);
71 static bool isR3AcceptedIfR1Accepted(double chi, double random_number_3);
72 static double getKPrime(double k, double chi);
73 static double getMu(double k, double k_prime);
74 bool isAcceptedByScatteringFunction(double mu, double k, Material& material);
75 double changeTrajectoryAndReturnEnergyForCoherentScattering(Particle& photon, double mu, double k, double k_prime);
76 static double getChiIfR1Rejected(double k, double random_number_2);
77 static bool isR3AcceptedIfR1Rejected(double k, double chi, double random_number_3);
78};
79
80#endif //MCXRAYTRANSPORT_PHOTON_INTERACTIONS_H
Class which represents the coherent scattering interaction.
double interact(Particle &photon, Material &material) override
Performs the coherent scattering interaction.
Class which represents the incoherent scattering interaction.
double interact(Particle &photon, Material &material) override
Performs the incoherent scattering interaction.
Class which represents a material.
Definition material.h:19
Class which represents a particle.
Definition particle.h:36
Virtual class which represents the behavior of a particle when it interacts with a material.
Class which represents the photoelectric effect interaction.
double interact(Particle &photon, Material &material) override
Performs the photoelectric effect interaction.
Contains constants used throughout the code.