44 JParser<> zap(
"Example program to plot acoustic fit results.");
46 zap[
'f'] =
make_field(inputFile,
"input file (output of JKatoomba[.sh])");
47 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
53 catch(
const exception &error) {
54 FATAL(error.what() << endl);
57 const JFormat_t format(4, 0, std::ios_base::fmtflags(),
'0');
59 TH1D h1(
"chi2/NDF", NULL, 500, 0.0, 10.0);
69 JManager<int, TH2D> H2(
new TH2D (
"[%].tiltdeviation", NULL, 300, -4.0, +4.0, 300, -4.0, +4.0),
'%', format);
71 while (inputFile.hasNext()) {
73 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
75 const JEvt* evt = inputFile.next();
87 for (JEvt::const_iterator i = evt->begin(); i != evt->end(); ++i) {
90 const double tx = i->tx * 1.0e3;
91 const double ty = i->ty * 1.0e3;
92 const double vs = i->vs * 1.0e2;
93 const double ts = sqrt(tx*tx + ty*ty);
101 GO[id].put(t1, atan2(ty, tx));
107 sum_tx /= evt->size();
108 sum_ty /= evt->size();
110 for (JEvt::const_iterator i = evt->begin(); i != evt->end(); ++i) {
112 H2[i->id]->Fill(i->tx * 1.0e3 - sum_tx, i->ty * 1.0e3 - sum_ty);
123 out << H1 << *H1 << H2;
Utility class to parse command line options.
int npar
number of fit parameters
Data structure for graph data.
#define MAKE_CSTRING(A)
Make C-string.
Auxiliary data structure to build TGraph.
double UNIXTimeStop
stop time
Auxiliary class for defining the range of iterations of objects.
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
double ndf
weighed number of degrees of freedom
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary data structure for sequence of same character.
double UNIXTimeStart
start time
General purpose class for object reading from a list of file names.
const JLimit & getLimit() const
Get limit.
#define DEBUG(A)
Message macros.
Double_t g1(const Double_t x)
Function.