76 JParser<> zap(
"Auxiliary program to merge JRunAnalyzer histograms.");
78 zap[
'f'] =
make_field(inputFile,
"input file (output from JRunAnalyzer).");
85 catch(
const exception &error) {
105 FATAL(
"MULTIPLE RUN INFO");
122 FATAL(
"NO RUN INFO");
146 string title = string(
"Data taken from: ") +
date_min.AsString(
"s") +
" - " +
date_max.AsString(
"s");
149 TH2D* h_Trigger_bit_hit =
new TH2D(
"h_Trigger_bit_hit",
string(title +
"; RUN; Hits trigger bit").c_str(),
xbins, (
double)
min_run-0.5, (
double)
max_run+0.5, NUMBER_OF_TRIGGER_BITS, -0.5, NUMBER_OF_TRIGGER_BITS - 0.5);
150 TH2D* h_Triggered_hits =
new TH2D(
"h_Triggered_hits",
string(title +
"; RUN; Number of triggered hits").c_str(),
xbins, (
double)
min_run-0.5, (
double)
max_run+0.5, 50, 0, 4);
152 TH2D* h_Triggered_hits_3dmuon =
new TH2D(
"h_Triggered_hits_3dmuon",
string(title +
"; RUN; Number of triggered hits - JTRIGGER3DMUON").c_str(),
xbins, (
double)
min_run-0.5, (
double)
max_run+0.5, 50, 0, 3);
154 TH2D* h_Snapshot_hits =
new TH2D(
"h_Snapshot_hits",
string(title +
"; RUN; Number of snapshot hits").c_str(),
xbins, (
double)
min_run-0.5, (
double)
max_run+0.5, 50, 0, 4);
156 TH2D* h_Triggered_over_Snapshot_hits =
new TH2D(
"h_Triggered_over_Snapshot_hits",
string(title +
"; RUN; Triggered/Snapshot hits").c_str(),
xbins, (
double)
min_run-0.5, (
double)
max_run+0.5, 100, 0, 0.5);
157 TH2D* h_Number_of_overlays =
new TH2D(
"h_Number_of_overlays",
string(title +
";RUN;Number of Overlays").c_str(),
xbins, (
double)
min_run-0.5, (
double)
max_run+0.5, 1000, -0.5, 1000 - 0.5);
158 TH2D* h_pmt_distribution_triggered_hits =
new TH2D(
"h_pmt_distribution_triggered_hits",
string(title +
";RUN;Normalised PMT Distrib triggered hits (upper PMTs=[0-11])").c_str(),
xbins, (
double)
min_run-0.5, (
double)
max_run+0.5, NUMBER_OF_PMTS, -0.5 , NUMBER_OF_PMTS - 0.5);
159 TH2D* h_pmt_distribution_snapshot_hits =
new TH2D(
"h_pmt_distribution_snapshot_hits",
string(title +
";RUN; Normalised PMT Distrib snapshot hits (upper PMTs=[0-11])").c_str(),
xbins, (
double)
min_run-0.5, (
double)
max_run+0.5, NUMBER_OF_PMTS, -0.5 , NUMBER_OF_PMTS - 0.5);
160 TH2D* h_event_duration =
new TH2D(
"h_event_duration",
string(title +
";RUN;Event Duration [ns]").c_str(),
xbins, (
double)
min_run-0.5, (
double)
max_run+0.5, 60, 1, 6);
183 FATAL(
"MULTIPLE RUN INFO");
186 FATAL(
"NO RUN INFO");
190 TFile in(i->c_str(),
"read");
215 in.GetDirectory(
"Detector")->GetObject(
"h_pmt_rate_distribution",
h1d_prd);
218 TDirectory* dir = in.GetDirectory(
"JDAQEvent");
220 dir->GetObject(
"h_Trigger_bit_hit",
h1d_thb);
223 dir->GetObject(
"h_Triggered_hits",
h1d_th);
226 dir->GetObject(
"h_Triggered_hits_3dmuon",
h1d_th3D);
229 dir->GetObject(
"h_Snapshot_hits",
h1d_sh);
232 dir->GetObject(
"h_Triggered_over_Snapshot_hits",
h1d_tosh);
235 dir->GetObject(
"h_Number_of_overlays",
h1d_noo);
238 dir->GetObject(
"h_pmt_distribution_triggered_hits",
h1d_pdth);
241 dir->GetObject(
"h_pmt_distribution_snapshot_hits",
h1d_pdsh);
244 dir->GetObject(
"h_event_duration",
h1d_ed);
247 if (in.GetKey(
"Reco")) {
279 outputFile.put(*h_pmt_distribution_snapshot_hits);
280 outputFile.put(*h_pmt_distribution_triggered_hits);
282 outputFile.put(*h_Triggered_over_Snapshot_hits);