- Количество слайдов: 27
Muon Reconstruction Tutorial 1. Find raw data; 2. Use ATHENA for muon reconstruction; 3. Look calibration NTUPLEs. Tiesheng Dai, Steven Goldfarb Dec. 18 -19, 2008 at Boston Univ. US Muon Alignment and Calibration Software Workshop
Find Raw Data • CERN online: /castor/cern. ch/grid/atlas/DAQ/2008, /castor/cern. ch/grid/atlas/DAQ/M 7 for May, June and early July 2008 data • CERN offline, where raw data are organized as /castor/cern. ch/grid/atlasdatadisk/data 08_X/Y (X = 1 beammag, calib, cosmag, cvalid and idcomm, Y = RAW for raw data, AOD, ESD, CBNT, TAG … for reco. ). nsls, rfdir and rfcp to list and copy CASTOR file. • AGLT 2, Muon Data (MDT+CSC+TGC+RPC+TRIG) only: /pnfs/aglt 2. org/data/daits/mdaq/ (all files on DISK), ls and dir to list DCACHE file and dccp for copy file. • BNL, Muon Data only and only single run 91060 at DCACHE: /pnfs/usatlas. bnl. gov/u 06/daits/mdaq/. • BU, Muon Data only and only single run 91060 at NFS: /data 4/bu/daits/mdaq/ • Get more information about raw data and run at http: //atlas-runquery. cern. ch/
Using DQ 2 to Find Raw Data https: //twiki. cern. ch/twiki/bin/view/Atlas/Work. Book. DQ 2 Setup DQ 2 • CERN : /afs/cern. ch/atlas/offline/external/GRID/ddm/DQ 2 Clients/setup. [c]sh • AGLT 2 : $LCG_ENV/grid_env. [c]sh and $DQ 2_ENV/setup. [c]sh • BNL : /afs/usatlas. bnl. gov/lcg/current/etc/profile. d/grid_env. [c]sh and /afs/usatlas. bnl. gov/Grid/Don-Quijote/DQ 2 Clients/setup. [c]sh, define GLOBAL variable DQ 2_LOCAL_SITE_ID as BNL-OSG 2_DATATAPE • BU : Please talk to manager for details if needed. Need GRID Certificate (obtain at http: //www. doegrids. org/) Obtain an ATLAS voms-enabled proxy by voms-proxy-init -voms atlas List dataset: dq 2 -ls –f data 08_cos. 00091060. physics_TGCw. Beam. daq. RAW. o 4 Copy dataset: dq 2 -get data 08_cos. 00091060. physics_TGCw. Beam. daq. RAW. o 4 Warning: Need lots of space to copy RAW data and takes time!
Support All scripts used in this tutorial are supported for CERN Tier 0, BNL Tier 1, AGLT 2 and BU Tier 2/3. Login • AGLT 2 : ssh -Y [email protected] Node. For. You OR ssh -Y [email protected] 3 int 0 X. physics. lsa. umich. edu (X=1, 2, 3) • CERN : ssh -Y [email protected] cern. ch OR your CERN workstation with AFS supported. • BNL : ssh -Y [email protected] bnl. gov, then rterm -i • BU : ssh -Y [email protected] bu. edu You are encouraged to use CERN or BNL for tutorial. At BU Tier 2, no package checkout (= not possible to make change).
Install ATHENA Muon Reconstruction Install and checkout Muon Calibration Ntuple Package for later usage ~daits/public/scripts/install. Prod. Muon. Rec 14. 5. 0. 1 -checkout Muon. Spectrometer/Muon. Calib. Ntuple
Installed Folders By default, ATHENA distribution kit from production team is used at Tier centers (option –KITDIR to point wanted kit location). If required Atlas. Production release is not installed on ATHENA kit, corresponding release will be installed under Atlas. Production in installation area (example on slide 10). Normally, one will see: • cmthome : requirement file and initial setup scripts; • Muon. Spectrometer : contain checkout packages; • Install. Area : contain libraries and links for user/checout packages; • data 08 list : contain 2008 data file lists; • run. Ctrl : control datacard and full setup script; • job : Scripts to process data.
Processing Cosmic Ray Data Two scripts to process data under fold job. run_using_default : read data file directly from its stored area, where CERN read from CASTOR, BNL and AGLT 2 read from DCACHE, settings are default no writing ESD. run_using_local_disk : copy data files from CASTOR or DCACHE to local area (/tmp/username), where using DCACHE or CASTOR is demonstrated. Both script accept data input and number events to be processed as shown: Process cosmic ray under installation area: mkdir test; cd test; . . /job/run_using_local_disk ! 10 will get Calibration. Ntuple. root and muon NTUPLE ntuple. root
Good to Know Details for Muon Reconstruction Installation for example do by yourself (Script Install. Prod. Muon. Rec)
Install. Prod. Muon. Rec (1) • Find out the installation side to locate ATHENA distribution kits and define proper environment and used commands; • Under cmthome, create requirement file Using ATHENA kit location User install area K Server for CVS checkout • Setup cmt and do cmt config to make general setup scripts inside cmthome.
Install. Prod. Muon. Rec (2) • If package Atlas. Production is not in ATHENA distribution kit for the release, will use pacman to install it. For example, using private kit at AGLT 2: ~/public/scripts/install. Prod. Muon. Rec 14. 5. 0. 1 -kitdir /afs/atlas. umich. edu/athena/ Install package Atlas. Proudction in installation area under Atlas. Production • Kill left over process from pacman, and do clean up; • If Atlas. Production release is installed both from user and ATHENA kit, user installation will be used; • Obtain AFS token (KERBERS 4) if necessary.
CVSROOT and CMT command • • CERN : gserver: isscvs. cern. ch: /local/reps/atlas, cmt BNL /afs/usatlas. bnl. gov/software/cvs, bnl_cmt AGLT 2 : kserver: atlas-sw. cern. ch: /atlascvs, cmt BU Tier 2 : kserver: atlas-sw. cern. ch: /atlascvs, cmt AFS Token AFS token (KERBERS 4) need to be obtained by using kinit -4 cern. User. [email protected] CH In case no AFS support for computers outside CERN, one could use ssh method (not recommended) : http: //www. triumf. info/wiki/atlas-triumf/index. php/Set_up_CVS_access WARNING: you will not get AFS token for your CERN login without password, you need to modify. ssh/config to enable password when login to CERN nodes with AFS home directory (could be painful).
Install. Prod. Muon. Rec (3) Need proper ATHENA setup to try following things, do as following: 1) /bin/sh if you are using csh/tcsh or you do not know your login shell 2) Go to your installation area 3) source. /runctrl/setup. sh and get AFS token if necessary. • Find out packages need to be checked out and its tag. If user gives package without tag, latest tag in the release will be used. cmt show versions Muon. Spectrometer/Muon. Reconstruction/Muon. Rec. Example gives used package tag in release from ATHENA kit and user installation. • Checkout packages and compile them cmt co –r Muon. Rec. Example-01 -01 -20 Muon. Spectrometer/Muon. Reconstruction/Muon. Rec. Example checks out package (use bnl_cmt at BNL Tier 1 please). To compile, do as following: 1) Go to your installation area. Do: unset CMTPATH; source cmthome/setup. sh –tag=32, 14. 5. 0 2) cd Muon. Spectrometer/Muon. Reconstruction/Muon. Rec. Example/cmt; source setup. sh; gmake • Compile packages required by user.
Install. Prod. Muon. Rec (4) • Find data file lists and link it. • Generate setup script accordingly, following is setup script where package Atlas. Production is in ATHENA kit. • Get Muon. Data. Rec_my. Top. Options. py and modify it to use right input data file and turn off ESD writing. • Generate run scripts for cosmic ray data processing.
Processing Data By Yourself • Make sure you are not using csh/tcsh, otherwise do /bin/sh (or if you do not know your login shell); • Go to your favour location; • source your. Installation. Area/run. Ctrl/setup. sh • cp your. Installation. Area/run. Ctrl/Muon. Data. Rec_my. Top. Options. py. • Modify Muon. Data. Rec_my. Top. Options. py as you need. • athena. py –s Muon. Data. Rec_my. Top. Options. py Want to know more about CASTOR at CERN, visit web page: https: //twiki. cern. ch/twiki/bin/view/Atlas/Work. Book. Castor Want to know more about DCACHE at BNL and AGLT 2, visit web pages: https: //www. racf. bnl. gov/Facility/dcache/ and https: //hep. pa. msu. edu/twiki/bin/view/AGLT 2/DCache. Notes
Existing Controls Muon. Data. Rec_my. Top. Options. py • ESD output flag : rec. do. Write. ESD = False • MDT segment T 0 fit : muon. Rec. Flags. do. Segment. T 0 Fit = False • Alignment correction : muon. Rec. Flags. use. Alignment. Corrections = True • Detector Control, such as CSC (run 91897 with CSC) : muon. Rec. Flags. do. CSCs=False • Data inputs, following is how to read multiple data files: athena. Common. Flags. BSRDOInput. set_Value_and_Lock([ ‘FILE 1’, ‘FILE 2’, ‘FILE 3’, …, ‘FILEN’ ]) Muon. Rec. Flags. py has more controls, change with care, it is under Muon. Spectrometer/Muon. Reconstruction/Muon. Rec. Example/python/ Rest examples, modified code can be found at ~daits/public/demo_for_14. 5. 0. 1/
New Flag and Use SQLLite DB Add flag use. MDTCalib. SQLLite in Muon. Rec. Flags. py at Muon. Spectrometer/Muon. Reconstruction/Muon. Rec. Example/python/ Add following lines after flag use. Alignment. Correction defination to introduce flag use. MDTCalib. SQLLite Use SQLLite DB to obtain MDT calibration constants (useful for calibration constant validation using data) in Muon. Read. Calib. py at Muon. Spectrometer/Muon. Reconstruction/Muon. Rec. Example/python/ change Note: Must turn on flag and get sqllite. db from Ed Diehl and link from run area
Add Things to Calibration NTUPLE 1. Modify Muon. Event. Ntuple. Branch. h at Muon. Spectrometer/Muon. Calib. Ntuple/Muon. Calib. Ntuple/ Add newline “int dummy. For. Test; ” before line “int event. Number; ” 2. Modify Muon. Event. Ntuple. Branch. h at Muon. Spectrometer/Muon. Calib. Ntuple/src/ Add newline “branch. Creator. create. Branch( tree, "dummy. For. Test" , &dummy. For. Test, "/I“ ); ” before line “branch. Creator. create. Branch( tree, "event. Number" , &event. Number, "/I" ); ” Add newline “dummy. For. Test = 1; ” before line “run. Number = event. Info. run. Number(); ” 3. Compile (option –checkout no to ignore get AFS token): ~daits/public/scripts/install. Prod. Muon. Rec 14. 5. 0. 1 -checkout no -compile Muon. Spectrometer/Muon. Calib. Ntuple 4. RUN : mkdir test; cd test; . . /job/run_using_local_disk 5. Look calibration ntuple ~/public/scripts/generate_cppfile_for_calib. Ntuple Calibration. Ntuple. root mytest more mytest. h: Got it! WARNING: Be careful in changing include file, may has effect on other package
Muon Calibration and AA Ntuple • Only MUON calibration NTUPLE will be produced officially in production, where MUON (AA) NTUPLE is not the case. It is recommended that MUON calibration NTUPLEs are used for analysis. • Recently, MOORE tracking are added into MUON calibration NTUPLE. , where Muonboy tracking is not in 14. 5. 0. 1 but has been put in. Segments from Muonboy are still not available but will be so in the near future. Useful Documents 1. Muon calibration ntuple documents : https: //twiki. cern. ch/twiki/bin/view/Atlas/Muon. Calib. Ntuple 2. Muon Spectrometer Nomenclature : https: //hep. pa. msu. edu/twiki/pub/AGLT 2/Muon. Reco/MS_Naming. ppt 3. Muon (AA) NTUPLE for raw data : https: //twiki. cern. ch/twiki/bin/view/Atlas/Muon. Comm. Raw. Data. Ana 4. Muon (AA) NTUPLE for MOORE tracking : https: //twiki. cern. ch/twiki/bin/view/Atlas/Moore. Ntuple 5. MUON (AA) NTUPLE for Muonboy tracking : http: //atlas-samusog. web. cern. ch/atlas-samusog/muonboy/Doc. Ntuples/CBNT_Muon. html
Start to Work on Calibration NTUPLE Use mytest as ROOT C++ filename as example for this talk Generate mytest. h and mytest. C : Pickup your favor location, for instance anal at installation area mkdir anal; cd anal root -l TFile *my = new TFile(“. . /test/calibration. Ntuple. root") my->ls() my->cd("Pattern. Ntuple. Maker") Segments->Make. Class(“mytest"). q ~daits/public/scripts/generate_cppfile_for_calib. Ntuple. . /test/Calibration. Ntuple. root mytest Modify mytest. h to include more ntuple files by replacing procedure mytest: : mytest(TTree *tree) by : or simply copy ~daits/public/muon_calib_ntup_demo/mytest. h
Simple Code for Calibration NTUPLE Modify mytest. C ( cp ~daits/public/muon_calib_ntup_demo/mytest. C. ) Open new root file for output Book histograms Filling histograms Write plots to root file Make plot
Process Calibration NTUPLE ~daits/public/scripts/run_cppfile mytest one gets picture All_plots. pdf and root output file mytest. root -l. L mytest. C mytest p p. Loop(). q
Useful Tools for Calibration Ntuple Many tools to look calibration NTUPLEs, if you want to use those tools, talk to MUON calibration people. For instance Ed Diehl has provided ROOT muonfixedid class to find a hit belongs to which MUON station. In muon calibration NTUPLE, hit ID is muonfixedid where detector type, station, eta and phi are coded as single number. To understand hit ID, one needs to decode it. Existing ROOT muonfixedid class does for you, get it from : ~daits/public/scripts/muonfixedid. h ~daits/public/scripts/checknt. sh to check and merge calibration NTUPLE (from Ed Diehl). ……
For Muon AA NTUPLE Use mytest as ROOT C++ filename as example for this talk Similar procedure to look muon AA ntuple, generate mytest. h and mytest. C root -l TFile *my = new TFile(“. . /test/ntuple. root") my->ls() Collection. Tree->Make. Class(“mytest"). q ~daits/public/scripts/generate_cppfile_for_muon. Ntuple. . /test/ntuple. root mytest Modify mytest. h and mytest. C, for simple example for ATHENA 14. 5. 0. 1 one can get them from ~daits/public/muon_AA_ntup_demo/, to chain files, use TChain *f = new TChain("Collection. Tree"); To process NTUPLES ~daits/public/scripts/run_cppfile mytest WARNING: NTUPLE could be different from different ATHENA version
Contacts for Help 1. Muon software general issue : Rosy Nikolaidou, Stephane Willocq, Ed Moyse and Kevin Black; 2. MOORE reconstruction : Niels Van Eldik or Stephane Willocq 3. Muonboy reconstruction : Saclay group [email protected] ch 4. General DB issue : Vakho Tsulaia or Emil Obreshkov 5. MDT COOL DB : Monica Verducci 6. MDT Calibration DB : Domizia Orestano 7. Calibration ntuple and software : Felix Rauscher and Edward Diehl 8. MDT Alignment : Christoph Amelung 9. MDT Alignment software : Robert Harrington 10. TGC : Masaya ISHINO 11. CSC : Woochun Park 12. RPC : Gabriele Chodini Tiesheng Dai and Steven Goldfarb are also happy to answer questions.
Summary • Scripts are provided to do muon reconstruction from raw data, where 4 sites (CERN Tier 0, BNL Tier 1, AGLT 2 and BU Tier 2) are supported; • With single script install. Prod. Muon. Rec, user will be able to install ATHENA, checkout packages, and compile packages after modifications. Also raw data file lists are given! Installed scripts run_using_default and run_using_local_disk allow user to process RAW data to produce muon calibration and AA ntuple; • Examples to add user modifications to ATHENA are given; • Scripts generate_cppfile_from_calib. Ntuple and run_cppfile help user to start muon calibration ntuple analysis and process ntuples. • Scripts generate_cppfile_from_muon. Ntuple and run_cppfile help user to start muon AA ntuple analysis and process ntuples. Wish the tutorial helps for your muon works and analysis
Finally Merry Christmas and Happy New Year