50 JParser<> zap(
"Example program to plot acoustic fit results.");
52 zap[
'f'] =
make_field(inputFile,
"input file (output of JKatoomba[.sh]/JFremantle[.sh])");
53 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
55 zap[
'Z'] =
make_field(
Z,
"detector height (for 2nd order tilt correction)") = 0.0;
60 catch(
const exception &error) {
61 FATAL(error.what() << endl);
66 const JFormat_t format(4, 0, std::ios_base::fmtflags(),
'0');
68 TH1D h1(
"chi2/NDF", NULL, 500, 0.0, 10.0);
78 JManager<int, TH2D> H2(
new TH2D(
"[%].tiltdeviation", NULL, 300, -4.0, +4.0, 300, -4.0, +4.0),
'%', format);
82 for (
counter_type counter = 0;
in.hasNext() && counter != inputFile.getLimit(); ++counter) {
84 STATUS(
"event: " << setw(10) << counter <<
'\r');
DEBUG(endl);
86 const JEvt* evt =
in.next();
98 for (JEvt::const_iterator
i = evt->begin();
i != evt->end(); ++
i) {
100 const int id =
i->id;
101 const double tx = (
i->tx +
i->tx2 *
Z) * 1.0e3;
102 const double ty = (
i->ty +
i->ty2 *
Z) * 1.0e3;
103 const double vs =
i->vs * 1.0e2;
104 const double ts = sqrt(tx*tx + ty*ty);
110 H1[id]->Fill(ts, vs);
112 GO[id].put(t1, atan2(ty, tx));
120 for (JEvt::const_iterator
i = evt->begin();
i != evt->end(); ++
i) {
122 const double tx = (
i->tx +
i->tx2 *
Z*
Z) * 1.0e3;
123 const double ty = (
i->ty +
i->ty2 *
Z*
Z) * 1.0e3;
125 H2 ->Fill(tx - Tx, ty - Ty);
126 H2[
i->id]->Fill(tx - Tx, ty - Ty);
137 out << H1 << *H1 << H2 << *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.
Long64_t counter_type
Type definition for counter.
Auxiliary class for multiplexing object iterators.
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.
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
const JLimit & getLimit() const
Get limit.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
#define DEBUG(A)
Message macros.
Double_t g1(const Double_t x)
Function.