GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > GEO_DB / V2-0-0

Constituent: geo_db_print     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

TFC_DB_geometry.h File Reference

Defines the tower geometry used in track finding. More...

This graph shows which files directly or indirectly include this file:


Data Structures

struct  _TFC_DB_geometrySid
 The geometry's source identification. There should be enough information in here to backtrack to the source of these constants. More...
struct  _TFC_DB_geometryTowerXY
 Describes the TKR geometry of either an X or Y stack of towers. More...
struct  _TFC_DB_geometryTower
 Describes the geometry of all TKR towers. More...
struct  _TFC_DB_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_DB_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_DB_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_DB_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 _TFC_DB_geometrySid TFC_DB_geometrySid
 Typedef for struct _TFC_DB_geometrySid.
typedef signed int TFC_DB_geometryZ_t
 Hides the implementation size of a Z coordinate expressed in the TFC Z units.
typedef signed short TFC_DB_geometryOffset_t
 Hides the implementation size of a XY offset expressed in the TFC units (typically an integer fraction of a strip).
typedef _TFC_DB_geometryTowerXY TFC_DB_geometryTowerXY
 Typedef for struct _TFC_DB_geometryTowerXY.
typedef _TFC_DB_geometryTower TFC_DB_geometryTower
 Typedef for struct _TFC_DB_geometryTower.
typedef _TFC_DB_geometryTkr TFC_DB_geometryTkr
 Typedef for struct _TFC_DB_geometryTkr.
typedef _TFC_DB_geometryAcd TFC_DB_geometryAcd
 Typedef for struct _TFC_DB_geometry.
typedef _TFC_DB_geometrySkirt TFC_DB_geometrySkirt
 Typedef for struct _TFC_DB_geometrySkirt.
typedef _TFC_DB_geometry TFC_DB_geometry
 Typedfe for struct _TFC_DB_geometry.

Detailed Description

Defines the tower geometry used in track finding.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id  

Define Documentation

#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)))
Produces the scaled ratio between the ACD TOP from TKR TOP distance and the TKR TOP to TKR TOP - 2 distance.

Parameters:
_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.
Returns:
The scaled ratio

#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)))
Produces the scaled ratio between the skirt plane from TKR BOTTOM distance and the TKR BOTTOM to TKR BOTTOM + 1 distance.

Parameters:
_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.
Returns:
The scaled ratio

#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.

Parameters:
_zratio The Z ratio to scale
Returns:
The scaled Z ratio.

#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.

#define TFC_Z_EXTEND_MAX _nominal,
_delta   ) 
 

Value:

((int)(TFC_Z_EXTEND_SCALE(((_nominal) + (_delta))  /              \
                                  ((_nominal) - (_delta)) ) + 0.5))
Calculates the ratio of the Z separation when the layers are maximally separated to the Z separation when the layers are minimally separated.

Parameters:
_nominal The nominal separation (in mm)
_delta The full stagger (in mm).
Returns:
Tthe ratio of the Z separation when the layers are maximally separated to the Z separation when the layers are minimally separated. Produces TFC_Z_EXTEND_SCALE when _delta = 0. When _delta is non-zero, this ratio will be greater than TFC_Z_EXTEND_SCALE.

#define TFC_Z_EXTEND_MIN _nominal,
_delta   ) 
 

Value:

((int)(TFC_Z_EXTEND_SCALE((((_nominal) - (_delta)) /              \
                                   ((_nominal) + (_delta)) ) ) + 0.5))
Calculates the ratio of the Z separation when the layers are maximally separated to the Z separation when the layers are minimally separated.

Parameters:
_nominal The nominal separation (in mm)
_delta The full stagger (in mm).
Returns:
The ratio of the Z separation when the layers are minimally separated to the Z separation when the layers are maximally separated. Produces TFC_Z_EXTEND_SCALE when _delta = 0. When _delta is non-zero, this ratio will be less than TFC_Z_EXTEND_SCALE.
TFC_Z_EXTEND_MAX/MIN is used when extending a seed projection from two adjacent layers to a third consequetive layer. The MAX is used when the extension layer is furtherest from the last layer, and MIN is used when the extension layer is closer to the last layer. TKR_Z_EXTEND_SCALE is purely an internal helper macro.

#define TFC_Z_EXTEND_SCALE _zratio   )     (((_zratio) * TFC_Z_EXTEND_SCALE_FACTOR))
 

Macro to scale a Z ratio when extendig a seed projection.

Parameters:
_zratio The _z ratio to scale
Returns:
The scaled Z ratio

#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.

Parameters:
_z The Z separation (in mm) to scale
_nominal The nominal Z separation (ie, no stagger) (in mm)
Returns:
The ratio of the specified Z separtion to the nominal separation in units of 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.

Parameters:
_nominal The nominal separation (in mm).
_delta The full stagger (in mm).
Returns:
The ratio of the Z distance to nominal separation of two planes. (Produces TFC_Z_FIND_SCALE when _delta = 0.)

#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.

Parameters:
_nominal The nominal separation in units of TFC_Z_FIND_SCALE
_delta The full stagger (in mm).
Returns:
The ratio of the Z distance to nominal separation of two planes. (Produces TFC_Z_FIND_SCALE when _delta = 0.)
TFC_Z_FIND_MAX/MIN is used during the find stage to predict the hit in the middle layers. The MAX is used when the middle layer is further from the top layer, and MIN is used when the middle layer is closer to the top layer.

#define TFC_Z_FIND_SCALE _zratio   )     (((_zratio) * TFC_Z_FIND_SCALE_FACTOR))
 

Macro to scale a Z ratio when finding a seed projection.

Parameters:
_zratio The _z ratio to scale
Returns:
The scaled Z ratio

#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.

Parameters:
_zratio The Z ratio to scale
Returns:
The scaled Z ratio.

#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)))
Defines the absolute Z position of an X layer.

Parameters:
_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.
Returns:
The absolute Z position of the specified X layer

#define TFC_Z_YLAYER_MM _layer,
_nominal,
_offset,
_delta   ) 
 

Value:

((_nominal) * (_layer) + (_offset) + (((_layer)&1)              \
                                             ? (+(_delta)/2.0)            \
                                             : (-(_delta)/2.0)))
Defines the absolute Z position of an Y layer.

Parameters:
_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.
Returns:
The absolute Z position of the specified Y layer


Generated on Tue Jun 26 03:46:58 2007 by  doxygen 1.4.4