GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EFC / dev > ggfc / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

CFC_ratio.h File Reference

Checks if the ratio of two numbers is between the specified limits. More...

#include <PBI/FFS.ih>

Functions

static int CFC__ratioLayerCheck (int num, int den, int lo_limit, int lo_status, int hi_limit, int hi_status)
 Checks that the ratio of num/den is between the specified limits.


Detailed Description

Checks if the ratio of two numbers is between the specified limits.

Author:
JJRussell - russell@slac.stanford.edu
This file contains two functions. Each uses a ratio test to access whether the energy deposited in the CAL is consistent with being from an electromagnetic shower.
CFC_ratioLayerCheck
CFC_ratioLayerCheck asks whether the ratio of the energy in the first layer to the total energy is not too small or not too big. Typically one would ask that, to be consistent with being an electromagnetic shower, that this ratio be in the range 1% - 90%.
CFC_ratioXtalCheck
CFC_ratioXtalCheck asks whether the detailed distribution of the shower is consistent with being an electromagnetic shower. It does this be demanding the number of crystals (logs) exceeding a specified threshold by greater than some percentage of the total number of crystals. Typical numbers would be that at least 20% of the logs have an energy larger than 1% of the total energy.
Warning:
This routine has been removed from active duty. The code and documentation are kept, but are inactivated.

Function Documentation

unsigned int CFC__ratioLayerCheck ( int  num,
int  den,
int  lo_limit,
int  lo_status,
int  hi_limit,
int  hi_status 
) [static]

Checks that the ratio of num/den is between the specified limits.

Returns:
One of lo_status, hi_status or 0 if inside limits.
See also:
CFC_RATIO_LAYER
Parameters:
num The numerator
den The denominator
lo_limit The lo limit of the ratio, in units of 1024 (i.e. 1 on this scale corresponds to 1/1024, or roughly .1%)
lo_status The status value to return if <= the low limit.
hi_limit The hi limit of the ratio, in units of 1024 (i.e. 1 on this scale corresponds to 1/1024, or roughly .1%)
hi_status The status value to return if >= the hi limit
It is assumed that num is no bigger that den and that lo_limit and hi_limit are in the range 0-1024, inclusive. It is safe to use -1 and/or 1025 to effectively disable the checks.

Referenced by gammaFilter().


Generated on Wed Jan 16 13:14:49 2013 by  doxygen 1.5.8