Update 'Selection code'

Renata Kopecná 2022-01-25 17:58:07 +01:00
parent be9b56cbff
commit 126d0ed840

@ -38,7 +38,7 @@ addAllXMuMuMass(true,true,2); addAllXMuMuMass(false,true,2); applyAllVetoKplusMu
We have all the preselection finished. Now we will need to fit the reconstructed B mass peak. For the instructions how to compile the code and make RooFit use double-sided Crystal Ball or ExpGauss, see [B mass model section](https://git.physi.uni-heidelberg.de/kopecna/EWP-BplusToKstMuMu-AngAna/wiki/B-mass-model). We have all the preselection finished. Now we will need to fit the reconstructed B mass peak. For the instructions how to compile the code and make RooFit use double-sided Crystal Ball or ExpGauss, see [B mass model section](https://git.physi.uni-heidelberg.de/kopecna/EWP-BplusToKstMuMu-AngAna/wiki/B-mass-model).
Now the peaking background is removed, we can proceed to reweighting via [[nTrackWeights.cpp][nTrackWeights]] Now the peaking background is removed, we can proceed to reweighting via [[nTrackWeights.cpp|nTrackWeights]]
``` ```
.L nTrackWeights.cpp+ .L nTrackWeights.cpp+
WeightAll(true,1,true); ReweightReferenceMC(true,1,true); ReweightPHSPMC(true,1,true); WeightAll(true,1,true); ReweightReferenceMC(true,1,true); ReweightPHSPMC(true,1,true);
@ -51,13 +51,13 @@ Check the MVA variables are agreeing after weighting them with sWeights
compareAll(1); compareAll(2); compareAll(1); compareAll(2);
``` ```
Reweighted Data and Monte Carlo can be used for the MVA training Reweighted Data and Monte Carlo can be used for the [[MVA.cpp|MVA training]]
``` ```
.L MVA.cpp+ .L MVA.cpp+
RunMVA(1); RunMVA(2); RunMVA(1); RunMVA(2);
``` ```
Apply the MVA to all the MC and Data Apply the MVA to all the MC and Data using [[TMVA.cpp|TMVA Class application]]
``` ```
.L TMVAClassApp.cpp+ .L TMVAClassApp.cpp+
TMVAClassAppAll(1); TMVAClassAppAll(2); TMVAClassAppAll(1); TMVAClassAppAll(2);
@ -81,7 +81,7 @@ Check the variables again
compareAll(1); compareAll(2); compareAll(1); compareAll(2);
``` ```
Run the MVA training, make nice plots, apply the MVA and remove multiple candidates Run the MVA training, [[make nice plots|Plot MVA]], apply the MVA and remove multiple candidates
``` ```
.L MVA.cpp+ .L MVA.cpp+
@ -104,13 +104,13 @@ Add variables to the MC samples **TODO**
addAllVariablesAllMCSamples(1); addAllVariablesAllMCSamples(2); addAllVariablesAllMCSamples(1); addAllVariablesAllMCSamples(2);
``` ```
Get the eficiencies needed for the estimation of the best MVA response cut Get the eficiencies needed for the estimation of the best MVA response cut, defined in [[Efficiency.cpp|Efficiency.cpp]]
``` ```
.L Efficiency.cpp+ .L Efficiency.cpp+
runAllEff(); runAllEff();
``` ```
Scan the significance in the MVA cut. Don't mind the 2012 and 2016 tags, they are just dummies Scan the significance in the MVA cut using the code in [[BDTcutScanner.cpp|BDTcutScanner]]. Don't mind the 2012 and 2016 tags, they are just dummies
``` ```
.L BDTcutScanner.cpp+ .L BDTcutScanner.cpp+
ScanSignalAndBckgndEstimation("2012",1,0.01,false,false,false,true) ScanSignalAndBckgndEstimation("2012",1,0.01,false,false,false,true)
@ -124,7 +124,7 @@ Make a nice TGraph from the scan; when creating the scan, it can happen that eg
python ReorganizeTGraph.py python ReorganizeTGraph.py
``` ```
Use the MVA scan to plot the signal yields, apply the MVA cut and compare the yields to the CMS results. Use the MVA scan to plot the signal yields, apply the MVA cut and compare the yields to the CMS results (see [[SignalStudy.cpp|Signal Study]].
``` ```
.L SignalStudy.cpp+ .L SignalStudy.cpp+
plotYieldInQ2(true); plotYieldInQ2(false); plotYieldInQ2(true); plotYieldInQ2(false);