MUSIC unknown
Analysis for the MUSIC active-target ionization chamber
Loading...
Searching...
No Matches
EventsSummary.hpp
Go to the documentation of this file.
1#ifndef EVENTS_SUMMARY_HPP
2#define EVENTS_SUMMARY_HPP
3
4#include "Constants.hpp"
5#include "FileSet.hpp"
6#include "IOUtils.hpp"
7#include "Normalization.hpp"
8#include "PlottingUtils.hpp"
9#include <TCanvas.h>
10#include <TFile.h>
11#include <TGraph.h>
12#include <TH1F.h>
13#include <TH2F.h>
14#include <TString.h>
15#include <TTree.h>
16#include <mutex>
17#include <vector>
18
32 TH2F *h_music;
33 TH1F *h_mult;
34 TH2F *h2_long_vs_short[18];
35 TH1F *h1_cathode;
36 TH1F *h1_strip17;
38 TH1F *h1_strip0;
39 TH1F *h1_grid;
40
43 : h_music(nullptr), h_mult(nullptr), h1_cathode(nullptr),
44 h1_strip17(nullptr), h2_strip0_vs_grid(nullptr), h1_strip0(nullptr),
45 h1_grid(nullptr) {
46 for (Int_t s = 0; s < 18; s++)
47 h2_long_vs_short[s] = nullptr;
48 }
49};
50
58 TString unit_label;
59 Double_t strip_e_min;
60 Double_t strip_e_max;
64 Double_t left_odd_max;
65 Double_t left_even_max;
66 Double_t right_odd_max;
67 Double_t right_even_max;
68 Double_t cathode_max;
69 Double_t strip17_max;
70 Double_t grid_max;
71 Double_t strip0_max;
74};
75
83 const SummaryHistConfig &cfg);
84
95 const TString &subdir,
96 const TString &plot_suffix);
97
105public:
113 static TGraph *BuildTraceFromTotals(const Double_t *total);
114
129 static void SaveSampleTraces(const std::vector<TGraph *> &traces,
130 const TString &save_name, const TString &subdir,
131 Double_t y_min, Double_t y_max,
132 const char *y_title);
133
139 static void BuildNormedSummaryHistograms(const TString &input_filename,
140 const TString &file_label);
141};
142
143#endif
The dataset configuration, and how it is layered.
void CreateSummaryHistograms(SummaryHistograms &h, const SummaryHistConfig &cfg)
Allocate every histogram in the set.
void SaveAndDeleteSummaryHistograms(SummaryHistograms &h, TFile *out_file, const TString &subdir, const TString &plot_suffix)
Write the set to file, save the plots, then free every histogram.
Calibrated summary plots and sample traces, built from events files.
static void SaveSampleTraces(const std::vector< TGraph * > &traces, const TString &save_name, const TString &subdir, Double_t y_min, Double_t y_max, const char *y_title)
Draw a set of traces overlaid on one frame and save it.
static void BuildNormedSummaryHistograms(const TString &input_filename, const TString &file_label)
Build the calibrated summary histograms for one events file.
static TGraph * BuildTraceFromTotals(const Double_t *total)
Build a trace graph from one event's per-strip totals.
Axis ranges and labels for building a SummaryHistograms set.
Double_t left_even_max
Left-side ceiling, even strips.
Double_t strip_e_min
Lower bound of the per-strip energy axis.
Double_t strip_e_max
Upper bound of the per-strip energy axis.
TString unit_label
Axis unit, e.g. "ADC" or "a.u.".
Double_t strip0_max
Strip 0 axis maximum.
Double_t right_odd_max
Right-side ceiling, odd strips.
Double_t strip17_max
Strip 17 axis maximum.
Bool_t odd_even_split
When true, odd and even strips take separate ceilings from the four *_odd_max / *_even_max fields rat...
Double_t right_even_max
Right-side ceiling, even strips.
Double_t left_odd_max
Left-side ceiling, odd strips.
Double_t cathode_max
Cathode axis maximum.
Int_t music_energy_bins
Bins on the energy axis of SummaryHistograms::h_music.
Double_t grid_max
Grid axis maximum.
The standard diagnostic histogram set for a subfile.
TH2F * h_music
Energy against strip index: the MUSIC plot.
TH1F * h1_strip0
Strip 0 energy.
SummaryHistograms()
Construct with every pointer null; call CreateSummaryHistograms().
TH1F * h1_cathode
Cathode energy.
TH2F * h2_strip0_vs_grid
Strip 0 against grid energy.
TH1F * h_mult
Hit multiplicity per event.
TH1F * h1_strip17
Strip 17 energy.
TH2F * h2_long_vs_short[18]
Long against short gate, per strip.
TH1F * h1_grid
Grid energy.