Browse Source

Merge branch 'master' into training_tryouts

training_tryouts
Marius Pfeiffer 6 months ago
parent
commit
5525558f6f
  1. 58
      B0ToKpPimMuMu_results.txt
  2. 66
      BuToHpMuMu_results.txt
  3. 20
      BuToKpMuMu_results.txt
  4. 8
      mapmc_b02hphmmumu.cpp
  5. 2
      mapmc_bu2hpmumu.cpp
  6. 31
      new_analysis_b02hphmmumu.cpp
  7. 10
      new_analysis_b02kppimmumu.cpp
  8. 6
      new_analysis_bu2hpmumu.cpp
  9. 8
      new_analysis_bu2kpmumu.cpp

58
B0ToKpPimMuMu_results.txt

@ -1,25 +1,25 @@
#### B0ToKpPimMuMu @ Tue Apr 2 10:46:02 2024 ####
#### B0ToKpPimMuMu @ Wed Apr 10 13:49:34 2024 ####
J/Psi Mode: 305 #pm 21 / 175 #pm 21 J/Psi Mode: 305 #pm 21 / 175 #pm 21
Sig/Bkg: 1.74 #pm 0.24 Sig/Bkg: 1.74 #pm 0.24
Psi(2S) Mode: 26 #pm 7 / 68 #pm 19
Sig/Bkg: 0.39 #pm 0.15
Psi(2S) Mode: 26 #pm 7 / 67 #pm 18
Sig/Bkg: 0.39 #pm 0.14
Mode Yield Ratio: 0.086 #pm 0.022 Mode Yield Ratio: 0.086 #pm 0.022
Rel Br Frac MuMu: 7.701 #pm 0.804 Rel Br Frac MuMu: 7.701 #pm 0.804
Rel Br Frac: 0.662 #pm 0.179
Rel Br Frac: 0.661 #pm 0.179
Params from Sim: Params from Sim:
aL: 1.74 aL: 1.74
nL: 3.27
aR: 1.82
nR: 5.82
S: 25.50
nL: 3.47
aR: 1.80
nR: 6.03
S: 25.48
#mu = 5278.97 \pm 0.13
#sigma_{LR} = 15.77 \pm 0.15
#mu = 5278.94 \pm 0.13
#sigma_{LR} = 15.76 \pm 0.15
#alpha_{L} = 1.74 \pm 0.06 #alpha_{L} = 1.74 \pm 0.06
n_{L} = 3.27 \pm 0.30
#alpha_{R} = 1.82 \pm 0.07
n_{R} = 5.82 \pm 0.81
n_{L} = 3.47 \pm 0.33
#alpha_{R} = 1.80 \pm 0.07
n_{R} = 6.03 \pm 0.86
Fitted Parameters: J/PSI Fitted Parameters: J/PSI
@ -27,29 +27,29 @@ N_{Sig} = 305 \pm 21
N_{Bkg} = 175 \pm 20 N_{Bkg} = 175 \pm 20
N_{Bkg,2#sigma} = 98 \pm 6 N_{Bkg,2#sigma} = 98 \pm 6
N_{Sig}/N_{Bkg} = 1.74 \pm 0.23 N_{Sig}/N_{Bkg} = 1.74 \pm 0.23
N_{Sig}/N_{Bkg,2#sigma} = 3.12 \pm 0.28
#lambda = -0.00332 \pm 0.00062
#mu = 5269.84 \pm 1.85
#sigma_{LR} = 25.50 \pm 1.77
N_{Sig}/N_{Bkg,2#sigma} = 3.11 \pm 0.28
#lambda = -0.00333 \pm 0.00062
#mu = 5269.83 \pm 1.85
#sigma_{LR} = 25.48 \pm 1.78
#alpha_{L} = 1.74 (c) #alpha_{L} = 1.74 (c)
n_{L} = 3.27 (c)
#alpha_{R} = 1.82 (c)
n_{R} = 5.82 (c)
n_{L} = 3.47 (c)
#alpha_{R} = 1.80 (c)
n_{R} = 6.03 (c)
Fitted Parameters: PSI(2S) Fitted Parameters: PSI(2S)
N_{Sig} = 26 \pm 6 N_{Sig} = 26 \pm 6
N_{Bkg} = 68 \pm 19
N_{Bkg} = 67 \pm 18
N_{Bkg,2#sigma} = 11 \pm 2 N_{Bkg,2#sigma} = 11 \pm 2
N_{Sig}/N_{Bkg} = 0.39 \pm 0.14 N_{Sig}/N_{Bkg} = 0.39 \pm 0.14
N_{Sig}/N_{Bkg,2#sigma} = 2.44 \pm 0.78
#lambda = -0.00003 \pm 0.00398
#mu = 5276.41 \pm 6.20
#sigma_{LR} = 25.50 (c)
N_{Sig}/N_{Bkg,2#sigma} = 2.43 \pm 0.76
#lambda = -0.00006 \pm 0.00328
#mu = 5276.43 \pm 6.20
#sigma_{LR} = 25.48 (c)
#alpha_{L} = 1.74 (c) #alpha_{L} = 1.74 (c)
n_{L} = 3.27 (c)
#alpha_{R} = 1.82 (c)
n_{R} = 5.82 (c)
n_{L} = 3.47 (c)
#alpha_{R} = 1.80 (c)
n_{R} = 6.03 (c)
# J/psi # J/psi
\begin{tabular}{c|c} \begin{tabular}{c|c}
@ -60,5 +60,5 @@ $305 \pm 21$ & $175 \pm 20$
# psi(2S) # psi(2S)
\begin{tabular}{c|c} \begin{tabular}{c|c}
$N_{Sig}$ & $N_{Bkg}$\\\hline $N_{Sig}$ & $N_{Bkg}$\\\hline
$26 \pm 6$ & $68 \pm 19$
$26 \pm 6$ & $67 \pm 18$
\end{tabular} \end{tabular}

66
BuToHpMuMu_results.txt

@ -1,64 +1,64 @@
#### BuToHpMuMu @ Wed Apr 10 11:06:16 2024 ####
J/Psi Mode: 733 #pm 30 / 174 #pm 20
Sig/Bkg: 4.20 #pm 0.49
Psi(2S) Mode: 64 #pm 9 / 43 #pm 11
Sig/Bkg: 1.50 #pm 0.42
Mode Yield Ratio: 0.087 #pm 0.013
#### BuToHpMuMu @ Tue Apr 16 12:07:16 2024 ####
J/Psi Mode: 737 #pm 30 / 174 #pm 19
Sig/Bkg: 4.24 #pm 0.50
Psi(2S) Mode: 65 #pm 9 / 38 #pm 11
Sig/Bkg: 1.70 #pm 0.51
Mode Yield Ratio: 0.088 #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.673 #pm 0.121
Rel Br Frac: 0.675 #pm 0.120
Params from Sim: Params from Sim:
aL: 1.76 aL: 1.76
nL: 4.02
nL: 4.01
aR: 1.93 aR: 1.93
nR: 4.33
S: 23.72
nR: 4.36
S: 23.39
#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
#alpha_{L} = 1.76 \pm 0.02 #alpha_{L} = 1.76 \pm 0.02
n_{L} = 4.02 \pm 0.16
n_{L} = 4.01 \pm 0.16
#alpha_{R} = 1.93 \pm 0.03 #alpha_{R} = 1.93 \pm 0.03
n_{R} = 4.33 \pm 0.19
n_{R} = 4.36 \pm 0.19
Fitted Parameters: J/PSI Fitted Parameters: J/PSI
N_{Sig} = 733 \pm 29
N_{Sig} = 737 \pm 29
N_{Bkg} = 174 \pm 19 N_{Bkg} = 174 \pm 19
N_{Bkg,2#sigma} = 179 \pm 7
N_{Sig}/N_{Bkg} = 4.20 \pm 0.49
N_{Sig}/N_{Bkg,2#sigma} = 4.08 \pm 0.23
#lambda = -0.00400 \pm 0.00018
#mu = 5271.39 \pm 1.03
#sigma_{LR} = 23.72 \pm 0.94
N_{Bkg,2#sigma} = 178 \pm 7
N_{Sig}/N_{Bkg} = 4.24 \pm 0.49
N_{Sig}/N_{Bkg,2#sigma} = 4.15 \pm 0.23
#lambda = -0.00400 \pm 0.00020
#mu = 5271.23 \pm 1.00
#sigma_{LR} = 23.39 \pm 0.90
#alpha_{L} = 1.76 (c) #alpha_{L} = 1.76 (c)
n_{L} = 4.02 (c)
n_{L} = 4.01 (c)
#alpha_{R} = 1.93 (c) #alpha_{R} = 1.93 (c)
n_{R} = 4.33 (c)
n_{R} = 4.36 (c)
Fitted Parameters: PSI(2S) Fitted Parameters: PSI(2S)
N_{Sig} = 64 \pm 9
N_{Bkg} = 43 \pm 10
N_{Bkg,2#sigma} = 18 \pm 2
N_{Sig}/N_{Bkg} = 1.50 \pm 0.42
N_{Sig}/N_{Bkg,2#sigma} = 3.56 \pm 0.67
#lambda = -0.00217 \pm 0.00121
#mu = 5264.03 \pm 3.67
#sigma_{LR} = 23.72 (c)
N_{Sig} = 65 \pm 9
N_{Bkg} = 38 \pm 10
N_{Bkg,2#sigma} = 16 \pm 2
N_{Sig}/N_{Bkg} = 1.70 \pm 0.51
N_{Sig}/N_{Bkg,2#sigma} = 3.99 \pm 0.76
#lambda = -0.00186 \pm 0.00129
#mu = 5264.90 \pm 3.56
#sigma_{LR} = 23.39 (c)
#alpha_{L} = 1.76 (c) #alpha_{L} = 1.76 (c)
n_{L} = 4.02 (c)
n_{L} = 4.01 (c)
#alpha_{R} = 1.93 (c) #alpha_{R} = 1.93 (c)
n_{R} = 4.33 (c)
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
$733 \pm 29$ & $174 \pm 19$
$737 \pm 29$ & $174 \pm 19$
\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
$64 \pm 9$ & $43 \pm 10$
$65 \pm 9$ & $38 \pm 10$
\end{tabular} \end{tabular}

20
BuToKpMuMu_results.txt

@ -15,11 +15,11 @@ nR: 4.43
S: 24.08 S: 24.08
#mu = 5278.10 \pm 0.05 #mu = 5278.10 \pm 0.05
#sigma_{LR} = 16.35 \pm 0.05
#sigma_{LR} = 16.34 \pm 0.05
#alpha_{L} = 1.77 \pm 0.02 #alpha_{L} = 1.77 \pm 0.02
n_{L} = 3.86 \pm 0.16
#alpha_{R} = 1.96 \pm 0.03
n_{R} = 4.43 \pm 0.20
n_{L} = 3.96 \pm 0.16
#alpha_{R} = 1.95 \pm 0.03
n_{R} = 4.62 \pm 0.22
Fitted Parameters: J/PSI Fitted Parameters: J/PSI
@ -32,9 +32,9 @@ N_{Sig}/N_{Bkg,2#sigma} = 3.16 \pm 0.18
#mu = 5271.35 \pm 1.08 #mu = 5271.35 \pm 1.08
#sigma_{LR} = 24.08 \pm 1.02 #sigma_{LR} = 24.08 \pm 1.02
#alpha_{L} = 1.77 (c) #alpha_{L} = 1.77 (c)
n_{L} = 3.86 (c)
#alpha_{R} = 1.96 (c)
n_{R} = 4.43 (c)
n_{L} = 3.96 (c)
#alpha_{R} = 1.95 (c)
n_{R} = 4.62 (c)
Fitted Parameters: PSI(2S) Fitted Parameters: PSI(2S)
@ -47,9 +47,9 @@ N_{Sig}/N_{Bkg,2#sigma} = 1.33 \pm 0.25
#mu = 5268.31 \pm 4.17 #mu = 5268.31 \pm 4.17
#sigma_{LR} = 24.08 (c) #sigma_{LR} = 24.08 (c)
#alpha_{L} = 1.77 (c) #alpha_{L} = 1.77 (c)
n_{L} = 3.86 (c)
#alpha_{R} = 1.96 (c)
n_{R} = 4.43 (c)
n_{L} = 3.96 (c)
#alpha_{R} = 1.95 (c)
n_{R} = 4.62 (c)
# J/psi # J/psi
\begin{tabular}{c|c} \begin{tabular}{c|c}

8
mapmc_b02hphmmumu.cpp

@ -69,7 +69,9 @@ int mapmc_b02hphmmumu()
Double_t B0_CHI2_in, B0_CHI2DOF_in, Double_t B0_CHI2_in, B0_CHI2DOF_in,
Jpsi_CHI2_in, Jpsi_CHI2DOF_in, Jpsi_CHI2_in, Jpsi_CHI2DOF_in,
Hp_PROBNN_K_in, Hp_PID_K_in, Hp_PROBNN_K_in, Hp_PID_K_in,
Hm_PROBNN_K_in, Hm_PID_K_in;
Hm_PROBNN_K_in, Hm_PID_K_in,
L1_PID_MU_in,
L2_PID_MU_in;
sim_chain->SetBranchAddress("B0_PT", &B0_PT_in); sim_chain->SetBranchAddress("B0_PT", &B0_PT_in);
sim_chain->SetBranchAddress("B0_BPVFDCHI2", &B0_BPVFDCHI2_in); sim_chain->SetBranchAddress("B0_BPVFDCHI2", &B0_BPVFDCHI2_in);
@ -99,9 +101,11 @@ int mapmc_b02hphmmumu()
sim_chain->SetBranchAddress("L1_BPVIPCHI2", &L1_BPVIPCHI2_in); sim_chain->SetBranchAddress("L1_BPVIPCHI2", &L1_BPVIPCHI2_in);
sim_chain->SetBranchAddress("L1_PT", &L1_PT_in); sim_chain->SetBranchAddress("L1_PT", &L1_PT_in);
sim_chain->SetBranchAddress("L1_PID_MU", &L1_PID_MU_in);
sim_chain->SetBranchAddress("L2_BPVIPCHI2", &L2_BPVIPCHI2_in); sim_chain->SetBranchAddress("L2_BPVIPCHI2", &L2_BPVIPCHI2_in);
sim_chain->SetBranchAddress("L2_PT", &L2_PT_in); sim_chain->SetBranchAddress("L2_PT", &L2_PT_in);
sim_chain->SetBranchAddress("L2_PID_MU", &L2_PID_MU_in);
TTree *output_tree = new TTree("DecayTree", "DecayTree"); TTree *output_tree = new TTree("DecayTree", "DecayTree");
@ -192,7 +196,7 @@ int mapmc_b02hphmmumu()
for (unsigned int i = 0; i < sim_entries; i++) for (unsigned int i = 0; i < sim_entries; i++)
{ {
sim_chain->GetEntry(i); sim_chain->GetEntry(i);
if (B_BKGCAT == 30 && TMath::Abs(L1_TRUEID) == PID_MUON && L2_TRUEID == -L1_TRUEID && ((TMath::Abs(Hp_TRUEID) == PID_KAON && TMath::Abs(Hm_TRUEID) == PID_PION) || (TMath::Abs(Hp_TRUEID) == PID_PION && TMath::Abs(Hm_TRUEID) == PID_KAON)))
if (B_BKGCAT == 30 && TMath::Abs(L1_TRUEID) == PID_MUON && L2_TRUEID == -L1_TRUEID && ((TMath::Abs(Hp_TRUEID) == PID_KAON && TMath::Abs(Hm_TRUEID) == PID_PION) || (TMath::Abs(Hp_TRUEID) == PID_PION && TMath::Abs(Hm_TRUEID) == PID_KAON)) && L1_PID_MU_in > -3. && L2_PID_MU_in > -3.)
{ {
B0_PT_out = B0_PT_in; B0_PT_out = B0_PT_in;
B0_BPVFDCHI2_out = B0_BPVFDCHI2_in; B0_BPVFDCHI2_out = B0_BPVFDCHI2_in;

2
mapmc_bu2hpmumu.cpp

@ -163,7 +163,7 @@ int mapmc_bu2hpmumu()
for (unsigned int i = 0; i < sim_entries; i++) for (unsigned int i = 0; i < sim_entries; i++)
{ {
sim_chain->GetEntry(i); sim_chain->GetEntry(i);
if (B_BKGCAT == 30 && TMath::Abs(L1_TRUEID) == PID_MUON && L2_TRUEID == -L1_TRUEID && TMath::Abs(Hp_TRUEID) == PID_KAON)
if (B_BKGCAT == 30 && TMath::Abs(L1_TRUEID) == PID_MUON && L2_TRUEID == -L1_TRUEID && TMath::Abs(Hp_TRUEID) == PID_KAON && L1_PID_MU_in > -3. && L2_PID_MU_in > -3.)
{ {
B_PT_out = B_PT_in; B_PT_out = B_PT_in;
B_BPVFDCHI2_out = B_BPVFDCHI2_in; B_BPVFDCHI2_out = B_BPVFDCHI2_in;

31
new_analysis_b02hphmmumu.cpp

@ -49,7 +49,7 @@ int new_analysis_b02hphmmumu()
const char *analysis_name = "B0ToHpHmMuMu"; const char *analysis_name = "B0ToHpHmMuMu";
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^{-})";
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 = false;
const bool skip_fit = false; const bool skip_fit = false;
@ -103,7 +103,7 @@ int new_analysis_b02hphmmumu()
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("B0_PT", "B0_PT"), TV::Float("B0_PT", "B0_PT"),
@ -240,16 +240,18 @@ int new_analysis_b02hphmmumu()
FillHlt1DecisionHistos(hlt1_decision_histos, reconstructed_B_Mass); FillHlt1DecisionHistos(hlt1_decision_histos, reconstructed_B_Mass);
} }
double mva_response = reader->EvaluateMVA("BDT");
h1_bdt_probs->Fill(mva_response);
h1_B_Mass_unf->Fill(reconstructed_B_Mass); h1_B_Mass_unf->Fill(reconstructed_B_Mass);
if (mva_response > mva_cut_value && kplus_pid_k_var->GetDataDouble() > -3 && (kplus_pid_k_var->GetDataDouble() - piminus_PID_K) > 0)
if (kplus_pid_k_var->GetDataDouble() > -3 && (kplus_pid_k_var->GetDataDouble() - piminus_PID_K) > 0 && TMath::Abs(reconstructed_Kstar.M() - KSTAR_MASS) < 100. && ((TMath::Abs(dimuon.M() - JPSI_MASS) < 100.) || (TMath::Abs(dimuon.M() - PSI2S_MASS) < 100.)))
{ {
h1_B_Mass_bdtf->Fill(reconstructed_B_Mass);
if (TMath::Abs(reconstructed_Kstar.M() - KSTAR_MASS) < 100.)
double mva_response = reader->EvaluateMVA("BDT");
h1_bdt_probs->Fill(mva_response);
if (mva_response > mva_cut_value)
{ {
h1_B_Mass_bdtf->Fill(reconstructed_B_Mass);
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;
@ -317,23 +319,30 @@ int new_analysis_b02hphmmumu()
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 << std::endl;
res_file << "Rel Br Frac: " << ErrToStr(br_frac, 3) << std::endl
<< std::endl;
res_file << std::endl << "Fitted Parameters: Simulation" << std::endl << std::endl;
res_file << std::endl
<< "Fitted Parameters: Simulation" << std::endl
<< 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 << "Fitted Parameters: J/PSI" << std::endl << std::endl;
res_file << 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 << "Fitted Parameters: PSI(2S)" << std::endl << std::endl;
res_file << 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)
{ {

10
new_analysis_b02kppimmumu.cpp

@ -49,7 +49,7 @@ int new_analysis_b02kppimmumu()
const char *analysis_name = "B0ToKpPimMuMu"; const char *analysis_name = "B0ToKpPimMuMu";
const char *data_tree_name = "Hlt2RD_B0ToKpPimMuMu"; const char *data_tree_name = "Hlt2RD_B0ToKpPimMuMu";
const char *sim_tree_name = "B0ToKpPimMuMu_noPID"; const char *sim_tree_name = "B0ToKpPimMuMu_noPID";
const char *end_state_mass_literal = "m(K^{+}#pi^{-}#mu^{+}#mu^{-})";
const char *end_state_mass_literal = "m(K^{+}#pi^{-}#mu^{+}#mu^{-}) [MeV]";
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_SprucingPass23r1_94000000_RD.root"); data_chain->Add("/auto/data/pfeiffer/inclusive_detached_dilepton/data_samples/Collision23_Beam6800GeV-VeloClosed-MagDown-Excl-UT_RealData_SprucingPass23r1_94000000_RD.root");
@ -72,12 +72,17 @@ int new_analysis_b02kppimmumu()
FourVect *hm4v_sim = FourVect::Init(sim_chain, "Pi"); FourVect *hm4v_sim = FourVect::Init(sim_chain, "Pi");
Int_t B_BKGCAT, L1_TRUEID, L2_TRUEID, Hp_TRUEID, Hm_TRUEID; Int_t B_BKGCAT, L1_TRUEID, L2_TRUEID, Hp_TRUEID, Hm_TRUEID;
Double_t L1_PID_MU, L2_PID_MU, K_PID_K, PI_PID_K;
sim_chain->SetBranchAddress("L1_TRUEID", &L1_TRUEID); sim_chain->SetBranchAddress("L1_TRUEID", &L1_TRUEID);
sim_chain->SetBranchAddress("L2_TRUEID", &L2_TRUEID); sim_chain->SetBranchAddress("L2_TRUEID", &L2_TRUEID);
sim_chain->SetBranchAddress("K_TRUEID", &Hp_TRUEID); sim_chain->SetBranchAddress("K_TRUEID", &Hp_TRUEID);
sim_chain->SetBranchAddress("Pi_TRUEID", &Hm_TRUEID); sim_chain->SetBranchAddress("Pi_TRUEID", &Hm_TRUEID);
sim_chain->SetBranchAddress("B0_BKGCAT", &B_BKGCAT); sim_chain->SetBranchAddress("B0_BKGCAT", &B_BKGCAT);
sim_chain->SetBranchAddress("L1_PID_MU", &L1_PID_MU);
sim_chain->SetBranchAddress("L2_PID_MU", &L2_PID_MU);
sim_chain->SetBranchAddress("K_PID_K", &K_PID_K);
sim_chain->SetBranchAddress("Pi_PID_K", &PI_PID_K);
Double_t B_Mass_jpsi_var, B_Mass_psi2s_var, B_Mass_sim_var; Double_t B_Mass_jpsi_var, B_Mass_psi2s_var, B_Mass_sim_var;
TString B_Mass_jpsi_var_name = "B_Mass_jpsi_var"; TString B_Mass_jpsi_var_name = "B_Mass_jpsi_var";
@ -115,7 +120,8 @@ int new_analysis_b02kppimmumu()
sim_chain->GetEntry(i); sim_chain->GetEntry(i);
Double_t reconstructed_B_Mass = (hp4v_sim->LorentzVector() + hm4v_sim->LorentzVector() + l14v_sim->LorentzVector() + l24v_sim->LorentzVector()).M(); Double_t reconstructed_B_Mass = (hp4v_sim->LorentzVector() + hm4v_sim->LorentzVector() + l14v_sim->LorentzVector() + l24v_sim->LorentzVector()).M();
h1_B_Mass_sim_unf->Fill(reconstructed_B_Mass); h1_B_Mass_sim_unf->Fill(reconstructed_B_Mass);
if (B_BKGCAT == 0 && TMath::Abs(L1_TRUEID) == PID_MUON && L2_TRUEID == -L1_TRUEID && TMath::Abs(Hp_TRUEID) == PID_KAON && TMath::Abs(Hm_TRUEID) == PID_PION)
if (B_BKGCAT == 0 && TMath::Abs(L1_TRUEID) == PID_MUON && L2_TRUEID == -L1_TRUEID && L1_PID_MU > -3. && L2_PID_MU > -3.
&& TMath::Abs(Hp_TRUEID) == PID_KAON && TMath::Abs(Hm_TRUEID) == PID_PION && K_PID_K > -4. && PI_PID_K < 4.)
{ {
B_Mass_sim_var = reconstructed_B_Mass; B_Mass_sim_var = reconstructed_B_Mass;
tree_B_Mass_sim->Fill(); tree_B_Mass_sim->Fill();

6
new_analysis_bu2hpmumu.cpp

@ -49,8 +49,8 @@ int new_analysis_bu2hpmumu()
const char *analysis_name = "BuToHpMuMu"; const char *analysis_name = "BuToHpMuMu";
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^{-})";
const bool retrain_bdt = true;
const char *end_state_mass_literal = "m(#pi^{+}_{(#rightarrow K^{+})}#mu^{+}#mu^{-}) [MeV]";
const bool retrain_bdt = false;
const bool skip_fit = false; 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));
@ -105,7 +105,7 @@ int new_analysis_bu2hpmumu()
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::Double("B_CHI2", "B_CHI2"),
TV::Float("Jpsi_BPVIPCHI2", "Jpsi_BPVIPCHI2"), TV::Float("Jpsi_BPVIPCHI2", "Jpsi_BPVIPCHI2"),

8
new_analysis_bu2kpmumu.cpp

@ -49,7 +49,7 @@ int new_analysis_bu2kpmumu()
const char *analysis_name = "BuToKpMuMu"; const char *analysis_name = "BuToKpMuMu";
const char *data_tree_name = "Hlt2RD_BuToKpMuMu"; const char *data_tree_name = "Hlt2RD_BuToKpMuMu";
const char *sim_tree_name = "BuToKpMuMu_noPID"; const char *sim_tree_name = "BuToKpMuMu_noPID";
const char *end_state_mass_literal = "m(K^{+}#mu^{+}#mu^{-})";
const char *end_state_mass_literal = "m(K^{+}#mu^{+}#mu^{-}) [MeV]";
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_SprucingPass23r1_94000000_RD.root"); data_chain->Add("/auto/data/pfeiffer/inclusive_detached_dilepton/data_samples/Collision23_Beam6800GeV-VeloClosed-MagDown-Excl-UT_RealData_SprucingPass23r1_94000000_RD.root");
@ -70,11 +70,15 @@ int new_analysis_bu2kpmumu()
FourVect *hp4v_sim = FourVect::Init(sim_chain, "K"); FourVect *hp4v_sim = FourVect::Init(sim_chain, "K");
Int_t B_BKGCAT, L1_TRUEID, L2_TRUEID, Hp_TRUEID; Int_t B_BKGCAT, L1_TRUEID, L2_TRUEID, Hp_TRUEID;
Double_t L1_PID_MU, L2_PID_MU, K_PID_K;
sim_chain->SetBranchAddress("L1_TRUEID", &L1_TRUEID); sim_chain->SetBranchAddress("L1_TRUEID", &L1_TRUEID);
sim_chain->SetBranchAddress("L2_TRUEID", &L2_TRUEID); sim_chain->SetBranchAddress("L2_TRUEID", &L2_TRUEID);
sim_chain->SetBranchAddress("K_TRUEID", &Hp_TRUEID); sim_chain->SetBranchAddress("K_TRUEID", &Hp_TRUEID);
sim_chain->SetBranchAddress("B_BKGCAT", &B_BKGCAT); sim_chain->SetBranchAddress("B_BKGCAT", &B_BKGCAT);
sim_chain->SetBranchAddress("L1_PID_MU", &L1_PID_MU);
sim_chain->SetBranchAddress("L2_PID_MU", &L2_PID_MU);
sim_chain->SetBranchAddress("K_PID_K", &K_PID_K);
Double_t B_Mass_jpsi_var, B_Mass_psi2s_var, B_Mass_sim_var; Double_t B_Mass_jpsi_var, B_Mass_psi2s_var, B_Mass_sim_var;
TString B_Mass_jpsi_var_name = "B_Mass_jpsi_var"; TString B_Mass_jpsi_var_name = "B_Mass_jpsi_var";
@ -112,7 +116,7 @@ int new_analysis_bu2kpmumu()
sim_chain->GetEntry(i); sim_chain->GetEntry(i);
Double_t reconstructed_B_Mass = (hp4v_sim->LorentzVector() + l14v_sim->LorentzVector() + l24v_sim->LorentzVector()).M(); Double_t reconstructed_B_Mass = (hp4v_sim->LorentzVector() + l14v_sim->LorentzVector() + l24v_sim->LorentzVector()).M();
h1_B_Mass_sim_unf->Fill(reconstructed_B_Mass); h1_B_Mass_sim_unf->Fill(reconstructed_B_Mass);
if (B_BKGCAT == 0 && TMath::Abs(L1_TRUEID) == PID_MUON && L2_TRUEID == -L1_TRUEID && TMath::Abs(Hp_TRUEID) == PID_KAON)
if (B_BKGCAT == 0 && TMath::Abs(L1_TRUEID) == PID_MUON && L2_TRUEID == -L1_TRUEID && TMath::Abs(Hp_TRUEID) == PID_KAON && L1_PID_MU > -4. && L2_PID_MU > -4. && K_PID_K > -4.)
{ {
B_Mass_sim_var = reconstructed_B_Mass; B_Mass_sim_var = reconstructed_B_Mass;
tree_B_Mass_sim->Fill(); tree_B_Mass_sim->Fill();

Loading…
Cancel
Save