Warning, /analysis/JS-Jet/JetValidation/offline/JetSpectra_README.md is written in an unsupported language. File is not indexed.
0001 This is a guide to creating jet spectra using pythia+HIJING via the EMCal and HCal JetValidation.h/cc
0002 For this analysis to work you’ll need your own fork of the ‘analysis’ repository that is within the sPHENIX Collaboration Github
0003 cd into the correct repo:
0004 `/sphenix/user/<username>/analysis/JS-Jet/JetValidation`
0005
0006 You should see three repositories, all of importance for the analysis
0007 Once you have this you will need to load the proper libraries using the following set of commands highlighted:
0008
0009 ```
0010 cd src
0011 mkdir build
0012 cd build
0013 source /opt/sphenix/core/bin/sphenix_setup.sh
0014 export MYINSTALL=~/install
0015 source /opt/sphenix/core/bin/setup_local.sh $MYINSTALL
0016 ```
0017
0018 Go back to src
0019 ```
0020 cd ..
0021 autogen.sh --prefix=$MYINSTALL
0022 make -j 4
0023 make install
0024 cd ../macro/
0025 ```
0026
0027 Get some files to run on using CreateFileList.pl, for example to get 1000 events of pythia dijets embeded in minimum bias HIJING:
0028 CreateFileList.pl -n 1000 -type 11 -embed DST_CALO_CLUSTER DST_TRUTH_JET DST_GLOBAL
0029 Test run using Fun4All. The Fun4All macro takes in input file lists for the truth jet and calo cluster DSTs and an output file name as inputs. For example, you can run:
0030 ```
0031 root -b -q 'Fun4All_JetVal.C("dst_truth_jet.list", "dst_calo_cluster.list", "dst_global.list", "output.root")'
0032 .q
0033 ```
0034 This will quit root if it does not close
0035 You should now have a output.root file that you can make the Jet Spectra from. In the offline directory, there is an example macro that draws a few figures that you can base a separate macro on that you’ll make for Jet Spectra.
0036 If you’re unsure what is in a root file, I like to open a TBrowser, find the root file, open it’s TTree’s and find the branches that we’d like to make figures of. This way I know what they are named in the root file too
0037
0038 ```
0039 root output.root
0040 `TBrowser b
0041 ```
0042 A TBrowser should open in a separate window: sometimes it will take a bit to load. We see that output.root has a TTree called ‘T’ and many branches containing the TH1D histograms we’d like. Specifically we want branch ‘pt’
0043
0044
0045
0046 See next page
0047 I can double check that this is what we want by looking at a very basic histogram in TBrowser of pt: In root do the following command:
0048 ```
0049 T->Draw(“pt”,””,””) or
0050 T->Draw(“pt”,””,”colz”
0051 ```
0052
0053 Alright this looks like the shape we’d expect, with a high number of jets at low pt and a low number towards higher pt. Now we need to make a simple macro
0054
0055 Quit root using .q and the TBrowser will close. Move to the offline directory
0056 ```
0057 cd ../offline
0058 ```
0059 From here on, you should try to create your own base macro. You will need some normalization and labels so please see my code when the time comes. But I really suggest you try creating it yourself first as it is a good learning experience
0060
0061 See this link [my GitHub](https://github.com/jamesjl3/analysis/blob/master/JS-Jet/JetValidation/offline/JetSpectra.C).
0062 See this link [for this README file with images](https://docs.google.com/document/d/1QWnMbti5S1oRhRMRGH1ADHYjiT_jWWklqyUcjFASofc/edit?usp=sharing)
0063
0064 I probably have made adjustments so make your own edits to your copy as needed
0065