// Macro que pega os histogramas dos arquivos .root e faz a superposiĆ§Ć£o. { gROOT -> ProcessLine (".x lhcbstyle.C"); TFile f1("Signal_Histograms.root"); TFile f2("Upper_Sideband_Histograms.root"); TCanvas *c1 = new TCanvas(); TH1F *h1 = (TH1F*)f1.Get("h_ptmed_sg"); TH1F *h2 = (TH1F*)f2.Get("h_ptmed_sb"); h1->SetLineColor(kRed); h1->SetFillColor(kRed); h1->SetFillStyle(3003); h2->SetLineColor(kBlue); h2->Draw("l"); h1->Draw("same"); c1 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h1, "Signal Distribution", "f"); leg->AddEntry(h2, "Upper Sideband Distribution", "l"); leg->Draw(); c1->Update(); c1 -> Print("ptmed_sg_uppersb_comparison.jpeg"); TCanvas *c2 = new TCanvas(); TH1F *h3 = (TH1F*)f1.Get("h_ptmax_sg"); TH1F *h4 = (TH1F*)f2.Get("h_ptmax_sb"); h3->SetLineColor(kRed); h3->SetFillColor(kRed); h3->SetFillStyle(3003); h4->SetLineColor(kBlue); h4->Draw("l"); h3->Draw("same"); c2 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h3, "Signal Distribution", "f"); leg->AddEntry(h4, "Upper Sideband Distribution", "l"); leg->Draw(); c2->Update(); c2 -> Print("ptmax_sg_uppersb_comparison.jpeg"); TCanvas *c3 = new TCanvas(); TH1F *h5 = (TH1F*)f1.Get("h_pointing_pt_sg"); TH1F *h6 = (TH1F*)f2.Get("h_pointing_pt_sb"); h5->SetLineColor(kRed); h5->SetFillColor(kRed); h5->SetFillStyle(3003); h6->SetLineColor(kBlue); h5->Draw("l"); h6->Draw("same"); c3 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h5, "Signal Distribution", "f"); leg->AddEntry(h6, "Upper Sideband Distribution", "l"); leg->Draw(); c3->Update(); c3 -> Print("pointing_pt_sg_uppersb_comparison.jpeg"); TCanvas *c4 = new TCanvas(); TH1F *h7 = (TH1F*)f1.Get("h_ipownpvsum_sg"); TH1F *h8 = (TH1F*)f2.Get("h_ipownpvsum_sb"); h7->SetLineColor(kRed); h7->SetFillColor(kRed); h7->SetFillStyle(3003); h8->SetLineColor(kBlue); h8->Draw("l"); h7->Draw("same"); c4 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h7, "Signal Distribution", "f"); leg->AddEntry(h8, "Upper Sideband Distribution", "l"); leg->Draw(); c4->Update(); c4 -> Print("ipownpvsum_sg_uppersb_comparison.jpeg"); TCanvas *c5 = new TCanvas(); TH1F *h9 = (TH1F*)f1.Get("h_ipchi2ownpvsum_sg"); TH1F *h10 = (TH1F*)f2.Get("h_ipchi2ownpvsum_sb"); h9->SetLineColor(kRed); h9->SetFillColor(kRed); h9->SetFillStyle(3003); h10->SetLineColor(kBlue); h10->Draw("l"); h9->Draw("same"); c5 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h9, "Signal Distribution", "f"); leg->AddEntry(h10, "Upper Sideband Distribution", "l"); leg->Draw(); c5->Update(); c5 -> Print("ipchi2ownpvsum_sg_uppersb_comparison.jpeg"); TCanvas *c6 = new TCanvas(); TH1F *h11 = (TH1F*)f1.Get("h_ip_ptmax_sg"); TH1F *h12 = (TH1F*)f2.Get("h_ip_ptmax_sb"); h11->SetLineColor(kRed); h11->SetFillColor(kRed); h11->SetFillStyle(3003); h12->SetLineColor(kBlue); h12->Draw("l"); h11->Draw("same"); c6 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h11, "Signal Distribution", "f"); leg->AddEntry(h12, "Upper Sideband Distribution", "l"); leg->Draw(); c6->Update(); c6-> Print("ip_ptmax_sg_uppersb_comparison.jpeg"); TCanvas *c7 = new TCanvas(); TH1F *h13 = (TH1F*)f1.Get("h_d3_TRACK_GhostProb_sg"); TH1F *h14 = (TH1F*)f2.Get("h_d3_TRACK_GhostProb_sb"); h13->SetLineColor(kRed); h13->SetFillColor(kRed); h13->SetFillStyle(3003); h14->SetLineColor(kBlue); h13->Draw("l"); h14->Draw("same"); c7 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h13, "Signal Distribution", "f"); leg->AddEntry(h14, "Upper Sideband Distribution", "l"); leg->Draw(); c7->Update(); c7-> Print("d3_TRACK_GhostProb_sg_uppersb_comparison.jpeg"); TCanvas *c8 = new TCanvas(); TH1F *h15 = (TH1F*)f1.Get("h_d3_TRACK_CHI2NDOF_sg"); TH1F *h16 = (TH1F*)f2.Get("h_d3_TRACK_CHI2NDOF_sb"); h15->SetLineColor(kRed); h15->SetFillColor(kRed); h15->SetFillStyle(3003); h16->SetLineColor(kBlue); h15->Draw("l"); h16->Draw("same"); c8 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h15, "Signal Distribution", "f"); leg->AddEntry(h16, "Upper Sideband Distribution", "l"); leg->Draw(); c8->Update(); c8-> Print("d3_TRACK_CHI2NDOF_sg_uppersb_comparison.jpeg"); TCanvas *c9 = new TCanvas(); TH1F *h17 = (TH1F*)f1.Get("h_d3_P_sg"); TH1F *h18 = (TH1F*)f2.Get("h_d3_P_sb"); h17->SetLineColor(kRed); h17->SetFillColor(kRed); h17->SetFillStyle(3003); h18->SetLineColor(kBlue); h18->Draw("l"); h17->Draw("same"); c9 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h17, "Signal Distribution", "f"); leg->AddEntry(h18, "Upper Sideband Distribution", "l"); leg->Draw(); c9->Update(); c9-> Print("d3_P_sg_uppersb_comparison.jpeg"); TCanvas *c10 = new TCanvas(); TH1F *h19 = (TH1F*)f1.Get("h_d2_TRACK_GhostProb_sg"); TH1F *h20 = (TH1F*)f2.Get("h_d2_TRACK_GhostProb_sb"); h19->SetLineColor(kRed); h19->SetFillColor(kRed); h19->SetFillStyle(3003); h20->SetLineColor(kBlue); h19->Draw("l"); h20->Draw("same"); c10 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h19, "Signal Distribution", "f"); leg->AddEntry(h20, "Upper Sideband Distribution", "l"); leg->Draw(); c10->Update(); c10-> Print("d2_TRACK_GhostProb_sg_uppersb_comparison.jpeg"); TCanvas *c11 = new TCanvas(); TH1F *h21 = (TH1F*)f1.Get("h_d2_TRACK_CHI2NDOF_sg"); TH1F *h22 = (TH1F*)f2.Get("h_d2_TRACK_CHI2NDOF_sb"); h21->SetLineColor(kRed); h21->SetFillColor(kRed); h21->SetFillStyle(3003); h22->SetLineColor(kBlue); h21->Draw("l"); h22->Draw("same"); c11 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h21, "Signal Distribution", "f"); leg->AddEntry(h22, "Upper Sideband Distribution", "l"); leg->Draw(); c11->Update(); c11-> Print("d2_TRACK_CHI2NDOF_sg_uppersb_comparison.jpeg"); TCanvas *c12 = new TCanvas(); TH1F *h23 = (TH1F*)f1.Get("h_d2_P_sg"); TH1F *h24 = (TH1F*)f2.Get("h_d2_P_sb"); h23->SetLineColor(kRed); h23->SetFillColor(kRed); h23->SetFillStyle(3003); h24->SetLineColor(kBlue); h24->Draw("l"); h23->Draw("same"); c12 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h23, "Signal Distribution", "f"); leg->AddEntry(h24, "Upper Sideband Distribution", "l"); leg->Draw(); c12->Update(); c12-> Print("d2_P_sg_uppersb_comparison.jpeg"); TCanvas *c13 = new TCanvas(); TH1F *h25 = (TH1F*)f1.Get("h_d1_TRACK_GhostProb_sg"); TH1F *h26 = (TH1F*)f2.Get("h_d1_TRACK_GhostProb_sb"); h25->SetLineColor(kRed); h25->SetFillColor(kRed); h25->SetFillStyle(3003); h26->SetLineColor(kBlue); h25->Draw("l"); h26->Draw("same"); c13 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h25, "Signal Distribution", "f"); leg->AddEntry(h26, "Upper Sideband Distribution", "l"); leg->Draw(); c13->Update(); c13-> Print("d1_TRACK_GhostProb_sg_uppersb_comparison.jpeg"); TCanvas *c14 = new TCanvas(); TH1F *h27 = (TH1F*)f1.Get("h_d1_TRACK_CHI2NDOF_sg"); TH1F *h28 = (TH1F*)f2.Get("h_d1_TRACK_CHI2NDOF_sb"); h27->SetLineColor(kRed); h27->SetFillColor(kRed); h27->SetFillStyle(3003); h28->SetLineColor(kBlue); h27->Draw("l"); h28->Draw("same"); c14 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h27, "Signal Distribution", "f"); leg->AddEntry(h28, "Upper Sideband Distribution", "l"); leg->Draw(); c14->Update(); c14-> Print("d1_TRACK_CHI2NDOF_sg_uppersb_comparison.jpeg"); TCanvas *c15 = new TCanvas(); TH1F *h29 = (TH1F*)f1.Get("h_d1_P_sg"); TH1F *h30 = (TH1F*)f2.Get("h_d1_P_sb"); h29->SetLineColor(kRed); h29->SetFillColor(kRed); h29->SetFillStyle(3003); h30->SetLineColor(kBlue); h30->Draw("l"); h29->Draw("same"); c15 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h29, "Signal Distribution", "f"); leg->AddEntry(h30, "Upper Sideband Distribution", "l"); leg->Draw(); c15->Update(); c15-> Print("d1_P_sg_uppersb_comparison.jpeg"); TCanvas *c16 = new TCanvas(); TH1F *h31 = (TH1F*)f1.Get("h_B_PT_sg"); TH1F *h32 = (TH1F*)f2.Get("h_B_PT_sb"); h31->SetLineColor(kRed); h31->SetFillColor(kRed); h31->SetFillStyle(3003); h32->SetLineColor(kBlue); h32->Draw("l"); h31->Draw("same"); c16 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h31, "Signal Distribution", "f"); leg->AddEntry(h32, "Upper Sideband Distribution", "l"); leg->Draw(); c16->Update(); c16-> Print("B_PT_sg_uppersb_comparison.jpeg"); TCanvas *c17 = new TCanvas(); TH1F *h33 = (TH1F*)f1.Get("h_B_P_sg"); TH1F *h34 = (TH1F*)f2.Get("h_B_P_sb"); h33->SetLineColor(kRed); h33->SetFillColor(kRed); h33->SetFillStyle(3003); h34->SetLineColor(kBlue); h33->Draw("l"); h34->Draw("same"); c17 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h33, "Signal Distribution", "f"); leg->AddEntry(h34, "Upper Sideband Distribution", "l"); leg->Draw(); c17->Update(); c17-> Print("B_P_sg_uppersb_comparison.jpeg"); TCanvas *c18 = new TCanvas(); TH1F *h35 = (TH1F*)f1.Get("h_B_IPCHI2_OWNPV_sg"); TH1F *h36 = (TH1F*)f2.Get("h_B_IPCHI2_OWNPV_sb"); h35->SetLineColor(kRed); h35->SetFillColor(kRed); h35->SetFillStyle(3003); h36->SetLineColor(kBlue); h35->Draw("l"); h36->Draw("same"); c18 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h35, "Signal Distribution", "f"); leg->AddEntry(h36, "Upper Sideband Distribution", "l"); leg->Draw(); c18->Update(); c18-> Print("B_IPCHI2_OWNPV_sg_uppersb_comparison.jpeg"); TCanvas *c19 = new TCanvas(); TH1F *h37 = (TH1F*)f1.Get("h_B_IP_OWNPV_sg"); TH1F *h38 = (TH1F*)f2.Get("h_B_IP_OWNPV_sb"); h37->SetLineColor(kRed); h37->SetFillColor(kRed); h37->SetFillStyle(3003); h38->SetLineColor(kBlue); h37->Draw("l"); h38->Draw("same"); c19 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h37, "Signal Distribution", "f"); leg->AddEntry(h38, "Upper Sideband Distribution", "l"); leg->Draw(); c19->Update(); c19-> Print("B_IP_OWNPV_sg_uppersb_comparison.jpeg"); TCanvas *c20 = new TCanvas(); TH1F *h39 = (TH1F*)f1.Get("h_B_FD_OWNPV_sg"); TH1F *h40 = (TH1F*)f2.Get("h_B_FD_OWNPV_sb"); h39->SetLineColor(kRed); h39->SetFillColor(kRed); h39->SetFillStyle(3003); h40->SetLineColor(kBlue); h40->Draw("l"); h39->Draw("same"); c20 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h39, "Signal Distribution", "f"); leg->AddEntry(h40, "Upper Sideband Distribution", "l"); leg->Draw(); c20->Update(); c20-> Print("B_FD_OWNPV_sg_uppersb_comparison.jpeg"); TCanvas *c21 = new TCanvas(); TH1F *h41 = (TH1F*)f1.Get("h_B_ENDVERTEX_CHI2_sg"); TH1F *h42 = (TH1F*)f2.Get("h_B_ENDVERTEX_CHI2_sb"); h41->SetLineColor(kRed); h41->SetFillColor(kRed); h41->SetFillStyle(3003); h42->SetLineColor(kBlue); h41->Draw("l"); h42->Draw("same"); c21 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h41, "Signal Distribution", "f"); leg->AddEntry(h42, "Upper Sideband Distribution", "l"); leg->Draw(); c21->Update(); c21-> Print("B_ENDVERTEX_CHI2_sg_uppersb_comparison.jpeg"); TCanvas *c22 = new TCanvas(); TH1F *h43 = (TH1F*)f1.Get("h_B_DIRA_OWNPV_sg"); TH1F *h44 = (TH1F*)f2.Get("h_B_DIRA_OWNPV_sb"); h43->SetLineColor(kRed); h43->SetFillColor(kRed); h43->SetFillStyle(3003); h44->SetLineColor(kBlue); h43->Draw("l"); h44->Draw("same"); c22 -> Update(); leg = new TLegend(0.1,0.7,0.48,0.9); leg->SetHeader("Legend"); leg->AddEntry(h43, "Signal Distribution", "f"); leg->AddEntry(h44, "Upper Sideband Distribution", "l"); leg->Draw(); c22->Update(); c22-> Print("B_DIRA_OWNPV_sg_uppersb_comparison.jpeg"); TCanvas *c23 = new TCanvas(); TH1F *h45 = (TH1F*)f1.Get("h_B_AMAXDOCA_sg"); TH1F *h46 = (TH1F*)f2.Get("h_B_AMAXDOCA_sb"); h45->SetLineColor(kRed); h45->SetFillColor(kRed); h45->SetFillStyle(3003); h46->SetLineColor(kBlue); h45->Draw("l"); h46->Draw("same"); c23 -> Update(); leg = new TLegend(0.67,0.67,0.90,0.90); leg->SetHeader("Legend"); leg->AddEntry(h45, "Signal Distribution", "f"); leg->AddEntry(h46, "Upper Sideband Distribution", "l"); leg->Draw(); c23->Update(); c23-> Print("B_AMAXDOCA_sg_uppersb_comparison.jpeg"); }