PSCalib::GeometryObject Class Reference
[PSCalib package]

Class supports elementary building block for hierarchial geometry description. More...

#include <GeometryObject.h>

List of all members.

Public Types

typedef PSCalib::SegGeometry SG
typedef boost::shared_ptr<
GeometryObject
shpGO

Public Member Functions

 GeometryObject (std::string pname=std::string(), unsigned pindex=0, std::string oname=std::string(), unsigned oindex=0, double x0=0, double y0=0, double z0=0, double rot_z=0, double rot_y=0, double rot_x=0, double tilt_z=0, double tilt_y=0, double tilt_x=0)
 Class constructor accepts path to the calibration "geometry" file and verbosity control bit-word.
virtual ~GeometryObject ()
std::string string_geo ()
std::string string_geo_children ()
void print_geo ()
 Prints info about self object.
void print_geo_children ()
 Prints info about children objects.
void set_parent (shpGO parent)
 Sets shared pointer to the parent object.
void add_child (shpGO child)
 Adds shared pointer of the children geometry object to the vector.
shpGO get_parent ()
 Returns shared pointer to the parent geometry object.
std::vector< shpGOget_list_of_children ()
 Returns vector of shared pointers to children geometry objects.
std::string get_geo_name ()
 Returns self object name.
unsigned get_geo_index ()
 Returns self object index.
std::string get_parent_name ()
 Returns parent object name.
unsigned get_parent_index ()
 Returns parent object index.
void evaluate_pixel_coords (const bool do_tilt=true, const bool do_eval=false)
 Re-evaluate pixel coordinates (useful if geo is changed).
void get_pixel_coords (const double *&X, const double *&Y, const double *&Z, unsigned &size, const bool do_tilt=true, const bool do_eval=false)
 Returns pointers to pixel coordinate arrays.
void get_pixel_areas (const double *&areas, unsigned &size)
 Returns pointers to pixel areas array.
void get_pixel_mask (const int *&mask, unsigned &size, const unsigned &mbits=0377)
 Returns pointers to pixel mask array.
unsigned get_size_geo_array ()
 Returns size of geometry object array - number of pixels.
double get_pixel_scale_size ()
 Returns pixel scale size of geometry object.
std::string str_data ()
 Returns string of data for output file.
void get_geo_pars (double &x0, double &y0, double &z0, double &rot_z, double &rot_y, double &rot_x, double &tilt_z, double &tilt_y, double &tilt_x)
 Gets self object geometry parameters.
void set_geo_pars (const double &x0=0, const double &y0=0, const double &z0=0, const double &rot_z=0, const double &rot_y=0, const double &rot_x=0, const double &tilt_z=0, const double &tilt_y=0, const double &tilt_x=0)
 Sets self object geometry parameters.
void move_geo (const double &dx=0, const double &dy=0, const double &dz=0)
 Adds offset for origin of the self object w.r.t. current position.
void tilt_geo (const double &dt_x=0, const double &dt_y=0, const double &dt_z=0)
 Adds tilts to the self object w.r.t. current orientation.
void deallocate_memory ()
 Delete arrays with allocated memory, reset pointers to 0.


Detailed Description

Class supports elementary building block for hierarchial geometry description.

Note:
This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.
Version:
Id
GeometryObject.h 10056 2015-05-12 00:21:09Z dubrovin@SLAC.STANFORD.EDU
See also:
GeometryObject, CalibFileFinder, PSCalib/test/ex_geometry_access.cpp
Author:
Mikhail S. Dubrovin
Interface Description

Definition at line 144 of file GeometryObject.h.


Member Typedef Documentation

typedef PSCalib::SegGeometry PSCalib::GeometryObject::SG

Definition at line 147 of file GeometryObject.h.

typedef boost::shared_ptr<GeometryObject> PSCalib::GeometryObject::shpGO

Definition at line 150 of file GeometryObject.h.


Constructor & Destructor Documentation

PSCalib::GeometryObject::GeometryObject ( std::string  pname = std::string(),
unsigned  pindex = 0,
std::string  oname = std::string(),
unsigned  oindex = 0,
double  x0 = 0,
double  y0 = 0,
double  z0 = 0,
double  rot_z = 0,
double  rot_y = 0,
double  rot_x = 0,
double  tilt_z = 0,
double  tilt_y = 0,
double  tilt_x = 0 
)

Class constructor accepts path to the calibration "geometry" file and verbosity control bit-word.

Parameters:
[in] pname - parent name
[in] pindex - parent index
[in] oname - this object name
[in] oindex - this object index
[in] x0 - object origin coordinate x[um] in parent frame
[in] y0 - object origin coordinate y[um] in parent frame
[in] z0 - object origin coordinate z[um] in parent frame
[in] rot_z - object rotation/design angle [deg] around axis z of the parent frame
[in] rot_y - object rotation/design angle [deg] around axis y of the parent frame
[in] rot_x - object rotation/design angle [deg] around axis x of the parent frame
[in] tilt_z - object tilt/deviation angle [deg] around axis z of the parent frame
[in] tilt_y - object tilt/deviation angle [deg] around axis y of the parent frame
[in] tilt_x - object tilt/deviation angle [deg] around axis x of the parent frame

virtual PSCalib::GeometryObject::~GeometryObject (  )  [virtual]


Member Function Documentation

void PSCalib::GeometryObject::add_child ( shpGO  child  )  [inline]

Adds shared pointer of the children geometry object to the vector.

Definition at line 200 of file GeometryObject.h.

void PSCalib::GeometryObject::deallocate_memory (  ) 

Delete arrays with allocated memory, reset pointers to 0.

void PSCalib::GeometryObject::evaluate_pixel_coords ( const bool  do_tilt = true,
const bool  do_eval = false 
)

Re-evaluate pixel coordinates (useful if geo is changed).

Parameters:
[in] do_tilt - on/off tilt angle correction
[in] do_eval - enforce (re-)evaluation of pixel coordinates

unsigned PSCalib::GeometryObject::get_geo_index (  )  [inline]

Returns self object index.

Definition at line 212 of file GeometryObject.h.

std::string PSCalib::GeometryObject::get_geo_name (  )  [inline]

Returns self object name.

Definition at line 209 of file GeometryObject.h.

void PSCalib::GeometryObject::get_geo_pars ( double &  x0,
double &  y0,
double &  z0,
double &  rot_z,
double &  rot_y,
double &  rot_x,
double &  tilt_z,
double &  tilt_y,
double &  tilt_x 
)

Gets self object geometry parameters.

std::vector<shpGO> PSCalib::GeometryObject::get_list_of_children (  )  [inline]

Returns vector of shared pointers to children geometry objects.

Definition at line 206 of file GeometryObject.h.

shpGO PSCalib::GeometryObject::get_parent (  )  [inline]

Returns shared pointer to the parent geometry object.

Definition at line 203 of file GeometryObject.h.

unsigned PSCalib::GeometryObject::get_parent_index (  )  [inline]

Returns parent object index.

Definition at line 218 of file GeometryObject.h.

std::string PSCalib::GeometryObject::get_parent_name (  )  [inline]

Returns parent object name.

Definition at line 215 of file GeometryObject.h.

void PSCalib::GeometryObject::get_pixel_areas ( const double *&  areas,
unsigned &  size 
)

Returns pointers to pixel areas array.

Parameters:
[out] areas - pointer to pixel areas array
[out] size - size of the pixel areas array (number of pixels)

void PSCalib::GeometryObject::get_pixel_coords ( const double *&  X,
const double *&  Y,
const double *&  Z,
unsigned &  size,
const bool  do_tilt = true,
const bool  do_eval = false 
)

Returns pointers to pixel coordinate arrays.

Parameters:
[out] X - pointer to x pixel coordinate array
[out] Y - pointer to y pixel coordinate array
[out] Z - pointer to z pixel coordinate array
[out] size - size of the pixel coordinate array (number of pixels)
[in] do_tilt - on/off tilt angle correction
[in] do_eval - enforce (re-)evaluation of pixel coordinates

void PSCalib::GeometryObject::get_pixel_mask ( const int *&  mask,
unsigned &  size,
const unsigned &  mbits = 0377 
)

Returns pointers to pixel mask array.

Parameters:
[out] mask - pointer to pixel mask array
[out] size - size of the pixel mask array (number of pixels)
[in] mbits - mask control bits; + 1 - mask edges, + 2 - mask two central columns, + 4 - mask non-bounded pixels, + 8 - mask nearest neighbours of nonbonded pixels.

double PSCalib::GeometryObject::get_pixel_scale_size (  ) 

Returns pixel scale size of geometry object.

unsigned PSCalib::GeometryObject::get_size_geo_array (  ) 

Returns size of geometry object array - number of pixels.

void PSCalib::GeometryObject::move_geo ( const double &  dx = 0,
const double &  dy = 0,
const double &  dz = 0 
)

Adds offset for origin of the self object w.r.t. current position.

void PSCalib::GeometryObject::print_geo (  ) 

Prints info about self object.

void PSCalib::GeometryObject::print_geo_children (  ) 

Prints info about children objects.

void PSCalib::GeometryObject::set_geo_pars ( const double &  x0 = 0,
const double &  y0 = 0,
const double &  z0 = 0,
const double &  rot_z = 0,
const double &  rot_y = 0,
const double &  rot_x = 0,
const double &  tilt_z = 0,
const double &  tilt_y = 0,
const double &  tilt_x = 0 
)

Sets self object geometry parameters.

void PSCalib::GeometryObject::set_parent ( shpGO  parent  )  [inline]

Sets shared pointer to the parent object.

Definition at line 197 of file GeometryObject.h.

std::string PSCalib::GeometryObject::str_data (  ) 

Returns string of data for output file.

std::string PSCalib::GeometryObject::string_geo (  ) 

std::string PSCalib::GeometryObject::string_geo_children (  ) 

void PSCalib::GeometryObject::tilt_geo ( const double &  dt_x = 0,
const double &  dt_y = 0,
const double &  dt_z = 0 
)

Adds tilts to the self object w.r.t. current orientation.


The documentation for this class was generated from the following file:
Generated on 19 Dec 2016 for PSDMSoftware by  doxygen 1.4.7