55 JParser<> zap(
"Example program to check contents of acoustic events.");
57 zap[
'f'] =
make_field(inputFile,
"output of JKatoomba[.sh]");
58 zap[
'n'] =
make_field(numberOfEvents) = JLimit_t::max();
66 catch(
const exception &error) {
67 FATAL(error.what() << endl);
83 STATUS(
"loading input from file(s) " << inputFile <<
"... " << flush);
85 dynamics.load(inputFile);
93 Double_t xmin = numeric_limits<Double_t>::max();
94 Double_t xmax = numeric_limits<Double_t>::lowest();
98 if (!string->second.empty()) {
99 xmin = min(xmin, string->second.getXmin());
100 xmax = max(xmax, string->second.getXmax());
104 const JFormat_t format(4, 0, std::ios_base::fmtflags(),
'0');
106 JManager<int, TH2D> H2(
new TH2D (
"[%].tilt", NULL, 100, -1.0, +1.0, 100, -1.0, +1.0),
'%', format);
109 JManager<int, TH1D> HO(
new TH1D (
"H[%].orientation", NULL, 1000, xmin, xmax),
'%', format);
114 TH1D* ho = HO[
string->first];
115 TH1D* ha = HA[
string->first];
117 for (Int_t i = 1; i <= HO->GetXaxis()->GetNbins(); ++i) {
119 const Double_t x = HO->GetXaxis()->GetBinCenter(i);
123 ho->SetBinContent(i, tilt.
getAngle());
131 if (string->second.size() > 1) {
133 TH2D* h2 = H2[
string->first];
134 TH1D* hc = HT[
string->first];
138 const double t1 = q->getX() - p->getX();
142 if (t1 > 0 && t1 < Tmax_s) {
143 h2->Fill(600.0e3 * (q->getY().tx - p->getY().tx) / t1,
144 600.0e3 * (q->getY().ty - p->getY().ty) / t1);
149 ZO[
string->first].put(i->getX(), i->getY().getAngle());
150 ZA[
string->first].put(i->getX(), i->getY().getLength());
158 out << H2 << HT << HO << HA;
Utility class to parse command line options.
double getAngle() const
Get angle.
#define MAKE_CSTRING(A)
Make C-string.
Auxiliary data structure to build TGraph.
data_type::const_iterator const_iterator
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...
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Dynamic detector calibration.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
General purpose class for object reading from a list of file names.
const JLimit & getLimit() const
Get limit.
do set_variable DETECTOR_TXT $WORKDIR detector
double getLength() const
Get length.