Categories
ATLAS recipes

Phase-II muon ntuple analysis

Instructions:
main instructions for ntuple reader setup at https://gitlab.cern.ch/atlas_hllhc_muon_trigger/muTrigNt_read

Installation
:
  • mkdir n010; cd n010
  • kinit
  • git clone ssh://git@gitlab.cern.ch:7999/atlas_hllhc_muon_trigger/muTrigNt_read.git
  • cd muTrigNt_read
  • bash
  • source scripts/install.sh –tag n010 |& tee install.log
  • source scripts/setup_area.sh –clean |& tee setup_area.log
Install MuTrigNtExampleAna to read ntuples:
info at https://gitlab.cern.ch/atlas_hllhc_muon_trigger/MuTrigNtExampleAna
  • git clone ssh://git@gitlab.cern.ch:7999/atlas_hllhc_muon_trigger/PhaseIIMounTriggerNtuple.git
  • git clone ssh://git@gitlab.cern.ch:7999/atlas_hllhc_muon_trigger/MuTrigNtExampleAna.git
  • git clone ssh://git@gitlab.cern.ch:7999/atlas_hllhc_muon_trigger/MuTrigNtAnaCommon.git
  • git clone ssh://git@gitlab.cern.ch:7999/atlas_hllhc_muon_trigger/RpcRoi.git
  • git clone ssh://git@gitlab.cern.ch:7999/atlas_hllhc_muon_trigger/TgcRoi.git
  • rc find_packages
  • rc compile

Find list of ntuples at https://gitlab.cern.ch/atlas_hllhc_muon_trigger/PhaseIIMuonTriggerNtuple/wikis/home#productions

Download Zmumu ntuples:

  • rucio get user.alarmstr:user.alarmstr.muTrigNt.n010f.147807.PowhegPythia8_AU2CT10_Zmumu.recon.ESD.e1564_s2988_s3000_r10370_EXT0

Running instructions at https://gitlab.cern.ch/atlas_hllhc_muon_trigger/MuTrigNtExampleAna

  • run_example_looper -i ~/work/data/n010/user.alarmstr.muTrigNt.n010f.147807.PowhegPythia8_AU2CT10_Zmumu.recon.ESD.e1564_s2988_s3000_r10370_EXT0/user.alarmstr.13598734.EXT0._000001.muTrigNt.root > run1.log
  • run_SingleMuonAnalysis -i ~/work/data/n010/user.asoffa.muTrigNt.n010b.422070.ParticleGun_single_mu_Pt1000.recon.ESD.e5865_s2988_s3000_r8974_EXT0/user.asoffa.12477721.EXT0._000010.muTrigNt.root

Code repository at https://gitlab.cern.ch/atlas_hllhc_muon_trigger/

Categories
ATLAS recipes

General introduction to particle physics

Below are a set of links that provide a basic introduction to particle physics:

More advanced documents about particle physics:

Categories
ATLAS recipes

Request and set up an account on NET3

Information about the Northeast Tier 3 center is available at https://twiki.cern.ch/twiki/bin/view/Main/UMassNET3.

To request a new account do as follows:

  1. Ask your supervisor to be invited to join the Slack workspace, see http://northeasttier3.slack.com/.
  2. You will receive an email from Slack asking you to “Join Now”, click on that link to create a Slack account.
  3. Generate a public SSH key following https://git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key.
  4. Post your public SSH key on the accounts channel in Slack and request an account, see this example. You should suggest a username (see login in the picture) and also request the zsh Unix shell (not shown in the picture).
  5. Once your SSH key is installed on NET3 you can log in with ssh -Y username@um3.net3.mghpcc.org
  6. For ease of use of NET3, you may want to install the x2goclient which allows you to create a remote desktop, see https://wiki.x2go.org/doku.php.

Once you are able to login to NET3, you need to set up your account to work on ATLAS. Follow these steps:

  1. Copy a basic zsh setup file to have access to ATLAS software:
    cp ~willocq/example.zshrc ~/.zshrc
  2. If you want to run vanilla ROOT, type:
    lsetup root
  3. To run root, type:
    root
Categories
ATLAS recipes

MadGraph + Pythia for multijet event generation

Here is basic information on how to generate multijet events with MadGraph + Pythia at the Northeast Tier 3 center.

Initial setup

  • Create a directory for event generation:
    cd
    mkdir -p evgen/MG5
  • Copy job options files and run script:
    cd evgen/MG5
    cp ~willocq/evgen/MG5/MC15.33344*.py .
    cp ~willocq/evgen/MG5/run_evgen.sh .

