Accessing EM Calibration Data

What's there? Job options

Where is it?

Production vanilla calibration data has a physical home:

     /afs/slac.stanford.edu/g/glast/ground/EMcalibroot

It's associated with the environment variable EMcalibroot. If you're running on SLAC Linux and source $GROUPSCRIPTS/group.cshrc, the environment variable will be defined for you. Otherwise

Where is it? Job options

What's there?

Currently we have standard CAL calibration files: pedestals, gains, amd mu slopes. Soon we'll also have TKR hot strips and dead strips. At that time I'll make a tar ball of the files at SLAC and put it in the FTP space to simplify the process of installing the files elsewhere. You can see what is available (more accurately, what is supposed to be available) by making a query to the MySQL database:

mysql> select ser_no,vstart,vend,data_ident from metadata_v2r1 where instrument="EM" and flavor="vanilla";
+--------+---------------------+---------------------+-------------------------------------------------+
| ser_no | vstart              | vend                | data_ident                                      |
+--------+---------------------+---------------------+-------------------------------------------------+
|      6 | 2000-08-02 00:00:00 | 2002-11-18 22:57:46 | $CALIBUTILROOT/xml/test/testHot-2002-05-02.xml  |
|     21 | 2000-10-31 00:00:00 | 2004-11-23 00:00:00 | $(CALIBUTILROOT)/xml/Tkr/DeadStripsOutput.xml   |
|     22 | 2000-10-31 00:00:00 | 2004-01-10 17:00:00 | $(CALIBUTILROOT)/xml/Tkr/HotStripsOutput.xml    |
|     27 | 2003-02-21 05:49:12 | 2003-06-03 00:00:00 | $(CALIBUTILROOT)/xml/Cal/CalPed_PEM_022103.xml  |
|     28 | 2003-02-21 05:49:12 | 2003-06-03 00:00:00 | $(CALIBUTILROOT)/xml/Cal/CalGain_PEM_022103.xml |
|     29 | 2003-02-21 05:49:12 | 2003-06-03 00:00:00 | $(CALIBUTILROOT)/xml/Cal/MuSlope_PEM_022103.xml |
|     36 | 2003-09-01 00:00:00 | 2003-11-01 00:00:00 | $(EMcalibroot)/CAL/gains.xml                    |
|     37 | 2003-09-01 00:00:00 | 2003-11-01 00:00:00 | $(EMcalibroot)/CAL/muslopes.xml                 |
|     38 | 2003-09-01 00:00:00 | 2003-11-01 00:00:00 | $(EMcalibroot)/CAL/pedestals.xml                |
+--------+---------------------+---------------------+-------------------------------------------------+
Where is it? What's there?

Job Options

In order to access the standard (flavor="vanilla") calibrations while processing EM event data from a Gaudi program like Gleam, you need provide job options parameters to

Typical job options handling all of the above look something like this:

// Add calibration services dll
ApplicationMgr.DLLs   += {"CalibSvc"};

// Add calibration-related services: a data service..
ApplicationMgr.ExtSvc += {"CalibDataSvc"};

// .. conversion services
ApplicationMgr.ExtSvc += {"CalibMySQLCnvSvc", "CalibXmlCnvSvc" };

// ...and persistency services
DetectorPersistencySvc.CnvServices += {"CalibMySQLCnvSvc"};
DetectorPersistencySvc.CnvServices += {"CalibXmlCnvSvc"};

// Set instrument for calibration data
CalibDataSvc.CalibInstrumentName = "EM";

// CalibEvtClock needs to run after event is read in and before
// any algorithms needing to access calibration data
ApplicationMgr.TopAlg = {"digiRootReaderAlg", "CalibEvtClock", 
                      "myAnalysisAlg",... };

// Nominal first event timestamp and interval between events for 
// CalibEvtClock
CalibEvtClock.startTime = "2003-10-01_00:20";
CalibEvtClock.delayTime = 1;

A little more work is required to access private calibrations of other flavors.



Last modified:
Joanne Bogart