https://github.com/robotal/HONR268N
https://github.com/robotal/PythiaWork
Note: Logbook info is on HEP3 UMD website due to security reasons, class stuff will still be here.
Semester 2 - Cluster Computing Project
Tuesday - February 2nd, 2016
Working on the pythia tutorial
Making Z decay events to electron positron pairs.
Thursday - February 11th, 2016 2:29 AM
TODO: if you did this right, if you plot the invariant mass of the two highest pT electrons in the event, you should see a nice bump at 1500 GeV. Please make this plot.
For this step, we first checked if the pythia.event[i].id() was equal to 11 or -11. This indicates that the event is an electron. We then compared the pT to the highest we'd seen so far, and replaced it if necessary. Here is the code that is in charge of this.
//check that the event is an electron
if(pythia2.event[i].id() ==11 || pythia2.event[i].id() == -11){
//if it is an electron compare and store the pT and invariant mass
cout << "FOUND AN ELECTRON with event id: " << i << " mass is: " << pythia2.event[i].pT() << endl;
//highest pT found so far, shift 1 to 2 and replace 1
if(particlePT > pT1){
pT2 = pT1;
pT1 = particlePT;
}
//higher than pT2 but lower than pt1
else if(particlePT > pT2){
pT2 = particlePT;
}
}
Next, at the end of each event, I filled a histogram called mass with the sum of pT1 + pT2 (massHist->Fill(pT1 + pT2);)
In the next step we added the new pythia run params for a Z boson background.
TODO: in a run of 20 fb-1, how many Zprime will be made? How many DY? What is the ratio of signal over background?
1. In order to predict the amount of particles generates, we multiply the cross section by luminosity. For the Zprime process, pythia indicates a cross section of 73.30 fb. For the Drell-Yan process, pythia indicates a cross section of 2.605e6 fb. Since the integrated luminosity is 20 fb, we get for each particle:
Zprime = 73.3 fb * 20 fb-1 = 1466
Drell-Yan = 2.605e6 fb * 20 fb-1 = 5.2e7
The ratio of signal to background is: 1466/5.2e7 = 2.82e-5
Scale factor for DY is 1/2.82e-5 = 35461
TODO: can you design selection requirements to improve the signal to background ratio? Apply these selection requirements to the events you generated and calculate from the results the improvement.
For the next step, we created another pythia instance called pythia2, with which we used the Drell Yan background cards before initializing it. We then created two histograms, one for the signal and one for the background. We then ran 1000 events on each, except the scale for the second histogram was 35461 (since that is how many more events of DY we have over signal). We then superimposed the histograms on one canvas and got the following:
Final code found here: https://github.com/robotal/PythiaWork/blob/master/pythiaTree.cc
Created github repository based on the tutorial @ Tutorial 2
Wrote a basic C++ "Hello World Program"
Code:
#include <iostream>
using namespace std;
int main() {
cout <<"Hello World!" << endl; //Follow by endline
return 0;
}
Note: In the github tutorial, step 5 when initializing your repo states:
git remote add origin https://github.com/your_github_user_name/HONRPHYS.git
However, you should not use the https link, and instead use the ssh url which looks like:
git@github.com:githubUsername/repository_name.git
Saturday - October 3rd, 2015
Began to further learn how to code c++
Variables: http://www.cplusplus.com/doc/tutorial/variables/
Variables are strongly typed, and are not automatically casted up
For example, multiplying an int by a double will cast the result to an integer. This truncates the result of the multiplaction.
Variable names are case sensitive, and can not start with a digit.
Variable types have a minimum length, but can vary depending on the compiler settings
boolean variables are either true or false
Loops are almost identical to java loops, there are two different loop types, a for loop and a while loop.
For loop syntax looks like this
for(int a = 0; a<10; a++){
//body
}
While loop syntax looks like this:
while(true){
//executes body infinitely
}
Summary:
Finished programming scripts for homework 4, names are hw4p1.cpp and hw4p2.cpp.
Read chapter on particle interactions
Derived Taylor expansion for kinetic energy from relativity to show that for v << c, KE = 1/2 m v^2 is still true.
Thursday - October 8th, 2015
Learned about c++ reference pointers
Say you have a variable, int i =5; , then the address reserved for i can be accessed with &i
We can store this address in a pointer p, int* p = &i;
If we display p, it will show us the address in memory of i.
In order to access the actual value of that address space, we use cout << p*
The * tells c++ to dereference the variable and look at what is inside
We can also add to the value of p to move the pointer in memory
This allows us loop through an array of ints by just adding 4 bytes to the value of the pointer. Saying p = p +1 will jump 4 bytes based on the size of the integer (usually 4 bytes, but can change based on compiler settings)
Thursday - November 30th, 2015
Changes made on hw9:
When typing ana::ana(TTree *t), make sure to type out "TChain* chain = new TChain("HZZ4LeptonsAnalysisReduced"); // this needs to match the TTree name" correctly. There is an s in Leptons.
In the tutorial where you fill out ana::loop, rename all the jentry and ientry in the for loop to ientry. Since it is not a nested for loop, only one type of variable should be used.
Under section 3, instead of typing out =c1.Print("mee_nocuts.gif")=, you need to call ana->Loop() once again, and then call Z_ee->Draw() in order to display the histogram so it can be saved.