void* Make_DrawInstructions_HistSuperimpose(vector locHistColors, vector locLegendNames) { DecayDrawInstructions* locDrawInstructions = new DecayDrawInstructions(); locDrawInstructions->Set_HistOrGraphColorVector(locHistColors); locDrawInstructions->Set_LegendNameVector(locLegendNames); locDrawInstructions->Set_FillHistFlag(1); return (void*)locDrawInstructions; } void DrawPlots_v2(void) { gSystem->Load("$(DECAYDRAW_PATH)/depends/MacOSXLeopard/libDecayDraw.so"); gSystem->Load("$(DECAYDRAW_PATH)/../PlotFitter/depends/MacOSXLeopard/libPlotFitter.so"); gROOT->LoadMacro("$(DECAYDRAW_PATH)/DecayDrawHistograms.C"); int locRebinAmount = 10; vector locHistColors; vector locLegendNames; DecayDrawInstructions* locDrawInstructions = NULL; TObjArray* locHistArray; TFile* locFile = new TFile("hd_root.root", "READ"); //NonKinFit Trues locFile->cd(); gDirectory->cd("n3pi_skim_true"); gDirectory->cd("Hist_MissingMassSquared_PostCheat"); TH1D* locReconHist_AllTrue = (TH1D*)gDirectory->Get("MissingMassSquared"); //34361 locReconHist_AllTrue->Rebin(locRebinAmount); locReconHist_AllTrue->GetXaxis()->SetRangeUser(-3.0, 5.0); gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut5Sigma"); TH1D* locReconHist_TrueCut1 = (TH1D*)gDirectory->Get("MissingMassSquared"); //32486 locReconHist_TrueCut1->Rebin(locRebinAmount); locReconHist_TrueCut1->GetXaxis()->SetRangeUser(-3.0, 5.0); gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut3Sigma"); TH1D* locReconHist_TrueCut2 = (TH1D*)gDirectory->Get("MissingMassSquared"); //29490 locReconHist_TrueCut2->Rebin(locRebinAmount); locReconHist_TrueCut2->GetXaxis()->SetRangeUser(-3.0, 5.0); gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut5Sigma"); TH1D* locReconHist_TrueCut3 = (TH1D*)gDirectory->Get("MissingMassSquared"); //17270 locReconHist_TrueCut3->Rebin(locRebinAmount); locReconHist_TrueCut3->GetXaxis()->SetRangeUser(-3.0, 5.0); gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut3Sigma"); TH1D* locReconHist_TrueCut4 = (TH1D*)gDirectory->Get("MissingMassSquared"); //13574 locReconHist_TrueCut4->Rebin(locRebinAmount); locReconHist_TrueCut4->GetXaxis()->SetRangeUser(-3.0, 5.0); //NonKinFit Recons locFile->cd(); gDirectory->cd("n3pi_skim_recon"); gDirectory->cd("Hist_MissingMassSquared"); TH1D* locReconHist_All = (TH1D*)gDirectory->Get("MissingMassSquared"); //71265960 locReconHist_All->GetXaxis()->SetRangeUser(-3.0, 5.0); gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut5Sigma"); TH1D* locReconHist_Cut1 = (TH1D*)gDirectory->Get("MissingMassSquared"); //34922730 locReconHist_Cut1->GetXaxis()->SetRangeUser(-3.0, 5.0); gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut3Sigma"); TH1D* locReconHist_Cut2 = (TH1D*)gDirectory->Get("MissingMassSquared"); //22540150 locReconHist_Cut2->GetXaxis()->SetRangeUser(-3.0, 5.0); gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut5Sigma"); TH1D* locReconHist_Cut3 = (TH1D*)gDirectory->Get("MissingMassSquared"); //5925443 locReconHist_Cut3->GetXaxis()->SetRangeUser(-3.0, 5.0); gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut3Sigma"); TH1D* locReconHist_Cut4 = (TH1D*)gDirectory->Get("MissingMassSquared"); //3578726 locReconHist_Cut4->GetXaxis()->SetRangeUser(-3.0, 5.0); //p4 kinfit locFile->cd(); gDirectory->cd("n3pi_skim_kinfitp4"); gDirectory->cd("Hist_MissingMassSquared_PostKinFit"); TH1D* locReconHist_Cut5 = (TH1D*)gDirectory->Get("MissingMassSquared"); //624401 locReconHist_Cut5->GetXaxis()->SetRangeUser(-3.0, 5.0); gDirectory->cd("../Hist_MissingMassSquared_PostCheat"); TH1D* locReconHist_TrueCut5 = (TH1D*)gDirectory->Get("MissingMassSquared"); //11816 locReconHist_TrueCut5->Rebin(locRebinAmount); locReconHist_TrueCut5->GetXaxis()->SetRangeUser(-3.0, 5.0); //vertex-p4 kinfit locFile->cd(); gDirectory->cd("n3pi_skim_kinfitvp4"); gDirectory->cd("Hist_MissingMassSquared_PostKinFit"); TH1D* locReconHist_Cut6 = (TH1D*)gDirectory->Get("MissingMassSquared"); //47195 locReconHist_Cut6->GetXaxis()->SetRangeUser(-3.0, 5.0); gDirectory->cd("../Hist_MissingMassSquared_PostCheat"); TH1D* locReconHist_TrueCut6 = (TH1D*)gDirectory->Get("MissingMassSquared"); //8636 TH1D* locReconHist_TrueCut6_Clone = (TH1D*)locReconHist_TrueCut6->Clone("MissingMassSquared_Clone"); locReconHist_TrueCut6->Rebin(locRebinAmount); locReconHist_TrueCut6->GetXaxis()->SetRangeUser(-3.0, 5.0); locReconHist_TrueCut6_Clone->GetXaxis()->SetRangeUser(-3.0, 5.0); //draw true's locHistColors.resize(7); locLegendNames.resize(7); locHistColors[0] = kBlack; locHistColors[1] = kGray; locHistColors[2] = kRed - 7; locHistColors[3] = kBlue - 7; locHistColors[4] = kViolet; locHistColors[5] = kTeal; locHistColors[6] = kYellow; locLegendNames[0] = "All"; locLegendNames[1] = "Combined Tracking CL: +/- 5#sigma (94.5%)"; locLegendNames[2] = "Combined Tracking CL: +/- 3#sigma (85.8%)"; locLegendNames[3] = "Combined PID CL: +/- 5#sigma (50.3%)"; locLegendNames[4] = "Combined PID CL: +/- 3#sigma (39.5%)"; locLegendNames[5] = "P4 KinFit CL (1-C): > 1% (34.4%)"; locLegendNames[6] = "Vertex-P4 KinFit CL (4-C): > 1% (25.1%)"; locDrawInstructions = (DecayDrawInstructions*)Make_DrawInstructions_HistSuperimpose(locHistColors, locLegendNames); locHistArray = new TObjArray(7); locHistArray->AddAt(locReconHist_AllTrue, 0); locHistArray->AddAt(locReconHist_TrueCut1, 1); locHistArray->AddAt(locReconHist_TrueCut2, 2); locHistArray->AddAt(locReconHist_TrueCut3, 3); locHistArray->AddAt(locReconHist_TrueCut4, 4); locHistArray->AddAt(locReconHist_TrueCut5, 5); locHistArray->AddAt(locReconHist_TrueCut6, 6); DrawAndSave_ddhHistSuperimposition(locHistArray, locDrawInstructions); //draw recons + last true locHistColors.resize(8); locLegendNames.resize(8); locHistColors[0] = kBlack; locHistColors[1] = kGray; locHistColors[2] = kRed - 7; locHistColors[3] = kBlue - 7; locHistColors[4] = kViolet; locHistColors[5] = kTeal; locHistColors[6] = kYellow; locHistColors[7] = kPink - 3; locLegendNames[0] = "All (0.0482%)"; locLegendNames[1] = "Combined Tracking CL: +/- 5#sigma (0.0930%)"; locLegendNames[2] = "Combined Tracking CL: +/- 3#sigma (0.131%)"; locLegendNames[3] = "Combined PID CL: +/- 5#sigma (0.291%)"; locLegendNames[4] = "Combined PID CL: +/- 3#sigma (0.379%)"; locLegendNames[5] = "P4 KinFit CL (1-C): > 1% (7.56%)"; locLegendNames[6] = "Vertex-P4 KinFit CL (4-C): > 1% (18.3%)"; locLegendNames[7] = "True Signal"; locDrawInstructions = (DecayDrawInstructions*)Make_DrawInstructions_HistSuperimpose(locHistColors, locLegendNames); locHistArray = new TObjArray(8); locHistArray->AddAt(locReconHist_All, 0); locHistArray->AddAt(locReconHist_Cut1, 1); locHistArray->AddAt(locReconHist_Cut2, 2); locHistArray->AddAt(locReconHist_Cut3, 3); locHistArray->AddAt(locReconHist_Cut4, 4); locHistArray->AddAt(locReconHist_Cut5, 5); locHistArray->AddAt(locReconHist_Cut6, 6); locHistArray->AddAt(locReconHist_TrueCut6_Clone, 7); DrawAndSave_ddhHistSuperimposition(locHistArray, locDrawInstructions); } void DrawPlots_v3(void) { gSystem->Load("$(DECAYDRAW_PATH)/depends/MacOSXLeopard/libDecayDraw.so"); gSystem->Load("$(DECAYDRAW_PATH)/../PlotFitter/depends/MacOSXLeopard/libPlotFitter.so"); gROOT->LoadMacro("$(DECAYDRAW_PATH)/DecayDrawHistograms.C"); int locRebinAmount = 10; vector locHistColors; vector locLegendNames; DecayDrawInstructions* locDrawInstructions = NULL; TObjArray* locHistArray; TFile* locFile = new TFile("hd_root.root", "READ"); //NonKinFit Trues locFile->cd(); gDirectory->cd("n3pi_skim_true"); // gDirectory->cd("Hist_MissingMassSquared_PostCheat"); // TH1D* locReconHist_AllTrue = (TH1D*)gDirectory->Get("MissingMassSquared"); //34361 // locReconHist_AllTrue->Rebin(locRebinAmount); gDirectory->cd("Hist_MissingMassSquared_PostMassCut800MeV"); TH1D* locReconHist_AllTrue = (TH1D*)gDirectory->Get("MissingMassSquared"); //30913 locReconHist_AllTrue->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut5Sigma"); TH1D* locReconHist_TrueCut1 = (TH1D*)gDirectory->Get("MissingMassSquared"); //29660 locReconHist_TrueCut1->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostMassCut600MeV"); TH1D* locReconHist_TrueCut2 = (TH1D*)gDirectory->Get("MissingMassSquared"); //28808 locReconHist_TrueCut2->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostMassCut400MeV"); TH1D* locReconHist_TrueCut3 = (TH1D*)gDirectory->Get("MissingMassSquared"); //27128 locReconHist_TrueCut3->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut3Sigma"); TH1D* locReconHist_TrueCut4 = (TH1D*)gDirectory->Get("MissingMassSquared"); //25076 locReconHist_TrueCut4->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut5Sigma"); TH1D* locReconHist_TrueCut5 = (TH1D*)gDirectory->Get("MissingMassSquared"); //14757 locReconHist_TrueCut5->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut3Sigma"); TH1D* locReconHist_TrueCut6 = (TH1D*)gDirectory->Get("MissingMassSquared"); //11687 TH1D* locReconHist_TrueCut6_Clone = (TH1D*)locReconHist_TrueCut6->Clone("MissingMassSquared_Clone"); locReconHist_TrueCut6->Rebin(locRebinAmount); //NonKinFit Recons locFile->cd(); gDirectory->cd("n3pi_skim_recon"); //first column is combos, second is events //all events: 4949901 // gDirectory->cd("Hist_MissingMassSquared"); // TH1D* locReconHist_All = (TH1D*)gDirectory->Get("MissingMassSquared"); //71265960 gDirectory->cd("Hist_MissingMassSquared_PostMassCut800MeV"); TH1D* locReconHist_All = (TH1D*)gDirectory->Get("MissingMassSquared"); //14833670 //2594738 gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut5Sigma"); TH1D* locReconHist_Cut1 = (TH1D*)gDirectory->Get("MissingMassSquared"); //7996696 //2306267 gDirectory->cd("../Hist_MissingMassSquared_PostMassCut600MeV"); TH1D* locReconHist_Cut2 = (TH1D*)gDirectory->Get("MissingMassSquared"); //5600832 //1862196 gDirectory->cd("../Hist_MissingMassSquared_PostMassCut400MeV"); TH1D* locReconHist_Cut3 = (TH1D*)gDirectory->Get("MissingMassSquared"); //3553740 //1396313 gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut3Sigma"); TH1D* locReconHist_Cut4 = (TH1D*)gDirectory->Get("MissingMassSquared"); //2401802 //1165556 gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut5Sigma"); TH1D* locReconHist_Cut5 = (TH1D*)gDirectory->Get("MissingMassSquared"); //660977 //421046 gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut3Sigma"); TH1D* locReconHist_Cut6 = (TH1D*)gDirectory->Get("MissingMassSquared"); //431198 //299550 //draw true's locHistColors.resize(7); locLegendNames.resize(7); locHistColors[0] = kBlack; locHistColors[1] = kGray; locHistColors[2] = kRed - 7; locHistColors[3] = kBlue - 7; locHistColors[4] = kViolet; locHistColors[5] = kTeal; locHistColors[6] = kYellow; locLegendNames[0] = "-3.0 < Missing Mass Squared (GeV/c^{2})^{2} < 5.0 (90.0%)"; locLegendNames[1] = "Combined Tracking CL: +/- 5#sigma (86.3%)"; locLegendNames[2] = "-2.0 < Missing Mass Squared (GeV/c^{2})^{2} < 4.0 (83.8%)"; locLegendNames[3] = "-1.0 < Missing Mass Squared (GeV/c^{2})^{2} < 3.0 (79.0%)"; locLegendNames[4] = "Combined Tracking CL: +/- 3#sigma (73.0%)"; locLegendNames[5] = "Combined PID CL: +/- 5#sigma (42.9%)"; locLegendNames[6] = "Combined PID CL: +/- 3#sigma (34.0%)"; locDrawInstructions = (DecayDrawInstructions*)Make_DrawInstructions_HistSuperimpose(locHistColors, locLegendNames); locHistArray = new TObjArray(7); locHistArray->AddAt(locReconHist_AllTrue, 0); locHistArray->AddAt(locReconHist_TrueCut1, 1); locHistArray->AddAt(locReconHist_TrueCut2, 2); locHistArray->AddAt(locReconHist_TrueCut3, 3); locHistArray->AddAt(locReconHist_TrueCut4, 4); locHistArray->AddAt(locReconHist_TrueCut5, 5); locHistArray->AddAt(locReconHist_TrueCut6, 6); DrawAndSave_ddhHistSuperimposition(locHistArray, locDrawInstructions); //draw recons + last true locHistColors.resize(8); locLegendNames.resize(8); locHistColors[0] = kBlack; locHistColors[1] = kGray; locHistColors[2] = kRed - 7; locHistColors[3] = kBlue - 7; locHistColors[4] = kViolet; locHistColors[5] = kTeal; locHistColors[6] = kYellow; locHistColors[7] = kPink - 3; locLegendNames[0] = "-3.0 < Missing Mass Squared (GeV/c^{2})^{2} < 5.0 (52.4%)"; locLegendNames[1] = "Combined Tracking CL: +/- 5#sigma (46.6%)"; locLegendNames[2] = "-2.0 < Missing Mass Squared (GeV/c^{2})^{2} < 4.0 (37.6%)"; locLegendNames[3] = "-1.0 < Missing Mass Squared (GeV/c^{2})^{2} < 3.0 (28.2%)"; locLegendNames[4] = "Combined Tracking CL: +/- 3#sigma (23.5%)"; locLegendNames[5] = "Combined PID CL: +/- 5#sigma (8.51%)"; locLegendNames[6] = "Combined PID CL: +/- 3#sigma (6.05%)"; locLegendNames[7] = "True Signal"; locDrawInstructions = (DecayDrawInstructions*)Make_DrawInstructions_HistSuperimpose(locHistColors, locLegendNames); locHistArray = new TObjArray(8); locHistArray->AddAt(locReconHist_All, 0); locHistArray->AddAt(locReconHist_Cut1, 1); locHistArray->AddAt(locReconHist_Cut2, 2); locHistArray->AddAt(locReconHist_Cut3, 3); locHistArray->AddAt(locReconHist_Cut4, 4); locHistArray->AddAt(locReconHist_Cut5, 5); locHistArray->AddAt(locReconHist_Cut6, 6); locHistArray->AddAt(locReconHist_TrueCut6_Clone, 7); DrawAndSave_ddhHistSuperimposition(locHistArray, locDrawInstructions); } void DrawPlots_v4(void) { gSystem->Load("$(DECAYDRAW_PATH)/depends/MacOSXLeopard/libDecayDraw.so"); gSystem->Load("$(DECAYDRAW_PATH)/../PlotFitter/depends/MacOSXLeopard/libPlotFitter.so"); gROOT->LoadMacro("$(DECAYDRAW_PATH)/DecayDrawHistograms.C"); int locRebinAmount = 10; vector locHistColors; vector locLegendNames; DecayDrawInstructions* locDrawInstructions = NULL; TObjArray* locHistArray; TFile* locFile = new TFile("hd_root.root", "READ"); //NonKinFit Trues locFile->cd(); gDirectory->cd("n3pi_skim_true"); // gDirectory->cd("Hist_MissingMassSquared_PostCheat"); // TH1D* locReconHist_AllTrue = (TH1D*)gDirectory->Get("MissingMassSquared"); //34361 // locReconHist_AllTrue->Rebin(locRebinAmount); gDirectory->cd("Hist_MissingMassSquared_PostMassCut800MeV"); TH1D* locReconHist_AllTrue = (TH1D*)gDirectory->Get("MissingMassSquared"); //30913 locReconHist_AllTrue->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut5Sigma"); TH1D* locReconHist_TrueCut1 = (TH1D*)gDirectory->Get("MissingMassSquared"); //29660 locReconHist_TrueCut1->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut5Sigma"); TH1D* locReconHist_TrueCut2 = (TH1D*)gDirectory->Get("MissingMassSquared"); //24552 locReconHist_TrueCut2->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostMassCut600MeV"); TH1D* locReconHist_TrueCut3 = (TH1D*)gDirectory->Get("MissingMassSquared"); //23913 locReconHist_TrueCut3->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostMassCut400MeV"); TH1D* locReconHist_TrueCut4 = (TH1D*)gDirectory->Get("MissingMassSquared"); //22617 locReconHist_TrueCut4->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut3Sigma"); TH1D* locReconHist_TrueCut5 = (TH1D*)gDirectory->Get("MissingMassSquared"); //21152 locReconHist_TrueCut5->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut3Sigma"); TH1D* locReconHist_TrueCut6 = (TH1D*)gDirectory->Get("MissingMassSquared"); //18967 TH1D* locReconHist_TrueCut6_Clone = (TH1D*)locReconHist_TrueCut6->Clone("MissingMassSquared_Clone"); locReconHist_TrueCut6->Rebin(locRebinAmount); //NonKinFit Recons locFile->cd(); gDirectory->cd("n3pi_skim_recon"); //first column is combos, second is events //all events: 4949901 // gDirectory->cd("Hist_MissingMassSquared"); // TH1D* locReconHist_All = (TH1D*)gDirectory->Get("MissingMassSquared"); //71265960 gDirectory->cd("Hist_MissingMassSquared_PostMassCut800MeV"); TH1D* locReconHist_All = (TH1D*)gDirectory->Get("MissingMassSquared"); //14833670 //2594738 gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut5Sigma"); TH1D* locReconHist_Cut1 = (TH1D*)gDirectory->Get("MissingMassSquared"); //7996696 //2306267 gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut5Sigma"); TH1D* locReconHist_Cut2 = (TH1D*)gDirectory->Get("MissingMassSquared"); //3429596 //1391962 gDirectory->cd("../Hist_MissingMassSquared_PostMassCut600MeV"); TH1D* locReconHist_Cut3 = (TH1D*)gDirectory->Get("MissingMassSquared"); //2379513 //1075463 gDirectory->cd("../Hist_MissingMassSquared_PostMassCut400MeV"); TH1D* locReconHist_Cut4 = (TH1D*)gDirectory->Get("MissingMassSquared"); //1483676 //758758 gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut3Sigma"); TH1D* locReconHist_Cut5 = (TH1D*)gDirectory->Get("MissingMassSquared"); //1065024 //627282 gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut3Sigma"); TH1D* locReconHist_Cut6 = (TH1D*)gDirectory->Get("MissingMassSquared"); //763594 //491457 //draw true's locHistColors.resize(7); locLegendNames.resize(7); locHistColors[0] = kBlack; locHistColors[1] = kGray; locHistColors[2] = kRed - 7; locHistColors[3] = kBlue - 7; locHistColors[4] = kViolet; locHistColors[5] = kTeal; locHistColors[6] = kYellow; locLegendNames[0] = "-3.0 < Missing Mass Squared (GeV/c^{2})^{2} < 5.0 (90.0%)"; locLegendNames[1] = "Combined Tracking CL: +/- 5#sigma (86.3%)"; locLegendNames[2] = "Combined PID CL: +/- 5#sigma (71.4%)"; locLegendNames[3] = "-2.0 < Missing Mass Squared (GeV/c^{2})^{2} < 4.0 (70.0%)"; locLegendNames[4] = "-1.0 < Missing Mass Squared (GeV/c^{2})^{2} < 3.0 (65.8%)"; locLegendNames[5] = "Combined Tracking CL: +/- 3#sigma (61.6%)"; locLegendNames[6] = "Combined PID CL: +/- 3#sigma (55.2%)"; locDrawInstructions = (DecayDrawInstructions*)Make_DrawInstructions_HistSuperimpose(locHistColors, locLegendNames); locHistArray = new TObjArray(7); locHistArray->AddAt(locReconHist_AllTrue, 0); locHistArray->AddAt(locReconHist_TrueCut1, 1); locHistArray->AddAt(locReconHist_TrueCut2, 2); locHistArray->AddAt(locReconHist_TrueCut3, 3); locHistArray->AddAt(locReconHist_TrueCut4, 4); locHistArray->AddAt(locReconHist_TrueCut5, 5); locHistArray->AddAt(locReconHist_TrueCut6, 6); DrawAndSave_ddhHistSuperimposition(locHistArray, locDrawInstructions); //draw recons + last true locHistColors.resize(8); locLegendNames.resize(8); locHistColors[0] = kBlack; locHistColors[1] = kGray; locHistColors[2] = kRed - 7; locHistColors[3] = kBlue - 7; locHistColors[4] = kViolet; locHistColors[5] = kTeal; locHistColors[6] = kYellow; locHistColors[7] = kPink - 3; locLegendNames[0] = "-3.0 < Missing Mass Squared (GeV/c^{2})^{2} < 5.0 (52.4%)"; locLegendNames[1] = "Combined Tracking CL: +/- 5#sigma (46.6%)"; locLegendNames[2] = "Combined PID CL: +/- 5#sigma (28.1%)"; locLegendNames[3] = "-2.0 < Missing Mass Squared (GeV/c^{2})^{2} < 4.0 (21.7%)"; locLegendNames[4] = "-1.0 < Missing Mass Squared (GeV/c^{2})^{2} < 3.0 (15.3%)"; locLegendNames[5] = "Combined Tracking CL: +/- 3#sigma (12.7%)"; locLegendNames[6] = "Combined PID CL: +/- 3#sigma (9.93%)"; locLegendNames[7] = "True Signal"; locDrawInstructions = (DecayDrawInstructions*)Make_DrawInstructions_HistSuperimpose(locHistColors, locLegendNames); locHistArray = new TObjArray(8); locHistArray->AddAt(locReconHist_All, 0); locHistArray->AddAt(locReconHist_Cut1, 1); locHistArray->AddAt(locReconHist_Cut2, 2); locHistArray->AddAt(locReconHist_Cut3, 3); locHistArray->AddAt(locReconHist_Cut4, 4); locHistArray->AddAt(locReconHist_Cut5, 5); locHistArray->AddAt(locReconHist_Cut6, 6); locHistArray->AddAt(locReconHist_TrueCut6_Clone, 7); DrawAndSave_ddhHistSuperimposition(locHistArray, locDrawInstructions); } void DrawPlots_v5(void) { gSystem->Load("$(DECAYDRAW_PATH)/depends/MacOSXLeopard/libDecayDraw.so"); gSystem->Load("$(DECAYDRAW_PATH)/../PlotFitter/depends/MacOSXLeopard/libPlotFitter.so"); gROOT->LoadMacro("$(DECAYDRAW_PATH)/DecayDrawHistograms.C"); int locRebinAmount = 10; vector locHistColors; vector locLegendNames; DecayDrawInstructions* locDrawInstructions = NULL; TObjArray* locHistArray; TFile* locFile = new TFile("hd_root.root", "READ"); //NonKinFit Trues locFile->cd(); gDirectory->cd("n3pi_skim_true"); // gDirectory->cd("Hist_MissingMassSquared_PostCheat"); // TH1D* locReconHist_AllTrue = (TH1D*)gDirectory->Get("MissingMassSquared"); //34361 // locReconHist_AllTrue->Rebin(locRebinAmount); gDirectory->cd("Hist_MissingMassSquared_PostMassCut800MeV"); TH1D* locReconHist_AllTrue = (TH1D*)gDirectory->Get("MissingMassSquared"); //30913 locReconHist_AllTrue->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut5Sigma"); TH1D* locReconHist_TrueCut1 = (TH1D*)gDirectory->Get("MissingMassSquared"); //29660 locReconHist_TrueCut1->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut5Sigma"); TH1D* locReconHist_TrueCut2 = (TH1D*)gDirectory->Get("MissingMassSquared"); //24552 locReconHist_TrueCut2->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostKinFit"); TH1D* locReconHist_TrueCut3 = (TH1D*)gDirectory->Get("MissingMassSquared"); //23076 locReconHist_TrueCut3->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostMassCut600MeV"); TH1D* locReconHist_TrueCut4 = (TH1D*)gDirectory->Get("MissingMassSquared"); //22587 locReconHist_TrueCut4->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostMassCut400MeV"); TH1D* locReconHist_TrueCut5 = (TH1D*)gDirectory->Get("MissingMassSquared"); //21529 locReconHist_TrueCut5->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut3Sigma"); TH1D* locReconHist_TrueCut6 = (TH1D*)gDirectory->Get("MissingMassSquared"); //20311 locReconHist_TrueCut6->Rebin(locRebinAmount); gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut3Sigma"); TH1D* locReconHist_TrueCut7 = (TH1D*)gDirectory->Get("MissingMassSquared"); //18295 TH1D* locReconHist_TrueCut7_Clone = (TH1D*)locReconHist_TrueCut7->Clone("MissingMassSquared_Clone"); locReconHist_TrueCut7->Rebin(locRebinAmount); //NonKinFit Recons locFile->cd(); gDirectory->cd("n3pi_skim_recon"); //first column is combos, second is events //all events: 4949901 // gDirectory->cd("Hist_MissingMassSquared"); // TH1D* locReconHist_All = (TH1D*)gDirectory->Get("MissingMassSquared"); //71265960 gDirectory->cd("Hist_MissingMassSquared_PostMassCut800MeV"); TH1D* locReconHist_All = (TH1D*)gDirectory->Get("MissingMassSquared"); //14833670 //2594738 gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut5Sigma"); TH1D* locReconHist_Cut1 = (TH1D*)gDirectory->Get("MissingMassSquared"); //7996696 //2306267 gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut5Sigma"); TH1D* locReconHist_Cut2 = (TH1D*)gDirectory->Get("MissingMassSquared"); //3429596 //1391962 gDirectory->cd("../Hist_MissingMassSquared_PostKinFit"); TH1D* locReconHist_Cut3 = (TH1D*)gDirectory->Get("MissingMassSquared"); //1820929 //1063173 gDirectory->cd("../Hist_MissingMassSquared_PostMassCut600MeV"); TH1D* locReconHist_Cut4 = (TH1D*)gDirectory->Get("MissingMassSquared"); //1240716 //794130 gDirectory->cd("../Hist_MissingMassSquared_PostMassCut400MeV"); TH1D* locReconHist_Cut5 = (TH1D*)gDirectory->Get("MissingMassSquared"); //758674 //533719 gDirectory->cd("../Hist_MissingMassSquared_PostTrackCut3Sigma"); TH1D* locReconHist_Cut6 = (TH1D*)gDirectory->Get("MissingMassSquared"); //625854 //460930 gDirectory->cd("../Hist_MissingMassSquared_PostPIDCut3Sigma"); TH1D* locReconHist_Cut7 = (TH1D*)gDirectory->Get("MissingMassSquared"); //460757 //357460 //draw true's locHistColors.resize(8); locLegendNames.resize(8); locHistColors[0] = kBlack; locHistColors[1] = kGray; locHistColors[2] = kRed - 7; locHistColors[3] = kBlue - 7; locHistColors[4] = kViolet; locHistColors[5] = kTeal; locHistColors[6] = kYellow; locHistColors[7] = kPink - 3; locLegendNames[0] = "-3.0 < Missing Mass Squared (GeV/c^{2})^{2} < 5.0 (90.0%)"; locLegendNames[1] = "Combined Tracking CL: +/- 5#sigma (86.3%)"; locLegendNames[2] = "Combined PID CL: +/- 5#sigma (71.4%)"; locLegendNames[3] = "Vertex-P4 KinFit Converges (67.2%)"; locLegendNames[4] = "-2.0 < Missing Mass Squared (GeV/c^{2})^{2} < 4.0 (65.7%)"; locLegendNames[5] = "-1.0 < Missing Mass Squared (GeV/c^{2})^{2} < 3.0 (62.7%)"; locLegendNames[6] = "Combined Tracking CL: +/- 3#sigma (59.1%)"; locLegendNames[7] = "Combined PID CL: +/- 3#sigma (53.2%)"; locDrawInstructions = (DecayDrawInstructions*)Make_DrawInstructions_HistSuperimpose(locHistColors, locLegendNames); locHistArray = new TObjArray(8); locHistArray->AddAt(locReconHist_AllTrue, 0); locHistArray->AddAt(locReconHist_TrueCut1, 1); locHistArray->AddAt(locReconHist_TrueCut2, 2); locHistArray->AddAt(locReconHist_TrueCut3, 3); locHistArray->AddAt(locReconHist_TrueCut4, 4); locHistArray->AddAt(locReconHist_TrueCut5, 5); locHistArray->AddAt(locReconHist_TrueCut6, 6); locHistArray->AddAt(locReconHist_TrueCut7, 7); DrawAndSave_ddhHistSuperimposition(locHistArray, locDrawInstructions); //draw recons + last true locHistColors.resize(9); locLegendNames.resize(9); locHistColors[0] = kBlack; locHistColors[1] = kGray; locHistColors[2] = kRed - 7; locHistColors[3] = kBlue - 7; locHistColors[4] = kViolet; locHistColors[5] = kTeal; locHistColors[6] = kYellow; locHistColors[7] = kPink - 3; locHistColors[8] = kCyan; locLegendNames[0] = "-3.0 < Missing Mass Squared (GeV/c^{2})^{2} < 5.0 (52.4%)"; locLegendNames[1] = "Combined Tracking CL: +/- 5#sigma (46.6%)"; locLegendNames[2] = "Combined PID CL: +/- 5#sigma (28.1%)"; locLegendNames[3] = "Vertex-P4 KinFit Converges (21.5%)"; locLegendNames[4] = "-2.0 < Missing Mass Squared (GeV/c^{2})^{2} < 4.0 (16.0%)"; locLegendNames[5] = "-1.0 < Missing Mass Squared (GeV/c^{2})^{2} < 3.0 (10.8%)"; locLegendNames[6] = "Combined Tracking CL: +/- 3#sigma (9.31%)"; locLegendNames[7] = "Combined PID CL: +/- 3#sigma (7.22%)"; locLegendNames[8] = "True Signal"; locDrawInstructions = (DecayDrawInstructions*)Make_DrawInstructions_HistSuperimpose(locHistColors, locLegendNames); locHistArray = new TObjArray(9); locHistArray->AddAt(locReconHist_All, 0); locHistArray->AddAt(locReconHist_Cut1, 1); locHistArray->AddAt(locReconHist_Cut2, 2); locHistArray->AddAt(locReconHist_Cut3, 3); locHistArray->AddAt(locReconHist_Cut4, 4); locHistArray->AddAt(locReconHist_Cut5, 5); locHistArray->AddAt(locReconHist_Cut6, 6); locHistArray->AddAt(locReconHist_Cut7, 7); locHistArray->AddAt(locReconHist_TrueCut7_Clone, 8); DrawAndSave_ddhHistSuperimposition(locHistArray, locDrawInstructions); }