11 Long64_t nentries =
fChain->GetEntriesFast();
15 TFile*
fout =
new TFile(
voi_stem(str_inp,
".root").c_str(),
"recreate");
17 array<TH1D*,10> harr_sub1, harr_rhoA;
20 array<TH1D*,10> fake_sub1, fake_rhoA, miss_sub1, miss_rhoA;
21 array<TH2D*,10> match_sub1, match_rhoA;
24 float lobin_fake = -20.;
25 float hibin_fake = 80.;
27 float lobin_miss = -20.;
28 float hibin_miss = 80.;
31 for (
int i=0;
i<10; ++
i) {
35 fake_sub1[
i] =
new TH1D(Form(
"fake_sub1_%i",
i), Form(
"cent: %i-%i%% MBC Cent;N_{jets} Fake;p_{T}^{SUB1}",i0, i1), nbins_fake, lobin_fake, hibin_fake);
36 fake_rhoA[
i] =
new TH1D(Form(
"fake_rhoA_%i",
i), Form(
"cent: %i-%i%% MBC Cent;N_{jets} Fake;p_{T}-#rho#timesA",i0, i1), nbins_fake, lobin_fake, hibin_fake);
38 miss_sub1[
i] =
new TH1D(Form(
"miss_sub1_%i",
i), Form(
"cent: %i-%i%% MBC Cent;N_{jets} miss;p_{T}^{truth}",i0, i1), nbins_miss, lobin_miss, hibin_miss);
39 miss_rhoA[
i] =
new TH1D(Form(
"miss_rhoA_%i",
i), Form(
"cent: %i-%i%% MBC Cent;N_{jets} miss;p_{T}^{truth}",i0, i1), nbins_miss, lobin_miss, hibin_miss);
41 match_sub1[
i] =
new TH2D(Form(
"match_sub1_%i",
i), Form(
"cent: %i-%i%% MBC Cent;p_{T}^{SUB1};p_{T}^{truth}",i0, i1), nbins_fake, lobin_fake, hibin_fake, nbins_miss, lobin_miss, hibin_miss);
42 match_rhoA[
i] =
new TH2D(Form(
"match_rhoA_%i",
i), Form(
"cent: %i-%i%% MBC Cent;p_{T}-#rho#timesA;p_{T}^{truth}",i0, i1), nbins_fake, lobin_fake, hibin_fake, nbins_miss, lobin_miss, hibin_miss);
47 Long64_t nbytes = 0, nb = 0;
48 for (Long64_t jentry=0; jentry<nentries;jentry++) {
50 if (ientry < 0)
break;
51 nb =
fChain->GetEntry(jentry); nbytes += nb;
56 cout <<
" WARNING centrality in un expected bin" << endl;
64 jetmatcher.do_matching();
66 for (
auto pp : jetmatcher.match) {
67 auto T = (*TruthJetPt)[pp.first];
69 cout <<
" WARNING WHY HERE!!! A0" << endl;
72 auto M = (*sub1JetPt)[pp.second];
73 match_sub1[
k] ->Fill(M,
T);
75 for (
auto F : jetmatcher.indices_fake) {
76 auto M = (*sub1JetPt)[
F];
77 fake_sub1[
k]->Fill(M);
79 for (
auto M : jetmatcher.indices_miss) {
80 auto T = (*TruthJetPt)[M];
81 miss_sub1[
k]->Fill(
T);
88 jetmatcher.do_matching();
90 for (
auto pp : jetmatcher.match) {
91 auto T = (*TruthJetPt)[pp.first];
93 cout <<
" WARNING WHY HERE!!! A1" << endl;
96 auto M = (*rhoAJetPtLessRhoA)[pp.second];
97 match_rhoA[
k]->Fill(M,
T);
100 for (
auto F : jetmatcher.indices_fake) {
101 auto pt = (*rhoAJetPtLessRhoA)[
F];
103 fake_rhoA[
k]->Fill(
pt);
106 for (
auto M : jetmatcher.indices_miss) {
107 auto pt = (*TruthJetPt)[M];
108 miss_rhoA[
k]->Fill(
pt);
112 if (
false)
if (jentry>10) {
113 cout <<
" Breaking on jentry(" << jentry <<
")" << endl;
118 for (
int k=0;
k<10;++
k) {
119 fake_sub1[
k]->Write();
120 miss_sub1[
k]->Write();
121 match_sub1[
k]->Write();
122 fake_rhoA[
k]->Write();
123 miss_rhoA[
k]->Write();
124 match_rhoA[
k]->Write();