Skip to content

beyerja/PrEWRunExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PrEWRunExample - Fitting example for PrEW

Script to perform a PrEW fit using the PrEWUtils library.

Installation

  1. Make sure you installed PrEW and PrEWUtils (preferably in a directory next to this one).
  2. Make sure your software is up-to-date (ROOT, gcc, cmake, ...) or load using macro (only on NAF):
cd macros && source load_env.sh && cd ..
  1. Compile the code:
cd macros && chmod u+x compile.sh && ./compile.sh && cd ..

After changing the source code

... simply recompile it using the macros/compile.sh macro.

Running

The code can be easily run after compilation:

cd bin && ./PrEWRunExample && cd ..

This will produce an output file in the output directory. It is a plain text file that stores some information about the results of the fits

Running it on the BIRD cluster

The executable can also be run on the BIRD cluster using the HTCondor scheduler.

cd macros && ./run_on_cluster.sh [--cpus=n_cpus] && cd ..

With the --cpus=n_cpus the number of cpus used on the BIRD cluster can be set.

The source code

The source code is in source/main.cpp.

It uses the necessary PrEW classes and the interfaces provided by PrEWUtils to be as clear as manageable. (This may not always have worked out.)

For open questions please consult the PrEW and PrEWUtils source code or open an issue on the GitHub page.

Interpreting the output

A jupyter (python) notebook is provided to interpret the output of the toy fits. It sits in the notebook directory and can be opened using

cd notebook && jupyter notebook ResultNotebook.ipynb && cd ..

and will produce histograms in the output directory.

The notebook can also be run without opening a browser window using

cd notebook && jupyter nbconvert --to notebook --inplace --execute ResultNotebook.ipynb

Text outputs (which would normally be visible in the browser window) can be found in the ResultNotebook.ipynb file.

About

Fitting example PrEW with PrEWUtils

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published