To run

  • Do the following in each new terminal session:
    setupATLAS
    cd evgen/MG5
    asetup AtlasProduction,19.2.5.34,here
  • Create a new subdirectory for each run and execute run script (e.g. for pp > 4b):
    mkdir 4b-test
    cp MC15.333444.MadGraphPythia8EvtGen_A14NNPDF23LO_4b.py 4b-test/.
    cd 4b-test
    ../run_evgen.sh
Categories
ATLAS recipes

SHERPA on titan

Sherpa 2.1.1 is installed on titan. For information about Sherpa, see http://www.sherpa-mc.de/.

Run instructions below are for the worker nodes (with SLC6 OS).

Define environment variables to point to the Sherpa and Root installation directories for convenience

  • export SHERPAROOT=/home/willocq/bin/sherpa/SHERPA-MC-2.1.1
  • export ROOTSYS=/home/willocq/root/root_v5.34.21/root

Add the location of the Sherpa and Root binaries to your PATH environment variable

  • export PATH=$SHERPAROOT/bin:$ROOTSYS/bin:$PATH

Make sure that the Sherpa, Root and hepmc libraries can be found by adding them to the LD_LIBRARY_PATH environment variable

  • export LD_LIBRARY_PATH=$SHERPAROOT/lib/SHERPA-MC:/home/willocq/root/root_v5.34.21/root/lib:/home/willocq/bin/hepmc/x86_64-slc6-gcc45-opt/lib:$LD_LIBRARY_PATH

For a quicker setup of all the required environment variables do as follows:

  • source /home/willocq/bin/sherpa/setup_sherpa.sh

Copy a set of run cards to your own directory. For example use the dijet process by copying the following cards: $SHERPAROOT/Examples/Jets_at_HadronColliders/LHC_Jets_MEPS/Run.dat. This particular process takes several days to compute matrix elements though! So it may be better to try a different example like the one in $SHERPAROOT/Examples/Models/SM_ZPrime/, (the latter requires executing Sherpa then ./makelibs before running again with Sherpa)

To run, type

  • Sherpa

T0 specify the type of output, see https://sherpa.hepforge.org/doc/SHERPA-MC-2.1.1.html#Event-output-formats. Unfortunately, the software to produce Delphes output from Sherpa is incompatible with the latest Delphes releases (3.X.Y).

Categories
ATLAS recipes

xAOD analysis and smearing functions

xAOD Analysis

  • The most up-to-date and detailed tutorial for xAOD analysis is available at https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/SoftwareTutorialxAODAnalysisInROOT.
  • First time setup
    • setupATLAS
    • cd to your working release directory
    • rcSetup Base,2.3.16
    • rc find_packages
    • rc compile
  • Setup for every session
    • setupATLAS
    • cd to your working release directory
    • rcSetup
  • To add a package
    • rc checkout_pkg PackageName
  • To start clean and recompile a whole working area
    • cd to your working release directory
    • rc clean
    • rc find_packages
    • rc compile
  • To run
    • cd Run/     (from your working release directory)
    • root -l -b -q $ROOTCOREDIR/scripts/load_packages.C ‘ATestRun.cxx(“outputDir”)’

Truth Smearing Functions

Smearing functions for physics upgrade studies are available in package TruthToRecoFunctions, see https://svnweb.cern.ch/trac/atlasgroups/browser/PhysicsAnalysis/EuropeanStrategy/TruthToRecoFunctions/trunk.

 

Categories
ATLAS recipes

Getting started with ATLAS analysis

To get started with research on ATLAS, here are some pointers to learn some of the more technical aspects of the data analysis.

1. Computer account

Our compute cluster is part of a larger system named NET3. Instructions on how to request and set up an account are available at https://websites.umass.edu/willocq/2018/09/05/request-account-on-net3/.

General information about the cluster is available at https://twiki.cern.ch/twiki/bin/view/Main/UMassNET3. In particular, you will see instructions to set up your account for ATLAS analysis.

2. UNIX

The titan computer cluster runs with the UNIX operating system. If you are not familiar with it, check http://www.ee.surrey.ac.uk/Teaching/Unix/.

3. C++

To help firm up your knowledge about programming languages, see the book in room LGRT 1036: “C++ How To Program”. Chapters 1 through 11 are most relevant. It’s a good idea to do some of the exercises (unless you already are very familiar with the material).

Otherwise, a good alternate option is the following online tutorial: http://www.cplusplus.com/doc/tutorial/.

This is a fair amount of material so you may want to do this in a number of steps in between ROOT tutorial sessions.

4. ROOT tutorial

The main data analysis tool is ROOT. For general information, see http://root.cern.ch/. You can download the user guide and binaries from that web site. It may be good for you to try running on your laptop if you wish.

