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
DetectorGlobals Class Reference

Stores the positions of a MICE detector in global coordinates. More...

#include <GeometryHandler.hh>

Public Member Functions

 DetectorGlobals ()
 Default constructor, initilizes everything to 0. More...
 
 DetectorGlobals (const std::string &filename, const std::string &name)
 Import the requested detector. More...
 
 DetectorGlobals (const DetectorGlobals &detector_globals)
 Copy constructor. More...
 
DetectorGlobals & operator= (const DetectorGlobals &detector_globals)
 Equality operator. More...
 
 ~DetectorGlobals ()
 Destructor. More...
 
const TVector3 & operator[] (const size_t i) const
 Overload the subscript operator, return a value. More...
 
TVector3 & operator[] (const size_t i)
 Overload the subscript operator, return a value, allows mods. More...
 
void Load (const std::string &filename, const std::string &name)
 Loads the global constants from the parent geometry file. More...
 
void SetPosition (const TVector3 &pos)
 Sets the global position of the detector. More...
 
const TVector3 & Position () const
 Returns the global position of the detector. More...
 
void SetAngles (const TVector3 &angles)
 Sets the global rotation angles of the detector. More...
 
const TVector3 & Angles () const
 Returns the global rotation angles of the detector. More...
 
double x () const
 Returns the global x coordinate of the detector. More...
 
double y () const
 Returns the global y coordinate of the detector. More...
 
double z () const
 Returns the global z coordinate of the detector. More...
 
double alpha () const
 Returns the global pitch of the detector. More...
 
double beta () const
 Returns the global yaw of the detector. More...
 
double gamma () const
 Returns the global roll of the detector. More...
 

Private Attributes

TVector3 _pos
 Position of module. More...
 
TVector3 _angles
 Rotation angles of module. More...
 
std::vector< TVector3 > _subpos
 Positions of submodules. More...
 

Detailed Description

Stores the positions of a MICE detector in global coordinates.

This object extracts the globals of the requested module from the MICE .dat geometry file. It retains its positions and rotations in the MICE global coordinate system.

Constructor & Destructor Documentation

DetectorGlobals::DetectorGlobals ( )

Default constructor, initilizes everything to 0.

DetectorGlobals::DetectorGlobals ( const std::string &  filename,
const std::string &  name 
)

Import the requested detector.

Parameters
filenamePath to the MICE geometry file
nameName of the detector
DetectorGlobals::DetectorGlobals ( const DetectorGlobals &  detector_globals)

Copy constructor.

DetectorGlobals::~DetectorGlobals ( )

Destructor.

Member Function Documentation

double DetectorGlobals::alpha ( ) const
inline

Returns the global pitch of the detector.

const TVector3& DetectorGlobals::Angles ( ) const
inline

Returns the global rotation angles of the detector.

double DetectorGlobals::beta ( ) const
inline

Returns the global yaw of the detector.

double DetectorGlobals::gamma ( ) const
inline

Returns the global roll of the detector.

void DetectorGlobals::Load ( const std::string &  filename,
const std::string &  name 
)

Loads the global constants from the parent geometry file.

Parameters
filenamePath to the MICE geometry file
nameName of the module
DetectorGlobals & DetectorGlobals::operator= ( const DetectorGlobals &  detector_globals)

Equality operator.

const TVector3& DetectorGlobals::operator[] ( const size_t  i) const
inline

Overload the subscript operator, return a value.

TVector3& DetectorGlobals::operator[] ( const size_t  i)
inline

Overload the subscript operator, return a value, allows mods.

const TVector3& DetectorGlobals::Position ( ) const
inline

Returns the global position of the detector.

void DetectorGlobals::SetAngles ( const TVector3 &  angles)
inline

Sets the global rotation angles of the detector.

void DetectorGlobals::SetPosition ( const TVector3 &  pos)

Sets the global position of the detector.

double DetectorGlobals::x ( ) const
inline

Returns the global x coordinate of the detector.

double DetectorGlobals::y ( ) const
inline

Returns the global y coordinate of the detector.

double DetectorGlobals::z ( ) const
inline

Returns the global z coordinate of the detector.

Field Documentation

TVector3 DetectorGlobals::_angles
private

Rotation angles of module.

TVector3 DetectorGlobals::_pos
private

Position of module.

std::vector<TVector3> DetectorGlobals::_subpos
private

Positions of submodules.


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