From 72022c7671f2e60ee6cb2850778aeb23399bc0ff Mon Sep 17 00:00:00 2001 From: Vratislav Chudoba Date: Fri, 1 Jun 2018 18:41:47 +0300 Subject: [PATCH] Scripts for hists access and saving modified. --- macros/BeCorrPRC/.rootrc | 3 ++- macros/BeCorrPRC/ES1_4560.cxx | 28 +++++++++++++-------- macros/BeCorrPRC/ES1_6075.cxx | 33 +++++++++++++++++-------- macros/BeCorrPRC/ES1_7590.cxx | 45 ++++++++++++++++++++-------------- macros/BeCorrPRC/ES1_90120.cxx | 29 +++++++++++----------- makefile | 16 ++++++------ 6 files changed, 93 insertions(+), 61 deletions(-) diff --git a/macros/BeCorrPRC/.rootrc b/macros/BeCorrPRC/.rootrc index 0d3c9af..3e22877 100644 --- a/macros/BeCorrPRC/.rootrc +++ b/macros/BeCorrPRC/.rootrc @@ -1,7 +1,8 @@ # Default histogram binnings for TTree::Draw(). #Rint.Logon: ./rootlogonThesis.C -Rint.Logon: ./rootlogon6panels.C +#Rint.Logon: ./rootlogon6panels.C +Rint.Logon: ./rootlogonPresentation.C #Rint.Logon: ./rootlogonThesis4panels.C #Rint.Logon: ./rootlogonPAC.C diff --git a/macros/BeCorrPRC/ES1_4560.cxx b/macros/BeCorrPRC/ES1_4560.cxx index 8c9f86c..82052f3 100644 --- a/macros/BeCorrPRC/ES1_4560.cxx +++ b/macros/BeCorrPRC/ES1_4560.cxx @@ -25,16 +25,16 @@ void ES1_4560() Bool_t cosThetaT[6] = {0,0,0,0,1}; Bool_t epsilonY[6] = {0,0,1,0,0}; Bool_t cosThetaY[6] = {0,0,1,0,0}; - Bool_t thetaAT[6] = {0,0,0,0,1}; + Bool_t thetaAT[6] = {0,0,1,1,0}; TString simEt[5] = {"", "f6BeIM>1.6 && f6BeIM<2.1", "", "", ""}; // TString simEt[5]; ana.SetSimCuts(simEt); - ana.SetNoBinsSpectra(10); +// ana.SetNoBinsSpectra(50); ana.SetSpectraRange(0., 10.); - ana.SetSpectra(); +// ana.SetSpectra(); // ana.SetEpsilonTintervals(epsilonT); // ana.SetEpsilonTintervals(); // ana.SetCosThetaTkIntervals(cosThetaT); @@ -43,7 +43,7 @@ void ES1_4560() // ana.SetEpsilonYintervals(); // ana.SetCosThetaYkIntervals(cosThetaY); // ana.SetCosThetaYkIntervals(); -// ana.SetThetaATintervals(thetaAT); + ana.SetThetaATintervals(thetaAT); // ana.SetThetaATintervals(); @@ -120,7 +120,9 @@ void ES1_4560() sw.Print(); sw.Continue(); - ana.SaveSpectrumHist(0, "figures/spectra1MeV.root"); +// return; + +// ana.SaveSpectrumHist(0, "figures/spectra1MeV.root"); // ana.SaveSpectrumHist(0, "figures/spectra15MeV.root"); ana.EpsilonT(); @@ -149,11 +151,17 @@ void ES1_4560() sw.Continue(); if (saveHists) { -// ana.SaveSpectrumHist(0); - ana.SaveEpsilonTHist(0, 0); - ana.SaveEpsilonTHist(1, 2); - ana.SaveEpsilonTHist(3, 5); - ana.SaveCosThetaTHist(0, 3); +// ana.SaveSpectrumHist(5); +// ana.SaveEpsilonTHist(0, 0); +// ana.SaveEpsilonTHist(1, 2); +// ana.SaveEpsilonTHist(3, 5); +// ana.SaveCosThetaTHist(0, 3); + + + for (Int_t i = 0; i < 6; i++) { + ana.SaveThetaAHist(2, i, "figures/BestFit4560.root"); + ana.SaveThetaAHist(3, i, "figures/BestFit4560.root"); + } } diff --git a/macros/BeCorrPRC/ES1_6075.cxx b/macros/BeCorrPRC/ES1_6075.cxx index 76cee46..3626093 100644 --- a/macros/BeCorrPRC/ES1_6075.cxx +++ b/macros/BeCorrPRC/ES1_6075.cxx @@ -21,16 +21,16 @@ void ES1_6075() Bool_t cosThetaT[6] = {0,0,0,0,1}; Bool_t epsilonY[6] = {0,0,0,0,1}; Bool_t cosThetaY[6] = {0,0,0,0,1}; - Bool_t thetaAT[6] = {0,0,0,0,1}; + Bool_t thetaAT[6] = {0,0,1,1,0}; TString simEt[5] = {"", "f6BeIM>1.5 && f6BeIM<2.0", "", "f6BeIM>2.4 && f6BeIM<3.1", ""}; TString inEt[5] = {"", "E_IM>1.5 && E_IM<2.0", "", "E_IM>2.4 && E_IM<3.1", ""}; ana.SetSimCuts(simEt); ana.SetInputCuts(inEt); - ana.SetNoBinsSpectra(10); +// ana.SetNoBinsSpectra(50); ana.SetSpectraRange(0., 10.); - ana.SetSpectra(); +// ana.SetSpectra(); // ana.SetEpsilonTintervals(epsilonT); // ana.SetEpsilonTintervals(); // ana.SetCosThetaTkIntervals(cosThetaT); @@ -39,7 +39,7 @@ void ES1_6075() // ana.SetEpsilonYintervals(); // ana.SetCosThetaYkIntervals(cosThetaY); // ana.SetCosThetaYkIntervals(); -// ana.SetThetaATintervals(thetaAT); + ana.SetThetaATintervals(thetaAT); // ana.SetThetaATintervals(); // ana.SetNoBinsSpectra(200); @@ -52,7 +52,9 @@ void ES1_6075() const Long64_t sMaxEvents = 3000000; // Long64_t sEvents[6] = {sMaxEvents, 2700000, sMaxEvents, 2700000, 2690000, 2710000}; - Long64_t sEvents[6] = {sMaxEvents, sMaxEvents, sMaxEvents, sMaxEvents, sMaxEvents, sMaxEvents}; + //used for PRC: + Long64_t sEvents[6] = {sMaxEvents, 2600000, sMaxEvents, 2600000, 2690000, 2600000}; +// Long64_t sEvents[6] = {sMaxEvents, sMaxEvents, sMaxEvents, sMaxEvents, sMaxEvents, sMaxEvents}; ana.SetNoSimEvents(sEvents); Int_t lowSimFile[6] = {0, 0, 0, 0, 0, 0}; @@ -109,8 +111,9 @@ void ES1_6075() ana.Spectra(); sw.Print(); sw.Continue(); +// ana.SaveSpectrumHist(0, "figures/spectraDiff.root"); - ana.SaveSpectrumHist(0, "figures/spectra1MeV.root"); +// ana.SaveSpectrumHist(0, "figures/spectra1MeV.root"); // ana.SaveSpectrumHist(0, "figures/spectra15MeV.root"); ana.EpsilonT(); @@ -139,10 +142,20 @@ void ES1_6075() sw.Continue(); if (saveHists) { - ana.SaveSpectrumHist(0); - ana.SaveEpsilonTHist(0, 5); - ana.SaveEpsilonTHist(1, 2); - ana.SaveEpsilonTHist(3, 5); +// ana.SaveSpectrumHist(2); +// ana.SaveEpsilonTHist(0, 5); +// ana.SaveEpsilonTHist(1, 2); +// ana.SaveEpsilonTHist(3, 5); + + for (Int_t i = 0; i < 6; i++) { +// ana.SaveEpsilonTHist(1, i); +// ana.SaveEpsilonTHist(3, i); + + ana.SaveThetaAHist(2, i, "figures/BestFit6075.root"); + ana.SaveThetaAHist(3, i, "figures/BestFit6075.root"); + } + + } Info("ES1_6075.cxx", "Finished."); diff --git a/macros/BeCorrPRC/ES1_7590.cxx b/macros/BeCorrPRC/ES1_7590.cxx index 640f50c..1479aae 100644 --- a/macros/BeCorrPRC/ES1_7590.cxx +++ b/macros/BeCorrPRC/ES1_7590.cxx @@ -15,18 +15,18 @@ void ES1_7590() // ana.SetChainsToDraw(0, 0, 0, 0, 1, 1); ana.SetChainsToDraw(); - Bool_t epsilonT[6] = {0,0,0,0,1}; - Bool_t cosThetaT[6] = {0,0,0,0,1}; + Bool_t epsilonT[6] = {0,0,1,0,1}; + Bool_t cosThetaT[6] = {1,1,1,1,1}; Bool_t epsilonY[6] = {0,0,0,0,0}; Bool_t cosThetaY[6] = {0,0,0,0,0}; - Bool_t thetaAT[6] = {0,0,0,0,1}; + Bool_t thetaAT[6] = {0,0,1,0,0}; TString simEt[5] = {"", "f6BeIM>1.5 && f6BeIM<2.0", "", "", ""}; ana.SetSimCuts(simEt); - ana.SetNoBinsSpectra(10); +// ana.SetNoBinsSpectra(50); ana.SetSpectraRange(0., 10.); - ana.SetSpectra(); +// ana.SetSpectra(); // ana.SetEpsilonTintervals(epsilonT); // ana.SetEpsilonTintervals(); // ana.SetCosThetaTkIntervals(cosThetaT); @@ -35,7 +35,7 @@ void ES1_7590() // ana.SetEpsilonYintervals(); // ana.SetCosThetaYkIntervals(cosThetaY); // ana.SetCosThetaYkIntervals(); -// ana.SetThetaATintervals(thetaAT); + ana.SetThetaATintervals(thetaAT); // ana.SetThetaATintervals(); ana.SetExpChain("../../../be/rootdata/correlations/v5_exp/Be.", 0, 40); @@ -107,7 +107,7 @@ void ES1_7590() sw.Print(); sw.Continue(); - ana.SaveSpectrumHist(0, "figures/spectra1MeV.root"); +// ana.SaveSpectrumHist(0, "figures/spectra1MeV.root"); // ana.SaveSpectrumHist(0, "figures/spectra15MeV.root"); ana.EpsilonT(); @@ -130,19 +130,28 @@ void ES1_7590() sw.Print(); sw.Continue(); - if (saveHists) { - ana.SaveSpectrumHist(0); - ana.SaveEpsilonTHist(0, 5); - ana.SaveCosThetaTHist(0, 0); - ana.SaveEpsilonYHist(0, 0); - + for (Int_t i = 0; i < 6; i++) { +// ana.SaveEpsilonTHist(1, i); +// ana.SaveEpsilonTHist(3, i); +// +// ana.SaveThetaAHist(1, i); +// ana.SaveThetaAHist(4, i, "figures/PRCthetaARightES.root"); + } + if (saveHists) { +// ana.SaveSpectrumHist(2); +// ana.SaveEpsilonTHist(0, 5); +// ana.SaveCosThetaTHist(0, 0); +// ana.SaveEpsilonYHist(0, 0); +// +// for (Int_t i = 0; i < 6; i++) { - ana.SaveEpsilonTHist(1, i); - ana.SaveEpsilonTHist(3, i); - - ana.SaveThetaAHist(1, i); - ana.SaveThetaAHist(3, i); +// ana.SaveEpsilonTHist(1, i); +// ana.SaveEpsilonTHist(3, i); +// +// ana.SaveThetaAHist(1, i); + ana.SaveThetaAHist(2, i, "figures/BestFit7590.root"); +// ana.SaveThetaAHist(3, i); } } diff --git a/macros/BeCorrPRC/ES1_90120.cxx b/macros/BeCorrPRC/ES1_90120.cxx index fe9eb4a..ff90096 100644 --- a/macros/BeCorrPRC/ES1_90120.cxx +++ b/macros/BeCorrPRC/ES1_90120.cxx @@ -1,8 +1,8 @@ void ES1_90120() { -// const Bool_t saveHists = 0; const Bool_t saveHists = 0; +// const Bool_t saveHists = 1; TStopwatch sw; sw.Start(); @@ -20,14 +20,14 @@ void ES1_90120() Bool_t cosThetaT[6] = {0,0,0,0,1}; Bool_t epsilonY[6] = {0,0,1,0,0}; Bool_t cosThetaY[6] = {0,0,1,0,0}; - Bool_t thetaAT[6] = {0,0,0,0,1}; + Bool_t thetaAT[6] = {0,0,1,0,0}; TString simEt[5] = {"", "f6BeIM>1.40 && f6BeIM<1.95", "", "", ""}; ana.SetSimCuts(simEt); - ana.SetNoBinsSpectra(10); +// ana.SetNoBinsSpectra(50); ana.SetSpectraRange(0., 10.); - ana.SetSpectra(); +// ana.SetSpectra(); // ana.SetEpsilonTintervals(epsilonT); // ana.SetEpsilonTintervals(); // ana.SetCosThetaTkIntervals(cosThetaT); @@ -36,7 +36,7 @@ void ES1_90120() // ana.SetEpsilonYintervals(); // ana.SetCosThetaYkIntervals(cosThetaY); // ana.SetCosThetaYkIntervals(); -// ana.SetThetaATintervals(thetaAT); + ana.SetThetaATintervals(thetaAT); // ana.SetThetaATintervals(); @@ -47,8 +47,8 @@ void ES1_90120() ana.SetNoExpEvents(eEvents); const Long64_t sMaxEvents = 3000000; -// Long64_t sEvents[6] = {2280000, 2290000, 2100000, 2300000, 2330000, 2300000}; - Long64_t sEvents[6] = {2200000, 2200000, 2200000, 2200000, 2200000, 2200000}; + Long64_t sEvents[6] = {2280000, 2290000, 2100000, 2300000, 2330000, 2300000}; +// Long64_t sEvents[6] = {2200000, 2200000, 2200000, 2200000, 2200000, 2200000}; ana.SetNoSimEvents(sEvents); Int_t lowSimFile[6] = {0, 0, 0, 0, 0, 0}; @@ -105,7 +105,7 @@ void ES1_90120() sw.Print(); sw.Continue(); - ana.SaveSpectrumHist(0, "figures/spectra1MeV.root"); +// ana.SaveSpectrumHist(0, "figures/spectra1MeV.root"); // ana.SaveSpectrumHist(0, "figures/spectra15MeV.root"); ana.EpsilonT(); @@ -129,13 +129,14 @@ void ES1_90120() sw.Continue(); if (saveHists) { - ana.SaveSpectrumHist(0); - ana.SaveEpsilonTHist(0, 0); - ana.SaveEpsilonTHist(1, 2); - ana.SaveEpsilonTHist(3, 5); - +// ana.SaveSpectrumHist(1); +// ana.SaveEpsilonTHist(0, 0); +// ana.SaveEpsilonTHist(1, 2); +// ana.SaveEpsilonTHist(3, 5); +// for (Int_t i = 0; i < 6; i++) { - ana.SaveThetaAHist(3, i); +// ana.SaveThetaAHist(3, i); + ana.SaveThetaAHist(2, i, "figures/BestFit90120.root"); } } diff --git a/makefile b/makefile index 2defa3e..c926c1a 100755 --- a/makefile +++ b/makefile @@ -65,20 +65,20 @@ install: clean: -$(RM) $(ACULDATAOBJS) $(ACULDATACPP_DEPS) - -$(RM) $(ACULDATA)/AculDataCint.* libAculData.so + -$(RM) $(ACULDATA)/AculDataCint.* libAculData.so $(ACULDATA)/*.pcm -@echo ' ' -$(RM) $(TELOSSOBJS) $(TELOSSCPP_DEPS) - -$(RM) $(TELOSS)/TELossCint.* libTELoss.so + -$(RM) $(TELOSS)/TELossCint.* libTELoss.so $(TELOSS)/*.pcm -@echo ' ' -$(RM) $(DETECTORSOBJS) $(DETECTORSCPP_DEPS) - -$(RM) $(DETECTORS)/DetectorsCint.* libDetectors.so + -$(RM) $(DETECTORS)/DetectorsCint.* libDetectors.so $(DETECTORS)/*.pcm -@echo ' ' -$(RM) $(BEOBJS) $(BECPP_DEPS) - -$(RM) $(BE)/BeCint.* libBe.so - -@echo ' ' - -$(RM) $(THREADSOBJS) - -$(RM) $(THREADS)/ThreadsCint.* libThreads.so - -@echo ' ' + -$(RM) $(BE)/BeCint.* libBe.so $(BE)/*.pcm +# -@echo ' ' +# -$(RM) $(THREADSOBJS) +# -$(RM) $(THREADS)/ThreadsCint.* libThreads.so $(THREADS)/*.pcm +# -@echo ' ' -$(RM) htmldoc -@echo ' ' -- 2.18.1