lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
geometry

Classes

class  geometry::GeometryObject
 Class supports elementary building block for hierarchial geometry description. More...
 
class  geometry::SegGeometryCspad2x1V1
 Class SegGeometryCspad2x1V1 defines the cspad 2x1 V1 sensor pixel coordinates in its local frame. More...
 
class  geometry::SegGeometryEpix100V1
 Class SegGeometryEpix100V1 defines the Epix100 V1 sensor pixel coordinates in its local frame. More...
 
class  geometry::SegGeometryEpix10kaV1
 Class SegGeometryEpix10kaV1 defines the Epix100 V1 sensor pixel coordinates in its local frame. More...
 

Functions

bool geometry::matrix_pars (const std::string &segname, gsize_t &rows, gsize_t &cols, pixel_coord_t &pix_size_rows, pixel_coord_t &pix_size_cols)
 Class SegGeometryMatrixV1 defines the matrix V1 (pnCCD, 512x512) sensor pixel coordinates in its local frame.
 

Variables

static const angle_t geometry::DEG_TO_RAD = 3.141592653589793238463 / 180
 Abstract base class SegGeometry defines the interface to access segment pixel coordinates.
 

Detailed Description

Function Documentation

◆ matrix_pars()

bool geometry::matrix_pars ( const std::string &  segname,
gsize_t &  rows,
gsize_t &  cols,
pixel_coord_t &  pix_size_rows,
pixel_coord_t &  pix_size_cols 
)

Class SegGeometryMatrixV1 defines the matrix V1 (pnCCD, 512x512) sensor pixel coordinates in its local frame.

Default constructor parameters are set for pnCCD; 512x512 pixels with 75x75um pixel size.

MatrixV1 sensor coordinate frame has a matrix-style coordinate system:

(Xmin,Ymin) (Xmin,Ymax)
(0,0) (0,511)
+-----------------+----> Y
| |
| |
| |
| |
| |
| |
| |
| |
+-----------------+
|
X V
(511,0) (511,511)
(Xmax,Ymin) (Xmax,Ymax)

Pixel (r,c)=(0,0) is in the top left corner of the matrix which has coordinates (Xmin,Ymin) - is in origin. Here we assume that sensor has 512 rows and 512 columns.

Interface Description
  • Instatiation
    SG *seg_geom = new SG();
    or
    bool use_wide_pix_center = true;
    SG *seg_geom = new SG(use_wide_pix_center);
  • Print info
    bitword_t pbits=0377; // 1-member data; 2-coordinate arrays; 4-min/max coordinate values
    seg_geom -> print_seg_info(pbits);
    unsigned bitword_t
    unsigned; per the trailing comment, a bit word that controls mask layers, printed bits,...
    Definition GeometryTypes.hh:35
  • Access methods
    // scalar values
    const gsize_t array_size = seg_geom -> size(); // 512*512
    const gsize_t number_of_rows = seg_geom -> rows(); // 512
    const gsize_t number_of_cols = seg_geom -> cols(); // 512
    const pixel_coord_t pixel_scale_size = seg_geom -> pixel_scale_size(); // 75.00
    const pixel_coord_t pixel_coord_min = seg_geom -> pixel_coord_min(SG::AXIS_Z);
    const pixel_coord_t pixel_coord_max = seg_geom -> pixel_coord_max(SG::AXIS_X);
    // pointer to arrays with size equal to array_size
    const gsize_t* p_array_shape = seg_geom -> shape(); // {512, 512}
    const pixel_area_t* p_pixel_area = seg_geom -> pixel_area_array(); // array of 1-for regular or 2.5-for long pixels
    const pixel_coord_t* p_pixel_size_arr = seg_geom -> pixel_size_array(SG::AXIS_X);
    const pixel_coord_t* p_pixel_coord_arr = seg_geom -> pixel_coord_array(SG::AXIS_Y);
    bitword_t mbits=0377; // 1-edges; 2-wide central cols; 4-non-bound; 8-non-bound neighbours
    const pixel_mask_t* p_mask_arr = seg_geom -> pixel_mask_array(mbits);
    double pixel_coord_t
    Geometry types.
    Definition GeometryTypes.hh:21
    uint16_t pixel_mask_t
    uint16_t; mask element type.
    Definition GeometryTypes.hh:27
    double pixel_area_t
    double; the trailing comment calls it an arbitrary pixel area.
    Definition GeometryTypes.hh:23
    unsigned gsize_t
    unsigned; the trailing comment says it is an array size.
    Definition GeometryTypes.hh:31

This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.

Author
Mikhail S. Dubrovin

Splits the string segname like MTRX:384:384:100:100 and returns values

Parameters
[in]segname- string like MTRX:384:384:100:100;
[out]rows- number of rows
[out]cols- number of columnss
[out]pix_size_rows- pixel size along axis counting rows
[out]pix_size_cols- pixel size along axis counting cols

Variable Documentation

◆ DEG_TO_RAD

const angle_t geometry::DEG_TO_RAD = 3.141592653589793238463 / 180
static

Abstract base class SegGeometry defines the interface to access segment pixel coordinates.

This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.

Author
Mikhail S. Dubrovin