13 #include <TApplication.h>
14 #include <boost/program_options.hpp>
18 using namespace boost::program_options;
20 int main(
int argc,
char** argv) {
21 std::cout <<
"*** ACTS Residual and Pull plotting " << std::endl;
27 auto ao = description.add_options();
28 ao(
"help,h",
"Display this help message");
29 ao(
"silent,s", bool_switch(),
"Silent mode (without X-window/display).");
30 ao(
"input,i", value<std::string>()->required(),
31 "Input ROOT file containing the input TTree.");
32 ao(
"tree,t", value<std::string>()->default_value(
"trackstates"),
34 ao(
"output,o", value<std::string>()->default_value(
""),
35 "Output ROOT file with histograms");
36 ao(
"predicted", bool_switch(),
"Analyze the predicted parameters.");
37 ao(
"filtered", bool_switch(),
"Analyze the filtered parameters.");
38 ao(
"smoothed", bool_switch(),
"Analyze the smoothed parameters.");
39 ao(
"fit-predicted", bool_switch(),
"Fit the predicted parameters.");
40 ao(
"fit-filtered", bool_switch(),
"Fit the filtered parameters.");
41 ao(
"fit-smoothed", bool_switch(),
"Fit the smoothed parameters.");
42 ao(
"save", value<std::string>()->default_value(
"png"),
43 "Output save format (to be interpreted by ROOT).");
49 if (vm.count(
"help") != 0
u) {
63 vm[
"silent"].as<
bool>()
65 :
new TApplication(
"ResidualAndPulls",
nullptr,
nullptr);
69 iFile, iTree, oFile, vm[
"predicted"].as<bool>(),
70 vm[
"filtered"].as<bool>(), vm[
"smoothed"].as<bool>(),
71 vm[
"fit-predicted"].as<bool>(), vm[
"fit-filtered"].as<bool>(),
72 vm[
"fit-smoothed"].as<bool>(), saveAs)) {
74 std::cout <<
"*** Input file could not be opened, check name/path."
79 std::cout <<
"*** Input tree could not be found, check name."
84 std::cout <<
"*** Successful run." << std::endl;
88 if (tApp !=
nullptr) {
92 }
catch (std::exception&
e) {
93 std::cerr << e.what() <<
"\n";
96 std::cout <<
"*** Done." << std::endl;