Tutorial: Basic DØ Data Analysis
| Page updated June 14, 2005 |
|
Global references: D0 At Work > Computing & Core Software > Software and Documentation D0 At Work > Physics Groups > Common samples Other more complete tutorials: Software and Documentation > DØ "How To" Documents Marco's software tutorial, Reiner's software tutorial, Reiner's d0tools tutorial, Heidi's data access tutorial |
|
DØ computer accounts clued0 |
|
EDM tutorial d0reco fixing, skimming, d0correct CAF page |
|
SAM Heidi's tutorial |
|
|
Let's have a look at Run 205213. Online and trigger infos: Run database: D0 At Work > TriggerMeister > Online Run Database Files associated with this run: SAM browser: D0 At Work > SAM > Browse the SAM Meta-data > Data Files (Revised) |
For MC, look at: D0 Official MC Production Catalog |
> setup sam
> sam translate constraints --dim="run_number 205213"
> sam translate constraints --dim="run_number 205213 and data_tier thumbnail"
> sam translate constraints --dim="run_number 205213 and data_tier thumbnail \
and file_name recoT_all_0000205213_mrg_%.raw_p17.03.03"
> sam get metadata --file=recoT_all_0000205213_mrg_097-099.raw_p17.03.03
> sam create dataset definition --defname=[your username]-205213-reco --group=dzero --dim="run_number 205213 \
and data_tier thumbnail and file_name like recoT_all_0000205213_mrg_%.raw_p17.03.03"
> sam translate constraints --dim="__set__ [your username]-205213-reco"
|
|
Skimmed data (physical skims + event tags): Common Sample Group > Common Skimming > p17.03.03 Skims > logical skims MC: D0 Official MC Production Catalog |
|
/d0dist/dist/releases/ How To Use the DØ Software Releases, CVS pages |
|
It depends what you want to do ! Status of DØ Production Releases - to reconstruct data: production release certified for reconstruction - to produce Monte Carlo: MC release history - to do analysis with certified objects: d0correct versions > d0rel (gives you the list of available releases) > echo $PATH > setup D0RunII p17.05.00 (this also setup root in the same time) > echo $PATH > echo $BFCURRENT > echo $SRT_QUAL > setup D0RunII p17.05.00 -O SRT_QUAL=maxopt > echo $SRT_QUAL > setenv LINK_SHARED yes > unsetenv LINK_SHARED |
|
/d0dist/dist/packages/ How To Use the DØ Software Releases, D0 CVS Repository Browser, D0 Code Browser, Marco's software tutorial, Reiner's software tutorial |
|
The main framework RCP: runTMBTreeMaker.rcp or runTMBTreeMakerSAM.rcp (contain the "string Packages" line) |
This tutorial uses the p18.01.00 release which is
the recommended release for d0correct at the time of
writing. Please replace p18.01.00 by the release version currently
recommended for running d0correct.
The is a tool that allows you to run every framework program (with the generic command rund0exe). Several specialized scripts exist for standard D0 programs: runreco for d0reco, runTMBAnalyze for tmb_analyze. Here we will use d0tools to run TMBAnalyze_x and create CAF trees. |
Reiner's d0tools tutorial | |||||||||||||||||||||||||||||||
> setup D0RunII p18.01.00 -O SRT_QUAL=maxopt > setup d0tools > runTMBAnalyze -h > cp /work/broglie-clued0/deliot/data/p17/CSskim-MUinclusive-20050508-001120-825095.raw_p17.03.03-first . (or any other thumbnail input file) create a file input.list with the path and name of the input file you just copied. > which TMBAnalyze_x > runTMBAnalyze -filelist=input.list -name=outputDir -fwkparams -num_events 10 or > runTMBAnalyze -filelist=input.list -name=outputDir -num=10 look at the content of the CAF tree you produced (see Root section in this tutorial) located in the ouputDir directory. |
||||||||||||||||||||||||||||||||
We will customize the running of TMBAnalyze_x by changing values in RCPs. We need a local copy of the tmb_analyze package and a release working area for that. > setup d0cvs > newrel -t p18.01.00 work > cd work > ls -altr > d0setwa (specify your working area to the framework) > ls -altr > addpkg tmb_analyze > ls -altr > more tmb_analyze/CVS/Tag > cd tmb_analyze/rcp > cp /d0dist/dist/releases/p18.01.00/tmb_tree_maker/rcp/TMBCorePkg.rcp . (customize the content of the CAF tree by changing the TMBCorePkg.rcp file) > chmod u+w TMBCorePkg.rcp edit the file TMBCorePkg.rcp and modify it or take the one I already modify at:TMBCorePkg.rcp modify the main framework RCP to use the TMBCorePkg.rcp located into tmb_analyze/rcp:(runTMBTreeMaker.rcp)
> cd ../..
> ln -s ../input.list .
> which TMBAnalyze_x
> runTMBAnalyze -filelist=input.list -name=outputDir2 -localfwkrcp -localrcp \
-fwkparams -num_events 10
look at the new content of the CAF tree you produced (see Root section in this tutorial)
|
||||||||||||||||||||||||||||||||
If you need to modify the code itself (or if your program is not built in a release), you will need to build a local version of TMBAnalyze_x.
> cd tmb_analyze/src
edit the file TMBTRefsPkg.cpp and add a printout in the constructor of the TMBTRefsPkg class.
(method: TMBTRefsPkg::TMBTRefsPkg (Context * cntxt))
> cd ../..
> gmake all
> which TMBAnalyze_x
> runTMBAnalyze -filelist=input.list -name=outputDir3 -localbuild -localfwkrcp \
-localrcp -fwkparams -num_events 10
edit outputDir3/TMBAnalyze_x.out and search for your printout !
|
||||||||||||||||||||||||||||||||
CAB stands for D0 Central Analysis Backend. It's a fast cluster of machines to run analysis. You can only run batch job on CAB. > runTMBAnalyze -defname=[your username]-205213-reco -cabsrv1 \ -scratch=[your scratch area] -name=outputDir4 \ -localbuild -localfwkrcp -localrcp -fwkparams -num_events 10 > qstat -u [username] @d0cabsrv1.fnal.govTo run on batch on clude0: cf. d0tools help (runTMBAnalyze -h) |
CAB page | |||||||||||||||||||||||||||||||
example of framework package: header file, source file example to access chunk from an event: header file, source file accessing chunks from an event: How To Analyze a DST, access the certified chunks out of d0correct |
Marco's software tutorial, Reiner's software tutorial |
|||||||||||||||||||||||||||||||
(the uncertified chunks are created by d0reco, the certified ones by d0correct)
+ other chunks containing hits (D0Note 4362). See also list of chunks. |
(need a setup D0RunII first before you can use root)
> cd outputDir
> root -l
> root[] TFile f("CSskim-MUinclusive-20050508-001120-825095.raw_p17.03.03-first.root");
> root[] TBrowser t;
> root[] gDirectory->ls();
> root[] TTree* tr = (TTree*) f->Get("TMBTree")
> root[] tr->Draw("Muon._deteta");
> root[] tr->Draw("Muon._deteta","Muon._isMedium==1");
> root[] .q
|
Root page root/paw translator |
|
Accessing Luminosity Information, lm_access |
|
Here are the different steps. > cd work > setup sam -o -q prd > addpkg lm_access > python lm_access/scripts/makeDatasetParentageList.py [your username]-205213-reco > ls -altrIf you use an official skims, you can save time by using the centrally produced parentage files: see Marco's D0 news Look at the data quality infos of the objects you need: D0 Data Quality Coordination and at the data quality database: Offline Run Quality Database Queries create a file badRunsList and badLBNList > sam translate constraints --dim="__set__ [your username]-205213-reco" create a file list.file with a list of triggers and run range create a file runrange.list with: MUH5_LM15 0 999999 ... > runrange_luminosity file.list . runrange.list > ls -altrYou will have to skip the bad LBN listed in the output file reconstructed_file.list_MUH5_LM15_0-999999.badlbns during your events selection (cf. lm_access). |
This page maintained by Frédéric Déliot