Skip to content

mayoub/hhana

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warning

UNDER CONSTRUCTION

Dependencies

  • Latest 5.X ROOT with PyROOT, RooFit, Minuit2, HistFactory enabled.
  • NumPy:

    pip install --user numpy
  • HDF5:

    yum install hdf5 hdf5-devel
  • PyTables:

    pip install --user tables
  • scikit-learn (private branch with more support for event weights):

    git clone git://github.com/ndawe/scikit-learn.git
    cd scikit-learn
    git checkout -b htt origin/htt
    python setup.py install --user
  • matplotlib:

    pip install --user matplotlib
  • rootpy:

    git clone git://github.com/rootpy/rootpy.git
    cd rootpy
    python setup.py install --user
  • root_numpy:

    pip install --user root_numpy
  • yellowhiggs:

    pip install --user yellowhiggs
  • GitPython:

    pip install --user GitPython
  • tabulate:

    pip install --user tabulate
  • hhntup:

    git clone git://github.com/htautau/hhntup.git
  • hhana:

    git clone git://github.com/htautau/hhana.git

Data Preparation

Automatically organize ROOT and log files with:

init-ntup

The above also merges the output from the subjobs for embedding and data.

Add the Higgs pt weights:

make higgs-pt

This creates copies of all signal ROOT files ntuples/running/hhskim/hhskim*tautauhh*.root at ntuples/running/hhskim/weighted.hhskim*tautauhh*.root.

Make a backup of the original signal files:

mkdir ntuples/running/hhskim/higgs_unweighted
mv ntuples/running/hhskim/hhskim*tautauhh*.root ntuples/running/hhskim/higgs_unweighted

Then remove weighted. from the weighted signal files:

rename weighted. "" ntuples/running/hhskim/weighted.hhskim*tautauhh*.root

Then move the hhskim running directory to production (replace XX with the skim version number):

mkdir ntuples/prod_vXX
mv ntuples/running/hhskim ntuples/prod_vXX

Update the production path in the Makefile (HHNTUP) and mva/__init__.py (NTUPLE_PATH).

And finally create the merged hhskim.root and hhskim.h5:

make ntup

Background Normalizations

Generate the cache of all background normalizations:

make norms

Variable Plots

Create all validation plots with:

make plots

BDT Training

Run the batch jobs that train the BDTs at each mass point with:

make train

Go get some coffee.

BDT Validation Plots

Create all the BDT validation plots with:

make mva-plots

Workspaces

Binning Optimization

Run the batch jobs to determine the optimal binning for each mass point in each category and year:

make binning

Go get some coffee.

Creating Workpaces

Run the batch jobs that create the workspaces with:

make mva-workspaces
make cuts-workspaces

When the batch jobs are done, create the workspace combinations with:

make combine-mva
make combine-cuts

Fixing Workspaces

Apply all of the HSG4 workspace fixes with:

cd workspaces
fix-workspace --quiet --symmetrize --prune-shapes --chi2-thresh 0.9 hh_nos_nonisol_ebz_mva
fix-workspace --quiet --symmetrize --prune-shapes --chi2-thresh 0.9 hh_nos_nonisol_ebz_cuts

Scan of the nuisance parameters

Construct the profile of every nuisance parameter (NP):

# submit a batch job for each NP. If --submit is omitted simply print the command.
multinp scans_fit --submit --file path_to_measurement_file.root
# merge all the output in a single file and compute the nominal NLL for normalisation
multinp merge --jobs -1 --file path_to_measurement_file.root
# Clean the directory from the individual pickle files (keep only the master)
multinp clean --file path_to_measurement_file.root

Plot the NP profiles with:

plot-nuis path_to_measurement_file.root

Pulls of the nuisance parameters

Compute the pull of each nuisance parameter with:

multinp pulls --jobs -1 --file path_to_measurement_file.root

Plot the NP ranking/pulls with:

plot-ranking path_to_measurement_file.root

Significance

Compute the expected significance (bkg. only hypothesis) with:

# Walk trough the directory and subdirectory and look for workspaces
multisig path_to_directory_containing_workspaces

Postfit plot

Compute the postfit histograms and errors with:

# --fit_var bdt_score/mmc_mass
plot-postfit path_to_measurement_file.root --fit-var bdt_score --force-fit --jobs -1
# If the fit has already been performed
plot-postfit path_to_measurement_file.root --fit-var bdt_score

References

https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/NuisanceParameterPullsWithRanking https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/StatisticsTools

About

Multivariate and cut-based analysis framework for the hh channel.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 68.5%
  • TeX 29.6%
  • Makefile 1.3%
  • Other 0.6%