From a5cd14a552e7c433c91d96a2b77924473266706d Mon Sep 17 00:00:00 2001 From: Vratislav Chudoba Date: Sun, 17 Jun 2018 03:27:55 +0300 Subject: [PATCH] Macros for data analysis modified. --- analysis/fillChain.cxx | 2 ++ analysis/openChain.cxx | 3 ++- analysis/showBananas2.cxx | 13 ++++++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/analysis/fillChain.cxx b/analysis/fillChain.cxx index 1e5924d..62feecc 100644 --- a/analysis/fillChain.cxx +++ b/analysis/fillChain.cxx @@ -11,9 +11,11 @@ void fillTree(Int_t nofile = 0, const Int_t noevents = 0) { TString inFile; inFile.Form("~/data/exp1804/h5_14_%02d.root", nofile); +// inFile.Form("~/data/exp1804/calib/si_20_03.root"); TString outFile; outFile.Form("~/data/exp1804/h5_14_%02d_calib.root", nofile); +// outFile.Form("~/data/exp1804/calib/si_20_03_calib.root"); cout << "Input file: " << inFile << endl; cout << "Output file: " << outFile << endl; diff --git a/analysis/openChain.cxx b/analysis/openChain.cxx index 3f2d4fb..a90c407 100644 --- a/analysis/openChain.cxx +++ b/analysis/openChain.cxx @@ -12,6 +12,7 @@ tr->AddFriend(trCal); - TFile *fcal = new TFile("~/data/exp1804/calib/si_20_03.root"); + TFile *fcal = new TFile("~/data/exp1804/calib/si_20_03_calib.root"); + TTree *tcal = (TTree*)fcal->Get("cal"); } diff --git a/analysis/showBananas2.cxx b/analysis/showBananas2.cxx index a48eb18..0472027 100644 --- a/analysis/showBananas2.cxx +++ b/analysis/showBananas2.cxx @@ -23,6 +23,12 @@ void showBananas2(const Long64_t drawEntries = 100000) { tr->AddFriend(trCal); + TFile *fcal = new TFile("~/data/exp1804/calib/si_20_03_calib.root"); + TTree *tAlphaCal = (TTree*)fcal->Get("cal"); + tAlphaCal->SetMarkerColor(kRed); + tAlphaCal->SetMarkerStyle(20); + tAlphaCal->SetMarkerSize(.6); + TFile *fc = new TFile("cutsIdentification.root", "READ"); TCutG *cUS = (TCutG*)fc->Get("c7UpperShadow"); TCutG *cLS = (TCutG*)fc->Get("c7LowerShadow"); @@ -94,6 +100,8 @@ void showBananas2(const Long64_t drawEntries = 100000) { tr->Draw(varName, condition, "col", drawEntries); // tr->Draw(varName, condition, "", drawEntries); + tAlphaCal->Draw(varName, "", "same"); + c2->Update(); }//for */ @@ -104,7 +112,7 @@ void showBananas2(const Long64_t drawEntries = 100000) { ///////////////////////////////////////////////////////////////////// // c3 - TCanvas *c3 = new TCanvas("c3", "dE-E raw", 1600, 800); + TCanvas *c3 = new TCanvas("c3", "dE-E corrected", 1600, 800); c3->Divide(4,2); for (Int_t i = 0; i < 8; i++) { @@ -122,6 +130,9 @@ void showBananas2(const Long64_t drawEntries = 100000) { tr->SetMarkerColor(kBlack); tr->Draw(varName, condition, "col", drawEntries); // tr->Draw(varName, condition, "", drawEntries); + + tAlphaCal->Draw(varName, "", "same"); + c3->Update(); } -- 2.18.1