Tag based analysis Ziyan DENG.

Slides:



Advertisements
Similar presentations
K A Assamagan Analysis Tutorial – December 19, Tucson, 2004 Overview of ATLAS Software and the Athena Framework (extracted from an earlier talk by S. R.
Advertisements

15 March, 2000LHCb Computing1 Software Review Panel LHCb Answers to Architecture, Data Model and Program Infrastructure Pere Mato for the LHCb Collaboration.
陈 石 SC 周义博 SC 张霄宁 SC 芮 琨 SC 朱桂莲 SC Crystalmaker 1.3 简介.
25/03/2003Simulation Application for the LHCb Experiment CHEP March 2003 Presented by: W. Pokorski / CERN Authors: I. Belyaev, Ph. Charpentier,
EventStore Managing Event Versioning and Data Partitioning using Legacy Data Formats Chris Jones Valentin Kuznetsov Dan Riley Greg Sharp CLEO Collaboration.
Gaudi Framework Tutorial, April Introduction.
LHCb Software week November, 1999 M.Frank LHCb/CERN N-Tuples within Gaudi ã Definition ã Usage ä Run through simplified example ã The persistent.
M.Frank LHCb/CERN - In behalf of the LHCb GAUDI team Data Persistency Solution for LHCb ã Motivation ã Data access ã Generic model ã Experience & Conclusions.
1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.
Nick Brook Current status Future Collaboration Plans Future UK plans.
Job Options and Printing 1 LHCb software tutorial - September 2011.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett The Athena Control Framework in Production, New Developments and Lessons Learned.
David N. Brown Lawrence Berkeley National Lab Representing the BaBar Collaboration The BaBar Mini  BaBar  BaBar’s Data Formats  Design of the Mini 
The BESIII Offline Software Weidong Li Institute of High Energy Physics, Beijing Workshop on the cooperation of PRC-US in HEP 16 June 2006.
BESIII MC Release notes & planned development Dengzy, Hem, Liuhm, Youzy, Yuany Nov. 23, 2005.
Event Data History David Adams BNL Atlas Software Week December 2001.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER 1 ACAT 2000, Fermilab Oct Control States... Control States for the Atlas Software Framework.
Introduction to Gaudi LHCb software tutorial - September
Use of Gaudi in Reconstruction Weidong Li 23/06/2004.
Gaudi Framework Tutorial, April Job Options and Printing.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett Interval of Validity Service IOVSvc ATLAS Software Week May Architecture.
GDB Meeting - 10 June 2003 ATLAS Offline Software David R. Quarrie Lawrence Berkeley National Laboratory
David Adams ATLAS DIAL: Distributed Interactive Analysis of Large datasets David Adams BNL August 5, 2002 BNL OMEGA talk.
HIGUCHI Takeo Department of Physics, Faulty of Science, University of Tokyo Representing dBASF Development Team BELLE/CHEP20001 Distributed BELLE Analysis.
Status of BESIII Weidong Li IHEP, CAS, Beijing Nanchang 17th April, 2010.
Detector Description in LHCb Detector Description Workshop 13 June 2002 S. Ponce, P. Mato / CERN.
GAUDI Muon Software  Algorithms : Muon Digitization MuonL0Trigger MuonIdentification  Detector Description Database  Transient Detector Store  Detector.
General requirements for BES III offline & EF selection software Weidong Li.
CERN Tutorial, February Introduction to Gaudi.
1 OO Muon Reconstruction in ATLAS Michela Biglietti Univ. of Naples INFN/Naples Atlas offline software MuonSpectrometer reconstruction (Moore) Atlas combined.
Workflows and Data Management. Workflow and DM Run3 and after: conditions m LHCb major upgrade is for Run3 (2020 horizon)! o Luminosity x 5 ( )
INFSO-RI Enabling Grids for E-sciencE Using of GANGA interface for Athena applications A. Zalite / PNPI.
ATLAS Distributed Computing perspectives for Run-2 Simone Campana CERN-IT/SDC on behalf of ADC.
The MEG Offline Project General Architecture Offline Organization Responsibilities Milestones PSI 2/7/2004Corrado Gatto INFN.
Introduction to the Athena Software Hong Ma BNL Athena Tutorial USATLAS Software Workshop.
Big picture: What’re the sub-topics of the software framework? What’s the relationship of them? How to arrange data pipe? 1.
Root and muon calibration at Daya Bay Deb Mohapatra.
June 2004 ATLAS WeekAlexander Solodkov1 testbeam 2004 offline reconstruction.
Gaudi Framework Tutorial, April Histograms And N-tuples.
BESIII offline software group Status of BESIII Event Reconstruction System.
BES III Software: Beta Release Plan Weidong Li 19 th October 2005.
David Adams ATLAS Hybrid Event Store Integration with Athena/StoreGate David Adams BNL March 5, 2002 ATLAS Software Week Event Data Model and Detector.
HYDRA Framework. Setup of software environment Setup of software environment Using the documentation Using the documentation How to compile a program.
Data Formats and Impact on Federated Access
Root I/O and the Gaudi Framework
BESIII data processing
“Algorithm Tools” what they are, how to get them and how to use them
Simulation Tools for Test Beam
ALICE experience with ROOT I/O
ALICE analysis preservation
LHCb Software Tutorial
Introduction to Gaudi LHCb software tutorial - December 2010.
OO Muon Reconstruction in ATLAS
Marco Cattaneo, CERN February 2000
SW Architecture SG meeting 22 July 1999 P. Mato, CERN
Data Persistency Solution for LHCb
GAUSS - GEANT4 based simulation for LHCb
Raw Event Conversion Service in BOSS framework
Simulation and Physics
2 Getting Started.
Major Design Criteria Clear separation between “data” and “algorithms”
2 Getting Started.
What’s new in version 4 of GAUDI
2 Getting Started.
Event Storage GAUDI - Data access/storage Framework related issues
Introduction to Gaudi Schedule: Timing Topic 20 minutes Lecture
Use Of GAUDI framework in Online Environment
Planning next release of GAUDI
Modifications in Gaudi v5 release:
BES III Software: Short-term Plan ( )
Presentation transcript:

Tag based analysis Ziyan DENG

Data Analysis Model Raw data on disk (All, Bhabha, Dimu., Random trigger ……) .raw Raw data on tapes Detector Calibration Index generation Detector Simulation Offline Reconstruction (DST Production) .idx .rtraw, ROOT .dst, ROOT Background Mixing (with random trigger events) Physics Skimming(nprong, DTag, …) .raw .dst, ROOT database Reconstruction User Analysis .dst, ROOT 2

探测器的击中信息 MDC: EMC: MUC: 单元编号 飞行时间 漂移时间 漂移距离 击中位置 …… 晶体编号 沉积能量 击中位置 击中时间 …… MUC: 击中时间 击中位置 沉积能量 动量,方向 …… 3个1GeV/c的π/μ在探测器里的不同行为

Gaudi Framework Provides standard interfaces for the common components necessary for data processing and analysis ISvcLocator ApplicationMgr IDataProviderSvc IAlgorithm IProperty EventDataSvc Concrete Algorithm IDataProviderSvc DetectorDataSvc IHistogramSvc HistogramSvc Obj_A Obj_B MessageSvc IMessageSvc IParticlePropertySvc ParticlePropertySvc

Gaudi Architecture Object Diagram Converter Algorithm Event Data Service Persistency Data Files Transient Event Store Detec. Data Transient Detector Store Message JobOptions Particle Prop. Other Services Histogram Transient Histogram Store Application Manager

Set properties, add converters RootCnvSvc Set properties, add converters RootEvtSelector Get next event ID RootAddress Root Tree names, branch names, and EntryNr RootInterface Open ROOT file, reading/writing tree RootEventBaseCnv TObjectToDataObject, DataObjectToTObject RootCnvSvc Digi/ Mc/ MdcTrackCnv MdcKalTrackCnv Rec/ MdcDedxCnv Dst/ TofTrackCnv EvtRec/ EmcTrackCnv …… ……

Current data processing Data production job: Recon. Algs file1.raw file1.dst Physics analysis job: RhopiAlg Analyzing full dst files (1) file1.dst, … ntuple data skim job file1.dst file1_skim.dst Analyzing skimmed dst Or (2) Physics analysis job: RhopiAlg file1_skim.dst, … ntuple

Tag based analysis TAG DST TagWriterAlg Input for analysis Size of TAG file is ~1/700 of DST file DST file directory/name event 0 entry runId eventId Total_charged event 1 ... … event 2 …… event N DST event 0 MdcTrackCol TofTrackCol …… event 1 event 2 event N TagWriterAlg Production job Input for analysis Users set tag selection criteria (“B>=2 && C=1……”) through TagFilterSvc RootCnvSvc: Read each entry in TAG file, and using TagFilterSvc to choose which DST event should read.

Initialize Algorithms OfflineEventLoopMgr::initialize Setup Event Selector Setup Services OfflineEventLoopMgr::getEventRoot RootEvtSelector::next set eventId RootEvtSelector::createAddress RootEventBaseCnv::createObj RootInterface::setBranchAddress OfflineEventLoopMgr::nextEvent RootAddress:setEntryNr(eventId) Event loop RootInterface::getBranchEntry RootEventBaseCnv::TObjectToDataObject OfflineEventLoopMgr::executeEvent Algorithms::execute Finalize Algorithms OfflineEventLoopMgr::finalize Release Event Selector Release Services

RootInterface::currentFileName New file ? Old file ? Read new tag file Get next entry of tag file Return eventId Get the first entry of tag file The end of tag file? no yes RootInterface::setEOF Return eventId The end of input file list? yes no No more input New file

Performance test All (analyzing full dst files) 3 dst files as input Skim (analyzing skimmed dst files) Skim events with totalCharged=2 from full dst files Tag (tag based analysis) Only read events with totalCharged=2 through tag all skim tag CPU time (test 1) 402 s 170 s 177 s CPU time (test 2) 377 s 270 s CPU time of tag based analysis is similar with directly analyzing skimmed DST files, much less than analyzing full DST files. Tag based analysis can get exactly the same result as analyzing skimmed DST files

Tag based analysis jobOptions #include "$ROOTIOROOT/share/jobOptions_ReadRec.txt" #include "$VERTEXFITROOT/share/jobOptions_VertexDbSvc.txt" #include "$MAGNETICFIELDROOT/share/MagneticField.txt" #include "$ABSCORROOT/share/jobOptions_AbsCor.txt" #include "$RHOPIALGROOT/share/jobOptions_Rhopi.txt" TagFilterSvc.tagFiles = { "tag_run_0009947_All_file001_SFO-1.root", "tag_run_0009947_All_file001_SFO-2.root", "tag_run_0009947_All_file002_SFO-1.root" }; TagFilterSvc.Criteria = "[4]==2"; EventCnvSvc.selectFromTag = 1; Input TAG files Pre-selection criteria Turn on tag based analysis

Discussions User interface One TAG file for each DST file, can be produced during or after reconstruction Physics groups or individual users can define the tag files Location of DST file saved in the corresponding TAG file Specify only tag files in analysis job Performance Size of TAG file is ~1/700 of DST file, depending on what saved in TAG CPU time: similar with analyzing skimmed DST files How many users will use this? Pre-selection(2 prong, 4 prong, ……), replace skimmed data

Data processing with TAG Data production job: Recon. Algs + TagWriterAlg file1.raw file1.dst, file1.tag DST and TAG files can be produced together in one job Tag select job: TagWriterAlg file1.tag, file2.tag… file1_s.tag, file2_s.tag… Physics analysis job: RhopiAlg Analyzing dst files with tag file1.dst, file2.dst… ntuple file1_s.tag, file2_s.tag… input output

Data processing with TAG Data production job: Recon. Algs file1.raw file1.dst Tag writer job: TagWriterAlg file1.dst, file2.dst… file1.tag, file2.tag… DST and TAG files can be produced seperately Tag select job: TagWriterAlg file1.tag, file2.tag… file1_s.tag, file2_s.tag… Physics analysis job: RhopiAlg file1.dst, file2.dst… ntuple file1_s.tag, file2_s.tag…

Tag based analysis jobOptions #include "$ROOTIOROOT/share/jobOptions_ReadRec.txt" #include "$VERTEXFITROOT/share/jobOptions_VertexDbSvc.txt" #include "$MAGNETICFIELDROOT/share/MagneticField.txt" #include "$ABSCORROOT/share/jobOptions_AbsCor.txt" #include "$RHOPIALGROOT/share/jobOptions_Rhopi.txt" // Input REC or DST file name EventCnvSvc.digiRootInputFile = { "/besfs2/offline/data/664-1/jpsi/dst/090612/run_0009947_All_file001_SFO-1.dst", "/besfs2/offline/data/664-1/jpsi/dst/090612/run_0009947_All_file001_SFO-2.dst", "/besfs2/offline/data/664-1/jpsi/dst/090612/run_0009947_All_file002_SFO-1.dst" }; EventCnvSvc.tagInputFile = { "sel_tag_run_0009947_All_file001_SFO-1.root", "sel_tag_run_0009947_All_file001_SFO-2.root", "sel_tag_run_0009947_All_file002_SFO-1.root" EventCnvSvc.selectFromTag = 1; // Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) MessageSvc.OutputLevel = 5; // Number of events to be processed (default is 10) ApplicationMgr.EvtMax = -1; ApplicationMgr.HistogramPersistency = "ROOT"; NTupleSvc.Output = { "FILE1 DATAFILE='rhopi.root' OPT='NEW' TYP='ROOT'"}; Input DST files Input TAG files Flag to switch on/off tag based analysis

Performance test: Skim vs Tag All (Analyzing full dst files) Input files of all.txt -rw-r--r-- 1 offline physics 543118149 Aug 7 2013 /besfs2/offline/data/664-1/jpsi/dst/090612/run_0009947_All_file001_SFO-1.dst -rw-r--r-- 1 offline physics 540516509 Aug 7 2013 /besfs2/offline/data/664-1/jpsi/dst/090612/run_0009947_All_file001_SFO-2.dst -rw-r--r-- 1 offline physics 561185351 Aug 7 2013 /besfs2/offline/data/664-1/jpsi/dst/090612/run_0009947_All_file002_SFO-1.dst Skim (Analyzing skimmed dst files) Skim events with otalCharged = 2 from the above 3 dst files, and output another 3 skimmed dst files Input files of flt.txt [dengzy@lxslc601 TestRelease]$ ls /besfs/users/dengzy/tag/filter/ -al -rw-r--r-- 1 dengzy physics 154819029 Mar 23 11:02 f_run_0009947_All_file001_SFO-1.dst -rw-r--r-- 1 dengzy physics 155643513 Mar 23 11:03 f_run_0009947_All_file001_SFO-2.dst -rw-r--r-- 1 dengzy physics 163040637 Mar 23 11:04 f_run_0009947_All_file002_SFO-1.dst Tag (tag based analysis) Input files of tag.txt Input files of all.txt + tag files Size of TAG file is 1/740 of DST file, information included in TAG ROOT file entry, run_number, event_number, total_charged, total_neutral, total_tracks [dengzy@lxslc601 test]$ tail all.txt.bosslog 402.555u 5.716s 7:02.05 96.7% 0+0k 7696+69992io 71pf+0w [dengzy@lxslc601 test]$ tail flt.txt.bosslog 170.829u 2.029s 3:05.98 92.9% 0+0k 5792+29240io 26pf+0w [dengzy@lxslc601 test]$ tail tag.txt.bosslog 177.372u 3.356s 3:22.94 89.0% 0+0k 5464+29224io 19pf+0w CPU time of tag based analysis is similar with directly analyzing skimmed DST files, much less than analyzing full DST files.

Performance test: Skim vs Tag All (analyzing full dst files) [dengzy@lxslc601 test]$ tail all.txt.bosslog 377.597u 5.108s 6:42.43 95.0% 0+0k 6056+69872io 36pf+0w Skim (analyzing skimmed dst files) [dengzy@lxslc601 test]$ tail flt.txt.bosslog 270.437u 2.789s 4:54.09 92.9% 0+0k 4576+29120io 6pf+0w Tag (tag based analysis) [dengzy@lxslc601 test]$ tail tag.txt.bosslog 167.323u 3.059s 3:11.37 89.0% 0+0k 5872+29184io 20pf+0w

Performance test: Skim vs Tag [dengzy@lxslc601 test]$ tail tag.txt.bosslog total number: 64131 nGood==2, nCharge==0: 20816 nGam>=2: 6487 Pass Pid: 4250 Pass 4C: 513 Pass 5C: 394 J/psi->rho0 pi0: 105 ApplicationMgr INFO Application Manager Finalized successfully ApplicationMgr INFO Application Manager Terminated successfully 177.372u 3.356s 3:22.94 89.0% 0+0k 5464+29224io 19pf+0w [dengzy@lxslc601 test]$ tail flt.txt.bosslog 170.829u 2.029s 3:05.98 92.9% 0+0k 5792+29240io 26pf+0w