5,513 bytes added
, 03:22, 4 June 2022
== ROOT Tutorials ==
<font><i>In general, my lesson plan was as follows:</i></font>
* Show you how to run PROOF (emphasizing the code needed)
** TChain files together
** Make template header, code, and PROOF starting files for specific .root data files
** Troubleshooting PROOF run errors (whether it's your code or the cluster's errors)
* Basic analysis code
** Explain online & offline triggers
** Analysis cut (lots to discuss)
** Ways to display data (and interpret it)
** Calculating invariant mass, delta phi, etc.
** Calculating Accidental Scaling Factor
** Tag weighting (accidental subtraction)
** Two calculations for Sideband Subtraction
** Fitting histograms
** Cross section (differential and total)
* Provide sample code and tricks
** Setup an array (using a for loop or with direct input, depending on the occasion)
** Reorder things from high to low mass (how to deal with multiple combinations at once)
** TLorentzVectors
** Create new .root files
** Create marcos to print, make GIF's, fit data, etc.
** TGraphs & TSplines
* Final Summary
** Walk you through my analysis for determining the Eta meson cross section
** Big picture stuff that puts everything all together and hopefully makes it all make sense
=== <u>Lesson #1</u> ===
[https://zeus.phys.uconn.edu/tutorials/ROOT_Training/Lesson_1/ROOT_Framework_Lesson1.mp4 Lesson #1 Video] <br>
{{#widget:Video|url=https://zeus.phys.uconn.edu/tutorials/ROOT_Training/Lesson_1/ROOT_Framework_Lesson1.mp4|width=200|height=120}} <br>
<br>
* [https://zeus.phys.uconn.edu/tutorials/ROOT_Training/Lesson_1/Lesson_1.C C++ code examples used in lesson #1] <br>
<br>
=== <u>Lesson #2</u> ===
[https://zeus.phys.uconn.edu/tutorials/ROOT_Training/Lesson_2/ROOT_Framework_Lesson2.mp4 Lesson #2 Video] <br>
{{#widget:Video|url=https://zeus.phys.uconn.edu/tutorials/ROOT_Training/Lesson_2/ROOT_Framework_Lesson2.mp4|width=200|height=120}} <br>
<br>
=== <u>Lesson #3</u> ===
[https://zeus.phys.uconn.edu/tutorials/ROOT_Training/Lesson_3/ROOT_Framework_Lesson3.mp4 Lesson #3] <br>
{{#widget:Video|url=https://zeus.phys.uconn.edu/tutorials/ROOT_Training/Lesson_3/ROOT_Framework_Lesson3.mp4|width=200|height=120}} <br>
<br>
* [https://zeus.phys.uconn.edu/tutorials/ROOT_Training/Lesson_3/Lesson3_CodeHints.C C++ code examples used in lesson #3] <br>
* [https://zeus.phys.uconn.edu/tutorials/ROOT_Training/Lesson_3/Lesson3.C Additional C++ code examples added to the file used in lesson #1] <br>
<br>
=== <u>Lesson #4</u> ===
[https://zeus.phys.uconn.edu/tutorials/ROOT_Training/Lesson_4/ROOT_Framework_Lesson4.mp4 Lesson #4]<br>
{{#widget:Video|url=https://zeus.phys.uconn.edu/tutorials/ROOT_Training/Lesson_4/ROOT_Framework_Lesson4.mp4|width=200|height=120}}
<br>
<br>
=== <u>Lesson #5</u> ===
[https://zeus.phys.uconn.edu/tutorials/ROOT_Training/Lesson_5/ROOT_Framework_Lesson5.mp4 Lesson #5]<br>
{{#widget:Video|url=https://zeus.phys.uconn.edu/tutorials/ROOT_Training/Lesson_5/ROOT_Framework_Lesson5.mp4|width=200|height=120}}
<br>
<br>
=== <u>Additional Resource Files</u> ===
<font><i>This file can be uploaded in to a personal annex directory on gluey and manipulated with ROOT to plot the TH1D's and TH2D's contained within.</i> <br>
* [https://zeus.phys.uconn.edu/tutorials/ROOT_Training/TwoG_jul_16_2021Analysis.root ROOT file with TTree h1] <br>
<p style = "text-indent: 40px"> <u>If inside the folder containing the .root file, use the command</u>: </p>
<p style = "text-indent: 80px"><i><b>root -l TwoG_jul_16_2021Analysis.root</b></i></p> <br>
<p style = "text-indent: 40px"> <u>If you know the path to the file then use</u>: </p>
<p style = "text-indent: 80px"> <i><b>root -l</b></i> </p>
<p style = "text-indent: 80px"> <i><b>TFile *_file0 = TFile::Open("/nfs/direct/annex/mcintyre/AnalysisXII/TwoG/inv_mass/TwoG_jul_16_2021Analysis.root")</b></i> </p> <br>
<p style = "text-indent: 240px"><u>or</u></p> <br>
<p style = "text-indent: 80px"><i><b>root -l /nfs/direct/annex/mcintyre/AnalysisXII/TwoG/inv_mass/TwoG_jul_16_2021Analysis.root</b></i></p> <br>
<br>
<br>
<font><i>These files are the three files needed to run a PROOF session. These files, written in C++, contain basic clean-up cuts for Radphi data analysis as discussed during the tutorial videos. Running a PROOF session on files such as these are how the .root file (listed above) was created.</i> <br>
* [https://zeus.phys.uconn.edu/tutorials/ROOT_Training/proof_TwoG_jan_8_2021.C C++ code used to TChain data files and setup PROOF service.] <br>
* [https://zeus.phys.uconn.edu/tutorials/ROOT_Training/TwoG_jan_8_2021.h Header file used to perform data analysis.] <br>
* [https://zeus.phys.uconn.edu/tutorials/ROOT_Training/TwoG_jan_8_2021.C TSelector used to perform data analysis.] <br>
<br>
<br>
<gallery caption="Images of histograms contained within the TTree of TwoG_jul_16_2021Analysis.root. These are three examples of the type of histograms you can produce using the ROOT framework." widths="400px" heights="300px" class="center">
NoBeamHoleCut_6g.png|Figure 1: A TH2D histogram plotting polar angle of a photon in the LGD versus its energy. This plot was generated with all clean-up cuts except the beamhole cut.
BeamHoleCut_6g.png|Figure 2: A TH2D histogram plotting polar angle of a photon in the LGD versus its energy. This plot was generated with all clean-up cuts including the beamhole cut.
</gallery>
[[Image:t_histogram.png|center|thumb|475px|Figure 3: A TH1D histogram of the Mandelstam variable t for the two gamma final state sample.]]