Difference: ATLASNaplesStudentTutorials (1 vs. 5)

Revision 52016-04-20 - FrancescoCirotto

Line: 1 to 1
 
META TOPICPARENT name="OutReachATLAS"

ATLASNaplesStudentTutorials

Line: 270 to 270
 
  • HLT_mu26_imedium and X is the leading muon pT (X=mu_pt[0]) (hint: use a proper orthogonal trigger): use Wmunu (/data/cirotto/NtupleTutorial_monob/ SUSY7_tutorial_bkg_Wmunu.root)

Are there eta/phi regions where the efficiency is higher?
Added:
>
>

<!--/twistyPlugin twikiMakeVisibleInline-->

<!-- Insert the content here -->
You define 3 histograms, numerator, denominator and ratio. See Here for dividing histograms
             
h_num1d->Sumw2(); //numerator
h_den1d->Sumw2();      //denominator 
h_ratio->Divide(h_num1d, h_den1d, 1, 1, "B") //B option guarantees the correct errors! 
<!--/twistyPlugin-->

 

Dilepton invariant mass reconstruction

Use the variables described before to see data/MC comparison of dilepton invariant mass.
Line: 302 to 321
 

Working with histograms

  1. What are the main backgrounds for these selections? You can check it by using the root files produced after each run of your code. Open it and retrieve the integral of each histogram.
  2. Do a ratio plot, divide your data histogram by the TOTAL MC histogram, and see how is the agreement bin per bin
Added:
>
>
<!--/twistyPlugin twikiMakeVisibleInline-->

<!-- Insert the content here -->
You define 3 histograms, numerator, denominator and ratio. You can clone ratio histogram
             
      
h_num1d->Sumw2(); //numerator
h_den1d->Sumw2();      //denominator 
TH1F *h_ratio = (TH1F*)h_num1d->Clone(); 
h_ratio->Divide( h_den1d) 
<!--/twistyPlugin-->
 

Bonus exercise

Can you reproduce mono jet SR by using TreeReader? Plot the leading jet pt using the proper cuts. You should find the same number for data!
Line: 310 to 347
 
