Skip to content

Commit 1bef46a

Browse files
authored
Merge pull request #708 from beomki-yeo/state-name-of-field
State name of field and material in the plots
2 parents f3a208b + a2455f5 commit 1bef46a

File tree

4 files changed

+33
-39
lines changed

4 files changed

+33
-39
lines changed

tests/integration_tests/cpu/propagator/jacobian_validation.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -1496,8 +1496,6 @@ int main(int argc, char** argv) {
14961496
mt1.seed(mc_seed);
14971497

14981498
// Volume material
1499-
// const material<scalar> volume_mat = detray::silicon<scalar>();
1500-
// const material<scalar> volume_mat = detray::iron_with_ded<scalar>();
15011499
const material<scalar> volume_mat =
15021500
detray::cesium_iodide_with_ded<scalar>();
15031501

tests/validation/root/covariance_validation.C

+11-11
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,23 @@ namespace {
3333
double x_pos = 0.205f;
3434
double title_x = x_pos;
3535
double title_y = 0.8197f;
36-
double y_gap = -0.05;
36+
double y_gap = -0.0505;
3737
double header_text_size = 0.055;
38-
double geom_text_size = 0.0416667;
38+
double geom_text_size = 0.0434028;
3939

4040
double pull_fit_title_x = x_pos;
41-
double pull_fit_title_y = 0.701f;
41+
double pull_fit_title_y = 0.700f;
4242
double pval_fit_title_x = x_pos;
43-
double pval_fit_title_y = 0.701f;
43+
double pval_fit_title_y = 0.700f;
4444
double gaus_fit_par_x = x_pos;
45-
double gaus_fit_par_y = pull_fit_title_y - 0.064;
45+
double number_offset = 0.125;
46+
double gaus_fit_par_y = pull_fit_title_y - 0.065;
4647
double const_fit_par_x = x_pos;
47-
double const_fit_par_y = pval_fit_title_y - 0.0449;
48+
double const_fit_par_y = pval_fit_title_y - 0.0459;
4849
double tolerance_x = 0.7f;
4950
double tolerance_y = 0.67f;
50-
double pull_text_size = 0.0416667;
51-
double pval_text_size = 0.0416667;
51+
double pull_text_size = 0.0434028;
52+
double pval_text_size = 0.0434028;
5253
double pad_x0 = 0.00f;
5354
double pad_x1 = 1.f;
5455
double pad_y0 = 0.00f;
@@ -217,7 +218,7 @@ void draw_gaus_fit_par(const std::array<double, 3u>& fit_par,
217218
sigma_stream << std::fixed << std::setprecision(3) << fit_par[2] << " #pm "
218219
<< fit_par_error[2];
219220

220-
TLatex* ttext2 = new TLatex(x + 0.11, y,
221+
TLatex* ttext2 = new TLatex(x + number_offset, y,
221222
"#splitline{" + TString(mean_stream.str()) +
222223
"}{" + TString(sigma_stream.str()) + "}");
223224
ttext2->SetTextFont(132);
@@ -575,8 +576,7 @@ void covariance_validation() {
575576

576577
const std::string rect_title = "Bound-to-bound transport";
577578
const std::string wire_title = "Perigee-to-perigee transport";
578-
const std::string geom_title =
579-
"RKN with an inhomogeneous field and a material";
579+
const std::string geom_title = "RKN with the ODD magnetic field and CsI";
580580

581581
/************************
582582
* Rectangular

tests/validation/root/jacobian_comparison.C

+17-20
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ double labely_offset = 0.01;
3434
double title_font_size = 0.055;
3535
double title_offset = 0.71;
3636
double marker_size = 1.3875;
37-
double legend_margin = 0.115;
37+
double legend_margin = 0.12;
3838
int title_font = 132;
3939
int label_font = 132;
4040
int legend_font = 132;
@@ -43,7 +43,7 @@ double y_min = -15;
4343
double y_max = 10;
4444
double y_margin = 0;
4545
double header_size = 0.05;
46-
std::array<float, 4> ldim{0.54424, 0.621849, 0.942404, 0.880252};
46+
std::array<float, 4> ldim{0.587646, 0.62395, 0.942404, 0.880252};
4747
double pad_x0 = 0.00;
4848
double pad_x1 = 1;
4949
double pad_y0 = 0.00;
@@ -299,33 +299,35 @@ void jacobian_comparison() {
299299
rect_legend->SetTextSize(legend_font_size);
300300
rect_legend->SetBorderSize(4);
301301

302+
const std::string RKN_ODD_CsI = "RKN with the ODD magnetic field and CsI";
303+
const std::string RKN_ODD = "RKN with the ODD magnetic field";
304+
const std::string RKN_homogeneous =
305+
"RKN with the homogeneous magnetic field";
306+
const std::string Helix_homogeneous =
307+
"Helix with the homogeneous magnetic field";
308+
302309
std::string rect_text = "Bound-to-bound transport";
303310
auto inhom_rect_material_histo = get_histogram(
304311
"inhom_rect_material", 25, markers[0u], log10_rk_tolerance_rect);
305312
// rect_legend->SetHeader("Bound-to-bound transport");
306313
inhom_rect_material_histo->SetMarkerColor(hues[0u]);
307314
inhom_rect_material_histo->Draw("hist P ");
308-
rect_legend->AddEntry(inhom_rect_material_histo,
309-
"RKN with an inhomogeneous field and a material",
310-
"p");
315+
rect_legend->AddEntry(inhom_rect_material_histo, RKN_ODD_CsI.c_str(), "p");
311316

312317
auto inhom_rect_histo = get_histogram("inhom_rect", 20, markers[1u], dummy);
313318
inhom_rect_histo->SetMarkerColor(hues[1u]);
314319
inhom_rect_histo->Draw("hist P same");
315-
rect_legend->AddEntry(inhom_rect_histo, "RKN with an inhomogeneous field",
316-
"p");
320+
rect_legend->AddEntry(inhom_rect_histo, RKN_ODD.c_str(), "p");
317321

318322
auto const_rect_histo = get_histogram("const_rect", 15, markers[2u], dummy);
319323
const_rect_histo->SetMarkerColor(hues[2u]);
320324
const_rect_histo->Draw("hist P same");
321-
rect_legend->AddEntry(const_rect_histo, "RKN with a homogeneous field",
322-
"p");
325+
rect_legend->AddEntry(const_rect_histo, RKN_homogeneous.c_str(), "p");
323326

324327
auto helix_rect_histo = get_histogram("helix_rect", 15, markers[3u], dummy);
325328
helix_rect_histo->SetMarkerColor(hues[3u]);
326329
helix_rect_histo->Draw("hist P same");
327-
rect_legend->AddEntry(helix_rect_histo, "Helix with a homogeneous field",
328-
"p");
330+
rect_legend->AddEntry(helix_rect_histo, Helix_homogeneous.c_str(), "p");
329331

330332
/*
331333
TLegendEntry* rect_header =
@@ -362,27 +364,22 @@ void jacobian_comparison() {
362364
// wire_legend->SetHeader("Perigee-to-perigee transport");
363365
inhom_wire_material_histo->SetMarkerColor(hues[0u]);
364366
inhom_wire_material_histo->Draw("hist P ");
365-
wire_legend->AddEntry(inhom_wire_material_histo,
366-
"RKN with an inhomogeneous field and a material",
367-
"p");
367+
wire_legend->AddEntry(inhom_wire_material_histo, RKN_ODD_CsI.c_str(), "p");
368368

369369
auto inhom_wire_histo = get_histogram("inhom_wire", 20, markers[1u], dummy);
370370
inhom_wire_histo->SetMarkerColor(hues[1u]);
371371
inhom_wire_histo->Draw("hist P same");
372-
wire_legend->AddEntry(inhom_wire_histo, "RKN with an inhomogeneous field",
373-
"p");
372+
wire_legend->AddEntry(inhom_wire_histo, RKN_ODD.c_str(), "p");
374373

375374
auto const_wire_histo = get_histogram("const_wire", 15, markers[2u], dummy);
376375
const_wire_histo->SetMarkerColor(hues[2u]);
377376
const_wire_histo->Draw("hist P same");
378-
wire_legend->AddEntry(const_wire_histo, "RKN with a homogeneous field",
379-
"p");
377+
wire_legend->AddEntry(const_wire_histo, RKN_homogeneous.c_str(), "p");
380378

381379
auto helix_wire_histo = get_histogram("helix_wire", 15, markers[3u], dummy);
382380
helix_wire_histo->SetMarkerColor(hues[3u]);
383381
helix_wire_histo->Draw("hist P same");
384-
wire_legend->AddEntry(helix_wire_histo, "Helix with a homogeneous field",
385-
"p");
382+
wire_legend->AddEntry(helix_wire_histo, Helix_homogeneous.c_str(), "p");
386383

387384
/*
388385
TLegendEntry* wire_header =

tests/validation/root/rk_tolerance_comparison.C

+5-6
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ namespace {
3131
double step_title_x_offset = 1.4;
3232
double step_title_x = 0.175;
3333
double step_title_y = 0.835;
34-
double step_ygap = -0.05;
34+
double step_ygap = -0.0505;
3535
double x_label_offset = 0.015;
3636
double x_margin = 1;
3737
double y_label_offset = 0.015;
3838
double rk_title_x_offset = 0.9;
3939
double rk_title_offset_fraction = 0.0218;
4040
double rk_title_y = 14.69;
41-
double rk_ygap = -0.8;
41+
double rk_ygap = -0.83;
4242
double rk_header_text_size = 0.046;
43-
double rk_geom_text_size = 0.035;
43+
double rk_geom_text_size = 0.0362903;
4444
double step_header_text_size = 0.055;
45-
double step_geom_text_size = 0.0416667;
45+
double step_geom_text_size = 0.0434028;
4646
double label_font_size_step = 0.055;
4747
double title_font_size_step = 0.055;
4848
double label_font_size_rk_tol = 0.046;
@@ -407,8 +407,7 @@ void rk_tolerance_comparison(int min, int max) {
407407

408408
const std::string rect_header = "Bound-to-bound transport";
409409
const std::string wire_header = "Perigee-to-perigee transport";
410-
const std::string geom_header =
411-
"RKN with an inhomogeneous field and a material";
410+
const std::string geom_header = "RKN with the ODD magnetic field and CsI";
412411

413412
/************************
414413
* Rectangular

0 commit comments

Comments
 (0)