GLAST CHEP 03 March 24-28 2003 J. Bogart1/26 Calibration Infrastructure for the GLAST LAT Joanne Bogart Stanford Linear Accelerator Center

Slides:



Advertisements
Similar presentations
Module R2 CS450. Next Week R1 is due next Friday ▫Bring manuals in a binder - make sure to have a cover page with group number, module, and date. You.
Advertisements

March 24-28, 2003Computing for High-Energy Physics Configuration Database for BaBar On-line Rainer Bartoldus, Gregory Dubois-Felsmann, Yury Kolomensky,
IE 423 – Design of Decision Support Systems Introduction to Data Base Management Systems and MS Access.
1 Databases in ALICE L.Betev LCG Database Deployment and Persistency Workshop Geneva, October 17, 2005.
David Adams ATLAS DIAL Distributed Interactive Analysis of Large datasets David Adams BNL March 25, 2003 CHEP 2003 Data Analysis Environment and Visualization.
Reconstruction and Analysis on Demand: A Success Story Christopher D. Jones Cornell University, USA.
GLAST LAT ProjectISOC Peer Review - March 2, 2004 Document: LAT-PR Section 2.1 Requirements 1 Gamma-ray Large Area Space Telescope GLAST Large.
TkrRecon Status Perugia Software Workshop May, 2003.
Simulation / Reconstruction Working group Toby Burnett University of Washington Jan 2000 T.
GLAST LAT ProjectGLAST Flight Software IDT, October 16, 2001 JJRussell1 October 16, 2001 What’s Covered Activity –Monitoring FSW defines this as activity.
The CU Beam Test at CERN Status Report and highlights from workshop II Luca Latronico LAT C&A Meeting May
SAS Calibration Infrastructure J. Bogart 7 June 2004 What it is, what it does.
Calibration Infrastructure & Gaudi Design and Status.
GLAST LAT ProjectOnline Peer Review – July 21, Integration and Test L. Miller 1 GLAST Large Area Telescope: I&T Integration Readiness Review.
Identifiers for Everyone J. Bogart Core Software Workshop April
This chapter is extracted from Sommerville’s slides. Text book chapter
Managing the development and purchase of information systems (Part 1)
GLAST LAT ProjectDOE/NASA Baseline-Preliminary Design Review, January 8, 2002 K.Young 1 LAT Data Processing Facility Automatically process Level 0 data.
Root, GLAST, and IDL Heather Kelly NASA/GSFC Emergent Corporation.
HPS Online Software Discussion Jeremy McCormick, SLAC Status and Plans.
Conditions DB in LHCb LCG Conditions DB Workshop 8-9 December 2003 P. Mato / CERN.
GLAST CHEP 03 March R.Dubois1/17 GLAST Large Area Telescope: Overview of GLAST Offline Software Richard Dubois Stanford Linear Accelerator Center.
Bookkeeping Tutorial. Bookkeeping & Monitoring Tutorial2 Bookkeeping content  Contains records of all “jobs” and all “files” that are created by production.
Databases E. Leonardi, P. Valente. Conditions DB Conditions=Dynamic parameters non-event time-varying Conditions database (CondDB) General definition:
Event Data History David Adams BNL Atlas Software Week December 2001.
L8 - March 28, 2006copyright Thomas Pole , all rights reserved 1 Lecture 8: Software Asset Management and Text Ch. 5: Software Factories, (Review)
GLAST CHEP 03 March K.Young1/22 GLAST Large Area Telescope: Release System for GLAST Offline Software Karl Young, Richard Dubois, Alex Schlessinger.
NA62 Trigger Algorithm Trigger and DAQ meeting, 8th September 2011 Cristiano Santoni Mauro Piccini (INFN – Sezione di Perugia) NA62 collaboration meeting,
Some Thoughts about Hits, Geometry etc Rob Kutschke, Hans Wenzel Fermilab March 13, 2007.
Configuration Database David Forrest 15th January 2009 CM23, HIT, Harbin.
CHEP /21/03 Detector Description Framework in LHCb Sébastien Ponce CERN.
ALICE Condition DataBase Magali Gruwé CERN PH/AIP Alice Offline week May 31 st 2005.
GLAST LAT Project LAT Instrument Analysis Workshop – Feb 27, 2006 Hiro Tajima, TKR Data Processing Overview 1 GLAST Large Area Telescope: TKR Data Processing.
DØ Algorithms Meeting March 9, Leslie Groer Columbia UniversityCalorimeter Online Software Status 1  Examines  Crate Unpacking  Calibration 
David Adams ATLAS DIAL: Distributed Interactive Analysis of Large datasets David Adams BNL August 5, 2002 BNL OMEGA talk.
GLAST LAT Project LAT System Engineering 1 GLAST Large Area Telescope: LAT System Engineering Pat Hascall SLAC System Engineering Manager
GLAST LAT Offline SoftwareCore review, Jan. 17, 2001 Review of the “Core” software: Introduction Environment: THB, Thomas, Ian, Heather Geometry: Joanne.
Why A Software Review? Now have experience of real data and first major analysis results –What have we learned? –How should that change what we do next.
CHEP /21/03 Detector Description Framework in LHCb Sébastien Ponce CERN.
Detector Description in LHCb Detector Description Workshop 13 June 2002 S. Ponce, P. Mato / CERN.
M1G Introduction to Programming 2 3. Creating Classes: Room and Item.
Bookkeeping Tutorial. 2 Bookkeeping content  Contains records of all “jobs” and all “files” that are produced by production jobs  Job:  In fact technically.
23/2/2000Status of GAUDI 1 P. Mato / CERN Computing meeting, LHCb Week 23 February 2000.
GLAST LAT Project LAT System Engineering 1 GLAST Large Area Telescope: LAT System Engineering Pat Hascall SLAC System Engineering Manager
Claudio Grandi INFN-Bologna CHEP 2000Abstract B 029 Object Oriented simulation of the Level 1 Trigger system of a CMS muon chamber Claudio Grandi INFN-Bologna.
GLAST LAT Project CU Beam Test Workshop 3/20/2006 C. Sgro’, L. Baldini, J. Bregeon1 Glast LAT Calibration Unit Beam Test Status Report on Online Monitor.
Alberto Colla - CERN ALICE off-line week 1 Alberto Colla ALICE off-line week Cern, May 31, 2005 Table of contents: ● Summary of requirements ● Description.
D. Duellmann - IT/DB LCG - POOL Project1 The LCG Dictionary and POOL Dirk Duellmann.
Summary of User Requirements for Calibration and Alignment Database Magali Gruwé CERN PH/AIP ALICE Offline Week Alignment and Calibration Workshop February.
LKr readout and trigger R. Fantechi 3/2/2010. The CARE structure.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
Analysis experience at GSIAF Marian Ivanov. HEP data analysis ● Typical HEP data analysis (physic analysis, calibration, alignment) and any statistical.
Finding Data in ATLAS. May 22, 2009Jack Cranshaw (ANL)2 Starting Point Questions What is the latest reprocessing of cosmics? Are there are any AOD produced.
Feb. 3, 2007IFC meeting1 Beam test report Ph. Bruel on behalf of the beam test working group Gamma-ray Large Area Space Telescope.
AliRoot Classes for access to Calibration and Alignment objects Magali Gruwé CERN PH/AIP ALICE Offline Meeting February 17 th 2005 To be presented to detector.
This was written with the assumption that workbooks would be added. Even if these are not introduced until later, the same basic ideas apply Hopefully.
GLAST Large Area Telescope Instrument Flight Software Flight Unit Design Review 16 September 2004 Instrument Configuration by File James Swain Stanford.
GLAST LAT ProjectNovember 18, 2004 I&T Two Tower IRR 1 GLAST Large Area Telescope: Integration and Test Two Tower Integration Readiness Review SVAC Elliott.
(on behalf of the POOL team)
CMS High Level Trigger Configuration Management
A C++ generic model for the GLAST Geometric Description
GLAST Large Area Telescope:
Gamma-ray Large Area Space Telescope
LHCb Detector Description Framework Radovan Chytracek CERN Switzerland
Status Report and highlights from workshop II
Andrea Valassi Pere Mato
Use Of GAUDI framework in Online Environment
LHCb Detector Description Framework Radovan Chytracek CERN Switzerland
Calibration Infrastructure Design
Presentation transcript:

