HOWTOs - Apr 25, 2005 ------------------------ ------------------------ HOWTO check linux system status (hacked?): ------------------------------------------ o who was logged in: last o who is currently logged in: who o check for suspicous processes: ps -aux o check user history files: bash_history o verify package integrity: rpm -Va o run chkrootkit o run rkhunter o look through logs for any abnormal log msgs like panics or errors: /var/log/auth.log o check current network status: netstat o check ethernet interface: ifconfig o change all passwords (user & root) o 'harden' ssh: disable direct root login: /etc/ssh/sshd_config -> PermitRootLogin no only use more secure SSH2 protocol: /etc/ssh/sshd_config & /etc/ssh/ssh_config -> Protocol 2 restart sshd: /etc/init.d/sshd restart o disable ftp/telnet o install logfile scanner: logcheck o prevent root console break-in: enable bootloader password enable BIOS password set HDD as first boot device (o harden the box using Bastille) (o set up Tripwire to monitor files for changes) HOWTO split and merge files in Linux: ------------------------------------- 0. tar -cvf webpage_mar15_2005.tar /var/www/ 1. split -b (for a file size of x byte put in x*1024) 2. cat > ( allows wildcard: xa*) tar -cvf webpage_mar15_2005.tar /var/www/ HOWTO create 2D event displays (d0ve): -------------------------------------- 1. general setup: setup D0RunII setup d0tools // make sure you have a valid kerberos ticket b4 u run pick_events! 2. pick_events: // pick_events selects events from raw data files stored in SAM. The command is // given a file containing a list of events to pick and will create a SAM dataset // for the raw data files containing those events and then submit a job to obtain // the files and extract the specified events into a separate file. // help option: pick_events --help // example eventlist file (eventlist.dat) containing a list of run/evt numbers //-------------------------- // defname = buehler_test_1 // group = dzero // outfile = test_output // // 178468 45613203 //-------------------------- // run pick_events on CAB: pick_events --runmode=cabsrv1 --scratch=/scratch/work/marc/temp/evt_disp/output eventlist.dat // check status of you job with: qstat -u buehler -n @d0cabsrv1.fnal.gov // output should appear in the /scratch/work/marc/temp/evt_disp/output directory 3. runreco // help option: runreco -h setup D0RunII p14.06.01 // mydata.dat contains the absolute path to the input file which was generated by pick_events runreco -format=data -filelist=mydata.dat -cabsrv1 -scratch=/scratch/work/marc/temp/evt_disp/output/reco_output 4. run d0ve_lite // go to the reco_output/D0reco_x-p14.06.01-Linux-mydata.dat... directory d0setwa d0ve_lite // a few empty window pop up // click on: 'file' -> 'open recofile' -> select the 'outputfile_00' file // then click on: 'event loop' -> 'start/resume' // that should display the first selected event! // use 'space' to skip to the next event // to print: 'file' -> 'ps print' -> 'all' (prints all 4 screens for the current event into all.ps) HOWTO create 3D event displays (d0scan): ---------------------------------------- suyong's instructions. doesn't seem to work on maxwell (only tried the first one): setup D0RunII p16.05.01 unsetup mesa (dunno what this does. Mesa is a 3-D graphics library ...) d0scan_qt_d0correct_x -rcp $SRT_PUBLIC_CONTEXT/d0scan_qt/rcp/run_d0scan_qt_off.rcp -input_file /scratch/work/suyong/releases/p140601def/D0reco_x-p14.06.01-maxopt-Linux-wbbcand.txt/outputfile_00 d0scan_qt_d0correct_x -rcp $SRT_PUBLIC_CONTEXT/d0scan_qt/rcp/run_d0scan_qt_off_tmb_corr.rcp -input_file /scratch/work/suyong/releases/tmbfix2/TMBfixer_x-p14.fixtmb2.03-maxopt-Linux-wbb1/TMBfix2-tmbfile_p14.fixtmb2.03 HOWTO check author privileges in cvs: ------------------------------------- setup d0cvs fczar buehler HOWTO get the latest EW Z(ee) note: ----------------------------------- setup D0RunII p16.04.00 setup d0cvs newrel -t p16.04.00 wz_enote cd wz_enote/ d0setwa addpkg -h wz_enote latex d0note.tex dvips -Pcmz d0note.dvi -o d0note.ps gv d0note.ps & HOWTO kerberize a linux machine: -------------------------------- o download and install krb5-workstation rpm o copy existing and working krb5.conf into /etc directory (copy the one from heplab2) o get ticket: kinit (buehler@FNAL.GOV) o access clued0: telnet -a -x -F mynode-clued0.fnal.gov -l username HOWTO awk: --------- cat input.txt | awk '{if ($12>10) print $0}' > output.txt reads in from input.txt line by line, checks if the value in field #12 is larger than 10, and if 'yes' writes the whole line into output.txt HOWTO generate Alpgen+Pythia samples: ------------------------------------- work area: /rooms/flames/marc/ALPGEN/cardfiles/common_alpgen_proposal/tools/CAPIv0215/ First create the Alpgen+Pythia generator files: o install CAPI (package that makes the generator files): - checkout from cvs: cvs co -r 1.45 cardfiles/common_alpgen_proposal/tools/ComAlpPI.sh - install: ./ComAlpPI.sh install o run it: ./ComAlpPI.sh cards z3j_2e3j - answer the questions ... - this step creates the configuration file to produce the Z(ee)+3jet Alpgen+Pythia generator files: z3j_2e3j.cards (with these settings you'll get 300-2k events per file) o run interactively: ./ComAlpPI.sh run < z3j_2e3j.cards o run in batch: - create a batch script: ./ComAlpPI.sh batch < z3j_2e3j.cards (this creates 'batch.sh') - submit jobf(s) to the clued0 batchsystem: cluesow -l cput=06:00:00 -l mem=500mb batch.sh - final output files should appear (after a few hours) at: ./work_gam-z+j+j+j_2e+3j_*/ReqSubmit/generator/ Next run the generator files through the d0 chain (d0gstar, d0sim, reco): o setup mc_runjob: setup D0RunII p14.05.02 setup mc_runjob v06-02-11 o setup the shell script: mc_runjob -macro=run_full_chain_template.macro: configure iterstream (http://www-clued0.fnal.gov/runjob/devel/IterStreamConfigurator.html): InputFileName = / <--- input filename needs to be short !!! TotalEvents = total number of events to process EventIncrement = how many iterations ? MaxIterations = how many events per iteration? (max = 500) NOTE: EventIncrement * MaxIterations = TotalEvents o run the script: mc_runjob -macro=run_full_chain_template.macro HOWTO do gif animation: ----------------------- 1. convert all pic to gif with: mogrify -format gif * 2. assemble all gifs: whirlgif -o loop.gif -loop -time 15 *.gif 3. display animation: xanim loop.gif ROOT commandline stuff: ----------------------- root EM1TRK_skim_5.root ROOT> mytree->Print() ROOT> mytree->Draw("EM.emchi7","EM.emchi7<50.") ROOT> mytree->Draw("EM.emeta:EM.emphi","EM.empt>10.") HOWTO (un)tar and g(un)zip: --------------------------- archive: tar -cvf ex1: tar -cvf analysis_mar15_2005.tar jun09_2004/ ex2: tar -cvf webpage_mar15_2005.tar /var/www/ compress: gzip uncompress: gunzip unarchive: tar -xvf HOWTO do background substraction a la WZ group: ----------------------------------------------- get the folowing files: background.C (reads in the various data/MC distributions) MinuitHisto.C (does the actual work) HOWTO add text strings to a file: -------------------------------- for i in `cat myfile`; do echo "if ( lbn ==" $i " ) badlbn=1;" >> output; done cat bad-lbn.list | awk '{ print "if ( lbn == "$1" ) badlbn=1;"}' > newfile cat temp | awk '{ print " c1.Add(\""$1"\");"}' > blah HOWTO use ROOT macros for Gaussian + BW fitting: ------------------------------------------------ get the following code: fit_gauss_bw.C (defines which ROOT input file and which plot from that file you want to fit !!!) fitZ.C (that's where the fitting happens) Functions.hpp (...) GaussBreitW.C (defines the convolution of Gauss and BW) (note: normally you only need to change parameters in fit_gauss_bw.C and fitZ.C) run code: root [1] .L fit_gauss_bw.C root [2] fit_gauss_bw() Random Linux knowledge: ----------------------- o network configuration: ifconfig o (Mandrake 10.0) en-/dis-able eth# devices on boot: /etc/sysconfig/network-scripts/ifcfg-eth# o (Mandrake 10.0) start stop eth# devices with 'ifup eth#' and 'ifdown eth#' o mount an iso disk image with: mount -o ro,loop=/dev/loop0 diskimage.iso /mnt/cdrom -t iso9660 o use 'dmesg' to display boot messages o set terminal window colors in /etc/DIR_COLORS.xterm o determine which shell is used with 'echo $SHELL' o determine which kernel is used with 'uname -r' o turnoff kudzu: ServerSettings -> Services -> ... o manually mounting HDD: mount -t ext2 /dev/hdb1 backup_disk o get fstype info: /sbin/fdisk -l o filesystem overview: df -h o directory size: du -sh * o burning CDs: gcombust Handling floppy disks under Linux: ---------------------------------- o cd /mnt o format a floppy: w/o mounting type: fdformat /dev/fd0H1440 o create ext2 filesystem: /sbin/mkfs.ext2 /dev/fd0H1440 o mount floppy o cd floppy RedQueen random knowledge: -------------------------- o enter BIOS by pressing F2 key when 'SONY' is diplayed HOWTO take a screenshot under Linux: ------------------------------------ xwd > // mousepointer turns into a cross // click on the frame you want to capture // pic gets saved into // then view it with: display HOWTO run d0scan (10-08-03): ---------------------------- // first need to extract the event from SAM: // get the tarball from: http://www-d0.fnal.gov/~danielw/pickReco/ // (on d0mino) untar with 'tar -xzf pickReco.tar.gz' cd pickReco // see 'readme' for documentation ... setup D0RunII setup sam ./pickReco.pl [] // patience ! this might take a while ... // a single-event reco file will appear in the 'events' directory // now running d0scan on the file: // get 'd0scan_qt_test.rcp' from /work/maxwell-clued0/marc/temp/d0scan // (needs to be in the directory from which you're running d0scan) setup D0RunII d0setwa d0scan_qt_x -rcp d0scan_qt_test.rcp -input_file // if you're lucky this pops up the d0scan GUI ... HOWTO setup Athena (09-16-03): ------------------------------ setup D0RunII p14.03.02 setup d0cvs newrel -t p14.03.02 athena_sep16_2003 cd athena_sep16_2003/ d0setwa addpkg -h Athena // make sure u have the correct packages in Athena/setup.sh // execute setup.sh from the toplevel directory of release area: ./Athena/setup.sh // after the compilation: cp /rooms/leg/boston/jwittlin/higgs/mettest/copyscript . also: cvs checkout d0reco/rcp and remove cal_t42 from the string Packages and the corresponding RCP below it. HOWTO get computer hardware info in linux: ------------------------------------------ more /proc/cpuinfo more /proc/meminfo HOWTO read in a txt file filed with integers and sum them up (09-11-03): ----------------------------------------------------------------------- awk '{sum+=$1; print sum}' file.txt | tail -1 awk '{x+=$1}END{print x}' < FILE CABing (09-09-03): ------------------ - put yourself on the CAB mailing list: d0cab-users@fnal.gov - documentation available at: http://www.nuhep.nwu.edu/~schellma/cab/cab_doc_v2.html - On d0mino from a secure terminal (ssh from your console and use cryptocard) setup kcroninit kcroninit - then on any system you plan to submit from edit $HOME/.k5login so that it contains at least: @FNAL.GOV /cron/d0mino.fnal.gov@FNAL.GOV (make certain there are no trailing blanks) D0tools will then do kerberos for you automatically when you run jobs! - setup a (big) scratch area somewhere locally on your disk. that's where all the output will be put! - to run it: setup d0tools runchunkanalyze -cab -defname=p13wzskim.em -jobs=40 -scratch=/work/maxwell-clued0/marc/CAB/ -mode=TMB -maxopt -nofpe -skipruns=badRuns.map -cabmonitor // -jobs: number of parallel jobs to split in...can be as high as 40 (not a mandatory flag) // should be no larger than number of files/2 - 'qstat @d0mino | grep buehler' lists all my jobs 'qstat -f NNNN.ripon-clued0@d0mino' tells you about a job - including what node it is on. You can then log in to check progress 'qdel NNNN.ripon-clued0@d0mino' deletes job NNNN setup p1403_test (Jul14_2003 EMcandidate): ------------------------------------------ setup D0RunII p14.03.01 setup d0cvs newrel -t p14.03.01 p14.03.01 cd p14.03.01/ d0setwa addpkg -h analysis_example addpkg em_util v00-02-82 addpkg emcandidate v00-01-07 addpkg em_evt v00-15-38 addpkg emreco v00-12-32 addpkg hmreco v00-06-14 addpkg empartfit v00-03-12 addpkg jetcorr v04-02-03 addpkg thumbnail addpkg bc_eTagreco addpkg bcjet_evt addpkg linked_physobj addpkg tmb_analyze addpkg tmb_tree addpkg em_analyze addpkg tau_analyze addpkg missingET cp ../p14.03.00/analysis_example/src/D0ChunkAnalyze.cpp analysis_example/src/. cp ../p14.03.00/analysis_example/analysis_example/D0ChunkAnalyze.hpp analysis_example/analysis_example/. // in thumbnail/rcp/UnpThumbNail.rcp: // bool dobcJet=false // bool doRecomputeBC=false // add "RegEMReco" to analysis_example/bin/OBJECTS // edit analysis_example/rcp/runD0ChunkAnalyze_TMB.rcp // RCP em1 = < emreco EMReco-scone-postprocess > // RCP em2 = < emreco EMReco-cnn-postprocess > // and then add "em1 em2" to the Packages string (between "trigsel" and "analyze") srt_setup SRT_QUAL=maxopt gmake clean gmake all HOWTO store files in SAM: ------------------------- 0. (obsolete) instructions are at: http://d0db.fnal.gov/sam/doc/userdocs/UserFileStoreDetails.html (i never really looked at them ...) 1. go to: http://d0db.fnal.gov/sam_admin/cgi/autoRegister.py and make sure that your user name is part of the higgs sam group. 2. transfer files to d0mino 3. get python script from: /work/maxwell-clued0/marc/p14MC/store_zbb_eebb.py 4. edit store_zbb_eebb.py: // specify file type: appfamily=AppFamily('generator', 'p14.03.00', 'alpgen+pythia') // specify filename: filename = 'tmb-p14.03.00_avto_higgs_group-phase1_fnal_null_03165160613' // specify begin event (x), end event (y), # of events in the file (z): t = SAMMCFile(filename,Events(501, 1000, 500), // specify generation data (time on the left has to be BEFORE the time // on the right. besides from that it doesn't really matter what time // you enter ...): appfamily,"06/20/2003 16:03:16","6/20/2003 16:10:20" // specify filesize in MB: ...,13667, // obvious stuff: 'ProducedByName':'buehler', 'OriginName':'Avto', . . . 5. test the script for obvious typos: setup D0RunII setup sam python store_zbb_eebb.py 6. store file in SAM: sam store --descrip=store_Wjj_enujj.py --source=. [--resubmit] // note: /path/to/file is the absolut path w/o the filename! // in case the storing fails, use the --resubmit flag next time 7. check to see if files really show up in SAM. HOWTO setup d0chunkanalyze with p14.03 (May16_2003 setup): ---------------------------------------------------------- setup D0RunII p14.03.00 setup d0cvs newrel -t p14.03.00 p14.03.00 cd p14.03.00 d0setwa addpkg -h analysis_example addpkg em_util v00-02-80 addpkg emcandidate v00-01-06 addpkg em_evt v00-15-33 addpkg emreco v00-12-24 addpkg hmreco v00-06-13 addpkg jetcorr v04-01-00 addpkg thumbnail // in thumbnail/rcp/UnpThumbNail.rcp: // bool dobcJet=false // bool doRecomputeBC=false // cp sourcecode (.cpp & .hpp) over ... // add "RegEMReco" to analysis_example/bin/OBJECTS // edit analysis_example/rcp/runD0ChunkAnalyze_TMB.rcp // RCP em1 = < emreco EMReco-scone-postprocess > // RCP em2 = < emreco EMReco-cnn-postprocess > // and then add "em1 em2" to the Packages string (between "trigsel" and "analyze") srt_setup SRT_QUAL=maxopt gmake clean gmake all HOWTO process p14MC: -------------------- 0. setup D0RunII p14.03.00 setup sam setup mc_runjob 1. get MCkinechunk file 2. split it up with: copyd0om.py zmumubb02_25k listfile:filelist.txt -max_per_file 500 (where filelist.txt lists the output file names) put the files into 'input' directory 3. get suyong's scripts (makejobs.py, zeebb.macro, zeebb.sh) from: /work/maxwell-clued0/marc/p14MC/output 4. edit zeebb.sh: LOCALWORKDIR=... Note: *DO NOT* touch DESTDIR and MACRO !!! 5. run makejobs.py script (needs absolut path to input files as argument): python makejobs.py /work/maxwell-clued0/marc/p14MC/zmumu/input/zmumu* This will create a bunch of macros and shell scripts, with the name the same as the input file name with .macro and .sh attached. It will also write submit.sh. 6. submit everything to the clued0 batch system: ./submit.sh HOWTO split a txt file with linux: ---------------------------------- split --lines=3 alllist.txt alllist HOWTO run d0chunkanalyze: ------------------------- // setup setup d0tools // need help? runchunkanalyze -h // standard running interactively: runchunkanalyze -filelist=p1305_data.txt -mode=TMB -maxopt -num=<#of events to process> // debugging with totalview setup totalview runchunkanalyze -filelist=p1305_data.txt -mode=TMB -maxopt -num=<#of events to process> -debug // standard running in batchmode on clued0: runchunkanalyze -filelist=p1305_data.txt -mode=TMB -maxopt -num=10000 -batch -cput=2:00:00 -skipruns=badruns.dat -nofpe // check batch job status qstat -u buehler -n // delete batch jobs qdel .ripon-clued0 HOWTO recompile analysis code: ------------------------------ // go to working directory setup D0RunII p14.03.01 d0setwa srt_setup SRT_QUAL=maxopt gmake analysis_example.clean gmake analysis_example.all HOWTO setup D0ChunkAnalyse analysis code with p13.09: ----------------------------------------------------- setup D0RunII p13.09.00 setup d0cvs newrel -t p13.09.00 p1309_test cd p1309_test addpkg -h analysis_example addpkg em_util v00-02-79 addpkg hmreco v00-06-13 // addpkg em_evt v00-15-32 addpkg em_evt v00-15-33 addpkg emcandidate v00-01-06 addpkg emreco v00-12-24 addpkg jetcorr v04-01-00 addpkg thumbnail addpkg tmb_analyze addpkg tmb_tree addpkg bc_eTagreco addpkg bcjet_evt addpkg empartfit addpkg linked_physobj // in thumbnail/rcp/UnpThumbNail.rcp: // bool dobcJet=false // bool doRecomputeBC=false // The following loop avoids creating executables for // emreco, jetcorr, linked_physobj, thumbnail and tmb_analyze. // Only the object files for these packages are necessary when // running D0ChunkAnalyze - the executables are not needed! // This is done to reduce compilation time. foreach i ( emreco jetcorr linked_physobj thumbnail tmb_analyze ) grep -v bin $i/SUBDIRS > tmp.SUBDIRS \mv tmp.SUBDIRS $i/SUBDIRS end // include this for optimized code (no debugging info!): srt_setup SRT_QUAL=maxopt d0setwa // cp analysis code: cp ../D0ChunkAnalyze.cpp analysis_example/src/. cp ../D0ChunkAnalyze.hpp analysis_example/analysis_example/. // copy framework rcp file: cp ../runD0ChunkAnalyze_TMB.rcp analysis_example/rcp/. // copy OBJECTS file (tells gmake which packages should be included // in executable): cp ../OBJECTS analysis_example/bin/. // compile: gmake all HOWTO setup D0ChunkAnalyse analysis code with p13.06.01: ------------------------------------------------------- ---> NOTE: this setup did NOT work! <--- setup D0RunII p13.06.01 setup d0cvs newrel -t p13.06.01 p130601 cd p130601/ addpkg -h analysis_example cp ../p1305/analysis_example/src/D0ChunkAnalyze.cpp analysis_example/src/. cp ../p1305/analysis_example/analysis_example/D0ChunkAnalyze.hpp analysis_example/analysis_example/. addpkg jetcorr v04-01-00 addpkg em_util v00-02-75 addpkg emcandidate v00-01-03 addpkg em_evt v00-15-25 addpkg emreco v00-12-19 addpkg hmreco v00-06-13 addpkg thumbnail addpkg tmb_analyze addpkg tmb_tree addpkg bc_eTagreco addpkg bcjet_evt addpkg empartfit addpkg linked_physobj // add "RegEMReco" to analysis_example/bin/OBJECTS // edit the framework rcp file at: analysis_example/rcp/runD0ChunkAnalyze_TMB.rcp // RCP em1 = < emreco EMReco-scone-postprocess > // RCP em2 = < emreco EMReco-cnn-postprocess > // and then add "em1 em2" to the Packages string (between "trigsel" and "analyze") d0setwa srt_setup SRT_QUAL=maxopt gmake clean gmake all HOWTO retrieve files from SAM via clued0: ----------------------------------------- 1. go to the directory on your clued0 machine where you want the files to be put. 2. setup sam 3. create SAM dataset for the files: sam translate constraints --dim="file_name blah%blah%" sam define dataset --group=dzero --defname="dataset_name" --dim="file_name blah%blah%" 4. cp ~/getroot.py . 5. edit getroot.py 6. sam run project getroot.py 7. files should appear in the target directory. HOWTO run D0ChunkAnalyze: ----------------------- // basic setup: setup D0RunII p13.05.00 setup d0cvs cd newrel -t p13.05.00 p1305 cd p1305 d0setwa addpkg -h analysis_example // setup EMcandidate: addpkg em_util v00-02-72 addpkg em_evt v00-15-22 addpkg thumbnail // add this to D0ChunkAnalyze.cpp: #include "em_evt/EMparticle.hpp" // setup jetcorr: addpkg jetcorr v04-00-01 // add this to D0ChunkAnalyze.cpp: #include "jetcorr/ParticleJetCorr.hpp" // compiling: srt_setup SRT_QUAL=maxopt gmake analysis_example.all // running // some RCP stuff to speed things up" // settings for .../thumbnail/rcp/UnpThumbnail.rcp: bool debug=false // unpacking flags bool doCps=false bool doFps=false bool doVtx=true bool doChp=true bool doEM=true bool doMuon=true bool doTau=false bool doJet=true bool doMET=true bool doL3=false bool dobcJet=false bool doRecomputeBC=false setup d0tools // create diem.txt with an explicit path to your input file(s) runchunkanalyze -filelist=diem.txt -mode=TMB -maxopt -num=<#of events> // for help: runchunkanalyze -h // run in batch mode on clued0 (check status with 'qstat -u buehler'): runchunkanalyze -filelist=p1305_data.txt -mode=TMB -maxopt -num=10000 -batch -cput=12:00:00 HOWTO read objects from a file in ROOT: --------------------------------------- 1. instantiate object of type by: a. doubleclicking on the file in TBrowser b. TChain chain("Global") chain.Add("") c. TFile f("filename") f.ls() 2. Global->Draw("branch.leave") Global->Draw("b1.l1","b2.l2 > cut") Global->Draw("b1.l1":"b1.l2") HOWTO run mc_runjob on d0mino: ------------------------------ - setup D0RunII setup sam setup mc_runjob - get PYTHIA cardfile from /d0dist/dist/releases//cardfiles/... - edit setup macro (see ~/info/z-zee-1500evt.macro for example) note: the example sets up 30 jobs with 50 events each - run it: mc_runjob -macro=z-zmumu-1000evt.macro -usercardpath=/prj_root/840/e/alg/suyong/p1306/ HOWTO check for double counting of events: ------------------------------------------ // write run- and event-numbers of each event to a textfile // both of the following commands should return the same count // if there is *no* double counting: sort textfile.txt | wc sort textfile.txt | uniq | wc HOWTO grow TMB trees (p13.05): ------------------------------ setup D0RunII p13.05.00 newrel -t p13.05.00 p1305 cd p1305 d0setwa setup d0cvs addpkg tmb_analyze/rcp p13-br cd tmb_analyze/rcp /d0dist/dist/releases/p13.05.00/bin/Linux2.4-KCC_4_0/TMBAnalyze_x -time -rcp runTMBTreeMaker.rcp -input_file -output_file /dev/null -num_events <# of events> HOWTO change and test L2Cal worker code in p13: ----------------------------------------------- setup D0RunII p13.05.00 // p13.05.00 is currently... newrel -t p13.05.00 p13.05.00 // ...running online (12/09/02)! cd p13.05.00 d0setwa setup d0cvs addpkg tsim_l1l2 // try running with the default rcp's // then change rcp's and try again // then checkout the worker code and try again // then change the worker code... addpkg l2calemworker p13-br addpkg l2caljetwoker p13-br gmake all // RCP settings (in ..../tsim_l1l2/rcp): ReadEvent.rcp: string InputFile="listfile:data.txt" // for multiple input files OR string InputFile="input.data" // for a single input file NOTE: 'input.data' or data.txt need to be in ..../tsim_l1l2/bin/ head.rcp: string Packages = "globalnt read tsim l1l2unp l1l2analyze event_info" tsim.rcp: string Packages = (l1cal l2calinputfix l2calem l2caljet collector) l1l2analyze.rcp: string Packages = "l1cal_analyze l2calem_analyze l2caljet_analyze" // in .../tsim_l1l2/bin ./Runme.sh HOWTO setup d0root_analysis (11/04/02): --------------------------------------- // Ariel's instructions are at: // http://www-d0.fnal.gov/%7Esch/d0_private/d0root/d0root.html // "The idea behind the d0root package is to build-up OBJECTS out of // the Ntuple and make them alive for physics analysis." // basic setup //------------ setup D0RunII p13.01.00 newrel -t p13.01.00 higgs_analysis cd higgs_analysis d0setwa setup d0cvs addpkg d0root_analysis v00-05-11 xemacs d0root_analysis/read_event/ReadEvent.cpp comment out (line 46) "_global->SetBranchStatus("*",0);" addpkg d0root_btag v00-05-05 addpkg d0root_met v00-05-01 addpkg em_util v00-02-64 // xemacs em_util/src/EtaPhiCell.cpp // change "FILE *f = fopen("em_util/dat/etaphicell.list","r");" // to "FILE *f = fopen("../em_util/dat/etaphicell.list","r");" // xemacs em_util/em_util/ChannelList.hpp // change "em_util/dat/channel.list" // to "../em_util/dat/channel.list" // xemacs em_util/em_util/CalCalibConst.hpp // change "CalCalibConst(char *file_name="em_util/dat/146225.coef"," // to "../CalCalibConst(char *file_name="em_util/dat/146225.coef"," // xemacs em_util/src/EMcandidate.cpp // change "static char* HMATRIX_FILE_HIGH="em_util/dat/hmatrix-H08-2.5sig.root";" // and "static char* HMATRIX_FILE_LOW="em_util/dat/hmatrix-L08-2.5sig.root";" // to "../em_util/dat/hmatrix-H08-2.5sig.root" // and "../em_util/dat/hmatrix-L08-2.5sig.root" //addpkg -h jetcorr // no longer needed above version 00-05-10! addpkg -h kinem_util // pre-compiling: // gmake em_util.all EMUTIL_SHARED=1 gmake kinem_util.all gmake d0root_analysis.all // ignore the "warning: unreachable code at beginning of switch statement" messages. gmake d0root_met.all gmake d0root_btag.all // link to em_util: cd d0root_met ln -s ../em_util em_util cd ../ cd d0root_btag ln -s ../em_util em_util cd ../ // move jetcorr .so files to lib area: // don't need this. //mv jetcorr/src/*.so ./lib/$BFARCH/ // now what ? // now you're all set to write your own analysis code: mkdir d0root_higgs cd d0root_higgs ln -s ../em_util em_util mkdir electron mkdir analysis // analysis class (*.cpp & *.hpp) goes into the 'analysis' directory - // this is your analysis code!!! // put macro in d0root_higgs directory (f.ex. runHiggsAnalysis.C) - this // macro links and compiles all needed shared objects (*.so) that were created // during the pre-compile step and then creates an object of your analysis // class. it also instanciates your analysis class and creates an object // that you can play with in root. example code at ...maxwell..runHiggsAnalysis.cpp etc... add source file into runHiggsAnalysis.cpp... // Example: root runHiggsAnalysis.C // links and compiles H->Electrons(); // calls the 'Electrons' method from your analysis code and lets it loose on H, // which is an object of type 'analysis-class'. // // Voila! HOWTO setup/compile thumbnail stuff: ------------------------------------ setup D0RunII p12.03.00 newrel -t p12.03.00 p12.03.00 cd p12.03.00 d0setwa setup d0cvs cvs co l1l2_tmb // copy l2calem_tmb.cpp and l2calem_tmb.hpp files into l1l2_tmb/src and l1l2_tmb/l1l2_tmb dirs respectively // add l2calem_tmb to l1l2_tmb/src/COMPONENTS cd include ln -s ../l1l2_tmb/l1l2_tmb l1l2_tmb cd p12.03.00 gmake all HOWTO request data processing (reco/reco_analyze) on the farms for special runs: -------------------------------------------------------------------------------- (follow initial instructions at: http://www-d0.fnal.gov/computing/production/production_request.html) - create SAM project definition (aka SAM dataset definition): sam create dataset definition --group="dzero" --defname="special-- --dim="run_number and data_tier raw" - then go to http://d0db.fnal.gov/sam_farm_request/ and fill in: name = Project Name = Appl Name Version = HOWTO run the p12/post-Roger EM worker code on data in passthru mode: --------------------------------------------------------------------- // basic setup: setup D0RunII p12.01.00 newrel -t p12.01.00 p12.01.00 cd p12.01.00 d0setwa setup d0cvs addpkg -h tsim_l1l2 addpkg -h tsim_l1cal addpkg -h tsim_l2cal_inputfix // --> ask reinhard about how to set up tsim_l2cal_inputfix addpkg -h l2calemworker gmake all // change RCPs: cd tsim_l1l2/rcp ReadEvent.rcp: string InputFile="listfile:data.txt" OR string InputFile="input.data" head.rcp: string Packages = "globalnt read epicscoor l1coor runConfigMgr unpack configure tsim l1l2unp l1l2analyze dump tsim_l2monitor event_info" NB: 'read' followed by 'tsim' must be in this string in order for the EM algorithm to run (tsim.rcp specifies in more detail which algorithms exactly are running!) tsim.rcp: string Packages = (l1muo l1ft l1cal l1frm l2calinputfix l2calem l2caljet global collector) l1l2analyze.rcp: string Packages = "l1cal_analyze l2calem_analyze l2caljet_analyze l2gbl_analyze" l1cal_analyze.rcp: string dummy = "blah" bool real_data = true bool old_pedestal = false l2calem_analyze.rcp: string dummy = "blah" string worker_type = "COM" l2caljet_analyze.rcp: string dummy = "blah" string worker_type = "COM" tsim_l1cal.rcp: bool rawdatapassthrough = true; // run it: cd tsim_l1l2/bin ln -s input.data ./Runme.sh HOWTO edit l2calem_analyze: -------------------------- setup: checkout l2io, l2calem_analyze, l2calbase, tsim_l1l2, l2calemworker edit: compile: gmake l2io.all gmake all HOWTO maintain p12 code: ------------------------ // EDIT and COMMIT: setup D0RunII p12.01.00 newrel -t p12.01.00 p12.01.00 cd p12.01.00 d0setwa setup d0cvs addpkg l2calemworker p12-br // make changes cvs commit // TAG and RELEASE: // get current tag cvs status -lv | more cvs rtag -r p12-br p12-br- // go to another directory to check if new code compiles newrel -t p12.01.00 p1201 cd p1201 addpkg l2calemworker p11-br- gmake l2calemworker.all visit http://www-d0.fnal.gov/software/cmgt/releaserequest/ request a release - next build of p12 Port to test release: ./cvsport.sh p12-br- head "commit_message_without_spaces" cvs status -lv | more cvs rtag vxx-xx-xx visit http://www-d0.fnal.gov/software/cmgt/releaserequest/ request a release - next test build running p11.09 trigsim on raw data (analyze packages only): ----------------------------------------------------------- // basic setup: setup D0RunII p11.09.00 newrel -t p11.09.00 p11.09.00 cd p11.09.00 d0setwa setup d0cvs addpkg tsim_l1l2 addpkg -h l1cal_analyze gmake all // change RCPs: cd tsim_l1l2/rcp ReadEvent.rcp: string InputFile="listfile:data.txt" head.rcp: string Packages = "globalnt read l1l2unp l1l2analyze event_info" l1l2analyze.rcp: string Packages = "l1cal_analyze l2calem_analyze l2caljet_analyze l2gbl_analyze" l1cal_analyze.rcp: string dummy = "blah" bool real_data = true bool old_pedestal = false l2calem_analyze.rcp: string dummy = "blah" string worker_type = "COM" l2caljet_analyze.rcp: string dummy = "blah" string worker_type = "COM" // run it: cd tsim_l1l2/bin ln -s input.data ./Runme.sh debugging l2calem (p12): ------------------------ setup D0RunII p12.00.00 newrel -t p12.00.00 p12 cd p12 d0setwa setup d0cvs addpkg tsim_l1l2 gmake all cd tsim_l1l2/bin ln -s input.data ./Runme.sh -> crash // Check where the crash is by doing: setup totalview rm global.root totalview ../../bin/Linux2.4-KCC_4_0/tsim_l1l2_test -a -rcp ../rcp/head.rcp // click 'ok' to some box that comes up // click 'g' for go // click 'no' to the question about do you want to set break points // wait a while... // arrow pointing to the buggy code should appear -> check further by removing l2cal from the simulator: // in .../tsim_l1l2/rcp remove the following entries: 'l2calem' from the package list in tsim.rcp 'l2calem_analyze' from the package list in l1l2analyze.rcp the input from l2calem to global in l2_global.rcp: comment out this line: //string input2 = "l2calem" -> does it still crash??? trigsim under p12: ------------------ setup D0RunII p12.00.00 newrel -t p12.00.00 p12 cd p12 d0setwa setup d0cvs addpkg tsim_l1l2 gmake all cd tsim_l1l2/bin ln -s input.data ./Runme.sh HOWTO add l2monitor stuff to CalEMWorker.cpp: --------------------------------------------- -> setup l2calemworker and tsim_l1l2... -> addpkg l2monitor -> addpkg tsim_l2 -> addpkg l2calworker -> .../l2calemworker/LIBDEPS: add 'l2monitor' -> .../l2calemworker/src/CalEMWorker.cpp (look at CalJetWorker.cpp to get the idea): . . . #include "l2monitor/LocalMonitorBuffer.hpp" #include "l2monitor/CircularBuffer.hpp" #include "l2monitor/ObjectIDs.hpp" . . using namespace l2monitor; . . . namespace l2calemworker { // Create the static input and output classes //CalEMInput CalEMWorker::_input; CalEMOutput CalEMWorker::_output; MBTData CalEMWorker::_l1data; // Constructor CalEMWorker::CalEMWorker(void) { CircularBuffer *buf; uint32 id; id=alphaWorkerID(L2CAL,2,0); buf=LocalMonitorBuffer::instance().getCircularBuffer(id); _timeAll.setCircularBuffer(buf); // id=alphaWorkerID(L2CAL,2,1); // buf=LocalMonitorBuffer::instance().getCircularBuffer(id); // _timeSeed.setCircularBuffer(buf); // id=alphaWorkerID(L2CAL,2,2); // buf=LocalMonitorBuffer::instance().getCircularBuffer(id); // _timePack.setCircularBuffer(buf); } // Event processor MessageBase &CalEMWorker::processEvent(void) { /*#ifdef DEBUG std::cout << "CalEMWorker: processEvent called!" << std::endl; #endif*/ #ifdef CHECKTIMING _timeAll.start(); #endif . . . . // Send everything out to Global CalEMObject *emobj = new CalEMObject; emobj->setEta(global_eta(weighted_eta)); emobj->setPhi(global_phi(weighted_phi)); emobj->setET((float)_elec_sort_array[i_elec]->counts()/4.0); emobj->setEmFraction(EMFraction); emobj->setIsoFraction(IsoFraction); emobj->setIetaSeed(ieta_sd); emobj->setIphiSeed(iphi_sd); emobj->setIetaNeighbor(ieta_nb); emobj->setIphiNeighbor(iphi_nb); emobj->setSpare1(0); /*#ifdef DEBUG emobj->print(std::cout); #endif*/ } #ifdef CHECKTIMING _timeAll.stop(); #endif -> CalEMWorker.hpp: . . . #include "l2monitor/BufferTimer.hpp" . . . private cut/paste // Constructor CalEMWorker::CalEMWorker(void) {...} over to CalEMWorker.cpp . . . /// blah text l2monitor::BufferTimer _timerAll; . . . -> l2monitor/src/timer.cpp: uncomment stuff... -> tsim_l1l2/rcp/tsim_l2monitor.rpc bool printMonInfo = true -> clean up rcp's in .../tsim_l1l2/rcp/: tsim.rcp: string Packages = (l1cal l2calem l2caljet collector) l1l2analyze.rcp: string Packages = "l1cal_analyze l2calem_analyze l2caljet_analyze" tsim_l1cal.rcp: 'current hardware = false' for MC -> gmake all / gmake clean HOWTO run tsim_l1l2 with p11.08: -------------------------------- addpkg tsim_l1l2 addpkg l2calemworker p11-br addpkg l2calbase addpkg -h l2workerbase HOWTO run tsim_l1l2 with p11.07: -------------------------------- addpkg tsim_l1l2 addpkg l1l2collector p11-br-11 addpkg l2calemworker p11-br HOWTO run trigsim using adam's setup: ------------------------------------- . . addpkg tsim_l1l2 addpkg -h tsim_l1cal . . head.rcp: string Packages = "globalnt read l1l2unp l1l2analyze event_info" l1l2analyze.rcp: string Packages = "l1cal_analyze l2calem_analyze l2gbl_analyze" l1cal_analyze.rcp: bool real_data = true l2calem_analyze.rcp: string worker_type = "COM" . . gmake all . . --> doesn't run the worker code, just runs the analyze packages HOWTO run reco and recoanalyze on maxwell ----------------------------------------- setup D0RunII setup d0tools mkdir blah cd blah create data.dat // containing path- and filename runreco -format=data -filelist=data.dat -num=5 -batch -q=medium -cput=18:00:00 // this puts a reco'd file in the D0reco_bla... directory named outputfile_00 // to reco_analyze this put path-/file-name for outputfile_00 in out.dat runrecoanalyze -filelist=out.dat -batch -q=medium -cput=18:00:00 // type 'qstat -u buehler' to see status of this job // type 'qstat -n' to see status of batch system // note: cpu time is approx 1 minute to reco and reco_analyze a datafile HOWTO run trigsim using d0tools under p11.06 -------------------------------------------- setup n32 (only on d0mino) setup D0RunII p11.06.00 setup d0tools -t runD0TrigSim -filelist=data.txt -num=5 or addpkg tsim_l1l2 addpkg -h tsim_l1cal addpkg -h l1cal_analyze addpkg -h l2calemworker addpkg -h l2jetworker HOWTO run tsim_l1l2 under p11.04 -------------------------------- setup D0RunII p11.04.00 newrel -t p11.04.00 p11.04.00 cd p11.04.00 d0setwa setup d0cvs addpkg tsim_l1l2 addpkg -h tsim_l1cal addpkg -h l1cal_analyze addpkg -h l2calemworker // edit RCP files: // ReadEvent.rcp: "listfile:data_location.txt" // edit # of events to process // tsim.rcp: string Packages = (l1cal l2calem l2caljet collector) // l1l2analyze.rcp: string Packages = "l1cal_analyze l2calem_analyze l2caljet_analyze" // tsim_l1cal.rcp: 'current hardware = false' for MC // head.rcp: add "RCP mc_analyze =" // add "mc_analyze" to the Packages string // in .../tsim_l1l2/bin: // add "RegMCAnalyze" to OBJECTS // add "mc_analyze" to LIBRARIES cd p11.03.00 gmake clean gmake all // go to .../tsim_l1l2/bin and create data_location.txt // or create static link to your datafile (input.data) ./Runme.sh > errorlog.txt HOWTO run tsim_l1l2 under p11.03 -------------------------------- setup D0RunII p11.03.00 newrel -t p11.03.00 p11.03.00 cd p11.03.00 d0setwa setup d0cvs addpkg tsim_l1l2 addpkg -h tsim_l1cal addpkg -h l2calemworker // edit RCP files: // ReadEvent.rcp: "listfile:data_location.txt" // edit # of events to process // tsim.rcp: string Packages = (l1cal l2calem l2caljet collector) // l1l2analyze.rcp: string Packages = "l1cal_analyze l2calem_analyze" // tsim_l1cal.rcp: 'current hardware = false' for MC // head.rcp: add "RCP mc_analyze =" // add "mc_analyze" to the Packages string // in .../tsim_l1l2/bin: // add "RegMCAnalyze" to OBJECTS // add "mc_analyze" to LIBRARIES cd p11.03.00 gmake clean gmake all // go to .../tsim_l1l2/bin and create data_location.txt // or create static link to your datafile (input.data) ./Runme.sh > errorlog.txt HOWTO maintain code in p- and t-realeases ----------------------------------------- // EDIT and COMMIT: setup D0RunII p11.03.00 newrel -t p11.03.00 p11.03.00 cd p11.03.00 d0setwa setup d0cvs addpkg l2calemworker p11-br // make changes cvs commit TAG and RELEASE: // get current tag cvs status -lv cvs rtag -r p11-br p11-br- l2calemworker // go to another directory to check if new code compiles newrel -t p11.03.00 p1103 cd p1103 addpkg l2calemworker p11-br- gmake l2calemworker.all visit http://www-d0.fnal.gov/software/cmgt/releaserequest/ request a release - next build of p11 Port to test release: ./cvsport.sh p11-br- head l2calemworker "commit_message_without_spaces" cvs status -lv cvs rtag vxx-xx-xx l2calemworker visit http://www-d0.fnal.gov/software/cmgt/releaserequest/ request a release - next test build running tsim_l1l2 under t02.07.00 --------------------------------- setup D0RunII t02.07.00 newrel -t t02.07.00 t02.07.00 cd t02.07.00 d0setwa setup d0cvs addpkg tsim_l1l2 addpkg -h tsim_l1cal addpkg -h l1cal_analyze addpkg -h l2calemworker // remove 'l2mu_analyze' from .../tsim_l1l2/bin/LIBRARIES // remove'Regl2mu_analyze' from .../tsim_l1l2/bin/OBJECT // setup RCPs: // ReadEvent.rcp: the usual... // tsim.rcp: string Packages = (l1cal l2calem l2caljet collector) // l1l2analyze.rcp: string Packages = "l1cal_analyze l2calem_analyze" // tsim_l1cal.rcp: 'current hardware = false' for MC // add mc_analyze info to root tuple (see below) cd t02.07.00 gmake clean gmake all // setup and run your MC... HOWTO add mc_analyze info to your root tuple -------------------------------------------- add "RegMCAnalyze" to tsim_l1l2/bin/OBJECTS add "mc_analyze" to tsim_l1l2/bin/LIBRARIES add "RCP mc_analyze =" to tsim_l1l2/rcp/head.rcp add "mc_analyze" to the Packages string in tsim_l1l2/rcp/head.rcp (after l1l2analyze). Then rebuild the tsim_l1l2 binary and it should work. HOWTO run tsim_l1l2 t02.04.00 ----------------------------- setup D0RunII t02.04.00 newrel -t t02.04.00 t04 cd t04 setup d0cvs d0setwa addpkg l2cttcftworker addpkg tsim_l1l2 addpkg tsim_l2 v00-04-02 // addpkg -h l2calemworker xemacs l2cttcftworker/l2cttcftworker/CTTTempTrack.hpp & // remove #include "l2buffer/InputBuffer.hpp" // put in changes to add mc_analyze // edit code if you want... gmake l2cttcftworker.all gmake tsim_l2.all // gmake l2calemworker.all gmake tsim_l1l2.all cp ~/info/tsim_l1cal.rcp tsim_l1l2/rcp/ cd tsim_l1l2/bin ln -s input.data specify number of events to process ./Runme.sh HOWTO run tsim_l1l2 t02.03.00 ----------------------------- (1) setup D0RunII t02.03.00 (2) setup d0cvs (3) newrel -t t02.03.00 t0203 (4) cd t0203 (5) d0setwa (6) addpkg tsim_l1l2 (7) cd tsim_l1l2/rcp (8) In this directory you need to modify the following rcp's (a) head.rcp --> No changes (b) l1cal_analyze.rcp Change only the following 1 line for MC files bool real_data=false (c) l1l2analyze.rcp Here keep only the l1cal_analyze and l2caljet_analyze (or l2calem_analyze) packages (d) tsim.rcp Keep only the l1cal,l2caljet(and/or l2calem), collector Also because SAM is currently broken you need to do the following changes From the tsim_l1l2/rcp directory do cd ../bin In this directory remove from the LIBRARIES the sam_manager line and from the OBJECTS remove the RegSAMManager line Then cd ../.. and then gmake tsim_l1l2.bin This should creates without any problem the executable named tsim_l1l2_test in t0203/bin/Linux2.4-KCC_4_0/ directory After you have create the executable go to the /t0203/tsim_l1l2/bin directory from there do a link to a MC file ln -s /rooms/library/work/p09.08_recocert/ sim_recocert_p09.08.00maxopt_fnal_pythia_ttbar-incl_mb-poisson -2.5_224152335_2001 input.data (In /rooms/library/work/p09.08_recocert/ directory from clued0 you can found several types of MC files) HOWTO run d0trigsim on reco'd MC using SAM and d0tools: ------------------------------------------------------- // using the SAM web interface go to the SAM dataset definition editor 1. definition name (no spaces) = 'test' for example 2. workgroup = dzero 3. username = buehler 4. description (should be explicit, use spaces) 5. constraint = reco'd (!) filename w/ wildcard % 6. dimension = filename 7. click on 'translate constraint' 8. click on 'create dataset' if SAM works this should create the dataset 'test' kinit setup n32 setup D0RunII setup d0tools setup d0cvs setup sam newrel -t cd d0setwa addpkg d0trigsim gmake runD0TrigSim -defname=test -num=5 -nocoorsim -localbuild if SAM doesn't work properly do the following: - put the 'getroot.py' script in your working area - in 'getroot.py' change the 'project_definition' variable to 'test' - setup sam - sam run project getroot.py do 'bjobs' to see if batchjob has started do 'ls | wc' to get a word/file count then copy the files over to your working area and do the runD0TrigSim with the -filename flag HOWTO create a trigsim+reco ntuple: ----------------------------------- (gives you an ntuple that contains both trigger and reco-/ offline-information, thereby providing a tool for correlated trigger and offline selections) setup n32 setup D0RunII p10.06.01 setup d0cvs setup sam newrel -t p10.06.01 test cd test d0setwa // get the 'send' script. you'll need it later to run the executable // get the 'mkrecoats' script and run it to create the executable: ./mkrecoats // edit the framework.rcp // compile recoats. this needs a lot of hardware resources // and in order to avoid any problems you should do an optimized // build by typing: srt_setup SRT_QUAL=maxopt // compile: gmake recoats.bin // edit 'send' for the number of events to process: set FRAMEWORK_OPTIONS="-time -mem -num_events " // for higgs studies go to http://www-d0.fnal.gov/Run2Physics/higgs/ // and click on MC to select the SAM Dataset Definition Name of the // datafile you wish to run. F.ex: higgswg_ZH_ee_bb_m115-v001 for // H(bb)Z(ee) events. // Run the executable you just compiled on the selected dataset using // the 'send' script: ./send --group=dzero --cpu-per-event=30 --defname=higgswg_ZH_ee_bb_m115-v001 HOWTO change the l2calemworker code: ------------------------------------ // this puts the code into the test release branch! // logon to d0mino or clued0 // goto scratch area (only on d0mino) setup n32 // only on d0mino setup D0RunII t01.66.00 setup d0cvs newrel -t t01.66.00 emworker cd emworker d0setwa addpkg tsim_l1l2 addpkg -h l2calemworker // if you want to submit the code to the production release branch: // addpkg l2calemworker p10-br // in this case you don't have to tag it after submitting it to cvs! cd tsim_l1l2/rcp // edit rcp files: // ReadEvent.rcp contains the parameter 'NumEvents' that sets // the number of events you want to use (0 = all) // edit head.rcp for the packages you want to run cd ../../ cd l2calemworker/src ---> edit CalEMWorker.cpp ... cd ../../ gmake l2calemworker.lib gmake tsim_l1l2.bin // now test the changes you implemented or proceed to ---> ... cd tsim_l1l2/bin ln -s input.data ./Runme.sh ---> after testing the changed code, put it into CVS by typing: (go to the directory where the changed file(s) are) cvs commit filename 'cvs commit' in a certain directory commits everything recursively note: you can only commit code to cvs if you are working on the headversion of a package!!! important: enter a comment in the logfile that pops up! (type :wq to save and quit the vi editor log file) ---> assign a symbolic tag to the source revision in the repository: cd l2calemworker check last version#: cvs status -lv (look for vxx-xx-xx) cvs rtag ---> fill out a release request: go to http://www-d0.fnal.gov/software/cmgt/releaserequest/ "request a release" of the newly tagged version if you've added some new functionality to the code "release a fix to a build in progress" if you've fixed a bug (put in comments about the changes you made) HOWTO run the totalview debugger on L2CalEMWorker.cpp: ------------------------------------------------------ setup n32 // only on d0mino setup D0RunII setup d0cvs newrel -t emworker cd emworker d0setwa addpkg tsim_l1l2 addpkg l2calemworker // edit rcp's and source code files (set # of events to 1) gmake l2calemworker.lib gmake tsim_l1l2.bin // binary/executable will be at ...emworker/bin/IRIX6-KCC_4_0/tsim_l1l2_test cd tsim_l1l2/bin ln -s input.data // run the executable to setup all necessary links ./Runme.sh rm global.root // start totalview setup totalview totalview ../../bin/IRIX6-KCC_4_0/tsim_l1l2_test -a -rcp ../../tsim_l1l2/rcp/head.rcp // ingnore OpenMP dynamic library error... // totalview debugger should start! // totalview options: f -> finds whatever code you want to look at (use 'processEvent()' as search term) g -> run totalview a -> specify parameters (rcp etc) s -> step into a fct n -> next line ctrl-z -> reset totalview midclick -> pops up options menu leftclick # in code -> set stop point HOWTO run tsim_l1l2: -------------------- // logon to d0mino or clued0 // goto scratch area (only on d0mino) setup n32 // only on d0mino setup D0RunII p06.00.01 setup d0cvs newrel -t p06.00.01 test cd test d0setwa addpkg tsim_l1l2 cd tsim_l1l2/rcp // edit rcp files: // ReadEvent.rcp contains the parameter 'NumEvents' that sets // the number of events you want to use (0 = all) // edit head.rcp for the packages you want to run cd ../../ gmake tsim_l1l2.bin cd tsim_l1l2/bin ln -s input.data ./Runme.sh HOWTO run d0trigsim: -------------------- // logon to d0mino or clued0 // goto scratch area (only on d0mino) setup n32 //only on d0mino setup D0RunII p09.03.00 setup d0cvs newrel -t p09.03.00 p09.03.00 cd p09.03.00 d0setwa addpkg d0trigsim cd d0trigsim/rcp // edit rcp files: // - D0TrigSimReadEvent.rcp contains the parameter 'NumEvents' that sets // the number of events you want to use (0 = all). // 'string InputFile =' determines the name of your data input file // - runD0TrigSim.rcp contains a list of packages that you're running. // if you don't want any L3 stuff, delete coor, l3_an and tsiml3. // - if you want to read-in data from multiple input files: // - don't do the 'ln -s ...' command (see below) // - in .../d0trigsim/rcp edit D0TrigSimReadEvent.rcp: // replace: string InputFile = "inputfile" // with: string InputFile="listfile:data_location.txt" // - in .../d0trigsim/bin create the file data_location.txt that contains // the full path name for all datafiles cd ../bin ln -s inputfile ./Runme.sh // If it's a big job (> 60min) you should run it in batch mode: // type: bsub -q Runme.sh // queue-names are 'short' if < 180min // 'medium' if < 300min // 'large' if infinite HOWTO run d0trigsim on SAM data: -------------------------------- setup n32 setup D0RunII p09.03.00 setup d0cvs newrel -t p09.03.00 p09.03.00 cd p09.03.00 d0setwa addpkg d0trigsim addpkg tsim_l1l2 edit files in d0trigsim/rcp: edit D0TrigSimReadEvent_sam.rcp to change number of events you want edit runD0TrigSim_sam.rcp to get rid of level 3: remove coor, l3_an, tsiml3 from list of Packages. edit files in tsim_l1l2/rcp: edit tsim.rcp to remove unwanted packages from Packages list cd p09.03.00 gmake d0trigsim.bin create a SAM dataset: setup sam sam translate constraints --dim="file_name sim%ttbar%" <--- to see the files that match .. % stands for wildcard sam define dataset --group=dzero --defname="ttbar1" --dim="file_name sim%ttbar%" after that, edit Runme_sam.sh and change the variable PROJECT to ttbar1 or whatever name you gave the project. cd d0trigsim/bin ./Runme_sam.sh or run in batchmode if it's a big job HOWTO retrieve a copy of a datafile from SAM to your working area: ------------------------------------------------------------------ 1. define and create a SAM dataset aka a SAM project: setup sam sam translate constraints --dim="file_name sim%zh-hbb+zee%" <--- to see what's there (% = wildcard) sam define dataset --group=dzero --defname="zh" --dim="file_name sim%zh-hbb+zee%" 2. edit the 'getroot.py' python script: project_definition = "zh" 3. run the script: sam run project getroot.py 4. if everything ran fine SAM retrieves the file, creates a copy in the SAM cache area and a link in your working area. ----------------------------------------------------------------------------- datafile locations: ------------------- on d0mino: /prj_root/813/emid_6/buehler/ on clued0: /work/raid/ z(ee)h(bb) files: sim_MCC3_psim01.02.00_UTA.hepfm000.uta.edu_pythia_zh-hbb+zee-PtGt5.0_mb-poisson-2.5_p1.1_297194720_2000 sim_MCC3_psim01.02.00_UTA.hepfm000.uta.edu_pythia_zh-hbb+zee-PtGt5.0_mb-poisson-2.5_p1.1_297194722_2000 for reco'd files search SAM with: %p08%zh%ee%bb% mcp10 SAM datasets: hzbbbaree115gev mcp10_WH_enubb_mb0.5_plate bad: mcp10_qcd_ptgt2.0 mcp10_qcd_ptgt5.0 mcp10_qcd_ptgt10.0 mcp10_qcd_ptgt20_mb0.5_plate mcp10_qcd_ptgt40.0 mcp10_qcd_ptgt80.0 good: qcd2 qcd5 qcd10_mcp10 155248_1 qcd20_higgs qcd40_higgs zee_plate_p10.11_reco h115z_bbee l2cal_153177 run_155612_042 run_155612_10to19 run164508 run165648 (L2CalJet special run with 5x5 algorithm - 19/04/02) p11_zee_marc p11_zee_marc2 mcp13_HZbbee_reco qcd file links(!): /projects/832/higgs_2/em-id/alex/pickphotonfake/allbut20 filenames: reco_mcp10_p10.11.00maxopt_lancs_pythia_calibv00+03+09+qcd-incl-PtGt160.0-PlateCaep-RecoRcp-lastMCK_mb-poisson-0.5_127_354173409 reco_mcp10_p10.11.00_lancs_pythia_calibv00+03+18+qcd-incl-EtaGt-0.8+PtGt50.0+EtaLt0.8-PlateCaep-RecoRcp-lastMCK_mb-none_4025_02036000530 reco_mcp10_p10.11.00_lancs_pythia_calibv00+03+18+qcd-incl-EtaGt-0.8+PtGt50.0+EtaLt0.8-PlateCaep-RecoRcp-lastMCK_mb-none_4025_02036000712 reco_mcp10_p10.11.00_lancs_pythia_calibv00+03+18+qcd-incl-EtaGt-2.5+PtGt50.0+EtaLt-1.5-PlateCaep-RecoRcp-lastMCK_mb-none_4026_02035235748 reco_mcp10_p10.11.00_lancs_pythia_calibv00+03+18+qcd-incl-EtaGt1.5+PtGt50.0+EtaLt2.5-PlateCaep-RecoRcp-lastMCK_mb-none_4027_02035235242 reco_mcp10_p10.11.00maxopt_lancs_pythia_calibv00+03+09+qcd-incl-PtGt40.0-PlateCaep-RecoRcp-lastMCK_mb-poisson-0.5_125_354190736 --------------------------------------------------------------------------- random wisdom: -------------- - d0trigsim-format files usually look like 'sim...' - tsim_l1l2-format files usually look like '... .dat' - convert tsim_l1l2-format to d0trigsim-format by running it thru the pileup package - setup ROOT on d0mino by typing: setup n32 setup kai v3_4g setup root v2_26_00g -q KCC_3_4:exception:thread:opt root - setup ROOT on clued0 by typing (work directory is /work/raid/marc/): setup D0RunII p09.03.00 root - do an addpkg -h to get the most recent version of the code from cvs. this might be a version that's more uptodate than the one that comes w/ the release you have specified. - to ckeckout alpha code follow the same procedure using the latest test release and then checkout the package you want including a version number (f.ex: addpkg l2mbus v00-04-00). - for d0tools instructions go to: http://www-d0.fnal.gov/d0dist/dist/packages/d0tools/devel/doc/ - event browser usage: d0ev -> Event -> specific event (to check number of events in the file) - d0analyze = reco -> recoanalyze -> trigsimanalyze - input into reco_analyze = dst... - input into trigsim_analyze = daq... - big disk on clued0: /rooms/library/work/marc/ - CVS URL: http://www-d0.fnal.gov/cgi-bin/cvsweb.cgi - p12 complete object printout command for debugging purposes: obj->print(std::cout); ---------------------------------------------------------------------------- totalview howto: ---------------- setup totalview totalview type 'a' to enter '-rcp framework.rcp' // if running recoats type 'g' to start