GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-5 > eds / mv2304
#include <EDS/EBF_calEnergy.h>
#include <EDS/EBF_cid.h>
#include <EDS/EBF_evt.h>
#include <EDS/EBF_dir.h>
#include <EDS/EBF_ctb.h>
#include <EDS/EBF_cal.h>
#include <EDS/EDA_cal.h>
#include <EDS/ECR_cal.h>
#include <PBI/FFS.ih>
Functions | |
static __inline int | convert (int val, const ECR_calLogEnd *cal) |
Converts ADC value into standard units (Log Energy Units). LEUs are the standard unit internally used by the filter code. | |
static __inline int | getEnergy (unsigned int data, const ECR_calTower *calTower, int logBeg) |
Converts the calorimeter data word in a energy. | |
static __inline int | sumTower4 (int *elayer, unsigned int counts, const unsigned int *data, const ECR_calTower *calTower) |
Sums the energies one a layer-by-layer basis and computes the total energy assuming the tower is in 4 range readout mode. | |
static __inline int | sumTower (int *elayer, unsigned int counts, const unsigned int *data, const ECR_calTower *calTower) |
Sums the energies one a layer-by-layer basis and computes the total energy. | |
int | EBF_calEnergyDirSum (int elayers[EDA_CAL_K_LAYERS_PER_LAT], const EBF_dir *dir, const ECR_cal *constants) |
Sums the energy in each struck CAL log in the LAT. | |
int | EBF_calEnergyEvtSum (int elayers[EDA_CAL_K_LAYERS_PER_LAT], int nbytes, const EBF_evt *evt, const ECR_cal *constants) |
Sums the energy in each struck CAL log in the LAT. |
CVS $Id: EBF_calEnergy.c,v 1.6 2011/03/25 22:16:56 russell Exp $
static __inline int convert | ( | int | val, | |
const ECR_calLogEnd * | cal | |||
) | [static] |
Converts ADC value into standard units (Log Energy Units). LEUs are the standard unit internally used by the filter code.
val | The ADC value to convert | |
cal | The calibration values for one log end |
References _ECR_calLogEnd::bf, _ECR_calLogEnd_bf::gain, _ECR_calLogEnd_bf::pedestal, _ECR_calLogEnd_bf::shift, and _ECR_calLogEnd::ui.
Referenced by getEnergy(), unpackLayer4(), and unpackTower().
int EBF_calEnergyDirSum | ( | int | elayers[EDA_CAL_K_LAYERS_PER_LAT], | |
const EBF_dir * | dir, | |||
const ECR_cal * | constants | |||
) |
Sums the energy in each struck CAL log in the LAT.
elayers | Array filled in with the layer-by-layer energy sum | |
dir | The event directory | |
constants | The array of gains and pedestals for the CAL |
References _EBF_esw::bf, _EBF_dirCtbDsc::ctb, _EBF_dir::ctbs, _EBF_dirRedux::ctids, EBF__dirCtbCalLocate(), EBF_DIR_TEMS_CAL, _EBF_ctbHdr::esw, _EBF_ctb::hdr, _EBF_esw_bf::range, _EBF_dir::redux, sumTower(), sumTower4(), and _ECR_cal::twrs.
int EBF_calEnergyEvtSum | ( | int | elayers[EDA_CAL_K_LAYERS_PER_LAT], | |
int | nbytes, | |||
const EBF_evt * | evt, | |||
const ECR_cal * | constants | |||
) |
Sums the energy in each struck CAL log in the LAT.
elayers | Array filled in with the layer-by-layer energy sum | |
nbytes | The size, in bytes, of the event | |
evt | Pointer to the event | |
constants | The array of gains and pedestals for the CAL |
References _EBF_CID_IS_TEM, _EBF_esw::bf, _EBF_ebw::bf, _EBF_evt::ctb, _EBF_ctb::dat, EBF__ctbAdvance(), EBF_CID_K_TEM, EBF_EBW_LEN_TO_BYTES, _EBF_ctbHdr::ebw, _EBF_ctbHdr::esw, _EBF_ctb::hdr, _EBF_esw_bf::range, sumTower(), sumTower4(), _ECR_cal::twrs, and _EBF_ebw::ui.
static __inline int getEnergy | ( | unsigned int | data, | |
const ECR_calTower * | calTower, | |||
int | logBeg | |||
) | [static] |
Converts the calorimeter data word in a energy.
data | The calorimeter data word for one log. | |
calTower | The calorimeter constants for this tower | |
logBeg | The beginning log number for this layer |
References _EBF_calLogData::bf, _EBF_calLogData_bf::col, convert(), _ECR_calTower::logs, _ECR_calLog::n, _ECR_calLog::p, _EBF_calLogData_bf::rngN, _EBF_calLogData_bf::rngP, _EBF_calLogData::ui, _EBF_calLogData_bf::valN, and _EBF_calLogData_bf::valP.
Referenced by sumTower(), and sumTower4().
static __inline int sumTower | ( | int * | elayer, | |
unsigned int | counts, | |||
const unsigned int * | data, | |||
const ECR_calTower * | calTower | |||
) | [static] |
Sums the energies one a layer-by-layer basis and computes the total energy.
elayer | The array of eight tower energies to sum into | |
counts | The layer counts. This must be guaranteed to be non-zero | |
data | Pointer to the data for this tower (first PHA value) | |
calTower | The calibration constants for this tower |
References EDA_CAL_K_LOGS_PER_LAYER, and getEnergy().
Referenced by EBF_calEnergyDirSum(), and EBF_calEnergyEvtSum().
static __inline int sumTower4 | ( | int * | elayer, | |
unsigned int | counts, | |||
const unsigned int * | data, | |||
const ECR_calTower * | calTower | |||
) | [static] |
Sums the energies one a layer-by-layer basis and computes the total energy assuming the tower is in 4 range readout mode.
elayer | The array of eight tower energies to sum into | |
counts | The layer counts | |
data | Pointer to the data for this tower (first PHA value) | |
calTower | The calibration constants for this tower |
References EDA_CAL_K_LOGS_PER_LAYER, getEnergy(), and _EBF_calLogData::ui.
Referenced by EBF_calEnergyDirSum(), and EBF_calEnergyEvtSum().