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 Attributes
Beam::Aperture Class Reference

Holds a set of beam line apertures. More...

#include <Aperture.hh>

Public Member Functions

 Aperture ()
 Default constructor, initilizes everything to 0. More...
 
 Aperture (std::vector< double > starts, std::vector< double > ends, std::vector< double > radii, std::vector< std::string > names=std::vector< std::string >())
 Normal constructor, sets apertures. More...
 
 Aperture (const Aperture &Aperture)
 Copy constructor. More...
 
Aperture & operator= (const Aperture &Aperture)
 Equality operator. More...
 
 ~Aperture ()
 Destructor. More...
 
void Initialize (std::vector< double > starts=std::vector< double >(), std::vector< double > ends=std::vector< double >(), std::vector< double > radii=std::vector< double >(), std::vector< std::string > names=std::vector< std::string >())
 Initializes the apertures. More...
 
void SetMICEDefault (const std::string &filename)
 Sets the default MICE apertures. More...
 
void Add (double start, double end, double radius, std::string name="")
 Adds a single aperture to the object. More...
 
const double & Radius (double z) const
 Checks the aperture radius at a given position along the beam line. More...
 
bool IsIn (double x, double y, double z) const
 Checks if the particle is within the apertures. More...
 
void Draw (std::string name="", double dz=1) const
 Draws the apertures on a canvas. More...
 

Private Attributes

std::vector< double > _apertures
 Summary vector used to fetch the smallest. More...
 
std::vector< double > _starts
 Starting points vector of the apertures. More...
 
std::vector< double > _ends
 End points vector of the apertures. More...
 
std::vector< double > _radii
 Radii of the apertures. More...
 
std::vector< std::string > _names
 Names of the apertures. More...
 

Detailed Description

Holds a set of beam line apertures.

The object stores and manages a set of apertures encountered in the beam line. It contains definitions of methods associated with the apertures.

Constructor & Destructor Documentation

Beam::Aperture::Aperture ( )

Default constructor, initilizes everything to 0.

Beam::Aperture::Aperture ( std::vector< double >  starts,
std::vector< double >  ends,
std::vector< double >  radii,
std::vector< std::string >  names = std::vector<std::string>() 
)

Normal constructor, sets apertures.

Parameters
startsStarting points of the apertures [mm]
endsEnd points of the apertures [mm]
radiiRadii of the apertures [mm]
namesNames of the apertures
Beam::Aperture::Aperture ( const Aperture &  Aperture)

Copy constructor.

Beam::Aperture::~Aperture ( )

Destructor.

Member Function Documentation

void Beam::Aperture::Add ( double  start,
double  end,
double  radius,
std::string  name = "" 
)

Adds a single aperture to the object.

Parameters
startStarting point of the aperture [mm]
endEnd point of the aperture [mm]
radiusRadius of the aperture [mm]
nameName of the aperture
void Beam::Aperture::Draw ( std::string  name = "",
double  dz = 1 
) const

Draws the apertures on a canvas.

Parameters
nameName of the beam line
dzStepping size between points [mm]
void Beam::Aperture::Initialize ( std::vector< double >  starts = std::vector<double>(),
std::vector< double >  ends = std::vector<double>(),
std::vector< double >  radii = std::vector<double>(),
std::vector< std::string >  names = std::vector<std::string>() 
)

Initializes the apertures.

Parameters
startsStarting points of the apertures [mm]
endsEnd points of the apertures [mm]
radiiRadii of the apertures [mm]
namesNames of the apertures
bool Beam::Aperture::IsIn ( double  x,
double  y,
double  z 
) const

Checks if the particle is within the apertures.

Parameters
xHorizontal coordinate [mm]
yVertical coordinate [mm]
zPosition along the beam line [mm]
Returns
True if within the aperture
Aperture & Beam::Aperture::operator= ( const Aperture &  Aperture)

Equality operator.

const double & Beam::Aperture::Radius ( double  z) const

Checks the aperture radius at a given position along the beam line.

Parameters
zPosition along the beam line [mm]
Returns
Radius of the aperture at z [mm]
void Beam::Aperture::SetMICEDefault ( const std::string &  filename)

Sets the default MICE apertures.

Parameters
filenamePath to the MICE geometry file

Field Documentation

std::vector<double> Beam::Aperture::_apertures
private

Summary vector used to fetch the smallest.

std::vector<double> Beam::Aperture::_ends
private

End points vector of the apertures.

std::vector<std::string> Beam::Aperture::_names
private

Names of the apertures.

std::vector<double> Beam::Aperture::_radii
private

Radii of the apertures.

std::vector<double> Beam::Aperture::_starts
private

Starting points vector of the apertures.


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