-
Notifications
You must be signed in to change notification settings - Fork 0
/
Run.C
59 lines (40 loc) · 1.14 KB
/
Run.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
R__LOAD_LIBRARY(build/libFemtoFitter.so)
void
Run()
{
std::cout << "Running\n";
// MomentumResolutionCorrector mrc;
// mrc.a[{0, 0, 0}][4] = 4.5;
// TFile f("mrc.root", "RECREATE");
// f.WriteTObject(&mrc);
// std::cout << mrc.a[{0,0,0}][4] << "\n";
auto tfile = TFile::Open("Data-Cmp.root");
if (!tfile) {
return 1;
}
tfile->ls();
auto *tdir = (TDirectory*)tfile->Get("Q3DLCMS/cfg2962DF8ABB076C96/pim/00_05/0.2_0.3/--");
auto *mrc = (TH3*)tfile->Get("AnalysisTrueQ3D/cfgBDC0F09B1F286D46/pim/00_90/0.2_0.3/--/mrc");
auto data = Data3D::FromDirectory(*tdir, mrc, 0.13);
Fitter3DGaussLcms fitter(*data);
TMinuit minuit;
fitter.setup_pml_fitter(minuit);
minuit.SetErrorDef(1.0);
minuit.Migrad();
TMinuit minuit1;
fitter.setup_pml_fitter(minuit1);
minuit1.SetErrorDef(0.5);
minuit1.Migrad();
TMinuit minuit2;
fitter.setup_pml_fitter(minuit2);
minuit2.SetErrorDef(5.88);
minuit2.Migrad();
TMinuit minuit3;
fitter.setup_pml_fitter(minuit3);
minuit3.SetErrorDef(5.88 / 2);
minuit3.Migrad();
minuit.mnprin(4, 1.0);
minuit1.mnprin(4, 1.0);
minuit2.mnprin(4, 1.0);
minuit3.mnprin(4, 1.0);
}