21 {
22
23 if (argc != 3) {
24 throw std::runtime_error(
25 Form("File: %s, Line: %d\nT0Fit::main() - Usage: %s <input file> <output file>!", __FILE__, __LINE__, argv[0]));
26 }
27
28 TROOT wurscht("wurscht", "wurscht");
31 TFile
outfile(argv[2],
"RECREATE");
35 if (!dir) {
36 throw std::runtime_error(
37 Form("File: %s, Line: %d\nT0Fit::main() - Cannot find TDirectory 'MT_t0_fitter' in file %s!", __FILE__, __LINE__, argv[1]));
38 }
39
40 TIter nextkey(
dir->GetListOfKeys());
43 while ((key = (TKey *)nextkey())) {
44 TObject *
obj =
key->ReadObj();
45 if (
obj->IsA()->InheritsFrom(
"TH1F")) {
47 if (hist == NULL) continue;
49 if (hname == "t_spec_Summary") continue;
50 hist->GetListOfFunctions()->Clear();
52 fitter.SetTSpec(n, hist, &settings);
55 }
56 }
58}
Histogram and fitter class for drift time and pulsehight spectra The rising slope is fitted by a ferm...
Settings for the T0 calibration (histogram booking and fitting parameters) Parameters for pattern rec...
const bool & AddFitfun() const
If set to true the fitted functions are added to the histograms.
const bool & DrawDebugGraphs() const
If set to true for every tube a TDirectory will be created.
const ShapeFitter * fitter
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)