GLAST CHEP 03 March J. Bogart1/26 Calibration Infrastructure for the GLAST LAT Joanne Bogart Stanford Linear Accelerator Center Gamma-ray Large Area Space Telescope

GLAST CHEP 03 March J. Bogart2/26 Contents Introduction and definitions Requirements Data and metadata System overview Non-Gaudi application support Gaudi application support (generic, examples) Wrap-up

GLAST CHEP 03 March J. Bogart3/26 GLAST Mission GLAST measures the direction, energy and arrival time of celestial gamma rays -LAT measures gamma-rays in the energy range ~20 MeV - >300 GeV -There is no telescope now covering this range!! - GBM provides correlative observations of transient events in the energy range ~20 keV – 20 MeV Launch: September 2006 Florida Orbit: 550 km, 28.5 o inclination Lifetime: 5 years (minimum)

GLAST CHEP 03 March J. Bogart4/26 GLAST Instrument: Large Area Telescope (LAT) DAQ Electronics Grid Tracker Calorimeter ACD Thermal Blanket Array of 16 identical “Tower” Modules, each with a tracker (Si strips) and a calorimeter (CsI with PIN diode readout) and DAQ module. Surrounded by finely segmented Anti- Coincidence Detector (plastic scintillator with PMT readout).

GLAST CHEP 03 March J. Bogart5/26 What do we mean by "calibration" ? Roughly speaking, we mean information about the detector which can vary with time and is required to interpret the raw readout. The boundaries are still fuzzy, but will include at a minimum  Hardware status (hot, dead, etc.) for components of the three subdetectors: calorimeter, tracker, and ACD.  Tracker alignment constants  Parameters needed to convert from electronic readout to physical units (thresholds, gains, position-dependent light attenuation in calorimeter crystals,...) and will not include description of the ideal detector geometry, which is managed by a separate facility.