%TWISTY{ mode="div"
Changed:
<
<
showlink="Solution 2"
>
>
showlink="Suggestion 2"
 hidelink="Hide Answer" showimgright="/twiki/pub/TWiki/TWikiDocGraphics/toggleopen-small.gif" hideimgright="/twiki/pub/TWiki/TWikiDocGraphics/toggleclose-small.gif"

Revision 42016-04-20 - FrancescoCirotto

Line: 1 to 1
 
META TOPICPARENT name="OutReachATLAS"

ATLASNaplesStudentTutorials

Line: 46 to 46
 
  1. eta jet TMath::Abs(jet_eta.at(0))<X
  2. tight leading jet jet_fch.at(0) / jet_fmax.at(0) > X
  3. MET: met_nomuon_tst_et/1000 > X
Changed:
<
<
  1. lepton veto n_el==X n_el_baseline==X n_mu_baseline==X =n_mu==X ALL TOGETHER
>
>
  1. lepton veto n_el==X   =n_el_baseline==X  n_mu_baseline==X n_mu==X ALL TOGETHER
 
  1. number of jet n_jet<X
  2. jet-MET mimim phi: jet_met_dphi_min > XX
Line: 228 to 228
 
  • nbins, xmin, and xmax are the number of bins, minimum and maximum in the histograms (you should be familiar since you are experts of TH1!)
  • We won't use the last line for now so please set doScan = false
Added:
>
>
Some advice
  1. The access to vector variables it's not like in yesterday's exercises. For example, to get leading jet pt you have to write jet_pt[0] and NOT jet_pt.at(0). This is because we're passing the string to the tree.
  2. You will get a file with all the histos you defined in your run macro. (Discard about the histos without name) Suggestion: maybe i can produce my histos with TreeReader when I do this Exercise
 

How to run

  1. Open and edit run.C
  2. Update your selection and your trigger
  3. Don't forget to set luminosity! We're working with 2.5 fb-1
  4. Write the variable you want to plot, by using doPlot method
Changed:
<
<
  1. run the code
root -l -b -q run.C
>
>
  1. run the code root -l -b -q run.C
 
  1. You can find your plots in a folder called data
Added:
>
>
  1. You also have a file with the histogram of variables you plotted (divided for each contribution)
 

Variables

If you open a file and type TBrowser you can see al the variables.
Line: 245 to 247
 Trigger Variables: trigger_HLT_+name variable for triggers. xeXX refers to MET triggers, for leptons you can find e or mu in the name
Lepton variables: there are several variable of interest:
Changed:
<
<
  • n_lep and n_mu baseline=: where lep can be e or mu it's the number of lepton
>
>
  • n_lep and n_lep_baseline: where lep can be e or mu it's the number of lepton
 
  • mumu_m, ee_m: dilepton invariant mass
  • enu_mT, munu_mT: transverse mass on lepton-MET system
  • lep_pt, lep_eta,  where lep can be =e or mu, vector variables (pt is in MeV)
Line: 253 to 255
 

Exercises

Added:
>
>

Trigger items

Check if the following trigger items are prescaled in run 267638
  • Level1 items: L1_2MU4, L1_2EM15, L1_TAU8, L1_J12, L1_XE70, L1_XE55
  • High Level Trigger items: HLT_2mu4, HLT_2mu14, HLT_e17_lhloose, HLT_j15, HLT_j25, HLT_xe70, HLT_xe80

In case some of them are prescaled check if the prescale is constant in all the lumiblocks
Fill a table with trigger items, the physical object(s) to which is related, the trigger items seeds and prescales when there is the condition ďstable beamĒ

Trigger efficiencies

Evaluate trigger efficiency of the following trigger items as a function of the variable X:
  • HLT_xe70 and X is the missing energy without muons (X=met_nomuon_tst_et) (hint: use all the event as reference): use Wmunu (/data/cirotto/ NtupleTutorial_monob/SUSY7_tutorial_bkg_Wmunu.root) and compare the results with the data
  • HLT_mu26_imedium and X is the leading muon pT (X=mu_pt[0]) (hint: use a proper orthogonal trigger): use Wmunu (/data/cirotto/NtupleTutorial_monob/ SUSY7_tutorial_bkg_Wmunu.root)

Are there eta/phi regions where the efficiency is higher?
 

Dilepton invariant mass reconstruction

Use the variables described before to see data/MC comparison of dilepton invariant mass.
Line: 285 to 303
 
  1. What are the main backgrounds for these selections? You can check it by using the root files produced after each run of your code. Open it and retrieve the integral of each histogram.
  2. Do a ratio plot, divide your data histogram by the TOTAL MC histogram, and see how is the agreement bin per bin
Added:
>
>

Bonus exercise

Can you reproduce mono jet SR by using TreeReader? Plot the leading jet pt using the proper cuts. You should find the same number for data!
Suggestion: you should edit the input file in /config/ where to put path to Giuliano's file.
<!--/twistyPlugin twikiMakeVisibleInline-->

<!-- Insert the content here -->
Actually there's already in your folder, so write down the selection in your run.C!
<!--/twistyPlugin-->
 
<!-- ********************************************************* -->
<!-- Do NOT remove the remaining lines, but add requested info as appropriate-->

Revision 32016-04-19 - FrancescoCirotto

Line: 1 to 1
 
META TOPICPARENT name="OutReachATLAS"

ATLASNaplesStudentTutorials

Line: 16 to 16
 
ssh -XY -p5022 <your_user>@atlasui03.na.infn.it
Added:
>
>
or on lxplus
ssh -XY <your_cern_user>@lxplus.cern.ch
  and setup all you need to use ROOT
Changed:
<
<
setupATLAS lsetup root
>
>
export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh localSetupROOT
 

Input files can be found here

Line: 33 to 38
 Now we are ready for the exercises.
Changed:
<
<

SR selection

Implement the Signal Region selection reading the data TTree and plot the leading jet pt and MET distribution with the 3.21 fb-1 available (you have to count 21447 events).
>
>

Selection criteria

NOTE THAT SOME VARIABLES ARE VECTORS
  1. trigger: trigger_HLT_xe70==1
  2. good events: last>=X
  3. leading jet pt: jet_pt.at(0)/1000 > X We divide to have it in GeV
  4. eta jet TMath::Abs(jet_eta.at(0))<X
  5. tight leading jet jet_fch.at(0) / jet_fmax.at(0) > X
  6. MET: met_nomuon_tst_et/1000 > X
  7. lepton veto n_el==X n_el_baseline==X n_mu_baseline==X =n_mu==X ALL TOGETHER
  8. number of jet n_jet<X
  9. jet-MET mimim phi: jet_met_dphi_min > XX

Suggestion : use a MakeClass to read the TTree. You can create it with the following commands:

root -l -b
TChain c
c.Add("/afs/cern.ch/work/g/ggustavi/public/MJ135_stuffs/MJ135_minitrees/run_MJ135_data.root/tree_data")
c.MakeClass("myAnalysis")
for running
root -l -b
.L myAnalysis.C
myAnalysis pippo
pippo.Loop()
 
Changed:
<
<
Suggestion: use a TSelector to read the TTree. You can create it with the following commands:
>
>
Suggestion 2: use a TSelector to read the TTree. You can create it with the following commands:
 
root -l -b
TChain c
c.Add("/afs/cern.ch/work/g/ggustavi/public/MJ135_stuffs/ MJ135_minitrees/run_MJ135_data.root/tree_data")
c.MakeSelector("myAnalysis")
Changed:
<
<
In myAnalysis.C remember to add in Process() method the following line
>
>
MakeSelector command produces an output similar to MakeClass. There are some differences, which Giuliano will show you.
See here for more information: Root Guide, and Root Guide 2 and and Root Guide Online

Edit myAnalysis.C to book your histograms and using the variable you need. In myAnalysis.C remember to add in Process() method the following line
 
 
fChain->GetEntry(entry);
Added:
>
>
for running
root -l -b

Exercises

1. Implement the Signal Region selection reading the data TTree and plot the leading jet pt and MET distribution with the 3.21 fb-1 available (you have to count 21447 events).
 
Changed:
<
<
Add to (1) the background MC simulations to make a data/MC comparison
>
>
2. Add to (1) the background MC simulations to make a data/MC comparison
 
Remember to set the weight correctly. Use the variable weight but remember that it is normalized to 1 fb-, so you need to scale the distributions for the proper luminosity.
Changed:
<
<
Do the same but in the range 150 GeV < MET < 250 GeV
>
>
3. Do the same but in the range 150 GeV < MET < 250 GeV
 
What do you note? which could be the explanation?
Changed:
<
<
Test the behavior of the MET with the pileup plotting the 2D histogram of the average interaction per bunch crossing VS MET and make the histogram profile.
>
>
4. Test the behavior of the MET with the pileup plotting the 2D histogram of the average interaction per bunch crossing VS MET and make the histogram profile.
 
Changed:
<
<
Repeat (1) and (2) in the Control Region with one muon following the same selection of the Signal Region
>
>
5. Repeat (1) and (2) in the Control Region with one muon following the same selection of the Signal Region
 
Add the cut on the () transverse mass 30 GeV < mT < 100 GeV. The transverse mass definition is
Line: 79 to 125
  /afs/cern.ch/user/g/ggustavi/public/MET_tutorial
Changed:
<
<
N.B. Donít use those macro because are complex and you donít need so many features in your plots.
>
>
N.B. Donít use those macros because are complex and you donít need so many features in your plots.
 

Lepton exercise

Added:
>
>
With this exercise you will work with lepton variables.

Setup

Go to your accounts on atlas UI
ssh -XY -p5022 <your_user>@atlasui03.na.infn.it

Now copy on your local folder the code for the analysis:

cp -r /data/cirotto/TreeReader_tutorial .

Go in the directory and do de setup

cd TreeReader_tutorial 
source setROOT.sh
Now that you completed setup, let's see how to use the code

TreeReader

You will work with TreeReader code, it's a simple class that reads trees and do plots. You have to create a run macro which exploits TreeReader methods. You have a template in your directory, run.C. What you need to do is
  1. Have a selection to use: this means a trigger and a selection for your region of interest
  2. Set your luminosity
  3. Using the doPlot() method for plotting your variable

This is a possible code that you will use
void run()
{
  //Don't modify this line
  gROOT->ProcessLine(".L TreeReader.cxx+");
 
Added:
>
>
TStopwatch p; p.Start();
 
Added:
>
>
//Write your selection and the trigger you want to use TString selection = " my selection"; TString trigger = " my trigger";

//Tag for your plot TString tag = " my tag";

//UPDATE YOUR PATH! TreeReader plot("my path);

//set LUMI for MC plot.SetLumi(myLumi);

//Set weight for bkg plot.SetWeight("weight"); //deafult is "weight"

//set weight for signal plot.SetSigWeight("weight"); //default is weight, set weight for signal as appropriate

//rescale signal (ONLY signal!) plot.SetSigScale(1); //default is 1

//Set Bkg error on significance calculation plot.SetBkgError(0.15); //default is 0.

//Set LogScale plot.SetLogScale(true);

//Draw Plot plot.doPlot("n_jet","n_jet","n jet", selection + trigger, tag,

      1. ,0,6, false,"n_jet",3,0,6, false);

plot.DrawPlot();

p.Stop(); p.Print();

}

Let's focus on doPlot method. It has the following structure

void TreeReader::doPlot(TString histoTitle, TString var, TString title, TString selection, TString selTag,
                         Int_t nbins, Double_t xmin, Double_t xmax,
                         Bool_t doScan, TString cut, Int_t div, Double_t min, Double_t max, Bool_t doRev)
  • The variable present in the TTree is the second one, var. Be careful to use a variable present in the tree, or you will get a crash!
  • histoTitle and title are strings for histogram name and its title
  • selTag just a string which will give a tag to your file
  • nbins, xmin, and xmax are the number of bins, minimum and maximum in the histograms (you should be familiar since you are experts of TH1!)
  • We won't use the last line for now so please set doScan = false

How to run

  1. Open and edit run.C
  2. Update your selection and your trigger
  3. Don't forget to set luminosity! We're working with 2.5 fb-1
  4. Write the variable you want to plot, by using doPlot method
  5. run the code
root -l -b -q run.C
  1. You can find your plots in a folder called data

Variables

If you open a file and type TBrowser you can see al the variables.
Trigger Variables: trigger_HLT_+name variable for triggers. xeXX refers to MET triggers, for leptons you can find e or mu in the name
Lepton variables: there are several variable of interest:
  • n_lep and n_mu baseline=: where lep can be e or mu it's the number of lepton
  • mumu_m, ee_m: dilepton invariant mass
  • enu_mT, munu_mT: transverse mass on lepton-MET system
  • lep_pt, lep_eta,  where lep can be =e or mu, vector variables (pt is in MeV)
