#include <TROOT.h>
void read_exampledata(int which = 0)
{
string path("examples/");
switch (which) {
case(0): {
path += "exampledata/";
break;
}
default: {
cout << "\nerror: path to data not specified" << endl;
break;
}
}
mymeas.
ReadFile(path,
true, 99,
"examples/exampledata_results.root");
float intwindowminus = 10.;
float intwindowplus = 30.;
float findmaxfrom = 80.;
float findmaxto = 140.;
mymeas.
IntegralFilter({ 0, 200, 200 }, {
false,
false,
false }, intwindowminus, intwindowplus, findmaxfrom, findmaxto);
mymeas.
PrintTimeDist(50, 170, findmaxfrom, findmaxto, 60, 1, .5);
int example_event = 68;
double ymin = -5;
double ymax = 150;
mymeas.
PrintChargeSpectrumWF(intwindowminus, intwindowplus, findmaxfrom, findmaxto, example_event, ymin, ymax);
gROOT->SetBatch(kTRUE);
for (
int i = 1; i < mymeas.
nevents; i +=
static_cast<int>(mymeas.
nevents / 10)) {
}
gROOT->SetBatch(kFALSE);
mymeas.
PrintChargeSpectrum(intwindowminus, intwindowplus, findmaxfrom, findmaxto, 6e3, 1.35e4, 200, 7e3, 1.3e4, 9, 1);
}
int nevents
Number of triggered events in data.
void CorrectBaselineMinSlopeRMS(vector< float >, double=0, int=2, int=3)
Baseline correction method searching for non-monotonic, rather constant regions.
vector< float > PrintChargeSpectrum_pars
Starting values of the fit parameters for PrintChargeSpectrum()
void PrintWFProjection(float=0, float=320, float=-50, float=50, int=200)
Plots waveform projection histograms of all channels.
void PlotChannelAverages(bool=false)
Plot averages only of the good, corrected waveforms for each channel.
void ReadFile(string, bool=false, int=9, string="out.root", bool=false)
Routine to read files created by the wavecatcher.
void PrintChargeSpectrumWF(float, float, float=0, float=300, int=1, float=0., float=0., float=0., float=0.)
Plot waveforms of all channels for a given event number and add the determined integration windows to...
vector< int > switch_polarity_for_channels
Stores the channel number where the polarity should be inverted. Example use to switch polarity for c...
void IntegralFilter(vector< float >, vector< bool >, float, float, float=50, float=250, bool=false, bool=false)
Skip events with threshold on integral.
vector< vector< float > > PrintChargeSpectrum_cal
Calibration values to normalize charge spectrum to number of photoelectrons Chennels must be ordered ...
void PrintChargeSpectrum(float, float, float=0, float=300, float=-50, float=600, int=750, float=0., float=0., int=99, int=0, bool=false)
Plots the "charge" spectrums of all channels.
void PlotWFHeatmaps(float=-20, float=200, int=880, string="", float=0, EColorPalette=kGistEarth)
Plot stacks of all non-skipped waveforms for all active channels.
void PlotChannelSums(bool=false, bool=false, double=0., double=0., int=2)
Plot sums of all raw waveforms for each channel.
void PrintTimeDist(float=0, float=300, float=0, float=300, int=100, int=0, float=.3)
Time distribution of maximum, CFD, or 10% - 90% rise time in a certain time window.
vector< int > plot_active_channels
Stores the numbers of the active channels which should be plotted.