Update 'FCNC Fitter'

Renata Kopecná 2022-02-03 17:30:27 +01:00
parent feb5d39f13
commit 4f342c6e8f

@ -1,10 +1,25 @@
FCNC fitter was originally written by Christoph Langenbruch. Then, it was modified by David Gerick to fit the needs of the B+->K\*(KSpi+)mumu analysis. Later, Renata Kopecna modified it further to be slightly more versatile, not have either verbose or super verbose modes only and to compile much faster. FCNC fitter was originally written by Christoph Langenbruch. Then, it was modified by David Gerick to fit the needs of the B+->K\*(KSpi+)mumu analysis. Later, Renata Kopecna modified it further to be slightly more versatile, not have either verbose or super verbose modes only and to compile much faster.
## Table of Contents
* [Compilation](#compilation)
* [spdlog](#spdlog)
* [File structure](#file-structure)
* [Running](#running)
## Compilation ## Compilation
Cmake The compilation is done by using cmake. The include of [spdlog](#spdlog) and all the libraries is done in `CMakeLists.txt`. When you install [spdlog](#spdlog), check the path is properly included!
Compile the code with a simple
```
bash cmake.sh
```
Or just run the code using the [[amazing python tool for running the code|Running the FCNC fitter]], it will take care of the compilation automatically.
## spdlog ## spdlog
Spdlog is a fast logging library. It is made for C++ and consists only of headers. Spdlog is used in FCNCfitter now, as the previous version only used two levels of verbosity (verbose and super verbose) using basic prints. Spdlog is a fast logging library. It is made for C++ and consists only of headers. Spdlog is used in FCNCfitter now, as the previous version only used two levels of verbosity (verbose and super verbose) using basic prints. To run the current version of the FCNC fitter it is required to be installed.
The github repository can be found at The github repository can be found at
[https://github.com/gabime/spdlog/wiki/1.-QuickStart](https://github.com/gabime/spdlog/wiki/1.-QuickStart) [https://github.com/gabime/spdlog/wiki/1.-QuickStart](https://github.com/gabime/spdlog/wiki/1.-QuickStart)
@ -12,8 +27,71 @@ The github repository can be found at
For simple instalation guide and tutorials, see For simple instalation guide and tutorials, see
[https://spdlog.docsforge.com/master/](https://spdlog.docsforge.com/master/) [https://spdlog.docsforge.com/master/](https://spdlog.docsforge.com/master/)
After installation, check that the path to the spdlog/include and spdlog/include/spdlog folder is added to the CMakeLists.txt file. Either set it relative to the directory where the CMake is stored
```
set(SPDLOG_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/yourRelativePath/spdlog/include/")
set(SPDLOG_INCLUDE_DIR_TWO "${CMAKE_CURRENT_LIST_DIR}/yourRelativePath/spdlog/include/spdlog/")
```
or set the absolute path
```
set(SPDLOG_INCLUDE_DIR "$/yourPath/spdlog/include/")
set(SPDLOG_INCLUDE_DIR_TWO "/yourPath/spdlog/include/spdlog/")
```
## File structure ## File structure
Currently, the file structure is as follows:
* bu2kstarmumu.cc: The main
* sources
* help.cc
* parse.cc
* paths.cc
* tests.cc
* Core: the core functions used in the FCNC fitter, where the calculations happen
* bu2kstarmumu_generator.cc
* bu2kstarmumu_loader.cc
* bu2kstarmumu_parameters.cc
* bu2kstarmumu_pdf.cc
* bu2kstarmumu_plotter.cc
* events.cc
* fitter.cc
* folder.cc
* funcs.cc
* integrals.cc
* options.cc
* toystudy.cc
* Helpers: Smaller utility functions, plotting functions
* design.cc
* helpers.cc
* Params: definition of constants, parameters used in the fit, their default values and boundaries
* constants.cc
* parameters.cc
* parameterscan.cc
* Run: Functions that initialize the fit model and then perform the fit
* angularcorr.cc
* backgroundfit.cc
* feldman_cousins.cc (**Never used**)
* genlvlvfit.cc
* likelihoodscan.cc (Never used **TODO**)
* mainfit.cc
* massfit.cc
* mcfit.cc
* momfit.cc: Method of moments fit (**Never used**)
* multifit.cc (**Never used**)
* pulls.cc
* toysfit.cc
* Scripts: Smaller functions mostly used for plotting
* EvaluateToys.cc
* GenLvlvsMC.cc
* GetMeanError.cc
* ReferencePlots.cc
* RunningScripts.cc
* ScriptHelpers.cc
## Running
python script