GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> GRBP / V1-0-4 > grbpsiu / mv2304


Interface   Data Structures   File List   Data Fields   Globals  

GRBP_gammaList.h File Reference

Interface to the routines controlling a circular list of gammas. More...

#include <GRBP_gamma.h>

Classes

struct  _GRBP_gammaList
 The list of gammas used in the localization process. More...

Typedefs

typedef struct _GRBP_cluster GRBP_cluster
typedef struct _GRBP_photon GRBP_photon
 Typedef struct _GRBP_photon.
typedef struct
_GRBP_probabilityLogs 
GRBP_probabilityLogs
 Typedef for struct _GRBP_probabilityLogs.
typedef struct
_GRBP_probabilityPrms 
GRBP_probabilityPrms
 Typedef for struct _GRBP_probabilityPrms.
typedef struct _GRBP_DB_gammaList GRBP_DB_gammaList
typedef struct _GRBP_gammaList GRBP_gammaList
 Typedef for struct _GRBP_gammaList.

Functions

int GRBP_gammaListSizeof (const GRBP_DB_gammaList *cfg)
 Computes the number of bytes needed for a gamma list of the specified configuration.
unsigned char * GRBP_gammaListConstruct (GRBP_gammaList *list, const GRBP_DB_gammaList *cfg, unsigned char *ptr)
 Constructs the gamma list.
void GRBP_gammaListCopy (GRBP_gammaList *dst, const GRBP_gammaList *src)
int GRBP_gammaListAdd (GRBP_gammaList *list, const GRBP_cluster *clusters, int beg, int max, const unsigned int *gamma_bl, int ngamma_bl)
 Fills the list of gammas used to localization using the parent gamma from the specified list of clusters.
void GRBP_gammaListReset (GRBP_gammaList *list)
 Resets the gamma list to an empty list.
int GRBP_gammaListSeed (GRBP_gammaList *list, GRBP_probabilityLogs *plog, float dx0, float dy0, float dz0, float distance_cut, const GRBP_probabilityPrms *prob, const GRBP_photon *photons, int cnt)
 Populates a gamma list with all the photons in the specified range that are within the distance_cut of the the GRB location.


Detailed Description

Interface to the routines controlling a circular list of gammas.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: GRBP_gammaList.h,v 1.5 2011/03/30 22:11:51 russell Exp $

Function Documentation

int GRBP_gammaListAdd ( GRBP_gammaList list,
const GRBP_cluster *  clusters,
int  beg,
int  max,
const unsigned int *  gamma_bl,
int  ngamma_bl 
)

Fills the list of gammas used to localization using the parent gamma from the specified list of clusters.

Returns:
The number of gammas added. This does not necessarily mean that the gamma list has increased in size by this amount. This is because the gamma list is limit in size, with new gammas replacing the retired gammas.
Parameters:
list The target list of gammas to be used in the localization process
clusters The database of clusters
beg The start index of the gamma for this window.
max Maximum range of circular list of clusters
gamma_bl The bit list of gammas to be added
ngamma_bl The number of words in the bit list.

References _GRBP_gammaList::beg, _GRBP_gammaList::cnt, _GRBP_gamma::dx, _GRBP_gamma::dy, _GRBP_gamma::dz, _GRBP_gammaList::end, _GRBP_gammaAux::energy, _GRBP_gammaList::gammas, _GRBP_gammaList::gammas_aux, _GRBP_gammaList::max, _GRBP_gammaAux::time, and wrap_hi().

Referenced by GRBP_windowTier1LatUpdate().

unsigned char * GRBP_gammaListConstruct ( GRBP_gammaList list,
const GRBP_DB_gammaList *  cfg,
unsigned char *  ptr 
)

Constructs the gamma list.

Returns:
Pointer to the next available memory location
Parameters:
list The list to construct
cfg The configuration of the gamma list
ptr The memory to carve the list from

References _GRBP_gammaList::gammas, _GRBP_gammaList::gammas_aux, GRBP_gammaListReset(), GRBP_gammaListSizeof(), and _GRBP_gammaList::max.

Referenced by GRBP_grbConstruct(), and windowTier2Construct().

void GRBP_gammaListReset ( GRBP_gammaList list  ) 

Resets the gamma list to an empty list.

Parameters:
list The gamma list to reset

References _GRBP_gammaList::beg, _GRBP_gammaList::cnt, and _GRBP_gammaList::end.

Referenced by GRBP_gammaListConstruct(), GRBP_grbReset(), and windowTier2Reset().

int GRBP_gammaListSeed ( GRBP_gammaList list,
GRBP_probabilityLogs plog,
float  dx0,
float  dy0,
float  dz0,
float  distance_cut,
const GRBP_probabilityPrms prob,
const GRBP_photon photon,
int  cnt 
)

Populates a gamma list with all the photons in the specified range that are within the distance_cut of the the GRB location.

Returns:
The number of photons entered
Parameters:
list The list to populate.
plog Filled in with logs of the spatial and temporal probabilities
dx0 The normalized X direction cosine of the seed location
dy0 The normalized Y direction cosine of the seed location
dz0 The normalized Z direction cosine of the seed location
distance_cut The distance cut to use. Only photons with 1 - cos (theta) are admitted to the list, where cos (theta) is the dot product of the photon's direction with the GRB location.
prob The parameters used in determining the spatial and temperal probabilities.
photon The first photon in the linked list to use
cnt The number of photons to use

References _GRBP_gammaList::beg, _GRBP_gammaList::cnt, _GRBP_gamma::dx, _GRBP_gamma::dy, _GRBP_gamma::dz, _GRBP_gammaList::end, _GRBP_gammaAux::energy, _GRBP_gammaList::gammas, _GRBP_gammaList::gammas_aux, GRBP__gammaAuxLocate(), GRBP_probSpatialCalculate(), GRBP_probTemporalCalculate(), _GRBP_gamma::nxt, _GRBP_photon::nxt, _GRBP_probabilityPrms::psc, _GRBP_probabilityPrms::ptc, _GRBP_probabilityLogs::spatial, _GRBP_probabilityLogs::temporal, and _GRBP_gammaAux::time.

Referenced by windowTier2Seed().

int GRBP_gammaListSizeof ( const GRBP_DB_gammaList *  cfg  ) 

Computes the number of bytes needed for a gamma list of the specified configuration.

Returns:
The number of bytes needed for a gamma list of cfg elements
Parameters:
cfg The configuration of the gamma list

Referenced by GRBP_gammaListConstruct(), GRBP_grbSizeof(), and windowTier2Sizeof().


Generated on Wed Nov 21 22:39:28 2012 by  doxygen 1.5.8