|
||||
File indexing completed on 2024-04-06 12:21:53
0001 { 0002 // In unnamed scripts, variables not forgotten at end, so must delete them before rerunning script, so ... 0003 gROOT->Reset("a"); 0004 gStyle->SetOptTitle(0); 0005 gStyle->SetOptStat(""); 0006 //gStyle->SetOptStat("emr"); 0007 // gStyle->SetOptStat("euom"); 0008 gStyle->SetStatFontSize(0.035); 0009 gStyle->SetHistFillColor(kBlue); 0010 gStyle->SetHistFillStyle(1001); 0011 gStyle->SetMarkerSize(2.0); 0012 0013 gStyle->SetStatFormat("5.3f"); 0014 gStyle->SetStatFontSize(0.04); 0015 gStyle->SetOptFit(0111); 0016 gStyle->SetStatW(0.30); 0017 gStyle->SetStatH(0.02); 0018 gStyle->SetStatX(0.9); 0019 gStyle->SetStatY(0.9); 0020 gStyle->SetPadLeftMargin(0.15); 0021 gStyle->SetTitleYOffset(1.3); 0022 gStyle->SetTitleSize(0.05, "XYZ"); 0023 0024 gStyle->SetLabelSize(.04, "x"); 0025 gStyle->SetLabelSize(.04, "y"); 0026 0027 gStyle->SetCanvasDefH(500); 0028 gStyle->SetCanvasDefW(800); 0029 0030 TCanvas d1("d1"); 0031 0032 TFile *file[7]; 0033 0034 /* 0035 file[1] = new TFile("out_ttbar_ultimate_off1_20180831_183411/Hist.root"); // Corr 1 off 0036 file[2] = new TFile("out_ttbar_ultimate_off2_20180831_183030/Hist.root"); // Corr 2 off 0037 file[3] = new TFile("out_ttbar_ultimate_off3_20180831_183117/Hist.root"); // Corr 3 off 0038 file[4] = new TFile("out_ttbar_ultimate_off4_20180831_183220/Hist.root"); // Corr 4 off 0039 file[5] = new TFile("out_ttbar_ultimate_20180831_182908/Hist.root"); // All on 0040 file[6] = new TFile("out_ttbar_ultimate_offall_20180831_183257/Hist.root"); // All off 0041 TLegend leg(0.7,0.15,0.9,0.45); 0042 */ 0043 0044 // Testing variants 0045 /* 0046 file[1] = new TFile("out_ttbar_ultimate_option1_20180831_183601/Hist.root"); // All on 0047 file[2] = new TFile("out_ttbar_ultimate_approxB_20180831_183534/Hist.root"); // All on 0048 file[3] = new TFile("out_ttbar_ultimate_dsbydr1_20180901_230848/Hist.root"); // Corr 3 off 0049 // file[4] = new TFile("out_ttbar_ultimate_option1_deltaS0_way1_20180901_231217/Hist.root"); // Corr 4 off - worse resolution near eta = 1.5 0050 file[4] = new TFile("out_ttbar_ultimate_option1_deltaS0_way2_20180901_231405//Hist.root"); // Corr 4 off - Even worse resolution near eta = 1.5 - 1.7 0051 file[5] = new TFile("out_ttbar_ultimate_20180831_182908/Hist.root"); // All on 0052 file[6] = new TFile("out_ttbar_ultimate_offall_20180831_183257/Hist.root"); // All off 0053 TLegend leg(0.7,0.15,0.9,0.45); 0054 */ 0055 0056 /* 0057 // Different particle types 0058 file[1] = new TFile("out_ttbar_ultimate_onlyE_20180903_115714/Hist.root"); 0059 file[2] = new TFile("out_ttbar_ultimate_noE_20180903_115836/Hist.root"); 0060 file[3] = new TFile("out_ttbar_ultimate_20180831_182908/Hist.root"); 0061 d1.SetLogy(1); 0062 TLegend leg(0.7,0.15,0.9,0.45); 0063 */ 0064 0065 file[1] = new TFile("out_muon_ultimate_off1_20180903_145832/Hist.root"); // Corr 1 off 0066 file[2] = new TFile("out_muon_ultimate_off2_20180903_145511/Hist.root"); // Corr 2 off 0067 file[3] = new TFile("out_muon_ultimate_off3_20180903_145549/Hist.root"); // Corr 3 off 0068 file[4] = new TFile("out_muon_ultimate_off4_20180903_145621/Hist.root"); // Corr 4 off 0069 file[5] = new TFile("out_muon_ultimate_20180903_145432/Hist.root"); // All on 0070 file[6] = new TFile("out_muon_ultimate_offall_20180903_145655/Hist.root"); // All off 0071 TLegend leg(0.2, 0.6, 0.4, 0.9); 0072 0073 TString name[7] = {"", "Corr. 1 off", "Corr. 2 off", "Corr. 3 off", "Corr. 4 off", "All on", "All off"}; 0074 //TString name[7] = {"", "e", "#mu, #pi, K, p", "e, #mu, #pi, K, p", "Corr. 4 off", "All on", "All off"}; 0075 unsigned int icol[7] = {0, 1, 2, 3, 6, 8, 9}; 0076 0077 TH1F *his; 0078 TH2F *his2D; 0079 TProfile *prof[7]; 0080 TEfficiency *teffi1, *teffi2, *teffi3; 0081 0082 float ymax = 0.; 0083 0084 bool first = true; 0085 for (unsigned int i = 1; i <= 6; i++) { 0086 //if (i > 3) continue; 0087 0088 file[i]->GetObject("TMTrackProducer/KF4ParamsComb/QoverPtResVsTrueEta_KF4ParamsComb", prof[i]); 0089 //file[i]->GetObject("TMTrackProducer/KF4ParamsComb/QoverPtResVsTrueInvPt_KF4ParamsComb", prof[i]); 0090 //file[i]->GetObject("TMTrackProducer/KF4ParamsComb/Z0ResVsTrueEta_KF4ParamsComb", prof[i]); 0091 //file[i]->GetObject("TMTrackProducer/KF4ParamsComb/FitChi2DofVsInvPtMatched_KF4ParamsComb", prof[i]); 0092 //file[i]->GetObject("TMTrackProducer/KF4ParamsComb/FitChi2DofVsInvPtUnmatched_KF4ParamsComb", prof[i]); 0093 //file[i]->GetObject("TMTrackProducer/KF4ParamsComb/FitChi2DofVsEtaMatched_KF4ParamsComb", prof[i]); 0094 //file[i]->GetObject("TMTrackProducer/KF4ParamsComb/FitChi2DofVsEtaUnmatched_KF4ParamsComb", prof[i]); 0095 0096 float ym = prof[i]->GetMaximum(); 0097 if (ymax < ym) 0098 ymax = ym; 0099 prof[i]->SetMaximum(1.8 * ymax); 0100 //prof[i]->SetMaximum(0.02); 0101 prof[i]->SetMinimum(0.0); 0102 0103 if (prof[i] == nullptr) { 0104 cout << "ERROR: Input histogram missing " << i << endl; 0105 cin.get(); 0106 continue; 0107 } 0108 0109 prof[i]->SetMarkerStyle(20 + i); 0110 prof[i]->SetMarkerColor(icol[i]); 0111 if (first) { 0112 first = false; 0113 prof[i]->Draw("P "); 0114 } else { 0115 prof[i]->Draw("P SAME"); 0116 } 0117 leg.AddEntry(prof[i], name[i], "P"); 0118 leg.Draw(); 0119 d1.Draw(); 0120 d1.Update(); 0121 } 0122 0123 //prof1->SetTitle(";1/Pt (1/GeV); #phi_{0} resolution"); 0124 0125 d1.Print("plot.pdf"); 0126 cin.get(); 0127 0128 for (unsigned int i = 1; i <= 6; i++) { 0129 file[i]->Close(); 0130 delete file[i]; 0131 } 0132 }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.2.1 LXR engine. The LXR team |