Commit 6e43819f authored by Vratislav Chudoba's avatar Vratislav Chudoba

SpectraDiff: binning changed

parent 5e1fe07e
...@@ -23,6 +23,7 @@ BeAnalysis::BeAnalysis() : che(0), lowExpFile(0), upExpFile(0), spectra(0) { ...@@ -23,6 +23,7 @@ BeAnalysis::BeAnalysis() : che(0), lowExpFile(0), upExpFile(0), spectra(0) {
SetChainsToDraw(); SetChainsToDraw();
SetNoBinsSpectra(); SetNoBinsSpectra();
SetSpectraRange();
SetNoBinsCorrelations(); SetNoBinsCorrelations();
SetNoBinsThetaA(); SetNoBinsThetaA();
...@@ -257,9 +258,9 @@ void BeAnalysis::InitHistos() { ...@@ -257,9 +258,9 @@ void BeAnalysis::InitHistos() {
} }
void BeAnalysis::SaveSpectrumHist(Int_t chain) { void BeAnalysis::SaveSpectrumHist(Int_t chain, TString outfilename) {
TFile fw("figures/spectra.root", "UPDATE"); TFile fw(outfilename.Data(), "UPDATE");
TString hName; TString hName;
...@@ -267,13 +268,13 @@ void BeAnalysis::SaveSpectrumHist(Int_t chain) { ...@@ -267,13 +268,13 @@ void BeAnalysis::SaveSpectrumHist(Int_t chain) {
hName.Form("heSpectrum%d%d", kMinAngle, kMaxAngle); hName.Form("heSpectrum%d%d", kMinAngle, kMaxAngle);
heSpectra[chain]->SetName(hName.Data()); heSpectra[chain]->SetName(hName.Data());
heSpectra[chain]->Write(); heSpectra[chain]->Write();
Info("BeAnalysis::SaveSpectrumHist", "Histogram saved."); Info("BeAnalysis::SaveSpectrumHist", "Histogram (exp) saved.");
} }
if (hsSpectra[chain] != 0) { if (hsSpectra[chain] != 0) {
hName.Form("hsSpectrum%d%d", kMinAngle, kMaxAngle); hName.Form("hsSpectrum%d%d", kMinAngle, kMaxAngle);
hsSpectra[chain]->SetName(hName.Data()); hsSpectra[chain]->SetName(hName.Data());
hsSpectra[chain]->Write(); hsSpectra[chain]->Write();
Info("BeAnalysis::SaveSpectrumHist", "Histogram saved."); Info("BeAnalysis::SaveSpectrumHist", "Histogram (sim) saved.");
} }
fw.Close(); fw.Close();
...@@ -434,14 +435,14 @@ void BeAnalysis::Spectra() { ...@@ -434,14 +435,14 @@ void BeAnalysis::Spectra() {
// chs[j]->SetLineColor(kBlue); // chs[j]->SetLineColor(kBlue);
// chs[j]->SetFillColor(kWhite); // chs[j]->SetFillColor(kWhite);
hsName.Form("hsSpectra%d", j); hsName.Form("hsSpectra%d", j);
hsSpectra[j] = new TH1F(hsName.Data(), cAngles.GetTitle(), noBinsSpectra, 0, 10); hsSpectra[j] = new TH1F(hsName.Data(), cAngles.GetTitle(), noBinsSpectra, minSpectraEnergy, maxSpectraEnergy);
// drawCommand.Form("f6BeIM>>%s(200,0,10)", hsName.Data()); // drawCommand.Form("f6BeIM>>%s(200,0,10)", hsName.Data());
drawCommand.Form("f6BeIM>>%s", hsName.Data()); drawCommand.Form("f6BeIM>>%s", hsName.Data());
// chs[j]->Draw(drawCommand.Data(), cQ && crBeWork && crAngles && sRatio[j], "", sEvents[j]); // chs[j]->Draw(drawCommand.Data(), cQ && crBeWork && crAngles && sRatio[j], "", sEvents[j]);
chs[j]->Draw(drawCommand.Data(), cProtons && cQ && crBeWork && crAngles && sRatio[j], "", sEvents[j]); chs[j]->Draw(drawCommand.Data(), cProtons && cQ && crBeWork && crAngles && sRatio[j], "", sEvents[j]);
// hsSpectra[j] = (TH1F*)gPad->FindObject(hsName.Data()); // hsSpectra[j] = (TH1F*)gPad->FindObject(hsName.Data());
heName.Form("heSpectra%d", j); heName.Form("heSpectra%d", j);
heSpectra[j] = new TH1F(heName.Data(), cAngles.GetTitle(), noBinsSpectra, 0, 10); heSpectra[j] = new TH1F(heName.Data(), cAngles.GetTitle(), noBinsSpectra, minSpectraEnergy, maxSpectraEnergy);
// drawCommand.Form("fBeIM>>%s(200,0,10)", heName.Data()); // drawCommand.Form("fBeIM>>%s(200,0,10)", heName.Data());
drawCommand.Form("fBeIM>>%s", heName.Data()); drawCommand.Form("fBeIM>>%s", heName.Data());
// che->Draw(drawCommand.Data(), cQ && cBeWork && cAngles, "same", eEvents[j]); // che->Draw(drawCommand.Data(), cQ && cBeWork && cAngles, "same", eEvents[j]);
...@@ -488,7 +489,7 @@ void BeAnalysis::Spectra() { ...@@ -488,7 +489,7 @@ void BeAnalysis::Spectra() {
cSpectra->Update(); cSpectra->Update();
Int_t intLowLimit, IntHighLimit; Int_t intLowLimit, IntHighLimit;
const Double_t binToMeV = 10./(Double_t)noBinsSpectra; const Double_t binToMeV = (maxSpectraEnergy - minSpectraEnergy)/(Double_t)noBinsSpectra;
Info("statesRatioFitting", "MC %d", j+1); Info("statesRatioFitting", "MC %d", j+1);
intLowLimit = (Int_t)0./binToMeV; intLowLimit = (Int_t)0./binToMeV;
......
...@@ -39,6 +39,8 @@ public: ...@@ -39,6 +39,8 @@ public:
void OpenExpChain(); void OpenExpChain();
void SetNoBinsSpectra(Int_t noBins = 100) {noBinsSpectra = noBins;}; void SetNoBinsSpectra(Int_t noBins = 100) {noBinsSpectra = noBins;};
void SetSpectraRange(Double_t minEnergy = 0., Double_t maxEnergy = 10.)
{minSpectraEnergy = minEnergy; maxSpectraEnergy = maxEnergy;};
void SetNoBinsCorrelations(Int_t noBins = 30) {noBinsCorr = noBins;}; void SetNoBinsCorrelations(Int_t noBins = 30) {noBinsCorr = noBins;};
void SetNoBinsThetaA(Int_t noBins = 30) {noBinsThetaA = noBins;}; void SetNoBinsThetaA(Int_t noBins = 30) {noBinsThetaA = noBins;};
...@@ -79,7 +81,7 @@ public: ...@@ -79,7 +81,7 @@ public:
void SetFigures(TString figPath = "figures/", TString figFormat = ".eps", Bool_t kSave = 1); void SetFigures(TString figPath = "figures/", TString figFormat = ".eps", Bool_t kSave = 1);
void SaveSpectrumHist(Int_t chain); void SaveSpectrumHist(Int_t chain, TString outfilename = "figures/spectra.root");
void SaveEpsilonTHist(Int_t interval, Int_t chain, TString outfilename = "figures/epsilonT.root"); void SaveEpsilonTHist(Int_t interval, Int_t chain, TString outfilename = "figures/epsilonT.root");
void SaveCosThetaTHist(Int_t interval, Int_t chain); void SaveCosThetaTHist(Int_t interval, Int_t chain);
...@@ -105,6 +107,8 @@ private: ...@@ -105,6 +107,8 @@ private:
Int_t upSimFile[6]; Int_t upSimFile[6];
Int_t noBinsSpectra; Int_t noBinsSpectra;
Double_t minSpectraEnergy;
Double_t maxSpectraEnergy;
Int_t noBinsCorr; Int_t noBinsCorr;
Int_t noBinsThetaA; Int_t noBinsThetaA;
......
...@@ -21,20 +21,21 @@ void ES1_4560() ...@@ -21,20 +21,21 @@ void ES1_4560()
// ana.SetChainsToDraw(0, 0, 0, 0, 1, 1); // ana.SetChainsToDraw(0, 0, 0, 0, 1, 1);
ana.SetChainsToDraw(); ana.SetChainsToDraw();
Bool_t epsilonT[6] = {0,1,0,0,0}; Bool_t epsilonT[6] = {0,0,0,0,1};
Bool_t cosThetaT[6] = {1,0,0,0,0}; Bool_t cosThetaT[6] = {0,0,0,0,1};
Bool_t epsilonY[6] = {0,0,1,0,0}; Bool_t epsilonY[6] = {0,0,1,0,0};
Bool_t cosThetaY[6] = {0,0,1,0,0}; Bool_t cosThetaY[6] = {0,0,1,0,0};
Bool_t thetaAT[6] = {0,1,0,0,0}; Bool_t thetaAT[6] = {0,0,0,0,1};
TString simEt[5] = {"", "f6BeIM>1.6 && f6BeIM<2.1", "", "", ""}; TString simEt[5] = {"", "f6BeIM>1.6 && f6BeIM<2.1", "", "", ""};
// TString simEt[5]; // TString simEt[5];
ana.SetSimCuts(simEt); ana.SetSimCuts(simEt);
// ana.SetNoBinsSpectra(200);
// ana.SetSpectra(); ana.SetNoBinsSpectra(10);
ana.SetEpsilonTintervals(epsilonT); ana.SetSpectraRange(0., 10.);
ana.SetSpectra();
// ana.SetEpsilonTintervals(epsilonT);
// ana.SetEpsilonTintervals(); // ana.SetEpsilonTintervals();
// ana.SetCosThetaTkIntervals(cosThetaT); // ana.SetCosThetaTkIntervals(cosThetaT);
// ana.SetCosThetaTkIntervals(); // ana.SetCosThetaTkIntervals();
...@@ -116,6 +117,11 @@ void ES1_4560() ...@@ -116,6 +117,11 @@ void ES1_4560()
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
ana.Spectra(); ana.Spectra();
sw.Print();
sw.Continue();
ana.SaveSpectrumHist(0, "figures/spectra1MeV.root");
// ana.SaveSpectrumHist(0, "figures/spectra15MeV.root");
ana.EpsilonT(); ana.EpsilonT();
...@@ -145,6 +151,8 @@ void ES1_4560() ...@@ -145,6 +151,8 @@ void ES1_4560()
if (saveHists) { if (saveHists) {
// ana.SaveSpectrumHist(0); // ana.SaveSpectrumHist(0);
ana.SaveEpsilonTHist(0, 0); ana.SaveEpsilonTHist(0, 0);
ana.SaveEpsilonTHist(1, 2);
ana.SaveEpsilonTHist(3, 5);
ana.SaveCosThetaTHist(0, 3); ana.SaveCosThetaTHist(0, 3);
} }
......
...@@ -17,30 +17,32 @@ void ES1_6075() ...@@ -17,30 +17,32 @@ void ES1_6075()
ana.SetChainsToDraw(); ana.SetChainsToDraw();
Bool_t epsilonT[6] = {0,0,0,1,0}; Bool_t epsilonT[6] = {0,0,0,0,1};
Bool_t cosThetaT[6] = {1,0,0,0,0}; Bool_t cosThetaT[6] = {0,0,0,0,1};
Bool_t epsilonY[6] = {1,0,0,0,0}; Bool_t epsilonY[6] = {0,0,0,0,1};
Bool_t cosThetaY[6] = {0,0,1,0,0}; Bool_t cosThetaY[6] = {0,0,0,0,1};
Bool_t thetaAT[6] = {0,0,1,0,0}; Bool_t thetaAT[6] = {0,0,0,0,1};
TString simEt[5] = {"", "f6BeIM>1.5 && f6BeIM<2.0", "", "f6BeIM>2.4 && f6BeIM<3.1", ""}; 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", ""}; TString inEt[5] = {"", "E_IM>1.5 && E_IM<2.0", "", "E_IM>2.4 && E_IM<3.1", ""};
ana.SetSimCuts(simEt); ana.SetSimCuts(simEt);
ana.SetInputCuts(inEt); ana.SetInputCuts(inEt);
// ana.SetSpectra(); ana.SetNoBinsSpectra(10);
ana.SetEpsilonTintervals(epsilonT); ana.SetSpectraRange(0., 10.);
ana.SetSpectra();
// ana.SetEpsilonTintervals(epsilonT);
// ana.SetEpsilonTintervals(); // ana.SetEpsilonTintervals();
// ana.SetCosThetaTkIntervals(cosThetaT); // ana.SetCosThetaTkIntervals(cosThetaT);
// ana.SetCosThetaTkIntervals(); // ana.SetCosThetaTkIntervals();
// ana.SetEpsilonYintervals(epsilonY); // ana.SetEpsilonYintervals(epsilonY);
// ana.SetEpsilonYintervals(); // ana.SetEpsilonYintervals();
//// ana.SetCosThetaYkIntervals(cosThetaY); // ana.SetCosThetaYkIntervals(cosThetaY);
// ana.SetCosThetaYkIntervals(); // ana.SetCosThetaYkIntervals();
// ana.SetThetaATintervals(thetaAT); // ana.SetThetaATintervals(thetaAT);
// ana.SetThetaATintervals(); // ana.SetThetaATintervals();
ana.SetNoBinsSpectra(200); // ana.SetNoBinsSpectra(200);
ana.SetExpChain("../../../be/rootdata/correlations/v5_exp/Be.", 0, 40); ana.SetExpChain("../../../be/rootdata/correlations/v5_exp/Be.", 0, 40);
...@@ -105,6 +107,11 @@ void ES1_6075() ...@@ -105,6 +107,11 @@ void ES1_6075()
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
ana.Spectra(); ana.Spectra();
sw.Print();
sw.Continue();
ana.SaveSpectrumHist(0, "figures/spectra1MeV.root");
// ana.SaveSpectrumHist(0, "figures/spectra15MeV.root");
ana.EpsilonT(); ana.EpsilonT();
...@@ -135,6 +142,7 @@ void ES1_6075() ...@@ -135,6 +142,7 @@ void ES1_6075()
ana.SaveSpectrumHist(0); ana.SaveSpectrumHist(0);
ana.SaveEpsilonTHist(0, 5); ana.SaveEpsilonTHist(0, 5);
ana.SaveEpsilonTHist(1, 2); ana.SaveEpsilonTHist(1, 2);
ana.SaveEpsilonTHist(3, 5);
} }
Info("ES1_6075.cxx", "Finished."); Info("ES1_6075.cxx", "Finished.");
......
...@@ -15,17 +15,19 @@ void ES1_7590() ...@@ -15,17 +15,19 @@ void ES1_7590()
// ana.SetChainsToDraw(0, 0, 0, 0, 1, 1); // ana.SetChainsToDraw(0, 0, 0, 0, 1, 1);
ana.SetChainsToDraw(); ana.SetChainsToDraw();
Bool_t epsilonT[6] = {0,1,0,0,0}; Bool_t epsilonT[6] = {0,0,0,0,1};
Bool_t cosThetaT[6] = {1,0,0,0,0}; Bool_t cosThetaT[6] = {0,0,0,0,1};
Bool_t epsilonY[6] = {1,0,0,0,0}; Bool_t epsilonY[6] = {0,0,0,0,0};
Bool_t cosThetaY[6] = {0,0,1,0,0}; Bool_t cosThetaY[6] = {0,0,0,0,0};
Bool_t thetaAT[6] = {0,0,1,0,0}; Bool_t thetaAT[6] = {0,0,0,0,1};
TString simEt[5] = {"", "f6BeIM>1.5 && f6BeIM<2.0", "", "", ""}; TString simEt[5] = {"", "f6BeIM>1.5 && f6BeIM<2.0", "", "", ""};
ana.SetSimCuts(simEt); ana.SetSimCuts(simEt);
// ana.SetSpectra(); ana.SetNoBinsSpectra(10);
ana.SetEpsilonTintervals(epsilonT); ana.SetSpectraRange(0., 10.);
ana.SetSpectra();
// ana.SetEpsilonTintervals(epsilonT);
// ana.SetEpsilonTintervals(); // ana.SetEpsilonTintervals();
// ana.SetCosThetaTkIntervals(cosThetaT); // ana.SetCosThetaTkIntervals(cosThetaT);
// ana.SetCosThetaTkIntervals(); // ana.SetCosThetaTkIntervals();
...@@ -89,10 +91,11 @@ void ES1_7590() ...@@ -89,10 +91,11 @@ void ES1_7590()
const Long64_t sMaxEvents = 3000000; const Long64_t sMaxEvents = 3000000;
Long64_t sEventsECuts[5][6] = {2020000, 2040000, 2130000, 2080000, 2060000, 2080000, Long64_t sEventsECuts[5][6] = {2020000, 2040000, 2130000, 2080000, 2060000, 2080000,
// 2000000, 2020000, 2000000, 2010000, 1990000, 1970000, 2220000, 2240000, 2240000, 2280000, 2210000, 2210000,
2300000, 2300000, 2300000, 2300000, 2300000, 2300000, // 2300000, 2300000, 2300000, 2300000, 2300000, 2300000,
2320000, 2300000, 2340000, 2310000, 2300000, 2290000, 2320000, 2300000, 2340000, 2310000, 2300000, 2290000,
2060000, 2070000, 2110000, 2110000, 2070000, 2060000, // 2060000, 2070000, 2110000, 2110000, 2070000, 2060000,
2050000, 2050000, 2050000, 2050000, 2050000, 2050000,
2050000, 2050000, 2110000, 2110000, 2050000, 2050000}; 2050000, 2050000, 2110000, 2110000, 2050000, 2050000};
ana.SimEventsECuts(sEventsECuts); ana.SimEventsECuts(sEventsECuts);
...@@ -104,6 +107,9 @@ void ES1_7590() ...@@ -104,6 +107,9 @@ void ES1_7590()
sw.Print(); sw.Print();
sw.Continue(); sw.Continue();
ana.SaveSpectrumHist(0, "figures/spectra1MeV.root");
// ana.SaveSpectrumHist(0, "figures/spectra15MeV.root");
ana.EpsilonT(); ana.EpsilonT();
sw.Print(); sw.Print();
sw.Continue(); sw.Continue();
...@@ -129,6 +135,16 @@ void ES1_7590() ...@@ -129,6 +135,16 @@ void ES1_7590()
ana.SaveEpsilonTHist(0, 5); ana.SaveEpsilonTHist(0, 5);
ana.SaveCosThetaTHist(0, 0); ana.SaveCosThetaTHist(0, 0);
ana.SaveEpsilonYHist(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);
}
} }
Info("ES1_7590.cxx", "Finished."); Info("ES1_7590.cxx", "Finished.");
......
...@@ -15,17 +15,20 @@ void ES1_90120() ...@@ -15,17 +15,20 @@ void ES1_90120()
// ana.SetChainsToDraw(0, 0, 0, 0, 1, 1); // ana.SetChainsToDraw(0, 0, 0, 0, 1, 1);
ana.SetChainsToDraw(); ana.SetChainsToDraw();
Bool_t epsilonT[6] = {0,1,0,0,0}; // Bool_t epsilonT[6] = {1,1,0,1,0};
Bool_t cosThetaT[6] = {0,0,1,0,0}; Bool_t epsilonT[6] = {0,0,0,0,1};
Bool_t cosThetaT[6] = {0,0,0,0,1};
Bool_t epsilonY[6] = {0,0,1,0,0}; Bool_t epsilonY[6] = {0,0,1,0,0};
Bool_t cosThetaY[6] = {0,0,1,0,0}; Bool_t cosThetaY[6] = {0,0,1,0,0};
Bool_t thetaAT[6] = {0,0,1,0,0}; Bool_t thetaAT[6] = {0,0,0,0,1};
TString simEt[5] = {"", "f6BeIM>1.40 && f6BeIM<1.95", "", "", ""}; TString simEt[5] = {"", "f6BeIM>1.40 && f6BeIM<1.95", "", "", ""};
ana.SetSimCuts(simEt); ana.SetSimCuts(simEt);
// ana.SetSpectra(); ana.SetNoBinsSpectra(10);
ana.SetEpsilonTintervals(epsilonT); ana.SetSpectraRange(0., 10.);
ana.SetSpectra();
// ana.SetEpsilonTintervals(epsilonT);
// ana.SetEpsilonTintervals(); // ana.SetEpsilonTintervals();
// ana.SetCosThetaTkIntervals(cosThetaT); // ana.SetCosThetaTkIntervals(cosThetaT);
// ana.SetCosThetaTkIntervals(); // ana.SetCosThetaTkIntervals();
...@@ -89,7 +92,8 @@ void ES1_90120() ...@@ -89,7 +92,8 @@ void ES1_90120()
// 2260000, 2270000, 2010000, 2280000, 2280000, 2280000, // 2260000, 2270000, 2010000, 2280000, 2280000, 2280000,
2280000, 2280000, 2280000, 2280000, 2280000, 2280000, 2280000, 2280000, 2280000, 2280000, 2280000, 2280000,
sMaxEvents, sMaxEvents, 2290000, sMaxEvents, sMaxEvents, sMaxEvents, sMaxEvents, sMaxEvents, 2290000, sMaxEvents, sMaxEvents, sMaxEvents,
3270000, sMaxEvents, sMaxEvents, sMaxEvents, sMaxEvents, sMaxEvents, // 3270000, sMaxEvents, sMaxEvents, sMaxEvents, sMaxEvents, sMaxEvents,
2260000, 2260000, 2260000, 2260000, 2260000, 2260000,
2320000, 2330000, 2100000, 2340000, 2370000, 2340000}; 2320000, 2330000, 2100000, 2340000, 2370000, 2340000};
ana.SimEventsECuts(sEventsECuts); ana.SimEventsECuts(sEventsECuts);
...@@ -101,6 +105,9 @@ void ES1_90120() ...@@ -101,6 +105,9 @@ void ES1_90120()
sw.Print(); sw.Print();
sw.Continue(); sw.Continue();
ana.SaveSpectrumHist(0, "figures/spectra1MeV.root");
// ana.SaveSpectrumHist(0, "figures/spectra15MeV.root");
ana.EpsilonT(); ana.EpsilonT();
sw.Print(); sw.Print();
sw.Continue(); sw.Continue();
...@@ -124,6 +131,12 @@ void ES1_90120() ...@@ -124,6 +131,12 @@ void ES1_90120()
if (saveHists) { if (saveHists) {
ana.SaveSpectrumHist(0); ana.SaveSpectrumHist(0);
ana.SaveEpsilonTHist(0, 0); ana.SaveEpsilonTHist(0, 0);
ana.SaveEpsilonTHist(1, 2);
ana.SaveEpsilonTHist(3, 5);
for (Int_t i = 0; i < 6; i++) {
ana.SaveThetaAHist(3, i);
}
} }
Info("ES1_90120.cxx", "Finished."); Info("ES1_90120.cxx", "Finished.");
......
//#include "TFile.h"
//#include "TCanvas.h"
//#include "TH1F.h"
void figSpectraDiff()
{
// TFile *fr = new TFile("figures/PRCspectra15MeV.root", "READ");
TFile *fr = new TFile("figures/PRCspectra1MeV.root", "READ");
// fr->ls();
TH1F *hExp[4];
TH1F *hSim[4];
TH1F *hCurr = 0;
TString heName;
TString hsName;
hCurr = (TH1F*)fr->Get("heSpectrum4560");
hExp[0] = new TH1F(*hCurr);
hCurr = (TH1F*)fr->Get("heSpectrum6075");
hExp[1] = new TH1F(*hCurr);
hCurr = (TH1F*)fr->Get("heSpectrum7590");
hExp[2] = new TH1F(*hCurr);
hCurr = (TH1F*)fr->Get("heSpectrum90120");
hExp[3] = new TH1F(*hCurr);
hCurr = (TH1F*)fr->Get("hsSpectrum4560");
hSim[0] = new TH1F(*hCurr);
hCurr = (TH1F*)fr->Get("hsSpectrum6075");
hSim[1] = new TH1F(*hCurr);
hCurr = (TH1F*)fr->Get("hsSpectrum7590");
hSim[2] = new TH1F(*hCurr);
hCurr = (TH1F*)fr->Get("hsSpectrum90120");
hSim[3] = new TH1F(*hCurr);
/*TCanvas *c1 = new TCanvas();
c1->ToggleEditor();
// c1->SetWindowSize(800, 1200);
c1->SetWindowSize(800, 800);
c1->Divide(2, 2, .001, .001);
for (Int_t i = 0; i < 4; i++) {
c1->cd(i+1);
hExp[i]->SetTitle("");
hSim[i]->SetTitle("");
hSim[i]->Draw("");
hExp[i]->Draw("E same");
TLine *l[4];
TLine *l[0] = new TLine(1.4, 0., 1.4, 40000);
TLine *l[1] = new TLine(1.9, 0., 1.9, 40000);
TLine *l[2] = new TLine(2.5, 0., 2.5, 40000);
TLine *l[3] = new TLine(3.1, 0., 3.1, 40000);
for (Int_t j = 0; j < 4; j++) {
l[j]->SetLineColor(kRed);
l[j]->SetLineWidth(2);
l[j]->Draw("same");
}
}*/
// c1->SaveAs("figures/spectra.eps");
TCanvas *c2 = new TCanvas();
c2->ToggleEditor();
c2->SetWindowSize(800, 800);
c2->Divide(2, 2, .001, .001);
TH1F *diff[4];
for (Int_t i = 0; i < 4; i++) {
c2->cd(i+1);
diff[i] = new TH1F(*hExp[i]);
diff[i]->Add(hSim[i], -1);
diff[i]->Draw("");
diff[i]->SetTitle("");
diff[i]->GetXaxis()->SetTitle("");
diff[i]->GetYaxis()->SetTitle("");
diff[i]->GetYaxis()->SetLabelSize(0.06);
// Double_t max = diff[i]->GetYaxis()->GetXmax();
// diff[i]->GetYaxis()->SetRangeUser(-100, 3500);
}
c2->SaveAs("figures/spectraDiff1.eps");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment