From 86bee791ef487754481bc190e7e8affb1e161d6d Mon Sep 17 00:00:00 2001 From: Vardan Tadevosyan <tadevosn@jlab.org> Date: Tue, 28 May 2013 10:47:19 -0400 Subject: [PATCH] Added comphits.C and compedeps.C ENGINE/hcana comparison scripts --- examples/compedeps.C | 35 +++++++++++++++++++++++++++++++++++ examples/comphits.C | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 examples/compedeps.C create mode 100644 examples/comphits.C diff --git a/examples/compedeps.C b/examples/compedeps.C new file mode 100644 index 0000000..790b4bf --- /dev/null +++ b/examples/compedeps.C @@ -0,0 +1,35 @@ +{ + + // Compare deposited energies in 4 planes from ENGINE with hcana. + + TFile* f = new TFile("hodtest.root"); + TH1F* h[4]; + h[0] = edep1; + h[1] = edep2; + h[2] = edep3; + h[3] = edep4; + + TFile* f1 = new TFile("50017_hbk.root"); + TH1F* h1[4]; + h1[0] = h683; //A + h1[1] = h684; //B + h1[2] = h685; //C + h1[3] = h686; //C + + TCanvas *c1 = new TCanvas("c1", "Shower raw Edeps", 1000, 750); + c1->Divide(2, 2); + + for (int j = 0; j < 4; j++){ + c1->cd(j+1); + h[j]->SetFillColor(kGreen); + h[j]->SetFillStyle(3345); + h[j]->Draw(); + + h1[j]->SetFillColor(kBlue); + h1[j]->SetFillStyle(3354); + h1[j]->Draw("same"); + + gPad->SetLogy(); + } + +} diff --git a/examples/comphits.C b/examples/comphits.C new file mode 100644 index 0000000..e21eda2 --- /dev/null +++ b/examples/comphits.C @@ -0,0 +1,35 @@ +{ + TFile* f = new TFile("hodtest.root"); + TH1F* h[6]; + h[0] = chposadc1; + h[1] = chnegadc1; + h[2] = chposadc2; + h[3] = chnegadc2; + h[4] = chposadc3; + h[5] = chposadc4; + + TFile* f1 = new TFile("50017_hbk.root"); + TH1F* h1[6]; + h1[0] = h212; //A+ + h1[1] = h216; //A- + h1[2] = h213; //B+ + h1[3] = h217; //B- + h1[4] = h214; //C+ + h1[5] = h215; //D+ + + TCanvas *c1 = new TCanvas("c1", "Shower Hit Maps", 1000, 750); + c1->Divide(2, 3); + + for (int j = 0; j < 6; j++){ + c1->cd(j+1); + h[j]->SetFillColor(kGreen); + h[j]->SetFillStyle(3345); + h[j]->Draw(); + + h1[j]->SetFillColor(kBlue); + h1[j]->SetFillStyle(3354); + h1[j]->Draw("same"); + + } + +} -- GitLab