GLAST CHEP 03 March J. Bogart6/26 Infrastructure Requirements Accommodate variety of data types, as in previous slide Handle data for prototypes as well as flight instrument –Prototypes have the same components, but in different numbers (including zero) Support, to varying degrees –clients adding new datasets (coach) –clients wishing to track hardware performance (coach) –[Gaudi] event reconstruction and analysis clients (1 st class) For event analysis, –require transparent update as event data timestamp leaves validity interval of in-memory constants –support access to multiple “flavors” of a single data type concurrently Support at least XML and ROOT persistent forms Portability for readers: full capability for anyone with network access; limited support for development on desert islands.

GLAST CHEP 03 March J. Bogart7/26 Infrastructure Non-requirements Don't need to provide easy access to subset of a particular calibration data set. –Simplifies TDS structure and conversion process Although must handle prototype instruments as well as flight instrument, may assume that any single analysis job only cares about one instrument. Conversion in the Gaudi* sense from in-memory form to persistent form is not required (though Gaudi applications may generate persistent calibration data sets other ways). –Conversion from persistent form must happen transparently during event analysis. Conversion to persistent form is the result of an explicit request. *Software framework designed for HEP or HEP-like event analysis. Some familiarity is assumed for this talk.

GLAST CHEP 03 March J. Bogart8/26 Data and Metadata The ability to look things up looms large in this system. To expedite this, we distinguish the bulk data from the metadata. Bulk data is what typical applications care about: which strips are dead, what is the gain of each calorimeter channel, etc. Metadata is information about a particular calibration bulk data set. It comes in several categories: –selection information used to determine which is the desired dataset, such as calibration type, instrument, validity interval –conversion information used to find and read in the bulk data such as file spec and physical format type –miscellany: other information primarily for browsing or for creating summaries for human readers, such as description of conditions when calibration was done.

GLAST CHEP 03 March J. Bogart9/26 Most Metadata Fields Calibration typeTKR alignment, CAL gains Flavorvanilla, ideal, digi,... Serial numberautomatically assigned; unique Data format versionfor schema evolution (someday) Data identifierWhere to find the data; e.g., file spec. Validity start timeCompare to event time Validity end timeditto Completion timeWhen procedure generating data completed InstrumentOne LAT (flight), CU, EM,... (prototypes) Procedure levelProduction, development, test, superseded.. Calibration statusCompletion status: OK, aborted,... Data formatXML or ROOT Input descriptionString describing input to the calibration procedure Comment fieldString for anything else

GLAST CHEP 03 March J. Bogart10/26 Searching the Metadata /** Return serial number for calibration which is best match to criteria. */ Metadata::eRet calibUtil::Metadata::findBest (unsigned int * ser, // serial # (output) const std::string& calibType, const facilities::Timestamp& ts,// validity interval must // include it unsigned int levelMask, // acceptable proc. level const std::string& instrument, // e.g. LAT, EM, CU,... const std::string& flavor = "VANILLA" ) Typically want to find the “right” calibration for a particular event and a particular kind of analysis...

GLAST CHEP 03 March J. Bogart11/26 Using the Metadata /** Given a calibration serial number, return information needed for caller to read in the data. Returns : true if serialNo exists in dbs and "filename" has non-null value; else false. */ Metadata::eRet calibUtil::Metadata::getReadInfo ( unsigned int serialNo, // input eDataFmt & dataFmt, // XML or ROOT std::string & fmtVersion, std::string & dataIdent ) // Typically, file spec. findBest and getReadInfo can be viewed as implementing an abstract interface for metadata, independent of the underlying MySQL implementation....and read it in.

GLAST CHEP 03 March J. Bogart12/26 Infrastructure Diagram (simplified) calibUtil interface Data (persistent)Metadata (persistent) bad strips (XML) CAL calibs (ROOT) MySQL rdbms Write/register Search Read I & T Client Gaudi Client Calibrator ROOT, XML services

GLAST CHEP 03 March J. Bogart13/26 How to Add a Calibration Dataset Generate the bulk data. This is entirely independent of Calibration Infrastructure except for help in some cases in writing it out in the proper form. Store the resulting information in an appropriate place. Make an entry in the production MySQL dbs pointing to it and including validity interval. calibUtil provides support for this –Access to MySQL is automatic for clients of calibUtil, but controlled. –Also possible to write a row to MySQL table directly, but without benefit of any sanity check.

GLAST CHEP 03 March J. Bogart14/26 How to Track Hardware Status (NYI) When a new calibration of an interesting type has been entered into the system, run a job which –Reads the entire new bulk data set –Outputs to a separate hardware dbs, organized by channel rather than by calibration procedure instance Initially do this manually; later it could be triggered automatically. The hardware database will have its own set of services, probably including histogramming relevant quantities, report generation,… all of which are outside the scope of “Calibration Infrastructure” as used here.

GLAST CHEP 03 March J. Bogart15/26 Gaudi and Calibration As for any TDS (Transient Data Store) object, may associate converter/conversion service with calibration data. Gaudi has built-in support for calibration/conditions data: data whose validity is a function of time. –IValidity abstract interface for data classes –IDetDataSvc interface for data services* needing to check validity However, Gaudi-provided implementation DetDataSvc was unsuitable (initialize() makes some rather specific assumptions) so wrote a variant CalibDataSvc class. CalibBase class inherits from IValidity, DataObject. Also keeps track of serial number. Since a (conceptually) single calibration dataset comes in two physical pieces which may be in different formats, the conversion process is most naturally implemented in two stages*: metadata “conversion” and bulk data conversion. * Data service: something responsible for providing access to data in a TDS. * See Acknowledgements.

GLAST CHEP 03 March J. Bogart16/26 Transient (Calibration) Data Store [T(C)DS] Datatypes are “simple” in the sense that anyone wanting calibration data gets the whole dataset. There is no hierarchy of data in the TCDS; all the actual data is in the leaf nodes. Early on we realized different applications might want different flavors of the same calibration type, covering the same time interval. Might even want more than one flavor available concurrently to different parts of the same job.

GLAST CHEP 03 March J. Bogart17/26 Flavors* Potential uses –Handy way to dispense with calibration altogether; use an “ideal” detector, all of whose (flavor = ideal) calibrations are perfect and valid for all time. –Can have one set of bad channels at digi step, a different set at recon (which is in fact what happens with real rather than MC data) –Can simulate failure modes How dynamic is it? –Code can discover flavors at initialization time; but specifying them (in job options) is a bit clumsy. –It's probably adequate for our needs. * See Acknowledgements.

GLAST CHEP 03 March J. Bogart18/26 TCDS Structure Calib TKR_HotChan CAL_LightAtt ACD_Eff vanilla digi /Calib/TKR_HotChan/vanilla /Calib/TKR_HotChan/digi /Calib/CAL_LightAtt/vanilla /Calib/ACD_Eff/vanilla Part of TCDS node hierarchy. Only the leaf nodes have calibration data associated with them.

GLAST CHEP 03 March J. Bogart19/26 client m_calibDataSvc->retrieveobject("/Calib/ACD_Eff/vanilla",pObj) CalibDataSvc (DataSvc) pLoader->createObject(pAddress,pObj) PersistencySvc pSvc->createObject(pAddress,pObj) Ask TCDS data service for pointer to object If object not already in TCDS, ask loader (Persistency service) to load it. So-called address is a descriptor including enough information to guide conversion Ask format-specific conversion service (MySQL) to create object CalibMySQLCnvSvc m_meta->findBest(&ser, calibType, eventTime,...); m_meta->getReadInfo(ser, &physFmt, &version, &ident); m_persSvc->createObj(tmpAddress, pObj); Search meta dbs for best match; get info needed to retrieve calib bulk data, ask Persistency Svc to create corresponding obj. Create a Calibration Object

GLAST CHEP 03 March J. Bogart20/26 PersistencySvc pSvc->createObject(pAddress,pObj) Ask format-specific conversion service (XML, later also ROOT) to create object CalibXMLCnvSvc (ConversionSvc) pCnv->createObject(pAddress,pObj) Find the right converter for this data type, this physical format, and ask it to create the object XmlTest1Cnv : XmlBaseCnv XmlBaseCnv fills info common to all calib data (validity interval, metadata serial number), parses XML file and passes DOM_Document node to specific converter, which fills in remainder of data. Create a Calibration Object (cont’d)

GLAST CHEP 03 March J. Bogart21/26 Still Valid? The first to get a pointer to the data in the TDS (and create it from its persistent form if it's not already there). This is what was portrayed in the previous slides. The second to verify that data already present in the TCDS is still applicable to current event (and if not update it with a new data set which is). The details are similarly convoluted, but mercifully omitted. A typical client algorithm for calibration data has to make at least two calls to the Calibration Data Service to insure that a dataset appropriate for the current event time will be in the Calibration TDS:

GLAST CHEP 03 March J. Bogart22/26 XML files Metadata rdbms Calibration conversion services, converters TCDS: hot strips, dead strips Tkr Service: merged bad strips algorithm Persistent data is kept in XML files. Each file is described with metadata. Metadata cnv service searches for the ‘right’ dataset. Format-specific cnv service invokes converter to create or update TCDS information. Once per event Tkr svc asks for update. If data has been refreshed (check serial # to see), it will then recreate its own merged representation. Tkr svc makes data available to algorithms. data control TKR Bad Strips Architecture* * See Acknowledgements.

GLAST CHEP 03 March J. Bogart23/26 CAL per-range data Unlike TKR bad strips, there are several CAL calibration types for which every data set (for a given instrument) is of the same size, and all such calibration types have the same organization: there is some fixed amount of data per channel. Design nearly-uniform XML (later will be ROOT) description for all such calib types. Design helper class CalFinder which knows how to find the right dataset for a particular range. End up with parallel class hierarchies, one for per-range data and one for full data set. Template implementation also considered.

GLAST CHEP 03 March J. Bogart24/26 Status MySQL database exists in a usable form, perhaps even final form. Future changes, if any, will not be sweeping. MySQL and XML conversion services exist in final form or something close to it. ROOT conversion service is on its way. Have several working examples of calibration data types: –TKR hot and dead strips –CAL pedestals and gains –Simple test data type For each, have –Persistent representation (all XML for now) –Corresponding TCDS class –Converter taking the former to the latter

GLAST CHEP 03 March J. Bogart25/26 Conclusions Get ROOT conversion service going (preferably one which will handle event data as well as calibration data) Add a bunch more calibration data types Finalize location for persistent form of production calibration data sets. Implement scheme for getting event time from the event (event has to contain a sensible event time field first!) Design and implement tools for maintaining metadata, in particular for updating validity intervals and checking their properties. Design and implement alternative to MySQL conversion service for isolated users Design and implement mirror strategy Enhance infrastructure or clone it to handle program parameters. So far, the system is living up to expectations. The design effort was long and difficult; implementation and debugging haven’t been bad. However, there is plenty left to do:

GLAST CHEP 03 March J. Bogart26/26 Acknowledgements Andrea Valassi, CERN, for help with the two-stage conversion including –pointing me to his somewhat similar implementation –answering my questions –(not least!) encouraging me to follow this route, which seemed rather daunting at first Leon Rochester, SLAC (GLAST), for contributing the concept of “flavor” and for helping with design and implementation of bad strips architecture. Just about everyone else in the GLAST LAT Software group, one way or another. Many thanks to...