Coder Social home page Coder Social logo

dennroy / plotsconfigurations Goto Github PK

View Code? Open in Web Editor NEW

This project forked from latinos/plotsconfigurations

0.0 2.0 0.0 663.5 MB

Plots configuration for mkShape

Python 82.18% Shell 4.12% C 10.59% C++ 0.47% Makefile 0.37% PHP 0.01% Objective-C 2.25%

plotsconfigurations's Introduction

PlotsConfigurations

Plots configuration for mkShapes, mkPlot, mkDatacards

First, setup the LatinoAnalysis framework:

cmsrel CMSSW_10_6_4
cd CMSSW_10_6_4/src/
cmsenv
git clone --branch 13TeV [email protected]:latinos/setup.git LatinosSetup
source LatinosSetup/SetupShapeOnly.sh
scram b -j4

Download the PlotsConfigurations package anywhere, but remember to do 'cmsenv' of the CMSSW release you are using:

git clone [email protected]:latinos/PlotsConfigurations.git

Make a copy and edit the following python file (userConfig.py) to specify your base directory, i.e. the directory in which your job related information will be stored:

cd LatinoAnalysis/Tools/python/
cp userConfig_TEMPLATE.py userConfig.py
cd -

Prepare your configuration, you can use the following configuration as a template (this is based on 2018 data and MC):

https://github.com/latinos/PlotsConfigurations/tree/master/Configurations/ggH/Full2018

Produce the histograms submitting batch jobs using HTCondor:

mkShapesMulti.py --pycfg=configuration.py --doBatch=1 --batchSplit=Samples,Files --batchQueue=longlunch

You can choose one of the following queues according to your job expected running time:

espresso     = 20 minutes
microcentury = 1 hour
longlunch    = 2 hours
workday      = 8 hours
tomorrow     = 1 day
testmatch    = 3 days
nextweek     = 1 week

If some of your jobs have failed because the wall clock time have been exceeded, you can resubmit the failed ones by going into the jobs directory (the one set in userConfig.py), and changing the queue using the following command:

for i in *jid; do sed -i "s/longlunch/workday/g" ${i/jid/jds}; condor_submit ${i/jid/jds}; done

For quick tests you can run interactively by just typing mkShapesMulti.py --pycfg=configuration.py. Use mkShapesMulty.py --help for more options. You can also run interactively but submitting jobs in parallel with the command mkShapesMulti.py --pycfg=configuration.py --doThreads=True.

Once all your jobs are done (you can check job status with condor_q), you will find a rootFile directory in your area containing all the histograms specified in your configuration. You can proceed by h-adding all the files to get a single one containing everything:

mkShapesMulti.py --pycfg=configuration.py --doHadd=1 --batchSplit=Samples,Files --doNotCleanup --nThreads=10

The --nThreads=10 option allows for running the Hadd step in multithreading mode (with 10 threads in this case), and is especially useful when your configuration contains many cuts and variables. The --doNotCleanup option is used to keep the input root files. Without this option the input files will be deleted after the hadd step and only the final root file will be kept.

You can now proceed making plots (mkPlot.py --help to see all available options):

mkPlot.py --pycfg configuration.py --inputFile rootFile/plots_TAG.root --showIntegralLegend 1

and datacards (mkDatacards.py --help to see all available options):

mkDatacards.py --pycfg configuration.py --inputFile rootFile/plots_TAG.root

Congratulations! You have done the analysis, or at least a very first step...

Useful information

plotsconfigurations's People

Contributors

amassiro avatar ntrevisani avatar lviliani avatar arunhep avatar lenzip avatar siewyan avatar yiiyama avatar piedraj avatar davidedicroce avatar adrianalvarezf avatar sarahfreed avatar d4space avatar dittmer avatar rseidita avatar calderona avatar lorusso7 avatar sebsiebert avatar lusanche avatar pageyu avatar corrinnemills avatar achiapparini avatar cedricpri avatar valsdav avatar claralasa avatar soarnsoar avatar dennroy avatar mlizzo avatar sennevanputte avatar guillermocamacho550 avatar tomaskello avatar

Watchers

James Cloos avatar  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.