Commit d28ab56e authored by Vratislav Chudoba's avatar Vratislav Chudoba

A few changes in histCorr.C script.

parent fcf14ea5
void histCFDf7_8()
{
gSystem->Load("../libData.so");
TFile *f = new TFile("../data/dataDSR4/analysis_07_8.root");
TTree *t = (TTree*)f->Get("atree");
TCanvas *c = new TCanvas("CFD canvas");
c->Divide(2,2);
c->cd(1);
t->Draw("Ach0.fTimeCFD","","");
c->cd(2);
t->Draw("Ach2.fTimeCFD","","");
c->cd(3);
t->Draw("Ach0.fTimeCFD - Ach2.fTimeCFD","","");
c->cd(4);
}
void histCFDf8_2()
{
gSystem->Load("../libData.so");
TFile *f = new TFile("../data/dataDSR4/analysis_08_2.root");
TTree *t = (TTree*)f->Get("atree");
TCanvas *c = new TCanvas("CFD canvas");
c->Divide(2,2);
c->cd(1);
t->Draw("Ach0.fTimeCFD","","");
c->cd(2);
t->Draw("Ach1.fTimeCFD","","");
c->cd(3);
t->Draw("Ach0.fTimeCFD - Ach1.fTimeCFD","","");
c->cd(4);
}
//#include "TCanvas.h"
void histCorr(const char *filename = "analysis_07_8.root", const char *foldername = "7_8", const char *ext = ".eps", const Bool_t can1 = 1, const Bool_t can2 = 1, const Bool_t can3 = 1, const Bool_t can4 = 1)
void histCorr(
// const char *filename = "analysis_07_8.root",
const char *filename = "analysis_08_2.root",
// const char *foldername = "7_8",
const char *foldername = "8_2",
// const char *ext = ".eps",
const char *ext = ".gif",
const Bool_t can1 = 1, const Bool_t can2 = 1, const Bool_t can3 = 1, const Bool_t can4 = 0)
{
gSystem->Load("../libData.so");
TFile *f = new TFile(Form("../data/dataDSR4/%s", filename));
......@@ -11,15 +18,16 @@ void histCorr(const char *filename = "analysis_07_8.root", const char *foldernam
TCanvas *c1 = new TCanvas("c1", "Correlation pictures: delta t from CFD vs something");
c1->Divide(2,2);
TH2F *h1 = new TH2F("h1", "Time difference between two channels vs an integral of the first channel",125, -50., 50., 125, 0., 5e-9);
TH2F *h2 = new TH2F("h2", "Time difference between two channels vs an integral of the second channel",125, -50., 50.,125, 0e-9, 5e-9);
// TH2F *h1 = new TH2F("h1", "Time difference between two channels vs an integral of the first channel",125, -50., 50., 125, 0., 5e-9);
TH2F *h1 = new TH2F("h1", "Time difference between two channels vs an integral of the first channel",125, -20., 30., 125, 0., 5e-9);
TH2F *h2 = new TH2F("h2", "Time difference between two channels vs an integral of the second channel",125, -10., 30.,125, 0e-9, 5e-9);
TH2F *h3 = new TH2F("h3", "Time difference between two channels vs amplitude of the first channel",125, -100., 100., 125, 0., 0.5);
TH2F *h4 = new TH2F("h4", "Time difference between two channels vs amplitude of the second channel",125, -100., 100., 125, 0., 0.5);
c1->cd(1);
t->Draw("Ach0.fChargeCFD : ( Ach0.fTimeCFD - Ach2.fTimeCFD ) >> h1","","col");
t->Draw("Ach0.fChargeCFD : ( Ach0.fTimeCFD - Ach1.fTimeCFD ) >> h1","","col");
//x
h1->GetXaxis()->SetTitle("\\Delta \\tau_{0-2} [ns]");
h1->GetXaxis()->SetTitle("\\Delta \\tau_{0-1} [ns]");
h1->GetXaxis()->CenterTitle();
//y
h1->GetYaxis()->SetTitle("Q_{0} [C]");
......@@ -27,18 +35,18 @@ void histCorr(const char *filename = "analysis_07_8.root", const char *foldernam
c1->Update();
c1->cd(2);
t->Draw("Ach2.fChargeCFD : ( Ach0.fTimeCFD - Ach2.fTimeCFD ) >> h2","","col");
h2->GetXaxis()->SetTitle("\\Delta \\tau_{0-2} [ns]");
t->Draw("Ach1.fChargeCFD : ( Ach0.fTimeCFD - Ach1.fTimeCFD ) >> h2","Ach1.fChargeCFD>0.05e-9","col");
h2->GetXaxis()->SetTitle("\\Delta \\tau_{0-1} [ns]");
h2->GetXaxis()->CenterTitle();
//y
h2->GetYaxis()->SetTitle("Q_{2} [C]");
h2->GetYaxis()->SetTitle("Q_{1} [C]");
h2->GetYaxis()->CenterTitle();
c1->Update();
c1->cd(3);
t->Draw("Ach0.fAmpMax: ( Ach0.fTimeCFD - Ach2.fTimeCFD ) >> h3","","col");
t->Draw("Ach0.fAmpMax: ( Ach0.fTimeCFD - Ach1.fTimeCFD ) >> h3","","col");
//x
h3->GetXaxis()->SetTitle("\\Delta \\tau_{0-2} [ns]");
h3->GetXaxis()->SetTitle("\\Delta \\tau_{0-1} [ns]");
h3->GetXaxis()->CenterTitle();
//y
h3->GetYaxis()->SetTitle("Max_ampl_{0} [V]");
......@@ -46,12 +54,12 @@ void histCorr(const char *filename = "analysis_07_8.root", const char *foldernam
c1->Update();
c1->cd(4);
t->Draw("Ach2.fAmpMax: ( Ach0.fTimeCFD - Ach2.fTimeCFD ) >> h4","","col");
t->Draw("Ach1.fAmpMax: ( Ach0.fTimeCFD - Ach1.fTimeCFD ) >> h4","","col");
//x
h4->GetXaxis()->SetTitle("\\Delta \\tau_{0-2} [ns]");
h4->GetXaxis()->SetTitle("\\Delta \\tau_{0-1} [ns]");
h4->GetXaxis()->CenterTitle();
//y
h4->GetYaxis()->SetTitle("Max_ampl_{2} [V]");
h4->GetYaxis()->SetTitle("Max_ampl_{1} [V]");
h4->GetYaxis()->CenterTitle();
c1->Show();
......@@ -61,25 +69,25 @@ void histCorr(const char *filename = "analysis_07_8.root", const char *foldernam
if (can2) {
TCanvas *c2 = new TCanvas("c2", "Correlation pictures: Integrals and amplitudes");
c2->Divide(1,2);
c2->Divide(2,2);
TH2F *h5 = new TH2F("h5", "Integral of the first channel vs integral of the second channel", 300, 0., 2e-9, 300, 0., 2e-9);
TH2F *h6 = new TH2F("h6", "Amplitude of the first channel vs amplitude of the second channel", 300, 10, 1e-10, 300, 10, 1e-10);
c2->cd(1);
t->Draw("Ach0.fChargeCFD : Ach2.fChargeCFD >> h5","","col");
t->Draw("Ach0.fChargeCFD : Ach1.fChargeCFD >> h5","","col1");
//x
h5->GetXaxis()->SetTitle("Q_{2} [C]");
h5->GetXaxis()->SetTitle("Q_{1} [C]");
h5->GetXaxis()->CenterTitle();
//y
h5->GetYaxis()->SetTitle("Q_{0} [C]");
h5->GetYaxis()->CenterTitle();
c2->Update();
c2->cd(2);
t->Draw("Ach0.fAmpMax : Ach2.fAmpMax >> h6","","col");
c2->cd(3);
t->Draw("Ach0.fAmpMax : Ach1.fAmpMax >> h6","","col");
//x
h6->GetXaxis()->SetTitle("Max_ampl_{2} [V]");
h6->GetXaxis()->SetTitle("Max_ampl_{1} [V]");
h6->GetXaxis()->CenterTitle();
//y
h6->GetYaxis()->SetTitle("Max_ampl_{0} [V]");
......@@ -96,10 +104,11 @@ void histCorr(const char *filename = "analysis_07_8.root", const char *foldernam
TH1F *h7 = new TH1F("h7", "Time difference between 90 and 10 percent of the rising edge ampl", 100, 0, 5);
TH2F *h8 = new TH2F("h8", "Time difference between 90 and 10 percent vs integral", 100, 0., 5., 100, 0., 3e-9);
TH2F *h9 = new TH2F("h9", "Time difference between 90 and 10: ch0 vs ch1", 100, 0., 5., 100, 0., 5.);
// TH2F *h9 = new TH2F("h9", "Time difference between 90 and 10: ch0 vs ch1", 100, 0., 5., 100, 0., 5.);
TH1F *h9 = new TH1F("h9", "Delta tau", 100, -10., 30.);
c3->cd(1);
t->Draw("Ach1.fTime90 - Ach1.fTime10 >> h7","((Ach1.fTime90-Ach1.fTime10)>=0)","col");
// t->Draw("Ach1.fTime90 - Ach1.fTime10 >> h7","((Ach1.fTime90-Ach1.fTime10)>=0)","col");
t->Draw("Ach1.fTime90 - Ach1.fTime10 >> h7","((Ach1.fTime90-Ach1.fTime10)>=0) && (Ach1.fEdgeXi < 0.0015)","col");
// t->Draw("Ach0.fTime90 - Ach0.fTime10 >> h7","","col");
//x
......@@ -118,13 +127,13 @@ void histCorr(const char *filename = "analysis_07_8.root", const char *foldernam
c3->Update();
c3->cd(2);
t->Draw(" (Ach1.fTime90 - Ach1.fTime10) : (Ach1.fTime90 - Ach1.fTime10) >> h9","(Ach1.fTime90 - Ach1.fTime10)>0","col");
// t->Draw(" (Ach1.fTime90 - Ach1.fTime10) : (Ach1.fTime90 - Ach1.fTime10) >> h9","(Ach1.fTime90 - Ach1.fTime10)>0","col");
t->Draw("Ach0.fTimeCFD - Ach1.fTimeCFD >> h9","Ach1.fChargeCFD>0.05e-9 && Ach1.fChargeCFD<0.5e-9","");
//x
h9->GetXaxis()->SetTitle("\\Delta \\tau_{0}^{(rise)} [ns]");
h9->GetXaxis()->SetTitle("\\Delta \\tau_{0-1} [ns]");
h9->GetXaxis()->CenterTitle();
//y
h9->GetYaxis()->SetTitle("\\Delta \\tau_{1}^{(rise)} [ns]");
h9->GetYaxis()->CenterTitle();
TF1 *fGaus = new TF1("f1", "gaus", 8.5, 13.);
h9->Fit(fGaus, "R");
c3->Update();
c3->cd(4);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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