The Run2 WZ analysis framework developed at LAPP

This analysis framework is based on EventLoop and has been developed at LAPP, primarily for the WZ diboson analysis of Run 2 data.

Main developers are:

  • Lucia Di Ciaccio: for all aspects related to truth in xAODs
  • Emmanuel Sauvan: main code structure, analysis classes
  • Elena Yatsenko: implementation of CP and trigger recommendations
  • Angela Burger: implementation of CP recommendations

LAPP Group SVN repository at CERN:

https://svnweb.cern.ch/trac/atlasinst/browser/Institutes/LAPP/DiBosonWZRun2/WZRunII

Our packages are put under Institutes/LAPP/DiBosonWZRun2/

Set-up analysis framework: (RootCore package WZRunII)

Prior to installation, make sure that you use bash shell at lyon. If it's not you default shell, you can just type > bash

In your home directory, check the file .bashrc If not existing, you can create one. Add in it


###--- set cern username
export CERN_USER=esauvan

###--- RootCore via CVMFS setup 
export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
alias setupATLAS='source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh'
alias setupRUCIO='localSetupRucioClients; voms-proxy-init -voms atlas -valid 96:00'


To have the modifications taken into account, re-open a new terminal or just do > source .bashrc

The analysis code should be installed on your home AFS directory. In a new directory do:


# 
#  Initial Setup for the WZRunII analysis
# 


#--- get the package
svn co "svn+ssh://$CERN_USER@svn.cern.ch/reps/atlasinst/Institutes/LAPP/DiBosonWZRun2/WZRunII/trunk" WZRunII


#--- Setup ATLAS and AnalysisBase
setupATLAS
rcSetup Base,2.4.42

#--- if you will access files store on LOCALGROUPDISK, setup rucio
setupRUCIO

#--- to add more packages not in the release 
rc checkout WZRunII/scripts/additional_packages.txt


#--- Find and compile these packages
rc find_packages
rc clean
rc compile


To run a test:

cd WZRunII/run/
WZRun run_testZZCtrl.par

(takes care of removing the output directory (e.g. "submitDir" if already existing (a feature of EventLoop which should maybe be a bit better handled later ...)

How To Run in batch

You can send the analysis on all data sample centrally stored on sps:

cd WZRunII/scripts
./Send_Prod anal_2016.par

You have to set in anal_2016.par the executable to run (full path for the moment) executable: /afs/in2p3.fr/home/s/sauvan/atlas/WZRun2/RootCoreBin/bin/x86_64-slc6-gcc49-opt/ZZCtrlRun (you have to change it according to your own directory)

and the output directory (it has to be created before) histo_dir: "/sps/atlas/s/sauvan/WZRun2_2016_Histos/19fb/"

Once the jobs are all finished, check the execution of jobs:

Once the jobs are all finished, check the execution of jobs:

Check_Prod anal_2016.par

then sum everything with

Sum_Histo sum_2016.py

In sum_2016.py you need to edit sumHisto.root = "/sps/atlas/s/sauvan/WZRun2_2016_Histos/19fb/" to the output directory set in anal_2016.par Merged histograms per physics process are then created at the top of this directory

To run the full analysis, latest version: Send_Prod anal_2016.par Check_Prod anal_2016.par Sum_Histo sum_2016.py

(Please take care of changing path inside these files)

Regular setup

Go in the installation directory and do:

setupATLAS
setupRUCIO (if using files on LOCALGROUPDISK)
rcSetup 

Change Analysis release

rcSetup -u
rcSetup Base,2.4.41
rc find_packages
rc clean
rc compile

Zgamma and Zgamma T&P analyses

  • ZgxAODEvent : specif event class for Zgamma analyses, derived from LapxAODEvent. Incorporates event-based calculations specific to the Zgamma reco analysis (list of selected photons + tools to apply photon recommendations, sum of weights and cross section of MC samples specific to Zgamma)

  • ZgTnPAnalysis : Analysis class dedicated to Zgamma T&P analysis. The associated histogram definition parameter file is run/ZgTnPHistosDef.par. The associated executable is util/ZgTnPRun.cxx

* ZgAnalysis : Analysis class dedicated to Zgamma inclusive analysis. The associated histogram definition parameter file is run/ZgHistosDef.par. The associated executable is util/ZgRun.cxx. Scripts to send the whole analysis in batch: anal_Zg_2016.par and sum_Zg_2016.py for summing

  • ZgVBSAnalysis : Analysis class dedicated to Zgamma VBS analysis. The associated histogram definition parameter file is run/ZgVBSHistosDef.par. The associated executable is util/ZgVBSRun.cxx

MarPlot : an automatised plotting program

A general plotting standalone code. (for the moment do not install it in the same base directory as the ROOTCORE installation of the analysis package)

#--- get the package
svn co "svn+ssh://$CERN_USER@svn.cern.ch/reps/atlasinst/Institutes/LAPP/DiBosonWZRun2/MarPlot/trunk" MarPlot

#--- compile it
cd cmt/
make -f Makefile.StandAlone

#--- run an example (Edit the output and maybe input directories in the steering file !)
cd run/
../bin/MarPlot draw_Run2_ZZCtrl_2016.par    #---- 

#--- visualize the result : go in the output directory
latex Summary; dvips -o Summary.ps Summary.dvi
evince Summary.ps

Structure of the WZ analysis framework

The structure defines an "Event" base class which which "load" and correct each xAOD event, and histograming+selection classes, to implement different selections using the centralised information from the Event class

  • LapPhysicsConstants : to gather-up all physics constants and units
  • LapRun : To manage running parameter and read input steering file
  • MarHistoManager : an old-fashion histo-manager added for convenience
Histograms are define using a separate steering file, for the moment in run/testhisto.par

  • LapxAODEvent : Base class for the Event. Should incorporate all xAOD corrections (trigger, SFs, particle calibration, mET calculation, etc ...)
  • WZxAODEvent : derived from LapxAODEvent. Incorporates event-based calculation specific to our WZ reco analysis (list of selected electrons, muons, etc ...)

  • WZAnalysis : base analysis class dedicated to all WZ analyses, contains main control histograms,inherits from LapBaseAnalysis
  • WZInclAnalysis : Analysis class dedicated to inclusive cross sections,inherits from WZAnalysis
  • WZPolAnalysis : Analysis class dedicated to polarisation measurements,inherits from WZAnalysis
  • WZVBSAnalysis : Analysis class dedicated to VBS measurements,inherits from WZAnalysis

  • WZxAODTruAnalysis : analysis class for truth studies. Also calculates truth quantities associated to each event. is linked to reco. level analysis classes.

  • util/ZZCtrlRun.cxx : executable
  • run/run_testZZCtrl.par : steering file for the executable
  • run/testInputFiles.inp : list of input xAOD files
  • run/testhistos.par : definition file for all sets of histograms associated to each analysis class. Read by MarHistoManager.

  • Another executable: util/WCRRun.cxx : for W+jets control region
  • util/ZCRRun.cxx : for Z+jets control region

Good practice to do commits:

In order to keep track of code changes made by everybody, please follow the procedure below for each commit of changes in the code.


svn status
svn update
svn add <new file> 


Then edit the file ChangeLog with a short description of your modifications

 2015-11-05 - E. Sauvan
   + XXXAnalysis creation
        * Correct small bugs in ....

Finally do

svn commit

And copy paste the description added in ChangeLog in the editor window which opens

-- EmmanuelSauvan - 2017-01-19

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r9 - 2019-04-16 - EmmanuelSauvan
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback