Compare commits
No commits in common. "training_tryouts" and "master" have entirely different histories.
training_t
...
master
@ -1,11 +1,11 @@
|
|||||||
#### B0ToHpHmMuMu @ Fri Apr 5 14:10:32 2024 ####
|
#### B0ToHpHmMuMu @ Tue Apr 16 10:40:41 2024 ####
|
||||||
J/Psi Mode: 252 #pm 19 / 59 #pm 14
|
J/Psi Mode: 341 #pm 23 / 202 #pm 25
|
||||||
Sig/Bkg: 4.25 #pm 1.02
|
Sig/Bkg: 1.69 #pm 0.24
|
||||||
Psi(2S) Mode: 15 #pm 4 / 3 #pm 4
|
Psi(2S) Mode: 25 #pm 7 / 40 #pm 9
|
||||||
Sig/Bkg: 4.59 #pm 4.45
|
Sig/Bkg: 0.62 #pm 0.21
|
||||||
Mode Yield Ratio: 0.060 #pm 0.017
|
Mode Yield Ratio: 0.072 #pm 0.019
|
||||||
Rel Br Frac MuMu: 7.701 #pm 0.804
|
Rel Br Frac MuMu: 7.701 #pm 0.804
|
||||||
Rel Br Frac: 0.463 #pm 0.136
|
Rel Br Frac: 0.554 #pm 0.157
|
||||||
|
|
||||||
|
|
||||||
Fitted Parameters: Simulation
|
Fitted Parameters: Simulation
|
||||||
@ -19,14 +19,14 @@ n_{R} = 5.67 \pm 0.73
|
|||||||
|
|
||||||
Fitted Parameters: J/PSI
|
Fitted Parameters: J/PSI
|
||||||
|
|
||||||
N_{Sig} = 252 \pm 19
|
N_{Sig} = 341 \pm 23
|
||||||
N_{Bkg} = 59 \pm 14
|
N_{Bkg} = 202 \pm 25
|
||||||
N_{Bkg,2#sigma} = 79 \pm 6
|
N_{Bkg,2#sigma} = 95 \pm 6
|
||||||
N_{Sig}/N_{Bkg} = 4.25 \pm 1.02
|
N_{Sig}/N_{Bkg} = 1.69 \pm 0.23
|
||||||
N_{Sig}/N_{Bkg,2#sigma} = 3.19 \pm 0.33
|
N_{Sig}/N_{Bkg,2#sigma} = 3.59 \pm 0.32
|
||||||
#lambda = -0.00400 \pm 0.00395
|
#lambda = -0.00188 \pm 0.00064
|
||||||
#mu = 5267.82 \pm 2.42
|
#mu = 5269.98 \pm 1.88
|
||||||
#sigma_{LR} = 29.94 \pm 2.37
|
#sigma_{LR} = 26.06 \pm 1.94
|
||||||
#alpha_{L} = 1.72 (c)
|
#alpha_{L} = 1.72 (c)
|
||||||
n_{L} = 3.34 (c)
|
n_{L} = 3.34 (c)
|
||||||
#alpha_{R} = 1.76 (c)
|
#alpha_{R} = 1.76 (c)
|
||||||
@ -34,14 +34,14 @@ n_{R} = 5.67 (c)
|
|||||||
|
|
||||||
Fitted Parameters: PSI(2S)
|
Fitted Parameters: PSI(2S)
|
||||||
|
|
||||||
N_{Sig} = 15 \pm 4
|
N_{Sig} = 25 \pm 6
|
||||||
N_{Bkg} = 3 \pm 3
|
N_{Bkg} = 40 \pm 9
|
||||||
N_{Bkg,2#sigma} = 2 \pm 1
|
N_{Bkg,2#sigma} = 14 \pm 2
|
||||||
N_{Sig}/N_{Bkg} = 4.59 \pm 4.44
|
N_{Sig}/N_{Bkg} = 0.62 \pm 0.20
|
||||||
N_{Sig}/N_{Bkg,2#sigma} = 6.17 \pm 2.34
|
N_{Sig}/N_{Bkg,2#sigma} = 1.79 \pm 0.54
|
||||||
#lambda = -0.00000 \pm 0.00320
|
#lambda = -0.00355 \pm 0.00217
|
||||||
#mu = 5275.52 \pm 8.60
|
#mu = 5269.38 \pm 7.62
|
||||||
#sigma_{LR} = 29.94 (c)
|
#sigma_{LR} = 26.06 (c)
|
||||||
#alpha_{L} = 1.72 (c)
|
#alpha_{L} = 1.72 (c)
|
||||||
n_{L} = 3.34 (c)
|
n_{L} = 3.34 (c)
|
||||||
#alpha_{R} = 1.76 (c)
|
#alpha_{R} = 1.76 (c)
|
||||||
@ -50,11 +50,11 @@ n_{R} = 5.67 (c)
|
|||||||
# J/psi
|
# J/psi
|
||||||
\begin{tabular}{c|c}
|
\begin{tabular}{c|c}
|
||||||
$N_{Sig}$ & $N_{Bkg}$\\\hline
|
$N_{Sig}$ & $N_{Bkg}$\\\hline
|
||||||
$252 \pm 19$ & $59 \pm 14$
|
$341 \pm 23$ & $202 \pm 25$
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
|
|
||||||
# psi(2S)
|
# psi(2S)
|
||||||
\begin{tabular}{c|c}
|
\begin{tabular}{c|c}
|
||||||
$N_{Sig}$ & $N_{Bkg}$\\\hline
|
$N_{Sig}$ & $N_{Bkg}$\\\hline
|
||||||
$15 \pm 4$ & $3 \pm 3$
|
$25 \pm 6$ & $40 \pm 9$
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
#### BuToHpMuMu @ Tue Apr 16 12:07:16 2024 ####
|
#### BuToHpMuMu @ Tue Apr 16 10:26:25 2024 ####
|
||||||
J/Psi Mode: 737 #pm 30 / 174 #pm 19
|
J/Psi Mode: 919 #pm 35 / 364 #pm 29
|
||||||
Sig/Bkg: 4.24 #pm 0.50
|
Sig/Bkg: 2.52 #pm 0.22
|
||||||
Psi(2S) Mode: 65 #pm 9 / 38 #pm 11
|
Psi(2S) Mode: 71 #pm 12 / 211 #pm 24
|
||||||
Sig/Bkg: 1.70 #pm 0.51
|
Sig/Bkg: 0.34 #pm 0.07
|
||||||
Mode Yield Ratio: 0.088 #pm 0.013
|
Mode Yield Ratio: 0.077 #pm 0.013
|
||||||
Rel Br Frac MuMu: 7.701 #pm 0.804
|
Rel Br Frac MuMu: 7.701 #pm 0.804
|
||||||
Rel Br Frac: 0.675 #pm 0.120
|
Rel Br Frac: 0.596 #pm 0.114
|
||||||
|
|
||||||
Params from Sim:
|
Params from Sim:
|
||||||
aL: 1.76
|
aL: 1.76
|
||||||
nL: 4.01
|
nL: 4.01
|
||||||
aR: 1.93
|
aR: 1.93
|
||||||
nR: 4.36
|
nR: 4.36
|
||||||
S: 23.39
|
S: 23.72
|
||||||
|
|
||||||
#mu = 5278.16 \pm 0.05
|
#mu = 5278.16 \pm 0.05
|
||||||
#sigma_{LR} = 16.43 \pm 0.05
|
#sigma_{LR} = 16.43 \pm 0.05
|
||||||
@ -23,14 +23,14 @@ n_{R} = 4.36 \pm 0.19
|
|||||||
|
|
||||||
Fitted Parameters: J/PSI
|
Fitted Parameters: J/PSI
|
||||||
|
|
||||||
N_{Sig} = 737 \pm 29
|
N_{Sig} = 919 \pm 34
|
||||||
N_{Bkg} = 174 \pm 19
|
N_{Bkg} = 364 \pm 28
|
||||||
N_{Bkg,2#sigma} = 178 \pm 7
|
N_{Bkg,2#sigma} = 250 \pm 9
|
||||||
N_{Sig}/N_{Bkg} = 4.24 \pm 0.49
|
N_{Sig}/N_{Bkg} = 2.52 \pm 0.22
|
||||||
N_{Sig}/N_{Bkg,2#sigma} = 4.15 \pm 0.23
|
N_{Sig}/N_{Bkg,2#sigma} = 3.68 \pm 0.19
|
||||||
#lambda = -0.00400 \pm 0.00020
|
#lambda = -0.00373 \pm 0.00042
|
||||||
#mu = 5271.23 \pm 1.00
|
#mu = 5271.10 \pm 0.95
|
||||||
#sigma_{LR} = 23.39 \pm 0.90
|
#sigma_{LR} = 23.72 \pm 0.88
|
||||||
#alpha_{L} = 1.76 (c)
|
#alpha_{L} = 1.76 (c)
|
||||||
n_{L} = 4.01 (c)
|
n_{L} = 4.01 (c)
|
||||||
#alpha_{R} = 1.93 (c)
|
#alpha_{R} = 1.93 (c)
|
||||||
@ -38,14 +38,14 @@ n_{R} = 4.36 (c)
|
|||||||
|
|
||||||
Fitted Parameters: PSI(2S)
|
Fitted Parameters: PSI(2S)
|
||||||
|
|
||||||
N_{Sig} = 65 \pm 9
|
N_{Sig} = 71 \pm 11
|
||||||
N_{Bkg} = 38 \pm 10
|
N_{Bkg} = 211 \pm 24
|
||||||
N_{Bkg,2#sigma} = 16 \pm 2
|
N_{Bkg,2#sigma} = 44 \pm 4
|
||||||
N_{Sig}/N_{Bkg} = 1.70 \pm 0.51
|
N_{Sig}/N_{Bkg} = 0.34 \pm 0.06
|
||||||
N_{Sig}/N_{Bkg,2#sigma} = 3.99 \pm 0.76
|
N_{Sig}/N_{Bkg,2#sigma} = 1.62 \pm 0.29
|
||||||
#lambda = -0.00186 \pm 0.00129
|
#lambda = -0.00169 \pm 0.00058
|
||||||
#mu = 5264.90 \pm 3.56
|
#mu = 5264.61 \pm 4.01
|
||||||
#sigma_{LR} = 23.39 (c)
|
#sigma_{LR} = 23.72 (c)
|
||||||
#alpha_{L} = 1.76 (c)
|
#alpha_{L} = 1.76 (c)
|
||||||
n_{L} = 4.01 (c)
|
n_{L} = 4.01 (c)
|
||||||
#alpha_{R} = 1.93 (c)
|
#alpha_{R} = 1.93 (c)
|
||||||
@ -54,11 +54,11 @@ n_{R} = 4.36 (c)
|
|||||||
# J/psi
|
# J/psi
|
||||||
\begin{tabular}{c|c}
|
\begin{tabular}{c|c}
|
||||||
$N_{Sig}$ & $N_{Bkg}$\\\hline
|
$N_{Sig}$ & $N_{Bkg}$\\\hline
|
||||||
$737 \pm 29$ & $174 \pm 19$
|
$919 \pm 34$ & $364 \pm 28$
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
|
|
||||||
# psi(2S)
|
# psi(2S)
|
||||||
\begin{tabular}{c|c}
|
\begin{tabular}{c|c}
|
||||||
$N_{Sig}$ & $N_{Bkg}$\\\hline
|
$N_{Sig}$ & $N_{Bkg}$\\\hline
|
||||||
$65 \pm 9$ & $38 \pm 10$
|
$71 \pm 11$ & $211 \pm 24$
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#### BuToKpMuMu @ Wed Apr 10 10:51:08 2024 ####
|
#### BuToKpMuMu @ Wed Apr 10 13:49:05 2024 ####
|
||||||
J/Psi Mode: 813 #pm 35 / 734 #pm 44
|
J/Psi Mode: 815 #pm 35 / 743 #pm 45
|
||||||
Sig/Bkg: 1.11 #pm 0.09
|
Sig/Bkg: 1.10 #pm 0.09
|
||||||
Psi(2S) Mode: 69 #pm 12 / 283 #pm 30
|
Psi(2S) Mode: 69 #pm 12 / 290 #pm 30
|
||||||
Sig/Bkg: 0.24 #pm 0.05
|
Sig/Bkg: 0.24 #pm 0.05
|
||||||
Mode Yield Ratio: 0.085 #pm 0.015
|
Mode Yield Ratio: 0.085 #pm 0.015
|
||||||
Rel Br Frac MuMu: 7.701 #pm 0.804
|
Rel Br Frac MuMu: 7.701 #pm 0.804
|
||||||
@ -9,10 +9,10 @@ Rel Br Frac: 0.654 #pm 0.132
|
|||||||
|
|
||||||
Params from Sim:
|
Params from Sim:
|
||||||
aL: 1.77
|
aL: 1.77
|
||||||
nL: 3.86
|
nL: 3.96
|
||||||
aR: 1.96
|
aR: 1.95
|
||||||
nR: 4.43
|
nR: 4.62
|
||||||
S: 24.08
|
S: 24.11
|
||||||
|
|
||||||
#mu = 5278.10 \pm 0.05
|
#mu = 5278.10 \pm 0.05
|
||||||
#sigma_{LR} = 16.34 \pm 0.05
|
#sigma_{LR} = 16.34 \pm 0.05
|
||||||
@ -23,14 +23,14 @@ n_{R} = 4.62 \pm 0.22
|
|||||||
|
|
||||||
Fitted Parameters: J/PSI
|
Fitted Parameters: J/PSI
|
||||||
|
|
||||||
N_{Sig} = 813 \pm 34
|
N_{Sig} = 815 \pm 34
|
||||||
N_{Bkg} = 734 \pm 44
|
N_{Bkg} = 743 \pm 44
|
||||||
N_{Bkg,2#sigma} = 257 \pm 9
|
N_{Bkg,2#sigma} = 258 \pm 9
|
||||||
N_{Sig}/N_{Bkg} = 1.11 \pm 0.08
|
N_{Sig}/N_{Bkg} = 1.10 \pm 0.08
|
||||||
N_{Sig}/N_{Bkg,2#sigma} = 3.16 \pm 0.18
|
N_{Sig}/N_{Bkg,2#sigma} = 3.15 \pm 0.18
|
||||||
#lambda = -0.00209 \pm 0.00031
|
#lambda = -0.00207 \pm 0.00031
|
||||||
#mu = 5271.35 \pm 1.08
|
#mu = 5271.47 \pm 1.08
|
||||||
#sigma_{LR} = 24.08 \pm 1.02
|
#sigma_{LR} = 24.11 \pm 1.02
|
||||||
#alpha_{L} = 1.77 (c)
|
#alpha_{L} = 1.77 (c)
|
||||||
n_{L} = 3.96 (c)
|
n_{L} = 3.96 (c)
|
||||||
#alpha_{R} = 1.95 (c)
|
#alpha_{R} = 1.95 (c)
|
||||||
@ -38,14 +38,14 @@ n_{R} = 4.62 (c)
|
|||||||
|
|
||||||
Fitted Parameters: PSI(2S)
|
Fitted Parameters: PSI(2S)
|
||||||
|
|
||||||
N_{Sig} = 69 \pm 11
|
N_{Sig} = 69 \pm 12
|
||||||
N_{Bkg} = 283 \pm 29
|
N_{Bkg} = 290 \pm 30
|
||||||
N_{Bkg,2#sigma} = 52 \pm 5
|
N_{Bkg,2#sigma} = 53 \pm 5
|
||||||
N_{Sig}/N_{Bkg} = 0.24 \pm 0.05
|
N_{Sig}/N_{Bkg} = 0.24 \pm 0.05
|
||||||
N_{Sig}/N_{Bkg,2#sigma} = 1.33 \pm 0.25
|
N_{Sig}/N_{Bkg,2#sigma} = 1.32 \pm 0.25
|
||||||
#lambda = -0.00136 \pm 0.00051
|
#lambda = -0.00131 \pm 0.00051
|
||||||
#mu = 5268.31 \pm 4.17
|
#mu = 5268.09 \pm 4.24
|
||||||
#sigma_{LR} = 24.08 (c)
|
#sigma_{LR} = 24.11 (c)
|
||||||
#alpha_{L} = 1.77 (c)
|
#alpha_{L} = 1.77 (c)
|
||||||
n_{L} = 3.96 (c)
|
n_{L} = 3.96 (c)
|
||||||
#alpha_{R} = 1.95 (c)
|
#alpha_{R} = 1.95 (c)
|
||||||
@ -54,11 +54,11 @@ n_{R} = 4.62 (c)
|
|||||||
# J/psi
|
# J/psi
|
||||||
\begin{tabular}{c|c}
|
\begin{tabular}{c|c}
|
||||||
$N_{Sig}$ & $N_{Bkg}$\\\hline
|
$N_{Sig}$ & $N_{Bkg}$\\\hline
|
||||||
$813 \pm 34$ & $734 \pm 44$
|
$815 \pm 34$ & $743 \pm 44$
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
|
|
||||||
# psi(2S)
|
# psi(2S)
|
||||||
\begin{tabular}{c|c}
|
\begin{tabular}{c|c}
|
||||||
$N_{Sig}$ & $N_{Bkg}$\\\hline
|
$N_{Sig}$ & $N_{Bkg}$\\\hline
|
||||||
$69 \pm 11$ & $283 \pm 29$
|
$69 \pm 12$ & $290 \pm 30$
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
|
@ -229,7 +229,7 @@ void TrainBDT(std::vector<TV *> vars, const char* unique_id, TTree *sig_tree, TT
|
|||||||
data_loader->AddBackgroundTree(bkg_tree, background_weight);
|
data_loader->AddBackgroundTree(bkg_tree, background_weight);
|
||||||
data_loader->PrepareTrainingAndTestTree("", "", "nTrain_Signal=0:nTrain_Background=0:SplitMode=Random:NormMode=NumEvents:V");
|
data_loader->PrepareTrainingAndTestTree("", "", "nTrain_Signal=0:nTrain_Background=0:SplitMode=Random:NormMode=NumEvents:V");
|
||||||
|
|
||||||
factory->BookMethod(data_loader, TMVA::Types::kBDT, "BDT", "!H:!V:NTrees=400:MinNodeSize=2.5%:CreateMVAPdfs:MaxDepth=3:BoostType=AdaBoost:AdaBoostBeta=0.5:UseBaggedBoost:BaggedSampleFraction=0.5:SeparationType=GiniIndex:nCuts=20");
|
factory->BookMethod(data_loader, TMVA::Types::kBDT, "BDT", "!H:!V:NTrees=600:MinNodeSize=2.5%:CreateMVAPdfs:MaxDepth=3:BoostType=AdaBoost:AdaBoostBeta=0.5:UseBaggedBoost:BaggedSampleFraction=0.5:SeparationType=GiniIndex:nCuts=20");
|
||||||
|
|
||||||
factory->TrainAllMethods();
|
factory->TrainAllMethods();
|
||||||
factory->TestAllMethods();
|
factory->TestAllMethods();
|
||||||
|
@ -50,8 +50,7 @@ int new_analysis_b02hphmmumu()
|
|||||||
const char *data_tree_name = "SpruceRD_B0ToHpHmMuMu";
|
const char *data_tree_name = "SpruceRD_B0ToHpHmMuMu";
|
||||||
const char *sim_tree_name = "B0ToHpHmMuMu_noPID_mapped";
|
const char *sim_tree_name = "B0ToHpHmMuMu_noPID_mapped";
|
||||||
const char *end_state_mass_literal = "m(#pi^{+}#pi^{-}_{(#rightarrow K^{-})}#mu^{+}#mu^{-} & #pi^{+}_{(#rightarrow K^{+})}#pi^{-}#mu^{+}#mu^{-}) [MeV]";
|
const char *end_state_mass_literal = "m(#pi^{+}#pi^{-}_{(#rightarrow K^{-})}#mu^{+}#mu^{-} & #pi^{+}_{(#rightarrow K^{+})}#pi^{-}#mu^{+}#mu^{-}) [MeV]";
|
||||||
const bool retrain_bdt = false;
|
const bool retrain_bdt = true;
|
||||||
const bool skip_fit = false;
|
|
||||||
|
|
||||||
TChain *data_chain = new TChain(TString::Format("%s/DecayTree", data_tree_name));
|
TChain *data_chain = new TChain(TString::Format("%s/DecayTree", data_tree_name));
|
||||||
data_chain->Add("/auto/data/pfeiffer/inclusive_detached_dilepton/data_samples/Collision23_Beam6800GeV-VeloClosed-MagDown-Excl-UT_RealData_Sprucing23r1_90000000_RD.root");
|
data_chain->Add("/auto/data/pfeiffer/inclusive_detached_dilepton/data_samples/Collision23_Beam6800GeV-VeloClosed-MagDown-Excl-UT_RealData_Sprucing23r1_90000000_RD.root");
|
||||||
@ -109,10 +108,8 @@ int new_analysis_b02hphmmumu()
|
|||||||
TV::Float("B0_PT", "B0_PT"),
|
TV::Float("B0_PT", "B0_PT"),
|
||||||
TV::Float("B0_BPVFDCHI2", "B0_BPVFDCHI2"),
|
TV::Float("B0_BPVFDCHI2", "B0_BPVFDCHI2"),
|
||||||
TV::Float("B0_BPVDIRA", "B0_BPVDIRA"),
|
TV::Float("B0_BPVDIRA", "B0_BPVDIRA"),
|
||||||
TV::Double("B0_CHI2", "B0_CHI2"),
|
|
||||||
TV::Float("Jpsi_BPVIPCHI2", "Jpsi_BPVIPCHI2"),
|
TV::Float("Jpsi_BPVIPCHI2", "Jpsi_BPVIPCHI2"),
|
||||||
TV::Float("Jpsi_PT", "Jpsi_PT"),
|
TV::Float("Jpsi_PT", "Jpsi_PT"),
|
||||||
TV::Double("Jpsi_CHI2", "Jpsi_CHI2"),
|
|
||||||
TV::Float("Kst0_BPVIPCHI2", "Kst0_BPVIPCHI2"),
|
TV::Float("Kst0_BPVIPCHI2", "Kst0_BPVIPCHI2"),
|
||||||
TV::Float("Kst0_PT", "Kst0_PT"),
|
TV::Float("Kst0_PT", "Kst0_PT"),
|
||||||
TV::Float("Kplus_BPVIPCHI2", "Kplus_BPVIPCHI2"),
|
TV::Float("Kplus_BPVIPCHI2", "Kplus_BPVIPCHI2"),
|
||||||
@ -120,10 +117,10 @@ int new_analysis_b02hphmmumu()
|
|||||||
TV::Float("piminus_BPVIPCHI2", "piminus_BPVIPCHI2"),
|
TV::Float("piminus_BPVIPCHI2", "piminus_BPVIPCHI2"),
|
||||||
TV::Float("piminus_PT", "piminus_PT"),
|
TV::Float("piminus_PT", "piminus_PT"),
|
||||||
kplus_pid_k_var,
|
kplus_pid_k_var,
|
||||||
//TV::Float("muminus_BPVIPCHI2", "muminus_BPVIPCHI2"),
|
TV::Float("muminus_BPVIPCHI2", "muminus_BPVIPCHI2"),
|
||||||
TV::Float("muminus_PT", "muminus_PT"),
|
// TV::Float("muminus_PT", "muminus_PT"),
|
||||||
//TV::Float("muplus_BPVIPCHI2", "muplus_BPVIPCHI2"),
|
TV::Float("muplus_BPVIPCHI2", "muplus_BPVIPCHI2"),
|
||||||
TV::Float("muplus_PT", "muplus_PT"),
|
// TV::Float("muplus_PT", "muplus_PT"),
|
||||||
};
|
};
|
||||||
|
|
||||||
TTree *sig_tree = new TTree("TreeS", "tree containing signal data");
|
TTree *sig_tree = new TTree("TreeS", "tree containing signal data");
|
||||||
@ -150,8 +147,7 @@ int new_analysis_b02hphmmumu()
|
|||||||
if (std::all_of(vars.begin(), vars.end(), [](TV *v)
|
if (std::all_of(vars.begin(), vars.end(), [](TV *v)
|
||||||
{ return v->IsDataFinite(); }))
|
{ return v->IsDataFinite(); }))
|
||||||
{
|
{
|
||||||
if (reconstructed_B_Mass > 5500. && ((TMath::Abs(dimuon.M() - JPSI_MASS) < 100.) || (TMath::Abs(dimuon.M() - PSI2S_MASS) < 100.))
|
if (reconstructed_B_Mass > 5500. && ((TMath::Abs(dimuon.M() - JPSI_MASS) < 100.) || (TMath::Abs(dimuon.M() - PSI2S_MASS) < 100.)))
|
||||||
&& kplus_pid_k_var->GetDataDouble() > -3 && (kplus_pid_k_var->GetDataDouble() - piminus_PID_K) > 0)
|
|
||||||
{
|
{
|
||||||
bkg_tree->Fill();
|
bkg_tree->Fill();
|
||||||
bkg_events++;
|
bkg_events++;
|
||||||
@ -198,11 +194,6 @@ int new_analysis_b02hphmmumu()
|
|||||||
std::cout << "# Finished BDT retrain." << std::endl;
|
std::cout << "# Finished BDT retrain." << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skip_fit) {
|
|
||||||
std::cout << "# Skipping evaluation of data." << std::endl;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << "# Starting evaluation of data." << std::endl;
|
std::cout << "# Starting evaluation of data." << std::endl;
|
||||||
|
|
||||||
Float_t *train_vars = new Float_t[vars.size()];
|
Float_t *train_vars = new Float_t[vars.size()];
|
||||||
|
@ -50,8 +50,7 @@ int new_analysis_bu2hpmumu()
|
|||||||
const char *data_tree_name = "SpruceRD_BuToHpMuMu";
|
const char *data_tree_name = "SpruceRD_BuToHpMuMu";
|
||||||
const char *sim_tree_name = "BuToHpMuMu_noPID_mapped";
|
const char *sim_tree_name = "BuToHpMuMu_noPID_mapped";
|
||||||
const char *end_state_mass_literal = "m(#pi^{+}_{(#rightarrow K^{+})}#mu^{+}#mu^{-}) [MeV]";
|
const char *end_state_mass_literal = "m(#pi^{+}_{(#rightarrow K^{+})}#mu^{+}#mu^{-}) [MeV]";
|
||||||
const bool retrain_bdt = false;
|
const bool retrain_bdt = true;
|
||||||
const bool skip_fit = false;
|
|
||||||
|
|
||||||
TChain *data_chain = new TChain(TString::Format("%s/DecayTree", data_tree_name));
|
TChain *data_chain = new TChain(TString::Format("%s/DecayTree", data_tree_name));
|
||||||
data_chain->Add("/auto/data/pfeiffer/inclusive_detached_dilepton/data_samples/Collision23_Beam6800GeV-VeloClosed-MagDown-Excl-UT_RealData_Sprucing23r1_90000000_RD.root");
|
data_chain->Add("/auto/data/pfeiffer/inclusive_detached_dilepton/data_samples/Collision23_Beam6800GeV-VeloClosed-MagDown-Excl-UT_RealData_Sprucing23r1_90000000_RD.root");
|
||||||
@ -61,9 +60,9 @@ int new_analysis_bu2hpmumu()
|
|||||||
FourVect *l24v_data = FourVect::Init(data_chain, "muplus");
|
FourVect *l24v_data = FourVect::Init(data_chain, "muplus");
|
||||||
FourVect *hp4v_data = FourVect::Init(data_chain, "Kplus");
|
FourVect *hp4v_data = FourVect::Init(data_chain, "Kplus");
|
||||||
|
|
||||||
Double_t Kplus_PID_K;
|
// Double_t Kplus_PID_K;
|
||||||
|
|
||||||
data_chain->SetBranchAddress("Kplus_PID_K", &Kplus_PID_K);
|
// data_chain->SetBranchAddress("Kplus_PID_K", &Kplus_PID_K);
|
||||||
|
|
||||||
TChain *sim_chain = new TChain(TString::Format("%s/DecayTree", sim_tree_name));
|
TChain *sim_chain = new TChain(TString::Format("%s/DecayTree", sim_tree_name));
|
||||||
sim_chain->Add("/auto/data/pfeiffer/inclusive_detached_dilepton/MC/BuToHpMuMu_mapped_mc.root");
|
sim_chain->Add("/auto/data/pfeiffer/inclusive_detached_dilepton/MC/BuToHpMuMu_mapped_mc.root");
|
||||||
@ -101,19 +100,17 @@ int new_analysis_bu2hpmumu()
|
|||||||
auto hlt1_decision_histos = CreateHlt1DecisionHistos(analysis_name);
|
auto hlt1_decision_histos = CreateHlt1DecisionHistos(analysis_name);
|
||||||
std::map<std::string, int> exclusive_hits{};
|
std::map<std::string, int> exclusive_hits{};
|
||||||
|
|
||||||
// TV* kplus_pid_k_var = TV::Double("Kplus_PID_K", "Kplus_PID_K");
|
TV *kplus_pid_k_var = TV::Double("Kplus_PID_K", "Kplus_PID_K");
|
||||||
|
|
||||||
std::vector<TV *> vars{
|
std::vector<TV *> vars{
|
||||||
TV::Float("B_PT", "B_PT"),
|
TV::Float("B_PT", "B_PT"),
|
||||||
// TV::Float("B_BPVFDCHI2", "B_BPVFDCHI2"),
|
TV::Float("B_BPVFDCHI2", "B_BPVFDCHI2"),
|
||||||
TV::Float("B_BPVDIRA", "B_BPVDIRA"),
|
TV::Float("B_BPVDIRA", "B_BPVDIRA"),
|
||||||
TV::Double("B_CHI2", "B_CHI2"),
|
|
||||||
TV::Float("Jpsi_BPVIPCHI2", "Jpsi_BPVIPCHI2"),
|
TV::Float("Jpsi_BPVIPCHI2", "Jpsi_BPVIPCHI2"),
|
||||||
TV::Float("Jpsi_PT", "Jpsi_PT"),
|
TV::Float("Jpsi_PT", "Jpsi_PT"),
|
||||||
TV::Double("Jpsi_CHI2", "Jpsi_CHI2"),
|
|
||||||
TV::Float("Kplus_BPVIPCHI2", "Kplus_BPVIPCHI2"),
|
TV::Float("Kplus_BPVIPCHI2", "Kplus_BPVIPCHI2"),
|
||||||
TV::Float("Kplus_PT", "Kplus_PT"),
|
TV::Float("Kplus_PT", "Kplus_PT"),
|
||||||
// kplus_pid_k_var,
|
kplus_pid_k_var,
|
||||||
TV::Float("muminus_BPVIPCHI2", "muminus_BPVIPCHI2"),
|
TV::Float("muminus_BPVIPCHI2", "muminus_BPVIPCHI2"),
|
||||||
// TV::Float("muminus_PT", "muminus_PT"),
|
// TV::Float("muminus_PT", "muminus_PT"),
|
||||||
TV::Float("muplus_BPVIPCHI2", "muplus_BPVIPCHI2"),
|
TV::Float("muplus_BPVIPCHI2", "muplus_BPVIPCHI2"),
|
||||||
@ -145,7 +142,7 @@ int new_analysis_bu2hpmumu()
|
|||||||
if (std::all_of(vars.begin(), vars.end(), [](TV *v)
|
if (std::all_of(vars.begin(), vars.end(), [](TV *v)
|
||||||
{ return v->IsDataFinite(); }))
|
{ return v->IsDataFinite(); }))
|
||||||
{
|
{
|
||||||
if (reconstructed_B_Mass > 5500. && ((TMath::Abs(dimuon.M() - JPSI_MASS) < 100.) || (TMath::Abs(dimuon.M() - PSI2S_MASS) < 100.)) && Kplus_PID_K > -3)
|
if (reconstructed_B_Mass > 5500. && ((TMath::Abs(dimuon.M() - JPSI_MASS) < 100.) || (TMath::Abs(dimuon.M() - PSI2S_MASS) < 100.)))
|
||||||
{
|
{
|
||||||
bkg_tree->Fill();
|
bkg_tree->Fill();
|
||||||
bkg_events++;
|
bkg_events++;
|
||||||
@ -189,12 +186,6 @@ int new_analysis_bu2hpmumu()
|
|||||||
std::cout << "# Finished BDT retrain." << std::endl;
|
std::cout << "# Finished BDT retrain." << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skip_fit)
|
|
||||||
{
|
|
||||||
std::cout << "# Skipping evaluation of data." << std::endl;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << "# Starting evaluation of data." << std::endl;
|
std::cout << "# Starting evaluation of data." << std::endl;
|
||||||
|
|
||||||
Float_t *train_vars = new Float_t[vars.size()];
|
Float_t *train_vars = new Float_t[vars.size()];
|
||||||
@ -231,13 +222,13 @@ int new_analysis_bu2hpmumu()
|
|||||||
FillHlt1DecisionHistos(hlt1_decision_histos, reconstructed_B_Mass);
|
FillHlt1DecisionHistos(hlt1_decision_histos, reconstructed_B_Mass);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Kplus_PID_K > -3 && ((TMath::Abs(dimuon.M() - JPSI_MASS) < 100.) || (TMath::Abs(dimuon.M() - PSI2S_MASS) < 100.)))
|
h1_B_Mass_unf->Fill(reconstructed_B_Mass);
|
||||||
|
|
||||||
|
if (kplus_pid_k_var->GetDataDouble() > -3 && ((TMath::Abs(dimuon.M() - JPSI_MASS) < 100.) || (TMath::Abs(dimuon.M() - PSI2S_MASS) < 100.)))
|
||||||
{
|
{
|
||||||
double mva_response = reader->EvaluateMVA("BDT");
|
double mva_response = reader->EvaluateMVA("BDT");
|
||||||
h1_bdt_probs->Fill(mva_response);
|
h1_bdt_probs->Fill(mva_response);
|
||||||
|
|
||||||
h1_B_Mass_unf->Fill(reconstructed_B_Mass);
|
|
||||||
|
|
||||||
if (mva_response > mva_cut_value)
|
if (mva_response > mva_cut_value)
|
||||||
{
|
{
|
||||||
h1_B_Mass_bdtf->Fill(reconstructed_B_Mass);
|
h1_B_Mass_bdtf->Fill(reconstructed_B_Mass);
|
||||||
|
@ -58,10 +58,6 @@ int new_analysis_bu2kpmumu()
|
|||||||
FourVect *l24v_data = FourVect::Init(data_chain, "muminus");
|
FourVect *l24v_data = FourVect::Init(data_chain, "muminus");
|
||||||
FourVect *hp4v_data = FourVect::Init(data_chain, "Kplus");
|
FourVect *hp4v_data = FourVect::Init(data_chain, "Kplus");
|
||||||
|
|
||||||
Double_t Kplus_PID_K;
|
|
||||||
|
|
||||||
data_chain->SetBranchAddress("Kplus_PID_K", &Kplus_PID_K);
|
|
||||||
|
|
||||||
TChain *sim_chain = new TChain(TString::Format("%s/DecayTree", sim_tree_name));
|
TChain *sim_chain = new TChain(TString::Format("%s/DecayTree", sim_tree_name));
|
||||||
sim_chain->Add("/auto/data/pfeiffer/inclusive_detached_dilepton/MC/rd_btoxll_simulation_turbo_v0r0p6657752_BuToKpMuMu_12143001_magdown.root");
|
sim_chain->Add("/auto/data/pfeiffer/inclusive_detached_dilepton/MC/rd_btoxll_simulation_turbo_v0r0p6657752_BuToKpMuMu_12143001_magdown.root");
|
||||||
|
|
||||||
@ -142,8 +138,6 @@ int new_analysis_bu2kpmumu()
|
|||||||
|
|
||||||
h1_B_Mass_unf->Fill(reconstructed_B_Mass);
|
h1_B_Mass_unf->Fill(reconstructed_B_Mass);
|
||||||
|
|
||||||
if (Kplus_PID_K > -3)
|
|
||||||
{
|
|
||||||
if (TMath::Abs(dimuon.M() - JPSI_MASS) < 100.)
|
if (TMath::Abs(dimuon.M() - JPSI_MASS) < 100.)
|
||||||
{
|
{
|
||||||
B_Mass_jpsi_var = reconstructed_B_Mass;
|
B_Mass_jpsi_var = reconstructed_B_Mass;
|
||||||
@ -154,7 +148,6 @@ int new_analysis_bu2kpmumu()
|
|||||||
B_Mass_psi2s_var = reconstructed_B_Mass;
|
B_Mass_psi2s_var = reconstructed_B_Mass;
|
||||||
tree_B_Mass_psi2s->Fill();
|
tree_B_Mass_psi2s->Fill();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
PrintProgress(TString::Format("%s BDT Evaluation", analysis_name), data_entries, 10000, i);
|
PrintProgress(TString::Format("%s BDT Evaluation", analysis_name), data_entries, 10000, i);
|
||||||
}
|
}
|
||||||
@ -202,35 +195,30 @@ int new_analysis_bu2kpmumu()
|
|||||||
res_file << "Rel Br Frac MuMu: " << ErrToStr(mumu_br_frac, 3) << std::endl;
|
res_file << "Rel Br Frac MuMu: " << ErrToStr(mumu_br_frac, 3) << std::endl;
|
||||||
|
|
||||||
auto br_frac = MultWithErr(signal_ratio.first, signal_ratio.second, mumu_br_frac.first, mumu_br_frac.second);
|
auto br_frac = MultWithErr(signal_ratio.first, signal_ratio.second, mumu_br_frac.first, mumu_br_frac.second);
|
||||||
res_file << "Rel Br Frac: " << ErrToStr(br_frac, 3) << std::endl
|
res_file << "Rel Br Frac: " << ErrToStr(br_frac, 3) << std::endl << std::endl;
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
res_file << "Params from Sim:" << std::endl
|
res_file << "Params from Sim:" << std::endl << roofit_hist_sim.shape_parameters.ToString() << std::endl;
|
||||||
<< roofit_hist_sim.shape_parameters.ToString() << std::endl;
|
|
||||||
|
|
||||||
for (const auto &par : roofit_hist_sim.fitted_params)
|
for (const auto &par : roofit_hist_sim.fitted_params)
|
||||||
{
|
{
|
||||||
res_file << par.ToString(true).c_str() << std::endl;
|
res_file << par.ToString(true).c_str() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
res_file << std::endl
|
res_file << std::endl << "Fitted Parameters: J/PSI" << std::endl << std::endl;
|
||||||
<< "Fitted Parameters: J/PSI" << std::endl
|
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
for (const auto &par : roofit_hist_jpsi_fitsum.fitted_params)
|
for (const auto &par : roofit_hist_jpsi_fitsum.fitted_params)
|
||||||
{
|
{
|
||||||
res_file << par.ToString(true).c_str() << std::endl;
|
res_file << par.ToString(true).c_str() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
res_file << std::endl
|
res_file << std::endl << "Fitted Parameters: PSI(2S)" << std::endl << std::endl;
|
||||||
<< "Fitted Parameters: PSI(2S)" << std::endl
|
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
for (const auto &par : roofit_hist_psi2s_fitsum.fitted_params)
|
for (const auto &par : roofit_hist_psi2s_fitsum.fitted_params)
|
||||||
{
|
{
|
||||||
res_file << par.ToString(true).c_str() << std::endl;
|
res_file << par.ToString(true).c_str() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
auto print_table = [&res_file](std::string name, std::pair<double, double> sig, std::pair<double, double> bkg)
|
auto print_table = [&res_file](std::string name, std::pair<double, double> sig, std::pair<double, double> bkg)
|
||||||
{
|
{
|
||||||
res_file << std::endl;
|
res_file << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user