File indexing completed on 2025-08-06 08:12:53
0001 #include "tau_commons.h"
0002
0003
0004
0005
0006
0007
0008 int test_cuts()
0009 {
0010 gStyle->SetOptStat(0);
0011
0012 unsigned col1 = kOrange+7;
0013 unsigned col2 = kBlue+2;
0014
0015
0016 TChain chain("event");
0017 chain.Add("/gpfs/mnt/gpfs02/phenix/scratch/spjeffas/data/LeptoAna_p250_e20_1000events_1seed_3pion_r05.root");
0018
0019
0020 float n_trueaccept_uds = chain.GetEntries(tau_commons::select_true_uds );
0021 float n_trueaccept_tau = chain.GetEntries(tau_commons::select_true_tau );
0022
0023
0024
0025
0026
0027 float n_tau_as_tau = chain.GetEntries( tau_commons::select_true_tau && tau_commons::select_tau);
0028 float n_tau_as_uds = chain.GetEntries( tau_commons::select_true_tau && !tau_commons::select_tau);
0029
0030 float n_uds_as_uds = chain.GetEntries( tau_commons::select_true_uds && !tau_commons::select_tau );
0031 float n_uds_as_tau = chain.GetEntries( tau_commons::select_true_uds && tau_commons::select_tau );
0032
0033 cout << "Selection of TRUE TAU: " << tau_commons::select_true_tau.GetTitle() << endl;
0034 cout << "Selection of TRUE QUARK: " << tau_commons::select_true_uds.GetTitle() << endl;
0035 cout << "Selection of JET acceptance: " << tau_commons::select_accept_jet.GetTitle() << endl;
0036 cout << endl;
0037 cout << "Total sample TAU: " << n_trueaccept_tau << endl;
0038 cout << "Total sample QUARK: " << n_trueaccept_uds << endl;
0039 cout << endl;
0040 cout << "Selection of RECO TAU: " << tau_commons::select_tau.GetTitle() << endl;
0041 cout << endl;
0042 cout << "Tau-as-tau (True Positive): " << n_tau_as_tau << endl;
0043 cout << "Tau-as-uds (False Negative): " << n_tau_as_uds << endl;
0044 cout << "Uds-as-uds (True Negative): " << n_uds_as_uds << endl;
0045 cout << "Uds-as-tau (False Positive): " << n_uds_as_tau << endl;
0046
0047 cout << endl;
0048 cout << "True positive rate: " << n_tau_as_tau / ( n_tau_as_tau + n_tau_as_uds ) << endl;
0049 cout << "False positive rate: " << n_uds_as_tau / ( n_uds_as_tau + n_tau_as_tau ) << endl;
0050 cout << endl;
0051 cout << "Tau recovery efficiency: " << n_tau_as_tau / n_trueaccept_tau << endl;
0052 cout << endl;
0053
0054
0055 return 0;
0056 }