GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > GRBP / V0-4-2

Constituent: grbpsiu     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

GRBP_probCalculate.h File Reference

The calculation routines. More...

#include "GRBP_math.h"
#include "EDS/TMR.h"

Include dependency graph for GRBP_probCalculate.h:

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


Data Structures

struct  _GRBP_probTemporalCtl
 The temporal probability control handle. More...
struct  _GRBP_probSpatialCtl
 The temporal probability control handle. More...

Typedefs

typedef _GRBP_probTemporalCtl GRBP_probTemporalCtl
 Typedef for struct _GRBP_probTemporalCtl.
typedef _GRBP_probSpatialCtl GRBP_probSpatialCtl
 Typedef for struct _GRBP_probSpatialCtl.

Enumerations

enum  GRBP_probTemporalDef {
  TEMPORAL_LOW_EXP = 28,
  TEMPORAL_NBITS_EXP = 5,
  TEMPORAL_NBITS_MAN = 8,
  TEMPORAL_NBITS = (TEMPORAL_NBITS_EXP + TEMPORAL_NBITS_MAN),
  TEMPORAL_SIZE = (1 << TEMPORAL_NBITS),
  TEMPORAL_SHIFT = (FLOAT_V_EXP - TEMPORAL_NBITS_MAN),
  TEMPORAL_INC = (1 << TEMPORAL_SHIFT),
  TEMPORAL_BEG,
  TEMPORAL_ZERO_IDX,
  TEMPORAL_ZERO_OFFSET = (TEMPORAL_ZERO_IDX * sizeof (float))
}
enum  GRBP_probSpatialDef {
  SPATIAL_LOW_EXP = 21,
  SPATIAL_NBITS_EXP = 5,
  SPATIAL_NBITS_MAN = 8,
  SPATIAL_NBITS = (SPATIAL_NBITS_EXP + SPATIAL_NBITS_MAN),
  SPATIAL_SIZE,
  SPATIAL_SHIFT = (FLOAT_V_EXP - SPATIAL_NBITS_MAN),
  SPATIAL_INC = (1 << SPATIAL_SHIFT),
  SPATIAL_BEG,
  SPATIAL_ZERO_IDX = (((127<<FLOAT_V_EXP)-(SPATIAL_BEG)) >> SPATIAL_SHIFT),
  SPATIAL_ZERO_OFFSET = (SPATIAL_ZERO_IDX * sizeof (float))
}

Functions

const GRBP_probTemporalCtlGRBP_probTemporalConstruct (void)
 Constructs the lookup table for the time probability calculation.
float GRBP_probTemporalCalculate (const GRBP_probTemporalCtl *ctl, float delta_time)
 Returns the log, base 10, of the temporal probability for the specified time difference delta_time.
static __inline float GRBP__probTemporalCalculate (const GRBP_probTemporalCtl *ctl, float delta_time)
 Computes the temporal probability via a table lookup method.
const GRBP_probSpatialCtlGRBP_probSpatialConstruct (double log10_costhetamax)
 Constructs the control structure use to when computing the spatial probability.
float GRBP_probSpatialCalculate (const GRBP_probSpatialCtl *ctl, float distance)
 Returns the log, base 10, of the spatial probability for the angular distance distance.
static __inline float GRBP__probSpatialCalculate (const GRBP_probSpatialCtl *ctl, float distance)
 Computes the spatial probability via a table lookup method.
static __inline double calculate_spatial_probability (double distance, double costhetamax)
 Calculate the spatial probabilty.
static __inline double calculate_spatial_log10P (double distance, double costhetamax, double log10_costhetamax)
 Calculate the -log10 (spatial probabilty).
static __inline double calculate_temporal_probability (double delta_time, double background_rate)
 Calculates the temporal probablity for the given delta time.
static __inline double calculate_temporal_log10P (double delta_time, double background_rate)
 Calculates the temporal probablity for the given delta time.
static __inline float calculate (const float *t, float val, int beg, int nman, int nshift, int o_offset)
 Workhorse lookup + optional linear correction routine.

Detailed Description

The calculation routines.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: GRBP_probCalculate.h,v 1.1 2007/08/02 17:25:00 russell Exp $

Function Documentation

static __inline float calculate const float *  t,
float  val,
int  beg,
int  nman,
int  nshift,
int  o_offset
[static]
 

Workhorse lookup + optional linear correction routine.

Returns:
The calculated value
Parameters:
t The function lookup table
val The value to feed the lookup table
beg The lowest value that can be looked up. Values less than this return 0
nman The number of bits of lookup in the mantissa
nshift The shift amount needed to extract the lookup index from val
o_offset The offset of the high end of the table. Values giving offsets larger than this will be returned as the t[o_offset]

static __inline double calculate_spatial_log10P double  distance,
double  costhetamax,
double  log10_costhetamax
[static]
 

Calculate the -log10 (spatial probabilty).

)

Parameters:
distance The inter-photon distance expressed as 1 - cos (theta)
costhetamax The maximum that 1 - cos (theta) can be. This is set by the largest angle track that the LAT can accomodate.
log10_costhetamax Precalculated value, log10 (costhetamax)
If FLATTEN is defined, an ad hoc polynomial will be used that will flatten out the spatial probability. This polynomial fit would have to be determined in orbit with real background. It does not change the verification that we need to do...

static __inline double calculate_spatial_probability double  distance,
double  costhetamax
[static]
 

Calculate the spatial probabilty.

Parameters:
distance The inter-photon distance expressed as 1 - cos (theta)
costhetamax The maximum that 1 - cos (theta) can be. This is set by the largest angle track that the LAT can accomodate.
If FLATTEN is defined, an ad hoc polynomial will be used that will flatten out the spatial probability. This polynomial fit would have to be determined in orbit with real background. It does not change the verification that we need to do...

static __inline double calculate_temporal_log10P double  delta_time,
double  background_rate
[static]
 

Calculates the temporal probablity for the given delta time.

Returns:
The temporal probability
Parameters:
delta_time The time difference
background_rate The background rate expected in the cone defining the cluster

static __inline double calculate_temporal_probability double  delta_time,
double  background_rate
[static]
 

Calculates the temporal probablity for the given delta time.

Returns:
The temporal probability
Parameters:
delta_time The time difference
background_rate The background rate expected in the cone defining the cluster

static __inline float GRBP__probSpatialCalculate const GRBP_probSpatialCtl ctl,
float  distance
[static]
 

Computes the spatial probability via a table lookup method.

Returns:
The log, base 10, of the spatial probability for the angular distance, distance.
Parameters:
ctl The spatial probability control structure
distance The angular distance, specified as 1 - dot_product to compute the spatial probability for.

static __inline float GRBP__probTemporalCalculate const GRBP_probTemporalCtl ctl,
float  delta_time
[static]
 

Computes the temporal probability via a table lookup method.

Returns:
The log, base 10, of the temporal probability for the time difference, delta_time.
Parameters:
ctl The temporal probability control structure
delta_time The value to compute the temporal probability for

float GRBP_probSpatialCalculate const GRBP_probSpatialCtl ctl,
float  distance
 

Returns the log, base 10, of the spatial probability for the angular distance distance.

Returns:
The log, base 10, of the spatial probability.
Parameters:
ctl The control handle for calculating the spatial probability.
distance The angular separation expressed as 1 - dot_product.

const GRBP_probSpatialCtl* GRBP_probSpatialConstruct double  log10_costhetamax  ) 
 

Constructs the control structure use to when computing the spatial probability.

Returns:
Pointer to the control structure
Parameters:
log10_costhetamax The log, base 10, of the cosine of the maximum opening angle, in radians. The maximum opening angle is the acceptance and is generally the equivalent of about ~115 degrees.

float GRBP_probTemporalCalculate const GRBP_probTemporalCtl ctl,
float  delta_time
 

Returns the log, base 10, of the temporal probability for the specified time difference delta_time.

Returns:
The log, base 10, of the spatial probability
Parameters:
ctl The control handle for calculating the temporal probability
delta_time The time difference


Generated on Mon Oct 29 03:04:45 2007 by  doxygen 1.4.4