Giter Club home page Giter Club logo

monohiggsfit's Introduction

MonoXFit

Installation

setenv SCRAM_ARCH slc6_amd64_gcc481
cmsrel CMSSW_7_1_5
cd CMSSW_7_1_5/src
cmsenv
git clone https://github.com/cms-analysis/HiggsAnalysis-CombinedLimit.git HiggsAnalysis/CombinedLimit
git clone https://gitlab.com/sidnarayanan/MonoXFit MonoX
scram b -j16

Produce fitting trees

  1. Modify config/categories_config.py to point to the correct input root file
  2. Call python buildModel.py categories_config to create mono-x.root
  3. Call python runModel.py to create combined-model.root

Running a single fit

datacards/combined.txt is the full datacard for this analysis. You can choose which signal model to use by uncommenting the appropriate line. The datacard automatically points to the combined-model.root file one directory up. Any changes to the datacard must be made here and in the datacard used for scans (see below)

To run the fit:

cd datacards/
combine -M MaxLikelihoodFit combined_2cat.txt --saveShapes --saveWithUncertainties

And the signal masked-fit:

cd datacards/
text2workspace.py combined_2cat.txt --channel-masks
combine combined_2cat.root -M MaxLikelihoodFit --saveShapes --saveWithUncertainties --setPhysicsModelParameters mask_tight_sig=1,mask_loose_sig=1

Running the limit scan

datacards/combined_tmpl.txt is identical to combined.txt, except the signal model is not specified. Any changes to the scan datacard must be made here and in the datacard used for fits (see above)

To run the scan:

cd datacards/
python scan.py

The results are dumped in *_obs_limits.txt

Making postfit plots

All plotting tools are in plotting/. They must be run after running the fit (or limit scan, depending on what plots you want to make). These scripts automatically point to the ROOT files generated by the above combine calls, so there is nothing you need to do.

python plot_ratio.py                                             # plots the xfer factors - no need to rerun now that the inputs are finalized
python plotStackedPostFit.py                                     # makes the stack plots with prefit and postfit comparisons to data
python diffNuisances.py -g pulls.root ../datacards/mlfit.root    # draws the pulls plot
python plotLimits.py                                             # makes the limit plots (both sigma and sigma/sigma_theory)

The output directories are specified inside the above scripts and will need to be changed to fit the user's preferences. This should probably be changed to an environment variable.

monohiggsfit's People

Watchers

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