From aafde5234ea301799fe53e3f842e6fc4718e963b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renata=20Kopecn=C3=A1?= Date: Thu, 27 Jan 2022 18:58:34 +0100 Subject: [PATCH] Update 'B mass model' --- B-mass-model.md | 96 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 85 insertions(+), 11 deletions(-) diff --git a/B-mass-model.md b/B-mass-model.md index 5414af7..9f9e235 100644 --- a/B-mass-model.md +++ b/B-mass-model.md @@ -1,10 +1,94 @@ -The B mass fit is performed by the functions defined in [[MassFit.cpp|MassFit.cpp]]. +## Introduction + +The B mass fit is performed by the functions defined in [[MassFit.cpp|MassFit.cpp]]. In this file, the main function `massFit` is defined. This function is rather complex with many parameters as we tried a lot of mass models. + +The fit model is base on RooFit **TODO** + +Before executing any part of the selection code involving the mass fit, it is needed to compile the files with the classes needed for the fit. +## Mass Fit compilation + Recompile mass fit + +``` + .L BmassShape/SignalType.cpp+ + .L BmassShape/SignalPdf.cpp+ + .L BmassShape/BackgroundType.cpp+ + .L BmassShape/BackgroundPdf.cpp+ + .L BmassShape/ParamValues.cpp+ + .L MassFit.cpp+ +``` + +## Adding double crystal ball and ExpGauss to RooFit + +Standard RooFit does not include a double crystal ball or ExpGaus function used to descibe partialy reconstructed background. Thanks go to Flavio for pointing me to the RooDoubleCB code and helping with the compilation! + +### RooDoubleCB compilation + +Run `build.C` in `Code/RooFit/RooDoubleCB/` + +**TODO** try this out! + +### RooExpAndGauss compilation + +``` +cd Code/RooFit/RooExpAndGauss/ +make +``` + +**TODO** try this out! + + +## Fit model description +The fit is defined in the `massFit` function in [[MassFit.cpp|MassFit.cpp]]. The user can decide + +* What year, polarity and Run to fit +* What sample (data, MC, PHSP, inclusive MC) to fit +* What selection to fit (stripped, preselected, set cut on MVA response, random subset of a selection, remove multiple candidates) +* What Q2 range to fit (below Jpsi/Jpsi/rare/all) +* Whether to constrain of fix the parameters to MC +* Whether to use LL or DD tracks +* Wheter to use sWeights or special weights calculated from efficiencis +* Reduce verbosity/saving +* What truth-matching to use +* Mass range for the yield calculation +* Apply additional cut on a variable (eg when scanning the B mass fit in different cos(thetak) bins) + + +### Signal + +The signal can fully turned off or be described by + +* Left-sided Crystal Ball +* Right-sided Crystal Ball +* Both-sided Crystal Ball +* Gaussian +* Double Gaussian + +The fixed/starting parameters are saved in [[ParamValues.cpp|ParamValues.cpp]]. + + + + +### Background + +The signal can fully turned off or be described by + +* Exponential +* Double Exponential +* Exponential + ExpGaus +* One Crystal Ball + single exponential + +The fixed/starting parameters are saved in [[ParamValues.cpp|ParamValues.cpp]]. + + + ## Source files [[BackgroundPdf Class|BackgroundPdf-Class]] + + [[BackgroundType Class|BackgroundType-Class]] LinkDef.hpp @@ -26,16 +110,6 @@ LinkDef.hpp -## Mass Fit compilation - Recompile mass fit -``` - .L BmassShape/SignalType.cpp+ - .L BmassShape/SignalPdf.cpp+ - .L BmassShape/BackgroundType.cpp+ - .L BmassShape/BackgroundPdf.cpp+ - .L BmassShape/ParamValues.cpp+ - .L MassFit.cpp+ -``` \ No newline at end of file