elizamelo / fgg-ana

Analyzers to run over flash-gg microAOD ntuples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Analyzers to run over flash-gg microAOD ntuples

To begin with this analyzers you must to set up the flashgg framework first, see here: https://github.com/cms-analysis/flashgg Then we need bbgTools, since some of the methods from there are used: https://github.com/ResonantHbbHgg/bbggTools

Finally, to get the fgg-ana code:

 cd $CMSSW_BASE/src
 mkdir APZ
 cd APZ
 git clone git@github.com:andreypz/fgg-ana.git
 scram b -j9

Now, that you have it compiled, enjoy by running:

 fggRunJobs.py --load data/jobs-dy-el.json -d testDir -x zgammaRun zgAna.py  maxEvents=100 --no-use-tarball

where jobs-dy-el.json is the file prepared following instructions here: https://github.com/cms-analysis/flashgg/tree/master/MetaData

To run over a few signal samples of HH -> bbgg analysis:

 fggRunJobs.py --load data/jobs-hh-sig-few.json -d OutDir -m 0 -x hhRun hhAna.py --no-use-tarball

(type fggRunJobs.py --help to see what do all those options mean).

Submit the whole thing to LSF (must be on lxplus and make sure to execute voms-proxy-init --voms cms --valid 168:00 prior to that):

fggRunJobs.py --load data/jobs-sig-hh-all.json -H -D -m 1 -d OutDir -x hhRun hhAna.py -n 2 -q 1nh

You may close the job watcher (Ctrl-C, not sure if this works though...), and check the status of the submission with the --summary command:

fggRunJobs.py --load <task_folder>/config.json --summary

In order to run without flashgg tools (for testing purposes), simply do: hhRun hhAna.py

How to create your own analyzer:

  • Write src/MyAna.cc and interface/MyAna.h files. It is a good idea to inherit it from DummyAnalyzer (see my other analyzers: GenAna, ZgammaAna), but this is not necessary.
  • Make your executable file at bin/myAnaRun.cc, and include it in bin/Buildfile.xml
  • Create your config file, myana.py, and run it with fgg comand like this:
 fggRunJobs.py --load jobs-myAna.json -d testDir -x myAnaRun myana.py  maxEvents=100

If you want to run a job without fgg scripts, first comment out the customize(process) string at the end of your myana.py file. Then run it simply with myAnaRun myana.py.

About

Analyzers to run over flash-gg microAOD ntuples


Languages

Language:C++ 65.1%Language:Python 32.8%Language:CSS 1.4%Language:HTML 0.7%Language:Objective-C 0.1%