Commit 300d656a authored by Kostyleva D.A's avatar Kostyleva D.A

Some changes in macros for drawing histograms

parent 73459264
...@@ -5,13 +5,16 @@ ...@@ -5,13 +5,16 @@
void histCorrNew01 ( void histCorrNew01 (
//01 means it is used for channels 0 and 1 //01 means it is used for channels 0 and 1
const char *filename = "analysis_07_8.root", // const char *filename = "analysis_07_8.root", //considered non-collimated
// const char *filename = "analysis_07_2.root", //collimated?
// const char *filename = "analysis_07_4.root",
const char *filename = "analysis_08_2.root",
const char *foldername = "7_8/chpair01", const char *foldername = "7_8/chpair01",
// const char *ext = ".eps", // const char *ext = ".eps",
const char *ext = ".gif", const char *ext = ".gif",
const Bool_t can1 = 1, const Bool_t can2 = 1, const Bool_t can1 = 0, const Bool_t can2 = 0,
const Bool_t can3 = 1, const Bool_t can4 = 1) const Bool_t can3 = 0, const Bool_t can4 = 1)
//const Bool_t can5 = 0, const Bool_t can6 = 0) //const Bool_t can5 = 0, const Bool_t can6 = 0)
{ {
using std::cout; using std::cout;
...@@ -153,21 +156,85 @@ void histCorrNew01 ( ...@@ -153,21 +156,85 @@ void histCorrNew01 (
TCanvas *c4 = new TCanvas ("c4", "Correlation pictures for non-collimated data: time difference"); TCanvas *c4 = new TCanvas ("c4", "Correlation pictures for non-collimated data: time difference");
c4->Divide(2,2); c4->Divide(2,2);
c4->cd(1); /* c4->cd(1);
TH1F *h11 = new TH1F("h11", "rise time for ch0", 100, 0 , 5); TH1F *h11 = new TH1F("h11", "rise time for ch0", 100, 0 , 5);
t->Draw("Ach0.fTime90 - Ach0.fTime10 >> h11","",""); t->Draw("Ach0.fTime90 - Ach0.fTime10 >> h11","","");
//gStyle->SetLineColor(kRed); //gStyle->SetLineColor(kRed);
c4->cd(2); c4->cd(2);
TH1F *h12 = new TH1F("h12", "rise time for ch1", 100, 0 , 5); TH1F *h12 = new TH1F("h12", "rise time for ch1", 100, 0 , 5);
t->Draw("Ach1.fTime90 - Ach1.fTime10 >> h12","",""); t->Draw("Ach1.fTime90 - Ach1.fTime10 >> h12","",""); */
c4->cd(1);
TH1F *h11 = new TH1F("h11", "ToT for ch0", 100, 0 , 10);
t->Draw("Ach0.fToT >> h11","Ach0.fToT > 0","");
//gStyle->SetLineColor(kRed);
c4->cd(2);
TH1F *h12 = new TH1F("h12", "ToT for ch1", 100, 0 , 10);
t->Draw("Ach1.fToT >> h12","Ach1.fToT > 0","");
//other files
/* c4->cd(3);
TH1F *h13 = new TH1F("h13", "time difference at the middle point of front edge", 100, -10, 10);
//t->Draw("Ach0.fTimeMid - Ach1.fTimeMid >> h13","Ach0.fEdgeSlope > 0.03 && Ach1.fEdgeSlope > 0.006","");
t->Draw("Ach0.fTimeMid - Ach1.fTimeMid >> h13","","");
h13->Fit("gaus","","",-3,2);
gStyle->SetOptFit();
c4->cd(4);
TH1F *h13 = new TH1F("h14", "time difference at the middle point of front edge with the correction on the ToT", 100, -10, 10);
t->Draw("Ach0.fTimeMid - Ach1.fTimeMid >> h14","Ach0.fToT > 2. && Ach0.fToT < 5. && Ach1.fToT > 1. && Ach1.fToT < 5.","");
h14->Fit("gaus","","",-3,2);
gStyle->SetOptFit();
*/
//file 7_8
/*
c4->cd(3);
TH1F *h13 = new TH1F("h13", "time difference at the 10 percent of front edge", 100, -10, 10);
//t->Draw("Ach0.fTimeMid - Ach1.fTimeMid >> h13","Ach0.fEdgeSlope > 0.03 && Ach1.fEdgeSlope > 0.006","");
t->Draw("Ach0.fTime10 - Ach1.fTime10 >> h13","","");
h13->Fit("gaus","","",-3,2);
gStyle->SetOptFit();
c4->cd(4);
TH1F *h13 = new TH1F("h14", "time difference at the middle point of front edge with the correction on the ToT", 100, -10, 10);
t->Draw("Ach0.fTime10 - Ach1.fTime10 >> h14","Ach0.fToT > 3. && Ach0.fToT < 6. && Ach1.fToT > 3. && Ach1.fToT < 6.","");
h14->Fit("gaus","","",-2,1);
gStyle->SetOptFit();
*/
//file 8_2
c4->cd(3); c4->cd(3);
TH1F *h13 = new TH1F("h13", "time difference at the middle point of front edge with the correction on the edge slope", 100, -10, 10); TH1F *h13 = new TH1F("h13", "time difference at the middle point of front edge", 100, 0, 20);
t->Draw("( Ach0.fTime10 + (Ach0.fTime90 - Ach0.fTime10)*0.5 ) - ( Ach1.fTime10 + (Ach1.fTime90 - Ach1.fTime10)*0.5 )>> h13","Ach0.fEdgeSlope > 0.03 && Ach1.fEdgeSlope > 0.006",""); //t->Draw("Ach0.fTimeMid - Ach1.fTimeMid >> h13","Ach0.fEdgeSlope > 0.03 && Ach1.fEdgeSlope > 0.006","");
h13->Fit("gaus","","",-5,5); t->Draw("Ach0.fTimeMid - Ach1.fTimeMid >> h13","","");
h13->Fit("gaus","","",8,13);
gStyle->SetOptFit(); gStyle->SetOptFit();
c4->cd(4);
TH1F *h13 = new TH1F("h14", "time difference at the middle point of front edge with the correction on the ToT", 100, 0, 20);
t->Draw("Ach0.fTimeMid - Ach1.fTimeMid >> h14","Ach0.fToT > 4. && Ach0.fToT < 6. && Ach1.fToT > 4 && Ach1.fToT < 6.","");
h14->Fit("gaus","","",9,13);
gStyle->SetOptFit();
/*
c4->cd(3);
TH1F *h13 = new TH1F("h13", "time difference at the 10 percent of front edge", 100, 0, 20);
//t->Draw("Ach0.fTimeMid - Ach1.fTimeMid >> h13","Ach0.fEdgeSlope > 0.03 && Ach1.fEdgeSlope > 0.006","");
t->Draw("Ach0.fTime10 - Ach1.fTime10 >> h13","","");
h13->Fit("gaus","","",9,13);
gStyle->SetOptFit();
c4->cd(4);
TH1F *h13 = new TH1F("h14", "time difference at the middle point of front edge with the correction on the ToT", 100, 0, 20);
t->Draw("Ach0.fTime10 - Ach1.fTime10 >> h14","Ach0.fToT > 1. && Ach0.fToT < 6. && Ach1.fToT > 1. && Ach1.fToT < 6.","");
h14->Fit("gaus","","",9,13);
gStyle->SetOptFit();
*/
// c4->Print(Form("../macros/picsDRS4/file%s/time_front_corr4%s", foldername, ext)); // c4->Print(Form("../macros/picsDRS4/file%s/time_front_corr4%s", foldername, ext));
} }
......
...@@ -10,9 +10,9 @@ void histCorrNew02 ( ...@@ -10,9 +10,9 @@ void histCorrNew02 (
// const char *ext = ".eps", // const char *ext = ".eps",
const char *ext = ".gif", const char *ext = ".gif",
const Bool_t can1 = 1, const Bool_t can2 = 1, const Bool_t can1 = 0, const Bool_t can2 = 0,
const Bool_t can3 = 1, const Bool_t can4 = 1, const Bool_t can3 = 0, const Bool_t can4 = 0,
const Bool_t can5 = 1 /*, const Bool_t can6 = 0*/) const Bool_t can5 = 0 , const Bool_t can6 = 1)
{ {
using std::cout; using std::cout;
using std::endl; using std::endl;
...@@ -64,7 +64,7 @@ void histCorrNew02 ( ...@@ -64,7 +64,7 @@ void histCorrNew02 (
c1->Update(); c1->Update();
c1->Print(Form("../macros/picsDRS4/file%s/time_front_corr1%s", foldername, ext)); //c1->Print(Form("../macros/picsDRS4/file%s/time_front_corr1%s", foldername, ext));
} }
if(can2) { if(can2) {
...@@ -103,7 +103,7 @@ void histCorrNew02 ( ...@@ -103,7 +103,7 @@ void histCorrNew02 (
h6->GetYaxis()->SetTitle("Max_ampl_{0} [V]"); h6->GetYaxis()->SetTitle("Max_ampl_{0} [V]");
h6->GetYaxis()->CenterTitle(); h6->GetYaxis()->CenterTitle();
c2->Print(Form("../macros/picsDRS4/file%s/time_front_corr2%s", foldername, ext)); //c2->Print(Form("../macros/picsDRS4/file%s/time_front_corr2%s", foldername, ext));
} }
if(can3) { if(can3) {
...@@ -151,7 +151,7 @@ void histCorrNew02 ( ...@@ -151,7 +151,7 @@ void histCorrNew02 (
h9->GetXaxis()->SetTitle("delta t [ns]"); h9->GetXaxis()->SetTitle("delta t [ns]");
h9->GetXaxis()->CenterTitle(); h9->GetXaxis()->CenterTitle();
c3->Print(Form("../macros/picsDRS4/file%s/time_front_corr3%s", foldername, ext)); //c3->Print(Form("../macros/picsDRS4/file%s/time_front_corr3%s", foldername, ext));
} }
if(can4) { if(can4) {
...@@ -173,7 +173,7 @@ void histCorrNew02 ( ...@@ -173,7 +173,7 @@ void histCorrNew02 (
t->Draw("( Ach0.fTime10 + (Ach0.fTime90 - Ach0.fTime10)*0.5 ) - ( Ach2.fTime10 + (Ach2.fTime90 - Ach2.fTime10)*0.5 )>> h13","Ach0.fEdgeSlope > 0.03 && Ach2.fEdgeSlope > 0.006",""); t->Draw("( Ach0.fTime10 + (Ach0.fTime90 - Ach0.fTime10)*0.5 ) - ( Ach2.fTime10 + (Ach2.fTime90 - Ach2.fTime10)*0.5 )>> h13","Ach0.fEdgeSlope > 0.03 && Ach2.fEdgeSlope > 0.006","");
h13->Fit("gaus","","",6,11); h13->Fit("gaus","","",6,11);
gStyle->SetOptFit(); gStyle->SetOptFit();
c4->Print(Form("../macros/picsDRS4/file%s/time_front_corr4%s", foldername, ext)); //c4->Print(Form("../macros/picsDRS4/file%s/time_front_corr4%s", foldername, ext));
} }
...@@ -189,7 +189,50 @@ void histCorrNew02 ( ...@@ -189,7 +189,50 @@ void histCorrNew02 (
c5->cd(2); c5->cd(2);
TH1F *h15 = new TH1F("h15", "edge slope distr for ch2", 100, 0 , 0.2); TH1F *h15 = new TH1F("h15", "edge slope distr for ch2", 100, 0 , 0.2);
t->Draw("Ach2.fEdgeSlope >> h15","",""); t->Draw("Ach2.fEdgeSlope >> h15","","");
c5->Print(Form("../macros/picsDRS4/file%s/time_front_corr5%s", foldername, ext)); //c5->Print(Form("../macros/picsDRS4/file%s/time_front_corr5%s", foldername, ext));
} }
if(can6) {
TCanvas *c6 = new TCanvas ("c6", "ToT");
c6->Divide(2,2);
c6->cd(1);
TH1F *h16 = new TH1F("h16", "ToT for ch0", 100, 0 , 10);
t->Draw("Ach0.fToT >> h16","Ach0.fToT > 0","");
c6->cd(2);
TH1F *h17 = new TH1F("h17", "ToT for ch2", 100, 0 , 10);
t->Draw("Ach2.fToT >> h17","Ach2.fToT > 0","");
/* c6->cd(3);
TH1F *h18 = new TH1F("h18", "time difference at the middle point of front edge", 100, 0, 20);
t->Draw("Ach0.fTimeMid - Ach2.fTimeMid >> h18","","");
h18->Fit("gaus","","",6,11);
gStyle->SetOptFit();
c6->cd(4);
TH1F *h19 = new TH1F("h19", "time difference at the middle point of front edge with the correction on the ToT", 100, 0, 20);
t->Draw("Ach0.fTimeMid - Ach2.fTimeMid >> h19","Ach0.fToT > 3. && Ach0.fToT < 5. && Ach2.fToT > 2. && Ach2.fToT < 5.","");
h19->Fit("gaus","","",7,10);
gStyle->SetOptFit();
*/
c6->cd(3);
TH1F *h18 = new TH1F("h18", "time difference at the 10 percent of front edge", 100, 0, 20);
t->Draw("Ach0.fTime10 - Ach2.fTime10 >> h18","","");
h18->Fit("gaus","","",7,10);
gStyle->SetOptFit();
c6->cd(4);
TH1F *h19 = new TH1F("h19", "time difference at the middle point of front edge with the correction on the ToT", 100, 0, 20);
t->Draw("Ach0.fTime10 - Ach2.fTime10 >> h19","Ach0.fToT > 2. && Ach0.fToT < 5. && Ach2.fToT > 1. && Ach2.fToT < 64","");
h19->Fit("gaus","","",7,10);
gStyle->SetOptFit();
//c6->Print(Form("../macros/picsDRS4/file%s/time_front_corr5%s", foldername, ext));
}
} }
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