![]() |
SynAPSE
0.6.0
Synergistic Analysis of Phase Space Evolution
|
Randomly scatters a particle across a specified material. More...
#include <Scattering.hh>
Public Member Functions | |
| Scattering () | |
| Default constructor, initilizes everything to 0. More... | |
| Scattering (const double &thickness) | |
| Normal constructor, sets the thickness and the scattering factor. More... | |
| Scattering (const Scattering &scat) | |
| Copy constructor. More... | |
| Scattering & | operator= (const Scattering &scat) |
| Equality operator. More... | |
| ~Scattering () | |
| Destructor. More... | |
| double | Scatter (const double &p, const double &m) |
| Performs the scattering on a particle. More... | |
| void | ScatterBunch (std::map< std::string, std::vector< double >> &beam, const double &p, const double &m) |
| Performs the scattering on a beam of particles. More... | |
| void | SetSeed (const size_t &seed) |
| Sets the seed. More... | |
| void | SetThickness (const double &thickness) |
| Sets the thickness in amount of radiation length. More... | |
| const double & | GetThickness () const |
| Gets the thickness in amount of radiation length. More... | |
| void | SetFactor (const double &factor) |
| Sets the scattering factor [MeV/c]. More... | |
| const double & | GetFactor () const |
| Gets the scattering factor [MeV/c]. More... | |
Private Member Functions | |
| void | ComputeFactor (const double &thickness) |
| Compute the scattering factor from the thickness [MeV/c]. More... | |
Private Attributes | |
| TRandom3 | _rdmzer |
| Pseudorandom number generator. More... | |
| double | _thickness |
Thickness of the material in amount of . More... | |
| double | _factor |
| Prefactor of the scattering formul. More... | |
Randomly scatters a particle across a specified material.
It uses the Gaussian approximation to scattering, with a width entirely defined by the material thickness in number
.
It is function of the input particle momentum and velocity.
| Scattering::Scattering | ( | ) |
Default constructor, initilizes everything to 0.
| Scattering::Scattering | ( | const double & | thickness | ) |
Normal constructor, sets the thickness and the scattering factor.
| thickness | Thickness of the absorber in |
| Scattering::Scattering | ( | const Scattering & | scat | ) |
Copy constructor.
| Scattering::~Scattering | ( | ) |
Destructor.
|
private |
Compute the scattering factor from the thickness [MeV/c].
|
inline |
Gets the scattering factor [MeV/c].
|
inline |
Gets the thickness in amount of radiation length.
| Scattering & Scattering::operator= | ( | const Scattering & | scat | ) |
Equality operator.
| double Scattering::Scatter | ( | const double & | p, |
| const double & | m | ||
| ) |
Performs the scattering on a particle.
| p | Total input momentum |
| m | Particle mass |
| void Scattering::ScatterBunch | ( | std::map< std::string, std::vector< double >> & | beam, |
| const double & | p, | ||
| const double & | m | ||
| ) |
Performs the scattering on a beam of particles.
| beam | Input beam: x, (y), px, (py), pz [mm, MeV/c] |
| p | Total input beam momentum [MeV/c] |
| m | Particle mass [MeV/c^2] |
|
inline |
Sets the scattering factor [MeV/c].
|
inline |
Sets the seed.
|
inline |
Sets the thickness in amount of radiation length.
|
private |
Prefactor of the scattering formul.
|
private |
Pseudorandom number generator.
|
private |
Thickness of the material in amount of
.
1.8.6