f1c2b27da8085b561aa6608bdf0ac0e9.ppt
- Количество слайдов: 25
ATLAS Cosmic Muon Reconstruction A Brief Tutorial Tiesheng Dai & Steven Goldfarb US–ATLAS Muon Alignment & Calibration Software Workshop Boston University – 18 Dec 2008
The Tutorial Primary Goals § § Find cosmic muon data Reconstruct that data in the Muon Spectrometer with athena Create and Modify Calibration N-Tuples and AANT Analyze the data in those N-Tuples What We Won’t Do § § Explain athena or the Muon reconstruction algorithms Spend much time on the technical issues of installation / running Run in batch or on the grid (or therefore over many events) Debug, calibrate & align the detector (exercise for the student) Calibration N-Tuple Raw Data athena AANT Wiki Instructions https: //hep. pa. msu. edu/twiki/bin/view/AGLT 2/Muon. Reco Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 2
Finding The Data CERN Online Raw Data /castor/cern. ch/grid/atlas/DAQ/2008 /castor/cern. ch/grid/atlas/DAQ/M 7 (May-July 2008) CERN Offline Data /castor/cern. ch/grid/atlasdatadisk/data 08_X/Y X = 1 beammag, calib, cosmag, cvalid and idcomm, Y = RAW, AOD, ESD, CBNT, TAG § Common Castor Commands: nsls, rfdir, rfcp (see user guide in Software wiki pages) AGLT 2 (ATLAS Great Lakes Tier 2) § /pnfs/aglt 2. org/data/daits/mdaq/ NOTE: Muon Data Only (stripped to MDT, CSC, RPC, TGC, Trig) § DCACHE Commands: ls, dir, dccp BNL (ATLAS Tier 1) [Muon Data Only of Run 91060] § /pnfs/usatlas. bnl. gov/u 06/daits/mdaq/ BU (ATLAS Tier 2) [Muon Data Only of Run 91060] § NFS: /data 4/bu/daits/mdaq/ More Information: § http: //atlas-runquery. cern. ch Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 3
Finding The Data DQ 2 https: //twiki. cern. ch/twiki/bin/view/Atlas/Work. Book. DQ 2 § Setting Up 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; /afs/usatlas. bnl. gov/Grid/Don-Quijote/DQ 2 Clients/setup. [c]sh • DQ 2_LOCAL_SITE_ID = BNL-OSG 2_DATATAPE § Grid Certificate Needed for voms-enabled proxy § https: //www. racf. bnl. gov/docs/howto/grid § Some Basic Commands: § List: dq 2 -ls –f data 08_cos. 00091060. physics_TGCw. Beam. daq. RAW. o 4 § Copy: dq 2 -get data 08_cos. 00091060. physics_TGCw. Beam. daq. RAW. o 4 § But, what are you doing copying a raw data set, anyway? § Better to run on the grid, at CERN, or at a Tier 1 or Tier 2 site. Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 4
Installing & Running The Software The Scripts § Tutorial Based on Scripts of Tiesheng § Installation of software and setup of environment § Running of reconstruction and filling of n-tuples § Advantages § Limited Time of Tutorial § Simplicity & Robustness § Provides Record of Full Procedure (Copy It!) § Where to Run the Scripts § § § AGLT 2 : ssh -Y myusername@Assigned. Node. For. You (see mail of Bob Ball) OR ssh -Y myusername@umt 3 int 0 X. physics. lsa. umich. edu (X=1, 2, 3) CERN : ssh -Y myusername@lxplus. cern. ch OR any CERN linux machine with AFS BNL : ssh -Y myusername@atlasgw. bnl. gov, rterm -i BU : ssh -Y myusername@atlas-login. bu. edu (no package checkout) Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 5
The Installation Script Example Usage: ~daits/public/scripts/install. Prod. Muon. Rec 14. 5. 0. 1 -checkout Muon. Spectrometer/Muon. Calib. Ntuple Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 6
The Installed Environment Directories § Atlas. Production/ § § § cmthome : requirements file and initial setup scripts; Muon. Spectrometer : any packages that were checked out; Install. Area : libraries and links for checked out packages; data 08 list : 2008 data file lists; run. Ctrl : python job. Option files and full setup script; job : Scripts to process data. § Caution: § Script will not overwrite any existing package unless “update” option used. • Still, be careful if you are editing files in the packages Note By default, the Tier Centers install the distribution kits. The script option –KITDIR allows the user to point to one of those kits explicitly. If Athena. Production was not included in that kit, the script will find the right tag for the release and install it. Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 7
Running The Run Scripts § jobs/run_using_default § reads data directly (castor at CERN, DCACHE for BNL, AGL 2) § ESD not written § jobs/run_using_local_disk § copies data to local area (/tmp/username) from DCACHE or castor § Both § ESD writing turned off § data. File. Name and number. Event can be specified as input to script § Example mkdir test; cd test. . /job/run_using_local_disk ! 10 § Runs reconstruction on 10 events of the default data set § New Files Produced § Calibration. Ntuple. root § ntuple. root (Muon AANT) We’re Done!!! § But, what did we do? Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 8
Inside Install. Prod. Muon. Rec (1) Create cmthome/requirements According to the Machine / Environment use athena kit location install area cvs kserver Set up CMT environment for version of CMT source $CMTDIR/$CMTVERS/mgr/setup. sh Build the setup scripts cmt config Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 9
Inside Install. Prod. Muon. Rec (2) Install the package from the kit, using pacman Example of a private installation: ~daits/public/scripts/install. Prod. Muon. Rec 14. 5. 0. 1 -kitdir /afs/atlas. umich. edu/athena/ Obtain AFS token (KERBEROS 4) if necessary kinit -4 cern. User. Name@CERN. CH Setting Up CVS and CMT CERN: CVSROOT=: gserver: isscvs. cern. ch: /local/reps/atlas; CMT=cmt BNL: CVSROOT=/afs/usatlas. bnl. gov/software/cvs; CMT=bnl_cmt AGLT 2: CVSROOT=: kserver: atlas-sw. cern. ch: /atlascvs; CMT=cmt BU Tier 2: CVSROOT=: kserver: atlas-sw. cern. ch: /atlascvs; CMT=cmt Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 10
Inside Install. Prod. Muon. Rec (3) Setup ATHENA Environment § Shell & athena Environment /bin/sh cd ~/work/p 14. 5. 0. 1 source. /runctrl/setup. sh § get AFS token if necessary Check Out and Install Packages § Explicit tag used when provided, else uses correct tag for Release cmt show versions Muon. Spectrometer/Muon. Reconstruction/Muon. Rec. Example § Example checkout and build: cmt co –r Muon. Rec. Example-01 -01 -20 Muon. Spectrometer/Muon. Reconstruction/Muon. Rec. Example (use bnl_cmt at BNL Tier 1) cd ~/work/p 14. 5. 0. 1; unset CMTPATH; source cmthome/setup. sh –tag=32, 14. 5. 0 cd Muon. Spectrometer/Muon. Reconstruction/Muon. Rec. Example/cmt; source setup. sh; gmake Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 11
Inside Install. Prod. Muon. Rec (4) Find and Link to Data File Lists § According to user’s request Generate Setup Script § Example for Atlas. Production from Kit: Modify job. Options to account for user’s requests, data sets, etc. § Muon. Data. Rec_my. Top. Options. py Generate run scripts for cosmics Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 12
Moving On After The Tutorial Making Changes to the job. Options and Running mkdir myinstallarea/Atlas. Production/work cd myinstallarea/Atlas. Production/work source. . /run. Ctrl/setup. sh cp. . /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 Running on More or Different Data § Using Castor § https: //twiki. cern. ch/twiki/bin/view/Atlas/Work. Book. Castor § Using DCACHE § https: //www. racf. bnl. gov/Facility/dcache/ § https: //hep. pa. msu. edu/twiki/bin/view/AGLT 2/DCache. Notes Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 13
More On job. Options Muon. Data. Rec_my. Top. Options. py § Settings for Tutorial § § ESD output : 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 (run 91897 with CSC) : muon. Rec. Flags. do. CSCs=False § Read Multiple Data Files § athena. Common. Flags. BSRDOInput. set_Value_and_Lock([ ‘FILE 1’, ‘FILE 2’, …]) Muon. Rec. Flags. py § Where to Find the File Muon. Spectrometer/Muon. Reconstruction/Muon. Rec. Example/python/ § Modify with Care More Examples § Modified files ~daits/public/demo_for_14. 5. 0. 1 Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 14
Reading Calibration Constants From SQLLite Muon. Rec. Flags. py § Create New Flag: use. MDTCalib. SQLLite Add these lines after the use. Alignment. Corrections flag to define this flag. Muon. Read. Calib. py § Change: to: Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 15
Adding Content to the Calibration N-Tuple Muon. Spectrometer/Muon. Calib. Ntuple/Muon. Event. Ntuple Branch. h § Add line: int dummy. For. Test; before: int event. Number; Muon. Spectrometer/Muon. Calib. Ntuple/src/Muon. Event. Ntuple. Branch. cxx § § Add line: branch. Creator. create. Branch( tree, "dummy. For. Test" , &dummy. For. Test, "/I“ ); before: branch. Creator. create. Branch( tree, "event. Number" , &event. Number, "/I" ); Add line: dummy. For. Test = 1; before: run. Number = event. Info. run. Number(); Build the Code ~daits/public/scripts/install. Prod. Muon. Rec 14. 5. 0. 1 -checkout no -compile Muon. Spectrometer/Muon. Calib. Ntuple Run the Code. . /job/run_using_local_disk Take a Quick Look at the N-Tuple to See if it Worked ~daits/public/scripts/generator_cppfile_for_calib. Ntuple Calibration. Ntuple. root mytest more mytest. h Here it is! Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 16
More On the N-Tuples What To Use § AANTP will NO LONGER be produced in central production § Muon Calibration N-Tuple WILL be produced § Tracking Contents § Moore Track Parameters in Calibration N-Tuple for 14. 5. 0. 1 § Muonboy Track Parameters in later releases (not yet segments) Documentation § Muon Calibration N-tuple https: //twiki. cern. ch/twiki/bin/view/Atlas/Muon. Calib. Ntuple § Muon Spectrometer Nomenclature https: //hep. pa. msu. edu/twiki/pub/AGLT 2/Muon. Reco/MS_Naming. ppt § Muon AANT for raw data https: //twiki. cern. ch/twiki/bin/view/Atlas/Muon. Comm. Raw. Data. Ana § Muon AANT for MOORE tracking https: //twiki. cern. ch/twiki/bin/view/Atlas/Moore. Ntuple § Muon AANT for Muonboy tracking http: //cern. ch/atlas-samusog/muonboy/Doc. Ntuples/CBNT_Muon. html Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 17
Analyzing The Calibration N-Tuple User Analysis Example: mytest § Create a work area for analysis and run Tiesheng’s script mkdir ~/work/p 14. 5. 0. 1/anal; cd ~/work/p 14. 5. 0. 1/anal ~daits/public/scripts/generate_cppfile_for_calib. Ntuple. . /test/Calibration. Ntuple. root mytest root -l TFile *my = new TFile(“. . /test/calibration. Ntuple. root") my->ls() my->cd("Pattern. Ntuple. Maker") Segments->Make. Class(“mytest"). q § Modify mytest. h to include more ntuple files: § Replace mytest: : mytest(TTree *tree) by § Or copy ~daits/public/muon_calib_ntup_demo/mytest. h Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 18
Analyzing The Calibration N-Tuple User Analysis Example: mytest (2) § Add code to mytest. C § Here is an example from ~daits/public/muon_calib_ntup_demo/mytest. C Open new root file for output Book histograms Fill histograms Write plots to root file Make plot Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 19
Analyzing The Calibration N-Tuple User Analysis Example: mytest (3) § Perform the Analysis ~daits/public/scripts/run_cppfile mytest root -l. L mytest. C mytest p p. Loop(). q § Take a look at All_plots. pdf and mytest. root Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 20
Useful Analysis Tools for Calibration N-Tuple Some Expert Code § Decoding the Identifiers: ~daits/public/scripts/muonfixedid. h (Code from Ed Diehl to decode muonfixedid into type, station, eta, phi) § Checking and Merging N-Tuples: ~daits/public/scripts/checknt. sh (also from Ed) § Other examples out there from other experts Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 21
Analysis of Muon AANT Similar to Calibration N-Tuple § Create mytest. h and mytest. C ~daits/public/scripts/generate_cppfile_for_muon. Ntuple. . /test/ntuple. root mytest § Modify the files as in Examples from Tiesheng for 14. 5. 0. 1: ~daits/public/muon_AA_ntup_demo/ § Chaining AANT files: TChain *f = new TChain("Collection. Tree"); § Running the Analysis ~daits/public/scripts/run_cppfile mytest Note: N-Tuples are often Athena version-dependent! Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 22
Experts Who To Ask When You Have Questions or Problems Topic Contact Questions Specific to the Tutorial Tiesheng Dai, Steven Goldfarb General Muon Software Issues hn-atlas-muon. SW@cern. ch, Stephane Willocq, Rosy Nikolaidou, Ed Moyse, Kevin Black Finding the Data http: //atlas-runquery. cern. ch, Tiesheng Dai MOORE Reconstruction hn-atlas-muon. SWReconstruction@cern. ch, Niels van Eldik Muonboy Reconstruction hn-atlas-muon. SWReconstruction@cern. ch, samusog@cern. ch ATLAS Database Technical Issues atlas-db-help@cern. ch, Vakho Tsulaia, Emil Obreshenkov Muon COOL Database Monica Verducci MDT Calibration Database Oliver Kortner, Domizia Orestano Calibration N-Tuple & Software Felix Rauscher, Ed Diehl MDT Alignment Christoph Amelung (Endcap), Pierre-Francois Giraud (Barrel) MDT Alignment Software Rob Harrington TGC Issues Masaya Ishino CSC Issues Woochun Park, Michael Schernau RPC Issues Gabriele Chodini Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 23
Summary What We Have Covered § How to Find Raw Cosmic Muon Data § How to Reconstruct that Data to Produce N-Tuples § How to Add Information to those N-Tuples § How to Analyze those N-Tuples The Scripts § Run them on the machine of your choice § More Important: Copy them and use them as examples § Available at CERN, BNL, AGLT 2, BU § § ~daits/public/scripts/ ~daits/public/demo_for_14. 5. 0. 1/ ~daits/public/muon_calib_ntup_demo/ ~daits/public/muon_AA_ntup_demo/ Enjoy! Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 24
Tiesheng’s Christmas Card Merry Christmas and Happy New Year Boston - 18 Dec 2008 T. Dai & S. Goldfarb - Univ of Michigan MDT Config DB - Slide 25
f1c2b27da8085b561aa6608bdf0ac0e9.ppt