These are instructions to run my root-tuple analysis package "DimuonAnalyze" ---------------------------------------------------- Bruce Hoeneisen 15 March 2002 This package is useful for data analysis and for streeming events. This package makes a chain out of a list of files in a given directory starting with a given letter; then it loops over the Muonid and MuoTrfit branches obtaining several single muon and dimuon histograms; then it presents the histograms to the screen and saves them to the root file "histos.root" and to several .eps files; then it saves selected branches of the "good" events to the root file "newfile.root". How to use it: 1. Copy from d0mino.fnal.gov: ~bruce1/dimu/analysis/DimuonAnalyze_xxxxxx.tar to your area (xxxxxx=ddmmyy is the date I made the tar file; choose the latest). 2. Unpack the tar file: tar xvf DimuonAnalyze_xxxxxx.tar 3. The package makes a chain out of root-tuple files in a given directory that start with a given letter. First edit "merge.C" to select the desired directory (twice, once with and once without a trailing "/"), and the desired letter. 4. Edit DimuonAnalyze.C to select branches and to write or not write "newfile.root" and "histos.root". 5. It is necessary to remake "DimuonAnalyze.h" for the particular release of the root-tuples. Do the following: cp DimuonAnalyze.C DimuonAnalyze.C_bck1 (to save DimuonAnalyze.C) setup n32 setup D0RunII p10.14.01 (for example) root In root (for example): // open a file on the stack (instance f of TFile): TFile f("recoA_reco_all_0000132081_027.raw_p10.14.01.rootx"); // list contents of file pointed to by f: f.ls(); // to see the structure of the TTree named "Global": Global -> Print(); // to see the 10'th entry of the TTree "Global": Global -> Show(10); // to explore the TTree "Global": Global -> StartViewer(); // to make list of variables in file DimuonAnalyze.h Global->MakeClass("DimuonAnalyze"); Now you have the new "DimuonAnalyze.h" and an empty "DimuonAnalyze.C". Restore your "DimuonAnalyze.C": cp DimuonAnalyze.C_bck1 DimuonAnalyze.C 5. To run enter root and .x AllInOne.C 6. To see the histograms later, enter root and, for example: TFile f("histos.root"); f->ls(); TH1F *h1 = (TH1F*)f.Get("hMpmc"); // read histogram hMpmc TH1F *h2 = (TH1F*)f.Get("hMpmf"); // read histogram hMpmf TCanvas *c1 = new TCanvas("c1","c1",600,600); c1->Clear(); c1->Divide(2,2); c1->cd(1); h1->SetLineColor(4); h1->Draw(); c1->cd(2); h2->SetLineColor(2); h2->Draw(); or simply: TFile f("histos.root"); TBrowser b; Then click on the desired histogram. 7. To run in batch mode: Edit a file (e.g. "rsubmit") and put the following lines in it: #!/bin/sh root -q -b /yourarea/AllInOne.C > /yourarea/job.out # don't forget chmod a+x rsubmit to give execute permission, then, to make "root" available: setup n32 setup D0RunII p10.14.01 (or whatever) then submit the file (e.g. if it is called rsubmit) bsub -q medium rsubmit the exact definitions of queues and submit command depends on your machine but this should work on d0mino. (These instructions have contributions from Daria Zieminska, Cecilia Gerber, Stefan Soldner-Rembold, and Ariel Schwartzman. Thanks!)