Skip to content

Commit

Permalink
Moved benchmark status flag to plotting macro
Browse files Browse the repository at this point in the history
  • Loading branch information
zsweger authored May 10, 2024
1 parent 823a408 commit 1ed0eb9
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions benchmarks/u_rho/macros/plot_rho_physics_benchmark.C
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
#include "RiceStyle.h"
using namespace std;

int setbenchstatus(double eff){
///////////// Set benchmark status!
// create our test definition
// test_tag
common_bench::Test rho_reco_eff_test{
{
{"name", "rho_reconstruction_efficiency"},
{"title", "rho Reconstruction Efficiency for rho -> pi+pi- in the B0"},
{"description", "u-channel rho->pi+pi- reconstruction efficiency "
"when both pions should be within B0 acceptance"},
{"quantity", "efficiency"},
{"target", "0.9"}
}
}; //these 2 need to be consistent
double eff_target = 0.9; //going to find a way to use the same variable

if(eff<0 || eff>1){
rho_reco_eff_test.error(-1);
}else if(eff > eff_target){
rho_reco_eff_test.pass(eff);
}else{
rho_reco_eff_test.fail(eff);
}

// write out our test data
common_bench::write_test(rho_reco_eff_test, "rhorecoeff.json");
return 0;
}

void plot_rho_physics_benchmark(TString filename="./benchmark_output/plot_combined.root"){
Ssiz_t dotPosition = filename.Last('.');
TString figure_directory = filename(0, dotPosition);
Expand Down Expand Up @@ -701,5 +731,7 @@ void plot_rho_physics_benchmark(TString filename="./benchmark_output/plot_combin
TString figure6name = figure_directory+"/benchmark_rho_recoquality.pdf";
c6->Print(figure6name);

double rhorecoeff = thiseff/100.0;
setbenchstatus(rhorecoeff);

}

0 comments on commit 1ed0eb9

Please sign in to comment.