SynAPSE  0.6.0
Synergistic Analysis of Phase Space Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Private Member Functions | Private Attributes
Scattering Class Reference

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 $X_0$. More...
 
double _factor
 Prefactor of the scattering formul. More...
 

Detailed Description

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 $X_0$.

It is function of the input particle momentum and velocity.

Constructor & Destructor Documentation

Scattering::Scattering ( )

Default constructor, initilizes everything to 0.

Scattering::Scattering ( const double &  thickness)

Normal constructor, sets the thickness and the scattering factor.

Parameters
thicknessThickness of the absorber in $X_0$
Scattering::Scattering ( const Scattering &  scat)

Copy constructor.

Scattering::~Scattering ( )

Destructor.

Member Function Documentation

void Scattering::ComputeFactor ( const double &  thickness)
private

Compute the scattering factor from the thickness [MeV/c].

const double& Scattering::GetFactor ( ) const
inline

Gets the scattering factor [MeV/c].

const double& Scattering::GetThickness ( ) const
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.

Parameters
pTotal input momentum
mParticle mass
Returns
Scattering angle
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.

Parameters
beamInput beam: x, (y), px, (py), pz [mm, MeV/c]
pTotal input beam momentum [MeV/c]
mParticle mass [MeV/c^2]
void Scattering::SetFactor ( const double &  factor)
inline

Sets the scattering factor [MeV/c].

void Scattering::SetSeed ( const size_t &  seed)
inline

Sets the seed.

void Scattering::SetThickness ( const double &  thickness)
inline

Sets the thickness in amount of radiation length.

Field Documentation

double Scattering::_factor
private

Prefactor of the scattering formul.

TRandom3 Scattering::_rdmzer
private

Pseudorandom number generator.

double Scattering::_thickness
private

Thickness of the material in amount of $X_0$.


The documentation for this class was generated from the following files: