32 int main(
int argc,
char **argv)
51 JParser<> zap(
"Auxiliary program to plot average tilt angles.");
53 zap[
'f'] =
make_field(inputFile,
"input file (output of JKatoomba[.sh]/JFremantle[.sh])");
54 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
56 zap[
'x'] =
make_field(
X) = JHistogram_t(500, -100.0, +100.0);
57 zap[
'y'] =
make_field(
Y) = JHistogram_t(500, -100.0, +100.0);
58 zap[
'Z'] =
make_field(
Z,
"detector height (for 2nd order tilt correction)") = 0.0;
63 catch(
const exception &error) {
64 FATAL(error.what() << endl);
70 X.getNumberOfBins(),
X.getLowerLimit(),
X.getUpperLimit(),
71 Y.getNumberOfBins(),
Y.getLowerLimit(),
Y.getUpperLimit()));
75 for (
counter_type counter = 0; in.
hasNext() && counter != inputFile.getLimit(); ++counter) {
77 STATUS(
"event: " << setw(10) << counter <<
'\r');
DEBUG(endl);
81 for (JEvt::const_iterator
i = evt->begin();
i != evt->end(); ++
i) {
83 const double tx = (
i->tx +
i->tx2 *
Z) * 1.0e3;
84 const double ty = (
i->ty +
i->ty2 *
Z) * 1.0e3;
87 H2[
i->id]->Fill(tx, ty);
Utility class to parse command line options.
int main(int argc, char *argv[])
ROOT TTree parameter settings.
Long64_t counter_type
Type definition for counter.
Dynamic ROOT object management.
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
Auxiliary class for multiplexing object iterators.
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...
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
void Write(TDirectory &out, const bool wm=false)
Write objects to file.
virtual const pointer_type & next() override
Get next element.
virtual bool hasNext() override
Check availability of next element.
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
General purpose class for object reading from a list of file names.
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
Utility class to parse command line options.
no fit printf nominal n $STRING awk v X
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.
#define DEBUG(A)
Message macros.