OFFLINE CALIBRATION FIRST STRATEGY AND EXAMPLES Chiara Zampolli
OFFLINE CALIBRATION – FIRST STRATEGY AND EXAMPLES Chiara Zampolli in collaboration with C. Cheshkov, A. Dainese ALICE Offline Week Feb 2009 C. Zampolli 1
Offline Calibration – a step forward As LHC (re)start-up is approaching, the need for a clear definition of the detector offline strategies arises Following the late ALICE Offline weeks, calibration was always mainly addressed to in terms of online calibration Status of DAs Status of DPs Status of the preprocessor OCDB objects Apart from specific detector-related issues, the general schema for online calibration within the Shuttle framework is in place since long time, and “working smoothly since Dec 2007” A new – well. . . not so new – question is now (re)asked to the detectors: What about offline calibration procedures? ALICE Offline Week Feb 2009 C. Zampolli 2
What has come out. . . From the ALICE Offline week – past and present – it looked as if not many clear ideas are already there Procedures may be defined, but. . . how to run them? . . . where? . . . when? . . . where to store the results? The problem is in common between Calibration and Alignement A common approach/strategy should be defined ALICE Offline Week Feb 2009 C. Zampolli 3
What we have now - examples So far, EMCAL/PHOS, TOF, TPC, and TRD have some work done on the offline calibration, but many details are still missing. TOF: offline calibration strategy first presented in the October ‘ 06 ALICE Offline Week EMCAL/PHOS: offline calibration strategy outlined recently, presented last Monday, and also before at the February ‘ 09 PWG 4 Meeting ALICE Offline Week Feb 2009 C. Zampolli 4
The TOF Example ALICE Offline Week Feb 2009 C. Zampolli 5
TOF Offline Calibration F rom 7 O ‘ 0 ct On-the-Fly offline calibration redesigned wrt July Offline week, being splitted into two steps: TTask (post-reconstruction process): Filling a tree: one entry/TOF channel; Each entry being a 1 D array with the necessary information to perform calibration; Running at the EOR; Writing the tree into Ali. En (as reference data) → don’t need CDB access Job/Macro: Job/Macro Chaining the trees so far created over many runs Running the calibration process Writing the calibration parameters on the CDB 8 th October 2007 Chiara Zampolli – ALICE TOF 6
TOF Offline Calibration: ‘ 07 t Ali. TOFCalib. Task Oc m Fro Process, Process loop over events: Applying quality cuts, and retrieving essential information from ESD tracks: To. T, measured time, expected times (π, K, p) → filling of a 2 D array [TOF channels][# expected tracks/channel per run], as before; Terminate: Terminate Perform Combinatorial PID → reducing the 2 D array size of a 1. 7 factor (only one exp time stored), as before but added some improvements in the encoding of the algorithm; Filling a run-level tree, tree one entry/TOF channel, changed; Storing the tree in Ali. En, Ali. En new. 8 th October 2007 Chiara Zampolli – ALICE TOF 7
TOF Offline calib strategy Run 0 Run 1 Chunk 0 Chunk 1 Chunk n ESD 0 ESD 1 ESD n Tree 0 Tree 1 Tree 2 Tree n Calibrator 0 Calibrator 1 Calibrator 2 Calibrator n OCDB Cern, July 19, 2007 OFFLINE Weekly meeting 7, ul ‘ 0 0 ’ J t Oc olla m C Fro m A. Fro 7 Alberto, Jan Fiete 8
TOF Offline Calibration: Ali. TOFcalib O m Fro 7 ‘ 0 ct OCDB functionalities for Online/Offline Calibration: Calibration writing/reading of TOF CDB objects, both online and offline, both for decalibration (in MC) and calibration Functionalities for Offline Calibration: Calibration Summing over the run-level trees stored into Ali. En Now, creating a TTree object, copying the entries of the existing ones (TTree: : Copy. Entries()): Quite memory expensive Allows to create the final tree also in case the run-level trees are stored in the reference data using the CDB classes Thinking of using a TChain object: No memory expense Many Log Info messages from TAlien. File Only possible in case the run-level trees are stored in Ali. En without using the CDB classes (but this seems to be the way. . ) 8 th October 2007 Chiara Zampolli – ALICE TOF 9
TOF Offline Calibration – Computation of the Parameters In the TOF schema: The Task should prepare the objects needed to calculate the offline calibration parameters. . . of which the job/macro should then be encharged Not so bad, but who should run the Task? When exactly? Where? ALICE Offline Week Feb 2009 C. Zampolli 10
The EMCAL/PHOS Example ALICE Offline Week Feb 2009 C. Zampolli 11
Offline Recalibration Strategy for PHOS and EMCal Task 2547: Implementation of online calibration procedures st la , o v n n n ta s PHOS and EMCAL had a joint meeting on 12. 02. 2009 to define. Gaustrategy for offline recalibration: rom F http: //indico. cern. ch/conference. Display. py? conf. Id=52643 PHOS and EMCAL offline calibration requires the full available statistics (~109 - 1010 events), therefore it can run with ESD only. ESD produced after the first reconstruction pass should be filtered to extract branches Calo. Clusters, PHOSCells, EMCALCells. Some calibration algorithms using track matching require the Tracks ESD branch which also should be extracted from ESD in the filtering procedure. n n The AOD with selected branches obtained by ESD filtering will be used for offline recalibration. Filtering and recalibration should be implemented as analysis tasks. The output of the recalibration task is a file with the corrections to the cell amplitudes and can be stored in a private alien directory for expert use only. n n Should this file have an structure depending on runs like OCDB? The OCDB to be used for further pass reconstructions will be corrected with the cell amplitude corrections obtained, basically multiplying the coefficients. n n ay d n mo We have to provide to the reconstruction managers macro that automatically do this. EMCal has already a recalibration procedure that works with the analysis frame developed by Aleksei P. a year ago ($ALICE_ROOT/EMCAL/Calib) Need to see how to adapt it to this recalibration strategy. 16/03/09 EMCal Status - Offline week 12/15
Offline Recalibration Strategy for PHOS and EMCal ay d on m st Task 2547: Implementation of online calibration procedures , la vo a t s Gu m Fro n Besides creating the new OCDB object, we aim to recalibrate the ESD created after the first reconstruction pass. For this, this first ESD should pass through another filter, and parameters of the Calo. Clusters (energies, coordinates, shower shape) should be recalculated with the use of corrections to the cell amplitudes found by recalibration procedure. n n As a result of this filtering, a new AOD will be created with better calibrated Calo. Clusters. This new AOD should be used for the official physics analysis. A possibility to create online DA is being studied. This DA can create TTree of objects needed for recalibration. The total size of these objects accumulated from 109 acquired pp events is estimated as a 33 Gb. These objects in root files should be exported from DAQ or HLT network to the outside world for an express offline analysis. As a result of this express analysis, an OCDB needed for the first reconstruction pass can be created. n Question to core offline: is there a way to export root files produced by QA to a storage other than OCDB? 16/03/09 EMCal Status - Offline week 13/15
EMCAL/PHOS main points A 1 st Task would filter the ESDs obtained from pass 1 to create new AODs with the necessary info A 2 nd Task should run on the new AODs to get the calibration parameters With these calibration parameters, new AODs could be created from the same initial ESDs, to be used for analysis while waiting for the second pass reconstruction Not so bad, but who should run the Task? When exactly? Where? ALICE Offline Week Feb 2009 C. Zampolli 14
Common Idea – using an Analysis. Task from a discussion with C. Cheshkov and A. Dainese Offline Calibration – as well as Alignment – could be organized as a “calibration/alignment train” to be run immediately after the reconstruction – in the same job, or in the same aliroot session: Every detector providing its own wagon Single loop over the events instead of once per detector calibration procedure Possibility to run over every type pf available data Automatization of the procedure Running on the Worker Node Every detector wagon should produce Calibration/Alignment data to be merged and from which to then extract the Calibration/Alignment parameters Merging of Calibration/Alignment data could be done over several runs, depending on the detector’s needs ALICE Offline Week Feb 2009 C. Zampolli 15
Offline Calibration – General Schema Chunk 0 Chunk 1 Chunk 2 Chunk 3 ESD 0 ESD 1 ESD 2 ESD 3 Calibration/Alignment train Cal/Alig data 0 Cal/Alig data 1 Cal/Alig data 2 Cal/Alig data 3 j-th Run i-th Run reconstruction Merging procedure (*) analogous to the existing merging procedure for ESD tags ALICE Offline Week Feb 2009 Cal/Alig obj run in Ali. En C. Zampolli 16
Offline Calibration Strategy - Features Size of Calibration/Alignment data after the merging must be small compared to the overall ESDs size! (if possible use QA data. . . ) requirement for detector, up to them to keep this under control Calibration/Alignment data need to be processed to obtain the real calibration parameters during a later step – macro? Job? No automatization foreseen, at least for the beginning, since this would imply blind processing of different runs (if summing over runs is necessary) and storing the new Calib/Align objects in the OCDB w/ any check Could also be done during the merging step – after a check (QA histo? ) of the data, the storing to the OCDB might be triggered Calibration/Alignment data will be produced with no access to the OCDB – by definition Can be run locally on the Worker Nodes Need to store somewhere together with the Calib/Align objects the info about the OCDB objs used to produce the ESDs Calibration/Alignment strategy seems to fit both TOF & EMCAL. . . Possibility to test it during next cosmics runs, but also with old cosmics data ALICE Offline Week Feb 2009 C. Zampolli 17
Any Comment? Thanks to Andrea, Cvetan, Gustavo. . . ALICE Offline Week Feb 2009 C. Zampolli 18
Back-Ups ALICE Offline Week Feb 2009 C. Zampolli 19
TOF Offline Calibration: Ali. TOFcalib O m Fro 7 ‘ 0 ct Functionalities for Offline Calibration (cont’d): Perform Calibration (as before): Calibration the whole TOF → default Calibrating a selected channel → debug purpose Calibrating summing over more than one channel → in case uniform behaviour between channels is expected Calibrating a specific set of channels → partial TOF configuration Calibrating using a dedicated algorithm to produce profile histogram → debug purpose Still the same debugging functionalities: functionalities possibility to store control histos both during the 2 -D array filling, and during calibration 8 th October 2007 Chiara Zampolli – ALICE TOF 20
Managing the OCDB during reco O m o Fr Offline Online 0 1 2 Run 0 1 2 3 4 100 101 102 103 104 3 4 5 Run validity 100 101 102 103 104 ∞ Offline Calib obj Reset ! not valid Calib Offline Calib obj valid no more valid Not valid Run 0 1 2 3 4 Valid Not valid 100 101 102 103 104 Cern, July 19, 2007 7 ‘ 0 ct Valid OFFLINE Weekly meeting Alberto, Jan Fiete
Offline Calibration Obj: f. Validity O m Fro 7 ‘ 0 ct Handled by Ali. TOFcalib as a const char* member, f. Validity; Validity for offline calibration objects is written as a comment (Ali. CDBMeta. Data: : Set. Comment()) in the Meta. Data of the obj; “valid” is the key-word to activate the use of offline calibration params during reco; f. Validity set as “valid” when Ali. TOFcalib: : Calibrate ends successfully (i. e. enough statistics), otherwise no new offline calibration objs stored; During TOF reconstruction, both online/offline calibration objects are read: the first being always necessary to retrieve the status of the channel, the second being used only in case f. Validity==“valid”. 8 th October 2007 Chiara Zampolli – ALICE TOF 22
- Slides: 22