GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EFC / V4-5-0 > gfc / sun-gcc
Classes | |
struct | _TFC_geometryTkrZ |
struct | _TFC_geometryTkrXY |
Describes the TKR geometry of either an X or Y stack of towers. More... | |
struct | _TFC_geometryTkr |
Describes the geometry of a TKR tower. The XY units are in integer multiples of strips and the Z units are in integer multiples of mm. The exact units are defined in this file, which provides macros to convert from physical units to internal filtering units. This structure just adds couple of values that apply to the TKR tower as a whole. More... | |
struct | _TFC_geometryAcd |
Describes the geometry of the ACD. The XY units are in integer multiples of strips and the Z units are in integer multiples of mm. The exact units are defined in this file, which which provides macros to convert from physical units to internal filtering units. More... | |
struct | _TFC_geometrySkirt |
Describes the geometry at the plane of the skirt (the TKR/CAL boundary. This is used to project a track to the plane of skirt and then to ascertain which region(s) of the skirt the projection passes through. More... | |
struct | _TFC_geometry |
Collects all the structures defining the LAT geometry into one grand structure. More... | |
Defines | |
#define | TFC_Z_FIND_SCALE_FACTOR 2048 |
Used when finding a seed projection. | |
#define | TFC_Z_FIND_SCALE(_zratio) (((_zratio) * TFC_Z_FIND_SCALE_FACTOR)) |
Macro to scale a Z ratio when finding a seed projection. | |
#define | TFC_Z_FIND(_z, _nominal) ((int)((TFC_Z_FIND_SCALE(_z))/(_nominal) +.5)) |
Macro to scale the specified Z separtion to a percentage of the nominal plane separation. The fractional units are TFC_Z_FIND_SCALE. | |
#define | TFC_Z_FIND_MAX(_nominal, _delta) TFC_Z_FIND(((_nominal) + (_delta))/2.0, _nominal) |
Ratio of the Z separation to the nominal separation when the stagger is a maximum. | |
#define | TFC_Z_FIND_MIN(_nominal, _delta) TFC_Z_FIND(((_nominal) - (_delta))/2.0, _nominal) |
Ratio of the Z separation to the nominal separation when the stagger is a minimum. | |
#define | TFC_Z_EXTEND_SCALE_FACTOR 2048 |
Used when extending a projection to an adjacent TKR layer. | |
#define | TFC_Z_EXTEND_SCALE(_zratio) (((_zratio) * TFC_Z_EXTEND_SCALE_FACTOR)) |
Macro to scale a Z ratio when extendig a seed projection. | |
#define | TFC_Z_EXTEND_MAX(_nominal, _delta) |
Calculates the ratio of the Z separation when the layers are maximally separated to the Z separation when the layers are minimally separated. | |
#define | TFC_Z_EXTEND_MIN(_nominal, _delta) |
Calculates the ratio of the Z separation when the layers are maximally separated to the Z separation when the layers are minimally separated. | |
#define | TFC_Z_XLAYER_MM(_layer, _nominal, _offset, _delta) |
Defines the absolute Z position of an X layer. | |
#define | TFC_Z_YLAYER_MM(_layer, _nominal, _offset, _delta) |
Defines the absolute Z position of an Y layer. | |
#define | TFC_Z_ACD_TOP_TO_TKR_SCALE_FACTOR 2048 |
Used when extending a projection to the plane of TOP ACD tiles. | |
#define | TFC_Z_ACD_TOP_TO_TKR_SCALE(_zratio) ((int)(((_zratio) * TFC_Z_ACD_TOP_TO_TKR_SCALE_FACTOR) + 0.5)) |
Scales the specified Z ration. | |
#define | TFC_ACD_TOP_PROJECTION(_acd_top_mm, _tkr_top0_mm, _tkr_top2_mm) |
Produces the scaled ratio between the ACD TOP from TKR TOP distance and the TKR TOP to TKR TOP - 2 distance. | |
#define | TFC_Z_TKR_TO_SKIRT_SCALE_FACTOR 2048 |
Used when extending a projection to the plane of skirt (TKR/CAL boundary). | |
#define | TFC_Z_TKR_TO_SKIRT_SCALE(_zratio) ((int)(((_zratio) * TFC_Z_TKR_TO_SKIRT_SCALE_FACTOR) + 0.5)) |
Scales the specified Z ration. | |
#define | TFC_SKIRT_PROJECTION(_skirt_mm, _tkr_top0_mm, _tkr_top2_mm) |
Produces the scaled ratio between the skirt plane from TKR BOTTOM distance and the TKR BOTTOM to TKR BOTTOM + 1 distance. | |
Typedefs | |
typedef int | TFC_geometryTkrZ_t |
Hides the implementation size of a Z coordinate expressed in the TFC Z units. | |
typedef unsigned short | TFC_geometryTkrExtend_t |
Hides the implementation size of an projection extension type. | |
typedef signed short | TFC_geometryTkrOffset_t |
Hides the implementation size of a XY offset expressed in the TFC units (typically an integer fraction of a strip). | |
typedef struct _TFC_geometryTkrZ | TFC_geometryTkrZ |
typedef struct _TFC_geometryTkrXY | TFC_geometryTkrXY |
Typedef for struct _TFC_geometryTkrXY. | |
typedef struct _TFC_geometryTkr | TFC_geometryTkr |
Typedef for struct _TFC_geometryTkr. | |
typedef struct _TFC_geometryAcd | TFC_geometryAcd |
Typedef for struct _TFC_geometry. | |
typedef struct _TFC_geometrySkirt | TFC_geometrySkirt |
Typedef for struct _TFC_geometrySkirt. | |
typedef struct _TFC_geometry | TFC_geometry |
Typedfe for struct _TFC_geometry. |
CVS $Id
#define TFC_ACD_TOP_PROJECTION | ( | _acd_top_mm, | |||
_tkr_top0_mm, | |||||
_tkr_top2_mm | ) |
Value:
TFC_Z_ACD_TOP_TO_TKR_SCALE (((_acd_top_mm ) - (_tkr_top0_mm)) / \ ((_tkr_top0_mm) - (_tkr_top2_mm)))
_acd_top_mm | The absolute Z position of the ACD TOP plane in mm. | |
_tkr_top0_mm | The absolute Z position of the nearest TKR plane in mm. | |
_tkr_top2_mm | The absolute Z position of two layers down from the previous layerTKR plane in mm. |
#define TFC_SKIRT_PROJECTION | ( | _skirt_mm, | |||
_tkr_top0_mm, | |||||
_tkr_top2_mm | ) |
Value:
TFC_Z_TKR_TO_SKIRT_SCALE (((_tkr_top0_mm) - (_skirt_mm)) / \ ((_tkr_top2_mm) - (_tkr_top0_mm)))
_skirt_mm | The absolute Z position of the skirt plane in mm. | |
_tkr_top0_mm | The absolute Z position of the nearest TKR plane in mm. | |
_tkr_top2_mm | The absolute Z position of the layer two down from the prevoius layer TKR plane in mm. |
#define TFC_Z_ACD_TOP_TO_TKR_SCALE | ( | _zratio | ) | ((int)(((_zratio) * TFC_Z_ACD_TOP_TO_TKR_SCALE_FACTOR) + 0.5)) |
Scales the specified Z ration.
_zratio | The Z ratio to scale |
#define TFC_Z_ACD_TOP_TO_TKR_SCALE_FACTOR 2048 |
Used when extending a projection to the plane of TOP ACD tiles.
This exact scale factor is selected by the following criteria
1. The maximum projection error due to using integer arthimetic is less than one strip. 2. The calculation never overflows 32-bit integer arthimetic 3. The value is a multiple of two, so that removing the scale factor by division is avoided, using a shift operation instead.
To extend a projection to the TOP ACD plane, a ratio of the Z distance from the TKR layer nearest the TOP ACD plane and the TOP ACD plane to the Z separation of the nearest two TKR layers is needed. Since the calculation is done using integer arthimetic, this ratio needs to be scaled to preserve the accuracy.
Referenced by projectXYtoAcdTop().
#define TFC_Z_EXTEND_MAX | ( | _nominal, | |||
_delta | ) |
Value:
((int)(TFC_Z_EXTEND_SCALE(((_nominal) + (_delta)) / \ ((_nominal) - (_delta)) ) + 0.5))
_nominal | The nominal separation (in mm) | |
_delta | The full stagger (in mm). |
#define TFC_Z_EXTEND_MIN | ( | _nominal, | |||
_delta | ) |
Value:
((int)(TFC_Z_EXTEND_SCALE((((_nominal) - (_delta)) / \ ((_nominal) + (_delta)) ) ) + 0.5))
_nominal | The nominal separation (in mm) | |
_delta | The full stagger (in mm). |
#define TFC_Z_EXTEND_SCALE | ( | _zratio | ) | (((_zratio) * TFC_Z_EXTEND_SCALE_FACTOR)) |
Macro to scale a Z ratio when extendig a seed projection.
_zratio | The _z ratio to scale |
#define TFC_Z_EXTEND_SCALE_FACTOR 2048 |
Used when extending a projection to an adjacent TKR layer.
This exact scale factor is selected by the following criteria
1. The maximum projection error due to using integer arthimetic is less than one strip. 2. The calculation never overflows 32-bit integer arthimetic 3. The value is a multiple of two, so that removing the scale factor by division is avoided, using a shift operation instead.
The pattern recognition uses this value when extending a projection. The hits in the two planes adjacent to the layer the projection is being extended two are selected. To predict where the projection hits in the next layer, the ratio of the Z distance between the two hit layers and the Z distance between the last hit layer the extension layer needs to be calculated. Since the calculation is done using integer arthimetic, this ratio is scaled by this number.
#define TFC_Z_FIND | ( | _z, | |||
_nominal | ) | ((int)((TFC_Z_FIND_SCALE(_z))/(_nominal) +.5)) |
Macro to scale the specified Z separtion to a percentage of the nominal plane separation. The fractional units are TFC_Z_FIND_SCALE.
_z | The Z separation (in mm) to scale | |
_nominal | The nominal Z separation (ie, no stagger) (in mm) |
#define TFC_Z_FIND_MAX | ( | _nominal, | |||
_delta | ) | TFC_Z_FIND(((_nominal) + (_delta))/2.0, _nominal) |
Ratio of the Z separation to the nominal separation when the stagger is a maximum.
_nominal | The nominal separation (in mm). | |
_delta | The full stagger (in mm). |
#define TFC_Z_FIND_MIN | ( | _nominal, | |||
_delta | ) | TFC_Z_FIND(((_nominal) - (_delta))/2.0, _nominal) |
Ratio of the Z separation to the nominal separation when the stagger is a minimum.
_nominal | The nominal separation in units of TFC_Z_FIND_SCALE | |
_delta | The full stagger (in mm). |
#define TFC_Z_FIND_SCALE | ( | _zratio | ) | (((_zratio) * TFC_Z_FIND_SCALE_FACTOR)) |
Macro to scale a Z ratio when finding a seed projection.
_zratio | The _z ratio to scale |
#define TFC_Z_FIND_SCALE_FACTOR 2048 |
Used when finding a seed projection.
This exact scale factor is selected by the following criteria
1. The maximum projection error due to using integer arthimetic is less than one strip. 2. The calculation never overflows 32-bit integer arthimetic 3. The value is a multiple of two, so that removing the scale factor by division is avoided, using a shift operation instead.
The pattern recognition uses this value when finding a seed projection. A seed projection is found by picking 3 adjacent TKR layers. One hit from each of the outer 2 layers is selected and the predicted hit in the middle layer is calculated. To perform this calculation the fractional distance of the middle layer needs to be calculated. Since all calculation is done using integer arthimetic this fraction (which would be 1/2 if the middle plane was halfway between the two outer planes) is scaled by this number.
#define TFC_Z_TKR_TO_SKIRT_SCALE | ( | _zratio | ) | ((int)(((_zratio) * TFC_Z_TKR_TO_SKIRT_SCALE_FACTOR) + 0.5)) |
Scales the specified Z ration.
_zratio | The Z ratio to scale |
#define TFC_Z_TKR_TO_SKIRT_SCALE_FACTOR 2048 |
Used when extending a projection to the plane of skirt (TKR/CAL boundary).
This exact scale factor is selected by the following criteria
1. The maximum projection error due to using integer arthimetic is less than one strip. 2. The calculation never overflows 32-bit integer arthimetic 3. The value is a multiple of two, so that removing the scale factor by division is avoided, using a shift operation instead.
To extend a projection to the skirt plane, a ratio of the Z distance from the TKR layer nearest the skirt plane and the skirt plane to the Z separation of the nearest two TKR layers is needed. Since the calculation is done using integer arthimetic, this ratio needs to be scaled to preserve the accuracy.
#define TFC_Z_XLAYER_MM | ( | _layer, | |||
_nominal, | |||||
_offset, | |||||
_delta | ) |
Value:
((_nominal) * (_layer) + (_offset) + (((_layer)&1) \ ? (-(_delta)/2.0) \ : (+(_delta)/2.0)))
_layer | The layer number (0-17, 0 closest to the CAL) | |
_nominal | The nominal layer spacing in mm. | |
_offset | The Z position of layer 0 (middle of X & Y) | |
_delta | The full stagger in mm. |
#define TFC_Z_YLAYER_MM | ( | _layer, | |||
_nominal, | |||||
_offset, | |||||
_delta | ) |
Value:
((_nominal) * (_layer) + (_offset) + (((_layer)&1) \ ? (+(_delta)/2.0) \ : (-(_delta)/2.0)))
_layer | The layer number (0-17, 0 closest to the CAL) | |
_nominal | The nominal layer spacing in mm. | |
_offset | The Z position of layer 0 (middle of X & Y) | |
_delta | The full stagger in mm. |