GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > EFC / V4-1-2
Constituent: igfc     Tag: mv2304
#include "EFC/EDM.h"
#include "EFC/EFC_edsFw.h"
#include "EFC/EFC.h"
#include "EFC/GFC.h"
#include "EFC/GFC_cfg.h"
#include "EFC/GFC_status.h"
#include "EFC/TFC_prjFind.h"
#include "EFC/TFC_prjDef.h"
#include "EFC/TFC_tolerances.h"
#include "EFC/TFC_geometry.h"
#include "TFC_geometryDef.h"
#include "GFC_def.h"
#include "GFC_resultDef.h"
#include "ATF_filter.h"
#include "ATF_shadowedTowers.ih"
#include "AFC_splash.h"
#include "CFC_ratio.h"
#include "TFC_tolerancesDef.h"
#include "TFC_triggerFill.h"
#include "TFC_triggerForm.h"
#include "TFC_triggerSortedForm.h"
#include "TFC_acd.h"
#include "TFC_skirt.h"
#include "EDS/EDS_fw.h"
#include "EDS/EBF_cid.h"
#include "EDS/EBF_acd.h"
#include "EDS/EBF_gem.h"
#include "EDS/EBF_tkr.h"
#include "EDS/EBF_dir.h"
#include "EDS/EBF_calEnergy.h"
#include "EDS/EBF_gemLocate.h"
#include "EDS/ECR_cal.h"
#include "EDS/EDR_cal.h"
#include "EDS/EDR_tkr.h"
#include "EDS/EDR_calUnpack.h"
#include "EDS/EDR_tkrUnpack.h"
#include "GEO_DB/GEO_DB_schema.h"
#include "GFC_DB/GFC_DB_schema.h"
#include "CDM/CDM_pubdefs.h"
#include <string.h>
Include dependency graph for GFC.c:
Defines | |
#define | _MOVE_BIT(_w, _from, _to) (((_w >> _from) & 1) << _to) |
Moves a bit from one location to another. | |
#define | MASK0_4_OF_6 |
A bit mask to be ordered with the dynamic 4/6 coincidence mask. Only patterns with 4/6 layers set are selected by this mask. This is the first of 2 32-bit words, representing patterns 0-0x1f. | |
#define | MASK1_4_OF_6 |
A bit mask to be ordered with the dynamic 4/6 coincidence mask. Only patterns with 4/6 layers set are selected by this mask. This is the second of 2 32-bit words, representing patterns 0x20-0x3f. | |
Typedefs | |
typedef enum _ACD_SIDE_TILES_M | ACD_SIDE_TILES_M |
Typedef for enum _ACD_SIDE_TILES_M. | |
Enumerations | |
enum | _ACD_SIDE_TILES_M { ACD_SIDE_TILES_M_ROW = (0x1f << 16) | (0x1f), ACD_SIDE_TILES_M_ROW0 = ACD_SIDE_TILES_M_ROW<<(0*5), ACD_SIDE_TILES_M_ROW1 = ACD_SIDE_TILES_M_ROW<<(1*5), ACD_SIDE_TILES_M_ROW2 = ACD_SIDE_TILES_M_ROW<<(2*5), ACD_SIDE_TILES_M_ROW01 = ACD_SIDE_TILES_M_ROW0 | ACD_SIDE_TILES_M_ROW1, ACD_SIDE_TILES_M_ROW3 = 0x80008000 } |
Enumerates the bit masks used to extract the struck tiles in various rows for both the + and - ACD side tile planes. More... | |
Functions | |
static __inline int | isVetoed (unsigned int status, unsigned int vetoes) |
Checks whether any of the veto bits are up. | |
static __inline unsigned int | cntBits (unsigned int word) |
Counts the bits in the specified word. | |
static __inline int | evaluateAcd (const GammaCfgAcd *cfg, int status, int energy, unsigned int acd_x, unsigned int acd_y, unsigned int acd_z, unsigned int acd_cnt) |
Rejects events based on CAL energy and ACD info. | |
static __inline int | evaluateZbottom (const GammaCfgZbottom *cfg, int energy, const EBF_dir *dir) |
Makes a quick test to see if there is energy in the CAL without the possibility of a track pointing into it. | |
static __inline int | evaluateCal (const GammaCfgCal *cfg, int energy, EBF_dir *dir, EDR_cal *cal, const ECR_cal *calCal) |
Evaluates cuts that can be made solely on the basis of the CAL information. | |
static __inline int | evaluateAtf (const GammaCfgAtf *cfg, int energy, unsigned int acd_x, unsigned int acd_y, unsigned int acd_z, unsigned int tmsk, const EBF_dirCtbDsc *contributor) |
Evaluates whether any tower with a track trigger is in coincidence with a shadowing ACD tile. | |
static __inline int | classifyAcd (unsigned int acd_x, unsigned int acd_y, unsigned int acd_z) |
Sets status bits indicating which part of the ACD has hits. return A status mask indicating those parts of the ACD which have hits. | |
static __inline int | nominateTowers (const EBF_dir *dir) |
Creates a list of towers with the potential for finding tracks in. | |
static __inline int | constrainEnergy (int energy) |
Limits the absolute value of the energy to be < 23 bits. | |
static unsigned int | tkrFilter (const GammaCfgTkr *cfg, int energy, unsigned int acd_x, unsigned int acd_y, unsigned int acd_z, unsigned int vetoes, EDR_tkr *tlr, TFC_prjs *prjs) |
Performs the most computationally intensive portions of the filtering. This involves TKR pattern recognition and matching to the ACD, skirt region and CAL. | |
static unsigned int | tkrFind (const GammaCfgTkr *cfg, int energy, EBF_dir *dir, EDR_tkr *tlr, TFC_prjs *prjs) |
Does the track finding. | |
static __inline unsigned int | tkrSetStatus (const GammaCfgTkr *cfg, int energy, int prjCnt) |
Completes tracker status, by evaluating the projection count. | |
static __inline int | evaluateTkr (const GammaCfgTkr *cfg, int energy, unsigned int acd_x, unsigned int acd_y, unsigned int acd_z, unsigned int vetoes, EBF_dir *dir, EDR_tkr *tkr, TFC_prjs *prjs) |
Does the projection finding and evaluates all the cuts based on the found projections. | |
static __inline int | gammaFilter (GFC *gfc, unsigned int pktBytes, EBF_pkt *pkt, EBF_siv siv, EDS_fwIxb *ixb, unsigned int vetoes, GFC_result *result) |
Determines the fate of 1 event. | |
static int | compileCfgPrms (GammaCfgPrms *cfg, const GFC_DB_prms *prms) |
Compiles/commits the set of user defined parameters into the the configuration block. | |
int | GFC_sizeof (int cnt) |
Sizes the gamma filtering control structure. | |
int | GFC_cfgSizeof (void) |
Sizes the gamma filtering configuration as it is used in the actual filtering progam. | |
int | GFC_resultSizeof (const GFC *gfc) |
Returns the size, in bytes, of one result vector. | |
int | GFC_cfgCompile (GFC_cfg *cfg, const GFC_DB_prms *prms) |
Implements the transformation of the configuration parameters as specified by the user, cfg, into the internal form, ctlCfg. | |
GFC_cfg * | GFC_cfgSet (GFC *gfc, GFC_cfg *cfg) |
Makes the specified internal representation of the configuration parameters the current active one. | |
int | GFC_filter (GFC *gfc, unsigned int pktBytes, EBF_pkt *pkt, EBF_siv siv, EDS_fwIxb *ixb, unsigned int vetoes, GFC_result *result) |
Determines the fate of 1 event. | |
unsigned int | GFC_fwNeeds (void) |
Returns a bit mask of the EDS_fw needs. | |
unsigned int | GFC_fwObjects (void) |
Returns a bit mask of the EDS_fw objects used by the gamma filter. | |
Variables | |
const AFC_splashMap | AFC_SplashMap1x1 |
Data structure representing the SplashMap with only nearest neighbors considered to be 'near' tiles. | |
const ATF_shadowedTowers | ATF_ShadowedTowers2x2 |
CVS $Id: GFC.c,v 1.11 2007/12/13 18:10:30 russell Exp $
|
Moves a bit from one location to another.
|
|
Value: ((0 << 0x00) | (0 << 0x01) | (0 << 0x02) | (0 << 0x03) | \ (0 << 0x04) | (0 << 0x05) | (0 << 0x06) | (0 << 0x07) | \ (0 << 0x08) | (0 << 0x09) | (0 << 0x0a) | (0 << 0x0b) | \ (0 << 0x0c) | (0 << 0x0d) | (0 << 0x0e) | (1 << 0x0f) | \ (0 << 0x10) | (0 << 0x11) | (0 << 0x12) | (0 << 0x13) | \ (0 << 0x14) | (0 << 0x15) | (0 << 0x16) | (1 << 0x17) | \ (0 << 0x18) | (0 << 0x19) | (0 << 0x1a) | (1 << 0x1b) | \ (0 << 0x1c) | (1 << 0x1d) | (1 << 0x1e) | (1 << 0x1f))
|
|
Value: ((0 << 0x00) | (0 << 0x01) | (0 << 0x02) | (0 << 0x03) | \ (0 << 0x04) | (0 << 0x05) | (0 << 0x06) | (1 << 0x07) | \ (0 << 0x08) | (0 << 0x09) | (0 << 0x0a) | (1 << 0x0b) | \ (0 << 0x0c) | (1 << 0x0d) | (1 << 0x0e) | (1 << 0x0f) | \ (0 << 0x10) | (0 << 0x11) | (0 << 0x12) | (1 << 0x13) | \ (0 << 0x14) | (1 << 0x15) | (1 << 0x16) | (1 << 0x17) | \ (0 << 0x18) | (1 << 0x19) | (1 << 0x1a) | (1 << 0x1b) | \ (1 << 0x1c) | (1 << 0x1d) | (1 << 0x1e) | (1 << 0x1f)) The bits representing the last 6 layers are extracted from the X/Y layer hit masks and placed in the low 6 bits or a new word. This word can take on the values 0x00 to 0x3f (0-63). If the value of this word is less than 32, then MASK0_4_OF_6 is used. That is, of the low 5 bits, 4 must be set. If the value of this word is greater than or equal to 32, then MASK1_4_OF_6 is used. That is, of the remaining low 5 bits, 3 must be set. |
|
|
Sets status bits indicating which part of the ACD has hits. return A status mask indicating those parts of the ACD which have hits.
|
|
Counts the bits in the specified word.
|
|
Compiles/commits the set of user defined parameters into the the configuration block.
|
|
Limits the absolute value of the energy to be < 23 bits.
This takes advantage of the take that if the energy is within range, the bit positions not within the range are either all 0s or all 1s. This is check in done by shifting those bits off the left end then shifting the result back down. Since the right shift drags the sign bit through, if the energy is within range, the result will be the same. If the answer is not the same, the code merely has to check whether the energy is positive or negative. That tells one which end of the range the energy has exceeded. |
|
Rejects events based on CAL energy and ACD info.
|
|
Evaluates whether any tower with a track trigger is in coincidence with a shadowing ACD tile.
|
|
Evaluates cuts that can be made solely on the basis of the CAL information.
|
|
Does the projection finding and evaluates all the cuts based on the found projections.
|
|
Makes a quick test to see if there is energy in the CAL without the possibility of a track pointing into it.
|
|
Determines the fate of 1 event.
|
|
Implements the transformation of the configuration parameters as specified by the user, cfg, into the internal form, ctlCfg.
|
|
Makes the specified internal representation of the configuration parameters the current active one.
|
|
Sizes the gamma filtering configuration as it is used in the actual filtering progam.
|
|
Determines the fate of 1 event.
|
|
Returns a bit mask of the EDS_fw needs.
|
|
Returns a bit mask of the EDS_fw objects used by the gamma filter.
|
|
Returns the size, in bytes, of one result vector.
|
|
Sizes the gamma filtering control structure.
|
|
Checks whether any of the veto bits are up.
|
|
Creates a list of towers with the potential for finding tracks in.
|
|
Performs the most computationally intensive portions of the filtering. This involves TKR pattern recognition and matching to the ACD, skirt region and CAL.
|
|
Does the track finding.
|
|
Completes tracker status, by evaluating the projection count.
|