17 TRandom3
rand(349867);
19 LhoodMM_tools*
l =
new LhoodMM_tools();
21 std::cout <<
"null!" << std::endl;
25 TH1F* h_ht =
new TH1F(
"ht",
"ht", 10, 0, 1000);
27 TH1F* h_phi =
new TH1F(
"phi",
"phi", 10, 0, 7);
29 TH2F* h_2d =
new TH2F(
"ht_vs_phi",
"ht_vs_phi", 10, 0, 7, 10, 0, 1000);
30 l->register1DHistogram(h_ht, &ht);
31 l->register1DHistogram(h_phi, &
phi);
32 l->register2DHistogram(h_2d, &
phi, &ht);
35 for (
int itxtfile = 1; itxtfile <
argc-1; itxtfile++) {
37 char* txtFilename =
argv[itxtfile];
40 std::cout <<
"reading..." << std::endl;
42 std::vector<bool> isTight_vals;
43 std::vector<double> realEff_vals;
44 std::vector<double> fakeEff_vals;
46 std::vector<FakeBkgTools::Particle>
particles;
47 for (
int ilep = 0; ilep<nlep; ilep++) {
52 txtFile >> is_tight >> real_eff >> fake_eff;
53 p.is_tight = is_tight;
54 p.real_eff = real_eff;
55 p.fake_eff = fake_eff;
60 ht = 1000.*
rand.Uniform();
61 phi = 2*TMath::Pi()*
rand.Uniform();
70 TFile
f(
"test.root",
"RECREATE");
78 double nfakes, poserr, negerr;
86 poserr =
y.uncertainties[
u].up;
87 negerr =
y.uncertainties[
u].down;
89 std::cout <<
"nfakes = " << nfakes <<
" + " << poserr <<
" - " << -1.0*negerr << std::endl;
92 TH1F* h_count =
new TH1F(
"h_count",
"h_count", 2, 0, 2);
93 h_count->SetBinContent(1, nfakes);
94 h_count->SetBinError(1, TMath::Max(TMath::Abs(poserr), TMath::Abs(negerr)));