MET: met_nomuon_tst_et, met_noelectron_tst_et they're in MeV, remind to divide if you want to have GeV

Exercises

Dilepton invariant mass reconstruction

Use the variables described before to see data/MC comparison of dilepton invariant mass.
What about Z->mumu? We need to selects events with 2 muons and no electrons. The opposite for Z->ee.
Use the following selections:
  • Zmumu
    • Trigger trigger_HLT_mu26_imedium
    • Selection: number of muons and electrons, 66 < dilepton mass < 116 (in GeV)
  • Zee
    • Trigger trigger_HLT_e24_lhmedium_L1EM18VH|| trigger_HLT_e24_lhmedium_L1EM20VH|| trigger_HLT_e60_lhmedium || trigger_HLT_e120_lhloose
    • Selection: number of muons and electrons, 66 < dilepton mass < 116 (in GeV)

Lepton-neutrino transverse mass reconstruction

Use the variables described before to see data/MC comparison of transverse mass.
You can reconstruct W->munu and W->enu mass
Use the following selections:
  • Wmunu
    • Trigger trigger_HLT_xe70 and MET > 200 GeV
    • Selection: number of muons and electrons
  • Wenu
    • Trigger trigger_HLT_xe70 and MET > 200 GeV
    • Selection: number of muons and electrons
 
Added:
>
>

Working with histograms

  1. What are the main backgrounds for these selections? You can check it by using the root files produced after each run of your code. Open it and retrieve the integral of each histogram.
  2. Do a ratio plot, divide your data histogram by the TOTAL MC histogram, and see how is the agreement bin per bin
 

<!-- ********************************************************* -->

Revision 22016-04-19 - FrancescoCirotto

Line: 1 to 1
 
META TOPICPARENT name="OutReachATLAS"

ATLASNaplesStudentTutorials

<!-- this line is optional -->
Deleted:
<
<
Please ensure this page is compatible with the ATLAS Twiki Rules. Thank You - your ATLAS TWiki Support team
In particular:
  1. Page is linked from another TWiki page - this is natural if you create a page by introducing a new link on a page and then create the page by clicking on "?". Do NOT create pages in other ways - else the parent (listed at top of page) will be WebPreferences, which is not correct.
  2. Page name must be a WikiWord of the form
    • Uppercase letter(s), followed by
    • Lowercase letter(s) or number(s), followed by
    • Uppercase letter(s)
    • Additional lowercase or uppercase letter(s) or numbers are optional and may follow in any order.
    • Underscore "_" and Dash "-" are not valid in the name
  3. Pages must have an appropriate Metadata Parent - if you don't understand what this means, look at the ATLAS Twiki Rules.
  4. If there are technical problems or questions not covered on the Atlas Documentation TWiki, please contact PatrickJussel or MariaSmizanska.
 

Introduction

