How To Get the LGD Calibration

How To Get the LGD Calibration

How Things Are Stored

The LGD calibration data is stored in the map lgd3053.Map. In addition to the calibration data, pedestal information is also stored here. Due to the problems we have encountered with MPS magnet cycles, the data has been split up into "calibration groups" (calGroups), with the boundries between calGroups normally defined by magnet cycles. The storge of the group info is:

There is only one set of calibration constants stored for each group, corresponding to the base run for that group. The constants for the other runs are arrived at by multiplying the base constants by a factor derived from the monitoring system :

The monitoring system data is stored in the following way: and the calibration constants for the base run can be found in

The last components needed are the pedestals. These are written out by lgdmond, and are stored in the map:

How To Get the Information

The following sections describe the routines that exist to get the calibration, and how to turn clusters into photons. These routines are defined in lgdUtil.h and contained in libUtil.a

Getting Calibration Group Definitions

int getRunCalGroup(int runNo, int* calGroup, int* nRuns, int* lastRun, int* baseRun)

Fetches the information for the group that run runNo belongs to. Failure returns non-zero.

Getting Pedestals

int getLGDPed(int runNo, float* ped, int* threshold, int* actualRun)

Gets the pedestal information for run runNo. Returns non-zero on failure, and sets actualRun to the run for wich pedestals were found, if applicable. NOte that ped and threshold are arrays dimensioned to 3053 by the user.

Getting Calibration Constants

int getLGDcc(int runNo, float* cc, int* actualRun)

Gets the calibration constants for run runNo. Returns non-zero on failure. Automatically applies the monitoring system scaling. This is actually just a specific case of the call:

int getLGDccGen(int mode, int runNo, float* cc, int* actualRun, char* fileName)

Here mode can be:

and fileName is:

Thus the call to getLGDcc(runNo,cc,&actualRun), is equivalent to getLGDccGen(LGDCC_MODE_1,runNo,cc,&actualRun,"map").

Turning Clusters Into Photons

vector4_t makePhoton(lgd_cluster_t* cluster, vector3_t vertex)

Converts the given cluster into a photon. This is actually a specific case of the more general call

vector4_t makePhoton(int mode, lgd_cluster_t* cluster, lgd_hits_t* clusterHits, vector3_t vertex)

where mode is a control word specified by the bitwise and of:

Note that in all cases, if the non-linearity is applied, cluster->energy will be rescaled. makePhoton(cluster,vertex) is actually just a call to makePhotonGen(MAKE_PHOTON_DEFUALT,cluser,NULL,vertex).

What Has Been Calibrated?

The easiest way to determine what has been calibrated is through the program calGroup-II. When run with the -rrunNo flag, it will report which calGroup the run belongs to, and it's calibration status. Run with the -gcalGroup flag, it will report on the status of the given group. When run with no flags, the status of all groups is reported.

***

  • 3/15/95 R.L.
  • UPDATED 3/22/95 R.L.