Categories
ATLAS recipes

Truth D3PD root example

  • On titan, copy the following file ~willocq/root/example/simple_plot_truth.C to your own subdirectory. After setting up root with localSetupROOT, the simple plotting macro can be run with

root simple_plot_truth.C

or you can just start root and at the root prompt type:

.x simple_plot_truth.C

  • Once this is working, extend the macro to create additional canvases like c1 to plot the following variables stored in the truth ntuple file that is opened in the macro:
    • jetAntiKt4TruthJets_pt          transverse momentum of truth jets
    • jetAntiKt4TruthJets_eta        pseudorapidity  of truth jets
    • el_pt                                           transverse momentum of truth electrons
    • el_eta                                         pseudorapidity of truth electrons
    • mu_muid_pt                             transverse momentum of truth muons
    • mu_muid_eta                           pseudorapidity of truth muons
  • Do the above plots with a logarithmic vertical scale
  • Produce a second set of those above plots with a minimum pt cut of 25000 MeV for  jets and 5000 MeV for both electrons and muons, i.e. in the example there is a cut on the barcode, simply replace that with a cut on the variable mu_muid_pt>5000 for muons, and similarly for electrons and jets
  • Produce a plot of the pseudorapidity of electrons and muons (separately) showing an overlay of negatively and postively charged particles (histograms with different colors).
Categories
ATLAS recipes

Drawing data/MC overlay plots

To make nice overlay plots comparing data and Monte Carlo distributions, you will need to copy the following files from /home/willocq/root/MuonESDAnalysis/:

  • plot_overlay.C
  • RescaleVariableBinHisto.C

Assuming you have a full complement of data and MC histograms, and have already executed run_hadd.sh, you should create a plots subdirectory and then produce the data/MC plots with:

  • root -q -b plot_overlay.C

To view the output plots in pdf, you can use the display command:

  • display filename.pdf
Categories
ATLAS recipes

Submitting muon analysis jobs to batch system on titan

To submit muonana jobs to the batch system on titan and combine the output histograms, the following files from /home/willocq/root/MuonESDAnalysis/ are needed:

  • batchscript.pl
  • batchrun_muonana.C
  • run_hadd.sh

To submit batch jobs for real data type the first line for only data period J (as a test) or the second line for all data periods:

  • perl batchscript.pl -s dataJ
  • perl batchscript.pl -s alldata

To submit batch jobs for simulated Monte Carlo data, use:

  • perl batchscript.pl -s allmc

To monitor the progress of your batch jobs type the first line to see all jobs or the second to see only your own jobs:

  • qstat
  • qstat -u $USER

Finally, the output histogram files can be merged with the hadd command by executing:

  • ./run_hadd.sh
Categories
ATLAS recipes

Muon ntuple analysis

On titan, copy the following files from ~willocq/root/MuonESDAnalysis/:

  • GoodRunSelector.h
  • GoodRunSelector.C
  • muonana.h
  • muonana.C
  • run_muonana.C

The analysis can be run with

  • root -q -b run_muonana.C

Output histograms are stored in the file histos.root.

A list of variables contained in the muon ntuple is available in the file MuonBranch.h, which includes a brief description of the meaning of each variable.