Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 Commit: Friday, October 18th, 2024, 
0002 Anthony Hodges, UIUC, <ahodges4@illinois.edu>
0003 
0004 This directory contains tools for performing the sPHENIX jet energy scale calibration.
0005 
0006 Jet_Resp_Condor_histMaker.C - this code expects single files that our output from the JetValidation macro under the "JetValidation" sub directory. It can be run over one, large output file or multiple output files that will be combined via hadd at the end. As the name implies it can be run via conder for the latter.
0007 
0008 The output are TH2D histograms that have the jet response (either p_T_Reco or P_T_Reco/P_T_truth depending on the setting) as a function of the truth jet p_T. 
0009 
0010 
0011 Standard constructor:
0012 void Jet_Resp_Condor_histMaker(float jetR = 4, int applyCorr = 0, int isLin = 0, const char* fi
0013 n= "", int segment = 0, int trig = 0)
0014 
0015 jetR: jet radius, it'll be divided by 10 later (to get R=0.4,etc)
0016 applyCorr: apply correction to generated corrected histograms
0017 isLin: is linearity, use to generate the calibration
0018 fin: input file
0019 segment: segment number of input file
0020 trig: trigger threshold (0 for MB, 10 for 10GeV set, 30 for 30GeV set). 
0021 
0022 For initial estimation of the JES:
0023 root -l -b -q Jet_Resp_Condor_histMaker.C'(4,0,0,"'$1'",'$2','$3')'
0024 Where $1, is the file number
0025 $2 is the segment number
0026 $3 is the trigger number
0027 
0028 I typically ran this over the nTuples produced by the JetValidation package and it ran very quickly, and because they're 2D histograms, hadding them together is also very quick
0029 
0030 For creation of calibration histograms
0031 root -l -b -q Jet_Resp_Condor_histMaker.C'(4,0,1,"'$1'",'$2','$3')'
0032 
0033 All that's happened is the third argument has switched to 1, which tells the code to switch from making the JES to the linearity. You run this file over the same inputs as when calculating the JES
0034 
0035 Next one runs  Jet_Resp_respFitter.C, which takes the aggregated output from the histogram maker, breaks it down into p_T bins and then fits the response or linearity bins. This makes for you the TGraphs for the JES and numerical inversion process. 
0036 
0037 Constructor: void Jet_Resp_respFitter(const char* fin = "", int isLin = 0)
0038 
0039 fin: the aggregated histogram file from the histMaker above
0040 isLin: is this the linearity (p_T^Reco vs. p_T^True) or the response (p_T^Reco/p_T^Truth vs. p_T^truth). You need the former for the calibration, the latter for just making the JES.
0041 
0042 Example usage:
0043 
0044 root -l -b -q Jet_Resp_respFitter.C'("hists_R04_Corr0_isLin0_2D.root",0)'
0045 root -l -b -q Jet_Resp_respFitter.C'("hists_R04_Corr0_isLin1_2D.root",1)'
0046 
0047 respFitterDef.h
0048 
0049 This file just contains some shared definitions for the number of bins (in eta, pt, etc.) so you don't have to change them in two places at once. Very mindful. Very demure. 
0050 
0051 
0052 Creating the Calibration:
0053 numericInverse_2D.C
0054 
0055 This takes in the output of the response fitter and peforms the numerical inversion procedure on them. It only takes one input, either 1 or 0, to either save or not save the associated plots. 
0056 
0057 root -l -b -q numericInverse_2D.C'(1)'
0058 
0059 It differs from the original numericInverse.C in that it has the hooks in to generate the calibration in different pseudorapidity windows. Upon first calculation, there really is no difference in the calibration constants as a function of pseudorapidity, but this might change with the 0mrad crossing angle data. 
0060 
0061 drawCorr.C
0062 
0063 Draws the uncorrected and corrected JES and JER for comparison. It has a flag for using the JES to perform the calibration, but you can ignore that. Just set it to zero. 
0064 
0065