41 (
"ShowerCalibrationGaloreScale_test");
43 (
"ShowerCalibrationGaloreService", R
"( 44 service_provider: "ShowerCalibrationGaloreScaleService" 62 auto const* Calibration
69 std::cout, Calibration, 0.0, 2.5, 0.1,
70 { 11, 13, -11, -13, 211, 111, 2112, 2212, 22 }
73 std::cout << Calibration->report() <<
std::endl;
76 auto corr = Calibration->correction(
shower);
77 if (corr != expected) {
78 std::cerr <<
"Correction for a shower of energy " 79 <<
shower.Energy().at(
shower.best_plane()) <<
" GeV is " << corr
80 <<
", expected " << expected <<
std::endl;
83 auto corr_factor = Calibration->correctionFactor(
shower);
84 if (corr_factor != expected.
factor) {
85 std::cerr <<
"Correction factor for a shower of energy " 86 <<
shower.Energy().at(
shower.best_plane()) <<
" GeV is " << corr_factor
A shower calibration service provider applying a uniform scale.
Test functions for ShowerCalibrationGalore service providers.
Class holding a configuration for a test environment.
Specialization of helper classes for LArSoft tests.
recob::Shower MakeShower(float E, int bestPlane=2, int ID=1)
A correction factor with global uncertainty.
void AddDefaultServiceConfiguration(std::string service_name, std::string service_cfg)
Adds a default configuration for the specified service.
Shower calibration service provider applying a uniform energy scale.
TESTENV CreateTesterEnvironment(CONFIG &&config, ARGS...other_args)
Constructs and returns a TesterEnvironment object.
float error
correction factor uncertainty
Interface for a shower calibration service provider.
unsigned int ShowerCalibrationTableTest(Stream &&out, lar::example::ShowerCalibrationGalore const *calibration, float Emin=0.0, float Emax=2.5, float Estep=0.1, std::vector< lar::example::ShowerCalibrationGalore::PDGID_t > const &pids={11, 13, 111, 2212, 22})
Synthetic test: prints corrections for showers in a energy range.
std::string to_string(ModuleType const mt)
float factor
correction factor
QTextStream & endl(QTextStream &s)
Interface for a shower calibration service provider.