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

Usage. More...

Classes

class  GeometryAccess
 Detector geometry built from "geometry" calibration text: each non-comment line becomes a GeometryObject, linked to its parent, and pixel arrays are computed from the tree. More...
 
class  GeometryObject
 Class supports elementary building block for hierarchial geometry description. More...
 
class  SegGeometry
 Abstract interface to one segment's geometry: size, rows, cols, shape, pixel scale size, the pixel area, size, coordinate (per AXIS) and mask arrays, and the coordinate minimum and maximum. More...
 
class  SegGeometryCspad2x1V1
 Class SegGeometryCspad2x1V1 defines the cspad 2x1 V1 sensor pixel coordinates in its local frame. More...
 
class  SegGeometryEpix100V1
 Class SegGeometryEpix100V1 defines the Epix100 V1 sensor pixel coordinates in its local frame. More...
 
class  SegGeometryEpix10kaV1
 Class SegGeometryEpix10kaV1 defines the Epix100 V1 sensor pixel coordinates in its local frame. More...
 
class  SegGeometryMatrixV1
 SegGeometry of a rectangular rows x cols matrix with uniform pixel sizes; the defaults (512 x 512, 75 um) are for pnCCD per the comment above. More...
 
class  SegGeometryStore
 

Typedefs

typedef double pixel_coord_t
 Geometry types.
 
typedef double pixel_area_t
 double; the trailing comment calls it an arbitrary pixel area.
 
typedef uint32_t pixel_idx_t
 uint32_t; per the trailing comment, a pixel index along a 1-d axis.
 
typedef uint16_t pixel_mask_t
 uint16_t; mask element type.
 
typedef double angle_t
 double; the trailing comment says it holds an angle in degrees or radians.
 
typedef unsigned gsize_t
 unsigned; the trailing comment says it is an array size.
 
typedef unsigned segindex_t
 unsigned; per the trailing comment, a segment index in the parent detector.
 
typedef unsigned bitword_t
 unsigned; per the trailing comment, a bit word that controls mask layers, printed bits, etc.
 
typedef psalg::types::shape_t shape_t
 Alias for psalg::types::shape_t (uint32_t).
 
typedef psalg::types::size_t psalg_size_t
 Alias for psalg::types::size_t (uint32_t).
 

Enumerations

enum  AXIS { AXIS_X =0 , AXIS_Y , AXIS_Z }
 Enumerator for X, Y, and Z axes. More...
 

Functions

template<typename T >
T min_of_arr (const T *arr, gsize_t size)
 Global method, returns minimal value of the array of specified length.
 
template<typename T >
T max_of_arr (const T *arr, gsize_t size)
 Global method, returns maximal value of the array of specified length.
 
bool 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.
 
template<typename T >
NDArray< const T > data2x2ToTwo2x1 (const NDArray< const T > &data2x2)
 Converts cspad2x2 NDArray data2x2[185,388,2] to two2x1[2,185,388].
 
template<typename T >
NDArray< const T > two2x1ToData2x2 (const NDArray< const T > &two2x1)
 Converts cspad2x2 NDArray two2x1[2,185,388] to data2x2[185,388,2].
 
template<typename T >
void two2x1ToData2x2 (T *A)
 Converts cspad2x2 NDArray two2x1[2,185,388] to data2x2[185,388,2].
 

Variables

static const angle_t DEG_TO_RAD = 3.141592653589793238463 / 180
 Abstract base class SegGeometry defines the interface to access segment pixel coordinates.
 
static const psalg_size_t N2X1 = 2
 2: number of 2x1 parts, the first dimension of the two2x1 layout used by the conversion templates.
 
static const psalg_size_t ROWS2X1 = 185
 185: rows per 2x1 part in the conversion templates.
 
static const psalg_size_t COLS2X1 = 388
 388: columns per 2x1 part in the conversion templates.
 
static const psalg_size_t SIZE2X1 = COLS2X1*ROWS2X1
 COLS2X1*ROWS2X1 (71780) elements per 2x1 part.
 
static const psalg_size_t SIZE2X2 = N2X1*SIZE2X1
 N2X1*SIZE2X1 (143560) elements.
 

Detailed Description

Usage.

#include "psalg/geometry/GeometryTypes.hh"

Typedef Documentation

◆ angle_t

typedef double geometry::angle_t

double; the trailing comment says it holds an angle in degrees or radians.

◆ bitword_t

typedef unsigned geometry::bitword_t

unsigned; per the trailing comment, a bit word that controls mask layers, printed bits, etc.

◆ gsize_t

typedef unsigned geometry::gsize_t

unsigned; the trailing comment says it is an array size.

◆ pixel_area_t

typedef double geometry::pixel_area_t

double; the trailing comment calls it an arbitrary pixel area.

◆ pixel_coord_t

typedef double geometry::pixel_coord_t

Geometry types.

◆ pixel_idx_t

typedef uint32_t geometry::pixel_idx_t

uint32_t; per the trailing comment, a pixel index along a 1-d axis.

◆ pixel_mask_t

typedef uint16_t geometry::pixel_mask_t

uint16_t; mask element type.

◆ psalg_size_t

◆ segindex_t

typedef unsigned geometry::segindex_t

unsigned; per the trailing comment, a segment index in the parent detector.

◆ shape_t

Enumeration Type Documentation

◆ AXIS

Enumerator for X, Y, and Z axes.

Enumerator
AXIS_X 

Value 0.

AXIS_Y 

Value 1.

AXIS_Z 

Value 2.

Function Documentation

◆ data2x2ToTwo2x1()

template<typename T >
NDArray< const T > geometry::data2x2ToTwo2x1 ( const NDArray< const T > &  data2x2)

Converts cspad2x2 NDArray data2x2[185,388,2] to two2x1[2,185,388].

Parameters
[in]data2x2- input NDArray shaped as [185,388,2]

◆ max_of_arr()

template<typename T >
T geometry::max_of_arr ( const T *  arr,
gsize_t  size 
)

Global method, returns maximal value of the array of specified length.

◆ min_of_arr()

template<typename T >
T geometry::min_of_arr ( const T *  arr,
gsize_t  size 
)

Global method, returns minimal value of the array of specified length.

◆ two2x1ToData2x2() [1/2]

template<typename T >
NDArray< const T > geometry::two2x1ToData2x2 ( const NDArray< const T > &  two2x1)

Converts cspad2x2 NDArray two2x1[2,185,388] to data2x2[185,388,2].

Parameters
[in]two2x1- input NDArray shaped as [2,185,388]

◆ two2x1ToData2x2() [2/2]

template<typename T >
void geometry::two2x1ToData2x2 ( T *  A)

Converts cspad2x2 NDArray two2x1[2,185,388] to data2x2[185,388,2].

Parameters
[in]A- pointer to input array with data shaped as [2,185,388]

Variable Documentation

◆ COLS2X1

const psalg_size_t geometry::COLS2X1 = 388
static

388: columns per 2x1 part in the conversion templates.

◆ N2X1

const psalg_size_t geometry::N2X1 = 2
static

2: number of 2x1 parts, the first dimension of the two2x1 layout used by the conversion templates.

◆ ROWS2X1

const psalg_size_t geometry::ROWS2X1 = 185
static

185: rows per 2x1 part in the conversion templates.

◆ SIZE2X1

const psalg_size_t geometry::SIZE2X1 = COLS2X1*ROWS2X1
static

COLS2X1*ROWS2X1 (71780) elements per 2x1 part.

◆ SIZE2X2

const psalg_size_t geometry::SIZE2X2 = N2X1*SIZE2X1
static

N2X1*SIZE2X1 (143560) elements.