Added:
>
>
This tutorial is aimed at (new and old) members of the ATLAS collaboration interested in learning the basics of ATLAS physics analysis tools. There are several introductory lectures aimed at introducing the topics followed by practical sessions.
You need ONLY an atlas UI account on Naples machine

Missing Energy exercise

Go to your accounts on atlas UI
ssh -XY -p5022 <your_user>@atlasui03.na.infn.it

and setup all you need to use ROOT

setupATLAS
lsetup root

Input files can be found here

/data/cirotto/NtupleTutorial_monojet
/afs/cern.ch/work/g/ggustavi/public/MJ135_stuffs/MJ135_minitrees
the directories are public, so you can read the files from here...don't copy it on your directories, they're big and require time!
Now we are ready for the exercises.

SR selection

Implement the Signal Region selection reading the data TTree and plot the leading jet pt and MET distribution with the 3.21 fb-1 available (you have to count 21447 events).

Suggestion: use a TSelector to read the TTree. You can create it with the following commands:

root -l -b
TChain c
c.Add("/afs/cern.ch/work/g/ggustavi/public/MJ135_stuffs/ MJ135_minitrees/run_MJ135_data.root/tree_data")
c.MakeSelector("myAnalysis")
In myAnalysis.C remember to add in Process() method the following line
 
fChain->GetEntry(entry);

Add to (1) the background MC simulations to make a data/MC comparison
Remember to set the weight correctly. Use the variable weight but remember that it is normalized to 1 fb-, so you need to scale the distributions for the proper luminosity.

Do the same but in the range 150 GeV < MET < 250 GeV
What do you note? which could be the explanation?

Test the behavior of the MET with the pileup plotting the 2D histogram of the average interaction per bunch crossing VS MET and make the histogram profile.

Repeat (1) and (2) in the Control Region with one muon following the same selection of the Signal Region
Add the cut on the () transverse mass 30 GeV < mT < 100 GeV. The transverse mass definition is



In this case the muon is a signal muon and not a baseline one.
Since that we are using the MET with the muons treated as invisible particles, which informations does the MET distribution give to us?

Solutions: don't cheat!

The macros and the results are in
 /afs/cern.ch/user/g/ggustavi/public/MET_tutorial

N.B. Donít use those macro because are complex and you donít need so many features in your plots.

Lepton exercise

 
Deleted:
<
<
<!-- Add an introduction here, describing the purpose of this topic. -->
 
Deleted:
<
<

Main heading

 
Deleted:
<
<
<!-- Add the main topic here. i.e. create some new headings as follows: -->
 
<!-- ********************************************************* -->
<!-- Do NOT remove the remaining lines, but add requested info as appropriate-->

Revision 12016-04-15 - ArturoS

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="OutReachATLAS"

ATLASNaplesStudentTutorials

<!-- this line is optional -->

Please ensure this page is compatible with the ATLAS Twiki Rules. Thank You - your ATLAS TWiki Support team
In particular:

  1. Page is linked from another TWiki page - this is natural if you create a page by introducing a new link on a page and then create the page by clicking on "?". Do NOT create pages in other ways - else the parent (listed at top of page) will be WebPreferences, which is not correct.
  2. Page name must be a WikiWord of the form
    • Uppercase letter(s), followed by
    • Lowercase letter(s) or number(s), followed by
    • Uppercase letter(s)
    • Additional lowercase or uppercase letter(s) or numbers are optional and may follow in any order.
    • Underscore "_" and Dash "-" are not valid in the name
  3. Pages must have an appropriate Metadata Parent - if you don't understand what this means, look at the ATLAS Twiki Rules.
  4. If there are technical problems or questions not covered on the Atlas Documentation TWiki, please contact PatrickJussel or MariaSmizanska.

Introduction

<!-- Add an introduction here, describing the purpose of this topic. -->

Main heading

<!-- Add the main topic here. i.e. create some new headings as follows: -->

<!-- ********************************************************* -->
<!-- Do NOT remove the remaining lines, but add requested info as appropriate-->
<!-- ********************************************************* -->


<!-- For significant updates to the topic, consider adding your 'signature' (beneath this editing box) -->
Major updates:
-- ArturoS - 2016-04-15

<!-- Person responsible for the page: 
Either leave as is - the creator's name will be inserted; 
Or replace the complete REVINFO tag (including percentages symbols) with a name in the form TwikiUsersName -->
Responsible: ArturoS
Subject: outreach
<!-- Once this page has been reviewed, please add the name and the date e.g. Arturo Sanchez- 15 Apr 2016 -->
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback