Git Product home page Git Product logo

dijetlimitcode's Introduction

-------------
Instructions:
-------------
Please refer to https://twiki.cern.ch/twiki/bin/view/CMS/DijetLimitCode for additional instructions and description.


1) Set up your CMSSW working area:

   setenv SCRAM_ARCH slc6_amd64_gcc481
   cmsrel CMSSW_7_0_9
   cd CMSSW_7_0_9/test
   cmsenv

   NOTE: You can skip this step if you already have your working area set up. Nevertheless,
         you will still need to initialize the CMSSW environment by calling 'cmsenv'.
         CMSSW_7_0_9 is used just as an example. Any CMSSW_7_0_X release should work.

2) Install BAT (Bayesian Analysis Toolkit):

   wget --no-check-certificate http://www.mppmu.mpg.de/bat/source/BAT-0.9.2.tar.gz
   tar xvzf BAT-0.9.2.tar.gz
   cd BAT-0.9.2
   ./configure --prefix=$HOME
   make
   make install
   cd -

   setenv BATINSTALLDIR    $HOME
   setenv LD_LIBRARY_PATH  {$LD_LIBRARY_PATH}:{$BATINSTALLDIR}/lib
   setenv CPATH            {$BATINSTALLDIR}/include

   Alternatively, instead of executing the above three lines, you can just source BAT_init.csh

   source ./BAT_init.csh

   NOTE: BAT needs to be installed only once. However, every time before compiling or using
         the limit code, you will need to initialize the above environment variables.

3) Checkout the limit code package:

   git clone git://github.com/CMSDIJET/DijetLimitCode.git LimitCode

   Enter the package directory:

   cd LimitCode

   The package has the following contents:

   Data_and_ResonanceShapes/
   plots/
   jobs/
   BAT_init.csh
   Makefile
   README.txt
   binneddata.cc
   binneddata.hh
   fit.cc
   fit.hh
   statistics.cc
   statistics.hh
   stats.cc

   The plots/ subdirectory contains some ROOT plotting macros and scripts and the jobs/ subdirectory
   contains some Condor job submission scripts.

   To start developing your own code, you can start from the stats.cc file.

4) Compile the code:

   make

5) Run the code:

   ./stats MASS FINAL_STATE

   where MASS is the resonance mass in GeV and FINAL_STATE is the type of two-parton final state, for instance

   ./stats 4000 qg

--------------------
Running with Condor:
--------------------

In order to speed up the process of running the limit code for multiple mass points, it is possible to use
the Condor batch queue. A Python script is provided that can automatically create and submit jobs for multiple
mass points and different final states.

To create and submit Condor jobs, run:

jobs/submit_condor_jobs.py FINAL_STATE MASS_MIN MASS_MAX STEP NPES NJOBS

where FINAL_STATE is the type of two-parton final state, MASS_MIN is the initial mass point, MASS_MAX is the final
mass point, and STEP defines the step size between the initial and final mass points. All mass-related quantities
are defined in units of GeV. The final two input arguments, NPES and NJOBS, are optional. The NPES argument
defines the number of pseudo-experiments per job and NJOBS defines the number of jobs per mass point. The total
number of pseudo-experiments per mass point will be NPES*NJOBS. If NPES is not specified, the hardcoded value
will be used. If NJOBS is not specified, only one job per mass point will be run. A possible example is

jobs/submit_condor_jobs.py qg 1200 7000 100 20 10

which will run limits for qg resonances starting from a mass point at 1.2 TeV going up to 7 TeV in steps of 100 GeV.
10 jobs per mass point will be created each running 20 pseudo-experiments resulting in a total of 200 pseudo-experiments
per mass point.

To combine the output from multiple jobs and get only one .log and .root file per mass point, run:

jobs/combine_output.py FINAL_STATE MASS_MIN MASS_MAX STEP

or for the above example

jobs/combine_output.py qg 1200 7000 100

Finally, to clean up your working directly from Condor files that are no longer needed, execute:

rm run_limits_*.jdl condor_*.log condor_*.stdout condor_*.stderr

dijetlimitcode's People

Contributors

ferencek avatar

Watchers

James Cloos avatar varun sharma avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.