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
31 TH2F *h_music;
32 TH1F *h_mult;
36 TH1F *h1_cathode;
37 TH1F *h1_strip17;
41 TH1F *h1_strip0;
42 TH1F *h1_grid;
43
46 : h_music(nullptr), h_mult(nullptr), h1_cathode(nullptr),
47 h1_strip17(nullptr), h2_strip0_vs_grid(nullptr), h1_strip0(nullptr),
48 h1_grid(nullptr) {
49 for (Int_t k = 0; k < 16; k++)
50 h2_long_vs_short[k] = nullptr;
51 }
52};
53
61 TString unit_label;
62 Double_t strip_e_min;
63 Double_t strip_e_max;
67 Double_t left_odd_max;
68 Double_t left_even_max;
69 Double_t right_odd_max;
70 Double_t right_even_max;
71 Double_t cathode_max;
72 Double_t grid_max;
73 Double_t strip0_max;
76};
77
85
93 const SummaryHistConfig &cfg);
94
105 const TString &subdir,
106 const TString &plot_suffix);
107
115public:
123 static TGraph *BuildTraceFromTotals(const Double_t *total);
124
139 static void SaveSampleTraces(const std::vector<TGraph *> &traces,
140 const TString &save_name, const TString &subdir,
141 Double_t y_min, Double_t y_max,
142 const char *y_title);
143
149 static void BuildNormedSummaryHistograms(const TString &input_filename,
150 const TString &file_label);
151};
152
153#endif
Dataset configuration.
Bool_t SummaryGridPartnerIsStrip1()
Whether the grid's partner in the summary is strip 1 rather than strip 0: when strip 0 is ignored or ...
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.
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; strip 1 against the grid when strip 0 is not required of an event (Summa...
TH1F * h_mult
Hit multiplicity per event.
TH1F * h1_strip17
Strip 17 energy.
TH2F * h2_long_vs_short[16]
Long end against short end of the segmented strips 1-16, index strip - 1.
TH1F * h1_grid
Grid energy.