43 TH1D hTest(
"hTest",
"", 10000, 0, 1000);
44 TF1 gaus(
"gaus",
"gaus");
45 for (
int i = 0;
i < 1000000;
i++) {
49 hTest.Fit(
"gaus",
"Q");
51 float charge_target = 137.15721769834721;
52 float charge_precision = charge_target / 100.f;
53 BOOST_CHECK_CLOSE(gaus.GetParameter(1), charge_target, charge_precision);
55 float charge_resolution_target = 21.7099991;
56 float charge_resolution_precision = charge_resolution_target / 100.f;
57 BOOST_CHECK_CLOSE(gaus.GetParameter(2), charge_resolution_target, charge_resolution_precision);
61 float charge_on_plane = 100.f;
64 float xmin = -0.658334;
66 float ymin = -0.0934209;
67 float ymax = 0.326579;
69 float expected_chargeonpad_stat1 = 0.29306942 * charge_on_plane;
71 float chargeonpad_precision = expected_chargeonpad_stat1 / 10.f;
72 float result_chargeonpad_stat1 = r_stat1.
chargePadfraction(xmin, xmax, ymin, ymax) * charge_on_plane;
73 BOOST_CHECK_CLOSE(result_chargeonpad_stat1, expected_chargeonpad_stat1, chargeonpad_precision);
80 float expected_chargeonpad_stat2 = 0.633606318 * charge_on_plane;
81 chargeonpad_precision = expected_chargeonpad_stat2 / 10.f;
82 float result_chargeonpad_stat2 = r_stat2.
chargePadfraction(xmin, xmax, ymin, ymax) * charge_on_plane;
83 BOOST_CHECK_CLOSE(result_chargeonpad_stat2, expected_chargeonpad_stat2, chargeonpad_precision);