11 Long64_t nentries =
fChain->GetEntriesFast();
16 TFile*
fout =
new TFile(
voi_stem(str_inp,
".root").c_str(),
"recreate");
18 array<TH1D*,10> harr_sub1, harr_rhoA;
19 for (
int i=0;
i<10; ++
i) {
22 harr_sub1[
i] =
new TH1D(Form(
"JES_sub1_%i",
i),
23 Form(
"JES %i-%i%% MBD Centrality;p_{T}_{truth};#frac{p_{T}^{jet,calo}_{SUB1}-p_{T}^{truth}}{p_{T}^{truth}}",
24 i0,i1), 300, -3., 3.);
25 harr_rhoA[
i] =
new TH1D(Form(
"JES_rhoA_%i",
i),
26 Form(
"JES %i-%i%% MBD Centrality;p_{T}_{truth};#frac{(p_{T}^{jet,calo}-#rho^{md.bkgd}A_{jet})-p_{T}^{truth}}{p_{T}^{truth}}",
27 i0,i1), 300, -3., 3.);
31 Long64_t nbytes = 0, nb = 0;
32 for (Long64_t jentry=0; jentry<nentries;jentry++) {
34 if (ientry < 0)
break;
35 nb =
fChain->GetEntry(jentry); nbytes += nb;
40 cout <<
" WARNING centrality in un expected bin" << endl;
48 jetmatcher.do_matching();
50 for (
auto pp : jetmatcher.match) {
51 auto T = (*TruthJetPt)[pp.first];
53 auto M = (*sub1JetPt)[pp.second];
54 harr_sub1[
k]->Fill((M-
T)/
T);
61 jetmatcher.do_matching();
63 for (
auto pp : jetmatcher.match) {
64 auto T = (*TruthJetPt)[pp.first];
66 auto M = (*rhoAJetPtLessRhoA)[pp.second];
67 harr_rhoA[
k]->Fill((M-
T)/
T);
71 if (
false)
if (jentry>10) {
72 cout <<
" Breaking on jentry(" << jentry <<
")" << endl;
77 for (
int k=0;
k<10;++
k) {
78 harr_sub1[
k]->Write();
79 harr_rhoA[
k]->Write();