8 TFile *upcfile =
new TFile(
"AcceptanceMRP.root",
"READ");
9 TH1 *h_InvMass_smeared_sphenix_total = (TH1*)upcfile->Get(
"h_InvMass_smeared_sphenix_total");
10 TH1 *h_pt_sphenix_total = (TH1*)upcfile->Get(
"h_pt_sphenix_total");
11 TH1 *h_rapt_sphenix_total = (TH1*)upcfile->Get(
"h_rapt_sphenix_total");
13 TFile *hijbkgfile =
new TFile(
"hijbkg_results.root",
"READ");
14 TH1 *he_mass = (TH1*)hijbkgfile->Get(
"he_mass");
15 TH1 *he_eta = (TH1*)hijbkgfile->Get(
"he_eta");
16 TH1 *he_pt = (TH1*)hijbkgfile->Get(
"he_pt");
19 double nevt_hij = 3333315. + 3716246. + 3313128.;
20 double sigma_auau = 7.2;
21 double integ_lumi = 4.7e9;
22 double lumi_scale = (sigma_auau*integ_lumi)/nevt_hij;
23 cout <<
"lumi scaled " << lumi_scale << endl;
25 he_mass->Scale( lumi_scale );
27 float markersize = 0.7;
30 int minbin = he_mass->FindBin( 0.6 );
33 he_mass->SetBinContent(
ibin, 0. );
37 TH1 *h_InvMass_smeared_sphenix_totalbkg = (TH1*)h_InvMass_smeared_sphenix_total->Clone(
"h_InvMass_smeared_sphenix_totalbkg");
38 h_InvMass_smeared_sphenix_totalbkg->Add( he_mass );
40 TCanvas *c_mass_total =
new TCanvas(
"c_mass_total",
"Invariant Mass",550,425);
41 h_InvMass_smeared_sphenix_totalbkg->SetLineColor(kBlack);
42 h_InvMass_smeared_sphenix_totalbkg->SetMarkerColor(kBlack);
43 h_InvMass_smeared_sphenix_totalbkg->SetMarkerStyle(20);
44 h_InvMass_smeared_sphenix_totalbkg->SetMarkerSize( markersize );
45 h_InvMass_smeared_sphenix_totalbkg->Draw(
"ehist");
47 he_mass->SetLineColor(kRed);
48 he_mass->SetMarkerColor(kRed);
49 he_mass->SetMarkerSize( markersize );
50 he_mass->SetMarkerStyle( 20 );
51 he_mass->Draw(
"ecsame" );
53 h_InvMass_smeared_sphenix_total->SetLineColor(kBlue);
54 h_InvMass_smeared_sphenix_total->SetMarkerColor(kBlue);
55 h_InvMass_smeared_sphenix_total->SetMarkerStyle( 20 );
56 h_InvMass_smeared_sphenix_total->SetMarkerSize( markersize );
57 h_InvMass_smeared_sphenix_total->SetFillStyle( 1001 );
58 h_InvMass_smeared_sphenix_total->SetFillColor( 7 );
59 h_InvMass_smeared_sphenix_total->Draw(
"ehistsame");
61 h_InvMass_smeared_sphenix_totalbkg->Draw(
"ehistsame");
65 int minjbin = he_mass->FindBin( 3.2 );
66 int maxjbin = he_mass->FindBin( 3.31 );
74 upcj += h_InvMass_smeared_sphenix_total->GetBinContent(
ibin );
75 upcjerr += h_InvMass_smeared_sphenix_total->GetBinError(
ibin )*he_mass->GetBinError(
ibin );
77 hijj += he_mass->GetBinContent(
ibin );
78 hijjerr += he_mass->GetBinError(
ibin )*he_mass->GetBinError(
ibin );
81 upcjerr = sqrt(upcjerr);
82 hijjerr = sqrt(hijjerr);
83 cout <<
"upcj\tupcjerr\thijj\thijjerr" << endl;
84 cout << upcj <<
"\t" << upcjerr <<
"\t" << hijj <<
"\t" << hijjerr << endl;
85 cout <<
"S/N = " << upcj/hijj << endl;