GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-5 > eds / rad750


Interface   Data Structures   File List   Data Fields   Globals  

ECR_cal.h File Reference

Interface to the CAL calibration constants utilities. More...

#include <EDS/EDA_cal.h>
#include <PBI/Endianness.h>

Classes

struct  _ECR_calLogEnd_bf
 The calibration constants for one range of one log end, bit field representation. More...
union  _ECR_calLogEnd
 The calibration constants for one range of one log end. More...
struct  _ECR_calLog
 The calibration constants for one range of one log. More...
union  _ECR_calLayer
 The calibration constants for one range of one layer. More...
union  _ECR_calRange
 The calibration constants for one ranges of a one tower. More...
union  _ECR_calTower
 The calibration constants for all ranges of a one tower. More...
struct  _ECR_cal
 The calibration constants for CAL. More...

Defines

#define ECR_CAL_V_LEU_PER_MEV   2
 Determines the internal units of the CAL LOG Energy Scale, expressed as a power of 2.
#define ECR_CAL_K_LEU_PER_MEV   (1 << ECR_CAL_V_LEU_PER_MEV)
 Determines the internal units of the CAL LOG Energy Scale.
#define ECR_CAL_V_GAIN_PER_LEU   8
 Calibration energy scale as power of 2.
#define ECR_CAL_K_GAIN_PER_LEU   (1 << ECR_CAL_V_GAIN_PER_LEU)
 Calibration energy scale.
#define ECR_CAL_MEV_TO_LEU(_mev)   ((_mev) * ECR_CAL_K_LEU_PER_MEV)
 Converts an energy in MEV to an LEU.
#define ECR_CAL_LEU_TO_MEV(_leu)   ((_leu) / ECR_CAL_K_LEU_PER_MEV)
 Converts an energy in MEV to an LEU.

Typedefs

typedef struct _ECR_calLogEnd_bf ECR_calLogEnd_bf
 Typedef for struct _ECR_calLogEnd_bf.
typedef union _ECR_calLogEnd ECR_calLogEnd
 Typedef for union _ECR_calLogEnd.
typedef struct _ECR_calLog ECR_calLog
 Typedef for struct _ECR_calLog.
typedef union _ECR_calLayer ECR_calLayer
 Typedef for union _ECR_calLayer.
typedef union _ECR_calRange ECR_calRange
 Typedef for union _ECR_calRange.
typedef union _ECR_calTower ECR_calTower
 Typedef for union _ECR_calTower.
typedef struct _ECR_cal ECR_cal
 Typedef for struct _ECR_cal.

Functions

int ECR_calInit (ECR_cal *cal)
 Initializes the calibration constants for all towers to a nominal set.
int ECR_calSizeof (void)
 Returns the size, in bytes, of an ECR_cal structure.


Detailed Description

Interface to the CAL calibration constants utilities.

Author:
JJRussell - russell@slac.stanford.edu

    CVS $Id: ECR_cal.h,v 1.5 2011/03/25 22:16:54 russell Exp $

Define Documentation

#define ECR_CAL_K_GAIN_PER_LEU   (1 << ECR_CAL_V_GAIN_PER_LEU)

Calibration energy scale.

All calibration gain constants are multiplied by this number. This ensures that all calibration gains are not only greater than 1, but also have a resolution of about a 1/12 of a LOG Energy Unit (LEU) (nominally ~1/4 Mev/count).
To recover the LEU, one multiplies the ADC count by the calibration gain factor, then divides by EDR_CAL_K_GAIN_PER_LEU

#define ECR_CAL_K_LEU_PER_MEV   (1 << ECR_CAL_V_LEU_PER_MEV)

Determines the internal units of the CAL LOG Energy Scale.

This determines the internal units of the CAL LOG energy scale. This is referred to as the LEU (Log Energy Units). This number should be picked to give enough resolution without overflowing the arthimetic.
Currently this number is set at 4. This means the internal units are 1/4 Mev. Even if all logs saturate at the highest reading possible and are summed, this value does not overflow 32 bit signed arthimetic.
       3072 logs * 102,400 Mev * 4 Counts/Mev = ~1.25 x 10 ** 9
  


Function Documentation

int ECR_calInit ( ECR_cal cal  ) 

Initializes the calibration constants for all towers to a nominal set.

Return values:
0,If successful
!= 0, if failure
Parameters:
cal The gains and pedestals to be initialized.
This is not meant to be real in any sense of the word. It is to be used for debugging only.

References calFill().

Referenced by initIxbObjTbl().

int ECR_calSizeof ( void   ) 

Returns the size, in bytes, of an ECR_cal structure.

Returns:
The size, in bytes, of an ECR_cal structure
This function should be called to determine the size of an ECR_cal structure. This allows the calling program to avoid including the structure definition an ECR_cal.

After allocating an ECR_acd structure, the structure should be initialized using ECR_calInit().


Generated on Tue Nov 29 23:24:42 2011 by  doxygen 1.5.8