Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /analysis/JS-Jet/JetValidation/README.md is written in an unsupported language. File is not indexed.

0001 This package is designed to create jet performance plots using simulations or data. The code first runs over DSTs to create root trees containing the relevant jet information, then offline root macros are used to create and plot histograms.
0002 
0003 # Tree Making
0004 The tree making step is done using the JetValidation analysis module, run using the macro macro/Fun4All_JetVal.C. 
0005 
0006 To run the tree making step (note if you are using a bash shell use instead the versions of the commands in parentheses):
0007 1. Build the package in the [usual way](https://wiki.bnl.gov/sPHENIX/index.php/Example_of_using_DST_nodes#Building%20a%20package):
0008 
0009    * Make a build directory inside the src directory: 
0010   
0011          cd src
0012          mkdir build
0013          cd build
0014         
0015    * Setup the sPHENIX environment and install paths:
0016 
0017          source /opt/sphenix/core/bin/sphenix_setup.csh -n (source /opt/sphenix/core/bin/sphenix_setup.sh)
0018          setenv MYINSTALL ~/install (export MYINSTALL=~/install)
0019          source /opt/sphenix/core/bin/setup_local.csh $MYINSTALL (source /opt/sphenix/core/bin/setup_local.sh $MYINSTALL)
0020         
0021    * Compile your code:
0022 
0023          /PATH_TO_YOUR_SOURCE_DIR/autogen.csh --prefix=$MYINSTALL (/PATH_TO_YOUR_SOURCE_DIR/autogen.sh --prefix=$MYINSTALL)
0024          make -j 4
0025          make install
0026          
0027 2. Run the code using the Fun4All macro:
0028  
0029    * Go to the macro directory:
0030    
0031           cd ../../macro
0032           
0033    * Get some files to run on using CreateFileList.pl, for example to get 1000 events of pythia dijets embeded in minimum bias HIJING:
0034           
0035           CreateFileList.pl -n 1000 -type 11 -embed DST_CALO_CLUSTER DST_TRUTH_JET DST_GLOBAL
0036  
0037    * 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:
0038           
0039           root -b -q 'Fun4All_JetVal.C("dst_truth_jet.list", "dst_calo_cluster.list", "dst_global.list", "output.root")'
0040    
0041    * This will create an output file containing all the necessary information for the histogram making.
0042    ## Options in JetValidation
0043    There are a few options you can specify in the Fun4All macro for the JetValidation module:
0044    * setPtRange(low, high): set the pt range of TRUTH jets you are interested in keeping in your tree
0045    * setEtaRange(low, high): set the eta range of TRUTH jets you are interested in keeping in your tree
0046    * doUnsub(flag): save also the pt of reconstructed jets before UE subtraction and the amount of Et subtracted (flag is set to 0 or 1)
0047    * doTruth(flag): save also the truth jet kinematics (set to 0 for running over data) 
0048    * doSeeds(flag): save also the seed jets (flag is set to 0 or 1)
0049 
0050 # Histogram Making
0051 Once you have made trees containing the relevant information, the next step is to make and plot histograms of the quantities of interest. The scripts for this are found in the offline/ directory.
0052 
0053 ### Jet_reso.C: 
0054 Jet_reso.C is a root macro which takes in the trees from the previous step and creates histograms. It matches truth and reconstructed jets in our trees based on the distance between them and produces histograms of the jet response as well as histograms of the truth and reconstructed jet kinematics. The response is then fit to produce the jet energy scale and jet energy resolution. The histograms are all written out to an output root file. The default input is the file "output.root" produced in the macros directory, but this can be changed in the macro. You can also read in multiple output files (see the commented out loop over files for an example).
0055 
0056 ### draw_hists.C
0057 draw_hists.C takes the histogram output from Jet_reso.C and draws nice versions of the plots, then saves them as pdfs. Currently it draws only the JES/JER and plots of the subtracted Et, but more will be added soon.
0058 
0059 # Questions/suggestions
0060 This package is a work in progress, so please send any questions, bugs, or suggestions for new features to Virginia Bailey (vbailey13@gsu.edu)