February 7th to 14th, 2020
For our project, we are designing a calorimeter for the Circular Electron-Positron Collider. The goal of this project is to design a high resolution calorimeter to measure the energy of incident particles as accurately as possible. While electromagnetic calorimeters are generally high resolution and precise, hadron calorimeters measuring particles with quarks are not as high res. The resolution of a calorimeter is determined by the following formula: σ/E=s/√E⊕n/E⊕c. The sigma represents the calorimeter's resolution; s is the sampling term while c is a constant term improved by calorimeter design; n is the noise term.
A sampling calorimeter is comprised of alternating layers of a passive material (usually copper, but anything with a high nuclear charge works) that creates particle showers through collisions and layers of active material (usually plastic scintillator, though liquid argon works as well) which measures and extrapolates the number of particles using photometric imaging. The resolution can be graphed as a Gaussian/normal distribution--the goal is the reduce the standard deviation of the distribution to make it narrower and less dispersed; therefore, the calorimeter can distinguish between showers created by two particles.
In preparation for the coding, I have installed and configured Xming and Putty (following this tutorial: http://laptops.eng.uci.edu/software-installation/using-linux/how-to-configure-xming-putty) and SSH-ed to the Tier 3 computing cluster with the GEANT library. Upon opening Putty, I saved my session, selected "Load", then checked if X11 was running (SSH > X11> Enable X11 Forwarding).
February 14th to 21st, 2020
This week, I ran a GEANT tutorial provided by Dr. Eno, who provided the following commands:
mkdir junk
cd junk
cp /home/eno/dualReadout/cepc_calotiming/g4env.sh .
source ./g4env.sh
cp -r /cvmfs/geant4.cern.ch/geant4/10.5/share/examples/basic/B4/B4a .
mkdir build
cd build
cmake -DGeant4_DIR=/cvmfs/geant4.cern.ch/geant4/10.5/x86_64-slc6-gcc63-opt/lib64/GEANT4-10.5.0 ../B4a
make
./exampleB4a -u Xm
Next to the “session” prompt in the window that pops up:
/run/beamOn 1
(While attempting this tutorial, make sure you have X11 running.)
After running this code, I received the following diagram:
February 21st to 28th, 2020
At our meeting, Dr. Eno provided us with code to modify how our histograms display in ROOT, which I added to a file called "rootlogon.c" in my personal directory on the cluster.
// This is the file rootlogon.C
{
printf("\n Beginning new ROOT session\n"); TStyle *myStyle = new TStyle("MyStyle","My Root Styles"); // from ROOT plain style
myStyle->SetCanvasBorderMode(0);
myStyle->SetPadBorderMode(0);
myStyle->SetPadColor(0);
myStyle->SetCanvasColor(0);
myStyle->SetTitleColor(1);
myStyle->SetStatColor(0); myStyle->SetLabelSize(0.03,"xyz"); // size of axis values // default canvas positioning
myStyle->SetCanvasDefX(900);
myStyle->SetCanvasDefY(20);
myStyle->SetCanvasDefH(550);
myStyle->SetCanvasDefW(540); myStyle->SetPadBottomMargin(0.1);
myStyle->SetPadTopMargin(0.1);
myStyle->SetPadLeftMargin(0.1);
myStyle->SetPadRightMargin(0.1); myStyle->SetPadTickX(1);
myStyle->SetPadTickY(1); myStyle->SetFrameBorderMode(0); myStyle->SetOptStat(111111);
myStyle->SetMarkerStyle(21);
myStyle->SetMarkerSize(0.6);
myStyle->SetMarkerColor(kBlue); gROOT->SetStyle("MyStyle");
gROOT->ForceStyle("MyStyle");
}
This week, I mainly worked on the ROOT tutorial provided by Dr. Eno, as I am unfamiliar with ROOT. The tutorial is linked here.
February 28th to March 6th, 2020
This week, I continued working on the ROOT tutorial linked above.
I also explored more of the files in the B4a example in GEANT alongside Dr. Eno's GEANT tutorial. I looked through run2.mac to see the syntax of the macros, so that I can create my own macro to run 1000 1GeV electron events and plot them in a histogram (the next step in Dr. Eno's tutorial).
I also looked through B4DetectorConstruction.cc (cd /junk/B4a/src). The code showed what the active and passive materials in the detector are (liquid Argon and lead, respectively), as well as their widths. I am working on running the example with different detector materials. Below is a screencap of B4DetectorConstruction.cc:
March 6th to March 13th, 2020
This week, I worked on the ROOT tutorial until the section on fitting. I worked through the provided examples and displayed histograms with fits, etc. Below are the histograms I made.
Demo Histogram
Gaussian Fit for a Histogram (with 2, 10, 100, 1000, 5000, and 10,000 randomly generated Gaussian values)
March 13th to March 27th, 2020
This week, I worked on the ROOT tutorial until the section on ROOT-tuples so that I am familiar with ROOT. Dr. Eno provided a file, toyMC.C, which I opened in GitHub and copied onto my laptop. I then sftp'd the file to my Tier 3 cluster directory using Command Prompt.
I used ROOT to open the file.
March 27th to April 10th, 2020
Once familiarized with ROOT, I worked on running the B4a example to generate histograms. First, I wrote a macro to run 1000 500 MeV electrons:
#initialize
/run/initilize
#define particle as electron
/gun/particle e-
#define the energy of the particle
/gun/energy 500 MeV
#run the example 1000 times
/run/beamOn 1000
exit
Then, I ran the macro in the B4a example detector using ./exampleB4a -m eRun.mac
The data is then saved in the file B4.root. Opening it with:
root.exa B4.root
TBrowser a
gave me this histogram:
This is a plot of the energy deposited in the passive layers of the detector (made of lead). There is also plots of the energy deposited in the absorber (liquid argon), and the path lengths of the particles in the passive and active materials each.
I am working on determining the energy resolution by dividing the histograms of Eabs/Egap and multiplying by Egap to determine a scale factor, and then determine the energy resolution of the calorimeter.
April 10th to April 17th, 2020
I had problems with histograms for energies greater than 1 GeV not showing up.
To fix this, I edited B4aEventAction.cc in the src directory and modified the histogram so it would plot the deposited energies divided by the true energy (i.e., as fractions of the true energy. Then, I modified B4RunAction.cc to change the scale of the x-axis so the histograms would display correctly. The histograms were as follows:
^ energy deposited in the passive material
^ energy deposited in the scintillator
The mean of the energy deposited in the absorber was 0.9482 of the true energy, while the mean of the energy deposited in the scintillator was 0.05179 of the true energy. However, when run for events larger than 1 GeV or so, these stats do not accurately represent the calorimeter's detection because the true energy =/= Egap + Eabs (because energy leaks from the calorimeter).
Currently, I am working on plotting the histograms using a scale factor to determine the energy resolution of the calorimeter.
April 17th to April 24th, 2020
As the code in B4aEventAction.cc does not define a true energy variable, I had to input the true energy for the scale factor every time I changed the particle energy and recompile. The code is shown below, but it is apparent that this method is time-consuming and ineffective as it required me to recompile every time I changed the source code.
This week, Dr. Eno gave us the link to a more sophisticated calorimeter (toyplot) made with two active layers of liquid argon and quartz. Cerenkov protons are produced in the quartz layer. Our goal for this calorimeter is to show that resolution improves with the two layers.
Following this link, I downloaded the file and sftp'd it to my directory. From there, I followed the readme:
first clone with using git clone git@github.com:saraheno/dualtoy.git
then compile it with cmake -DGeant4_DIR=/cvmfs/geant4.cern.ch/geant4/10.5/x86_64-slc6-gcc63-opt/lib64/GEANT4-10.5.0 make
you can run it two ways. to run interactively, do ./dualtoy -c template.cfg -u Xm
while to run without the display do ./dualtoy -c template.cfg -m run.mac -o filename where filename is the name of the file you want GEANT to put the output into
Look inside of template.cfg. You will see many options you can change about the detector geometry You can also see other files like run*.mac. these allow running different particles and energies Compare them.
Once you have run a bunch of particles at different energies, you need to make histograms from the geant output. This is done with toyplot.cc. go into root and type .x toyplot.cc Do this once for each GEANT root file you created. You should edit the two lines just after "void toyplot() {" in this file to change the input and output file names.
Now, you want to take these histograms and use them to make resolution curve. Use res.C to do this in root.
My goal for this week is to experiment with the detector geometry as well as running different particles of different energies and comparing their histograms.
April 17th to April 24th, 2020
This week, I ran electrons and pions at energies from 1 to 100 GeV. Here is a histogram showing the energy deposited in the scintillator for 50 GeV:
This histogram only shows 5 events. I ran into a problem while attempting to run 500 particles, as my histograms were displaying nothing. I am currently working on fixing this problem.
This is the process I followed for each run I did:
1. copy run_50GeV_electron_N500.mac to a new file for XGeV and particle. Edit the file to run particle of choice at energy of choice.
2. ./dualtoy -c template.cfg -m inputfilename -o outputfilename. Input file name from previous step.
3. edit toyplot.cc to create histograms. The input file name is the same output file from the previous step. The output is the histogram filename.
4. Go into root, then type .x toyplot.cc and then TBrowser a to create and view histograms.
My next step is to make a resolution curve using res.C.