A good primer is provided on the ROOT web site, see https://root.cern.ch/root/htmldoc/guides/primer/ROOTPrimer.html.

To run root on titan you will need to type the following every time you login:

lsetup root

I suggest you create root and tutorial subdirectories and work inside of the tutorial directory as you follow each of the tutorials above in turn.

cd
mkdir -p root/tutorial
cd root/tutorial

To run just enter:

root

5. Other tools

If you plan to use your laptop you will need to install:

  • text editor (or your choice, I like emacs)
  • remote connection program like PuTTy (if you run Windows) to run ssh, otherwise macs already have ssh
  • X11 graphics program to view graphics output from titan, e.g. Cygwin for Windows: http://x.cygwin.com/
  • root (from root.cern.ch)

The above will give you plenty to do for a couple of weeks but will be valuable to establish a foundation for your research.

Stephane W.

Categories
ATLAS recipes

Muon 2012 data analysis

From titan, the following steps need to be done for every new terminal session:

  • cd root/2013    (0r choose your main directory; all directories mentioned below are relative to this directory)
  • source script.sh

Files needed for analysis:

  •  Directory ContactInteractionAnalysis contains the main analysis code class implemented in ContactInteractionAnalysis/Analyzer.cxx and ContactInteractionAnalysis/ContactInteractionAnalysis/Analysis.h.
  • input.txt lists the input data sample for analysis.
  • Input ntuple files can be listed at /titan_rw/atlas/common/D3PD/mc12_8TeV/slim_p1328 for Monte Carlo simulation and at /titan_rw/atlas/common/D3PD/data12_8TeV/slim_p1345 for real data.

To compile the code:

  • cd ContactInteractionAnalysis/cmt
  • make

To run the analysis:

  • cd ContactInteractionAnalysis
  • ./bin/runClassTest -f input.txt -o outputFile.root –isMC      (for MC, note the double dash in front of isMC)
  • ./bin/runClassTest -f input.txt -o outputFile.root      (for data)

Relevant variables in ntuple files:

  • mu_muid_pt          muon transverse momentum
  • mu_muid_eta        muon pseudorapidity
  • mu_muid_charge  muon electric charge
  • mu_muid_id_qoverp   associated ID track q/p
  • mu_muid_id_theta      associated ID track polar angle
  • mu_muid_id_phi         associated ID tracks
  • mu_muid_me_qoverp   associated MS track q/p
  • mu_muid_me_theta      associated MS track polar angle
  • mu_muid_me_phi         associated MS tracks

Histograms to produce:

  • mu_muid_pt
    • for all muons in the event and those with opposite q/p for ID and MS tracks
    • for all muons passing the selection criteria (goodSmearedMuons for MC) and those with opposite q/p for ID and MS tracks
    • the goal is to plot the rate of charge flips between the ID and MS tracks as a function of muon pt for both data and MC simulation
  • mu_muid_eta
    • same categories as for pt listed above
Categories
ATLAS recipes

Z_KK to ZH analysis with delphes ntuples

  • Code for the Z_KK to ZH decay analysis is on titan in /home/willocq/Snowmass2013/root/. Create a work directory named Z_KK and copy the contents of the original directory into it:
    • cd
    • mkdir -p root/Z_KK
    • cd ~/root/Z_KK
    • cp /home/willocq/Snowmass2013/root/*.C .
  • Create a link to an include file required for compilation
    • mkdir classes
    • cd ~/root/Z_KK/classes
    • ln -s /scratch/willocq/Snowmass2013/Delphes-3.0.9/classes/SortableObject.h
  • Run the analysis code
    • cd ~/root/Z_KK
    • root -b -q runMyExample1.C
  • A series of histograms is produced and stored in an output file with a name specified in runMyExample1.C, it’ll be of the form output_filename.root, where filename is the name of a given input file. The input files are stored in /scratch/willocq/Snowmass2013/Delphes-3.0.9/.
  • The histograms can be plotted with the help of the myPlots.C macro; for example start up root and give it the histogram file name as input, as follows
    • root output_filename.root
  • At the root prompt you can then execute the plotting macro, which actually runs a number of functions defined in myPlots.C
    • .x runMyPlots.C
Categories
ATLAS recipes

Delphes root file analysis

The content of ntuples produced by the Delphes fast simulation program is described in https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/RootTreeDescription.

Sample analysis programs are available on titan in directory /home/willocq/Snowmass2013/root, see the files myExample1.C and myExample2.C. The first is a rather simple example of analysis code to produce some simple histograms. The second example uses a more complex program structure as well as Delphes analysis classes like a histogram manager.

Root files for analysis are located in /scratch/willocq/Snowmass2013/Delphes-3.0.9.