diff --git a/dataClasses/AEvent.cpp b/dataClasses/AEvent.cpp index 8db275c6618eaedf566a3eb07396f644f28be8e4..57985c7b8f358d43b75d93b72ac47c7be69f08eb 100644 --- a/dataClasses/AEvent.cpp +++ b/dataClasses/AEvent.cpp @@ -140,10 +140,10 @@ void AEvent::SmoothGraphs() { //Int_t winSize = 5; //number of smoothing points Int_t winMidSize = fWinSize / 2; - Double_t tmin, tmax, meanTime, meanAmp; + Double_t tmin, tmax, meanTime, meanAmp, sumAmp; for(Int_t i = winMidSize; i < fNPoints - winMidSize; ++i) { - Float_t mean = 0; + sumAmp = 0; tmin = 0; tmax = 0; meanTime = 0; @@ -151,12 +151,12 @@ void AEvent::SmoothGraphs() { for(Int_t j = i - winMidSize; j <= (i + winMidSize); ++j) { if (j == i - winMidSize) { tmin = fTime[j]; } if (j == i + winMidSize) { tmax = fTime[j]; } - mean += fAmpPos[j]; + sumAmp += fAmpPos[j]; } meanTime = (tmax - tmin)*0.5 + tmin; //cout<<"mean time "<SetPoint(i, meanTime, meanAmp); diff --git a/macros/histCorrNew.C b/macros/histCorrNew01.C similarity index 84% rename from macros/histCorrNew.C rename to macros/histCorrNew01.C index eea620929bdd129d704ea9e9e7ead6dfd81cd7b4..ce3a3aeb1958c4982d54e3cd012fb8e388158f52 100644 --- a/macros/histCorrNew.C +++ b/macros/histCorrNew01.C @@ -2,17 +2,17 @@ #include "TH3F.h" #include "TStyle.h" -void histCorrNew ( +void histCorrNew01 ( +//01 means it is used for channels 0 and 1 const char *filename = "analysis_07_8.root", -// const char *foldername = "report", - const char *foldername = "8_2", + const char *foldername = "7_8/chpair01", // const char *ext = ".eps", const char *ext = ".gif", - const Bool_t can1 = 0, const Bool_t can2 = 0, - const Bool_t can3 = 1, const Bool_t can4 = 0, - const Bool_t can5 = 0, const Bool_t can6 = 0) + const Bool_t can1 = 1, const Bool_t can2 = 1, + const Bool_t can3 = 1, const Bool_t can4 = 1) + //const Bool_t can5 = 0, const Bool_t can6 = 0) { using std::cout; using std::endl; @@ -25,7 +25,7 @@ void histCorrNew ( if(can1){ - TCanvas *c1 = new TCanvas("c1", "Correlation pictures for collimated data: Integrals and amplitudes"); + TCanvas *c1 = new TCanvas("c1", "Correlation pictures for non-collimated data: delta t and integrals"); c1->Divide(2,2); c1->cd(1); @@ -68,7 +68,7 @@ void histCorrNew ( } if(can2) { - TCanvas *c2 = new TCanvas("c2", "Correlation pictures for collimated data: Integrals and amplitudes"); + TCanvas *c2 = new TCanvas("c2", "Correlation pictures for non-collimated data: delta t and amplitudes"); c2->Divide(2,2); c2->cd(1); @@ -107,7 +107,7 @@ void histCorrNew ( } if(can3) { - TCanvas *c3 = new TCanvas ("c3", "Correlation pictures for collimated data: time difference"); + TCanvas *c3 = new TCanvas ("c3", "Correlation pictures for non-collimated data: time difference"); c3->Divide(2,2); c3->cd(1); @@ -150,27 +150,25 @@ void histCorrNew ( } if(can4) { - TCanvas *c4 = new TCanvas ("c4", "Correlation pictures for collimated data: time difference"); + TCanvas *c4 = new TCanvas ("c4", "Correlation pictures for non-collimated data: time difference"); c4->Divide(2,2); c4->cd(1); - TH1F *h11 = new TH1F("h11", "rise time", 100, 0 , 5); + TH1F *h11 = new TH1F("h11", "rise time for ch0", 100, 0 , 5); t->Draw("Ach0.fTime90 - Ach0.fTime10 >> h11","",""); //gStyle->SetLineColor(kRed); c4->cd(2); - TH1F *h12 = new TH1F("h12", "rise time", 100, 0 , 5); + TH1F *h12 = new TH1F("h12", "rise time for ch1", 100, 0 , 5); t->Draw("Ach1.fTime90 - Ach1.fTime10 >> h12","",""); - // h10->Fit("gaus", "","",7,14); - // gStyle->SetOptFit(); - // h10->GetXaxis()->SetTitle("delta t [ns]"); - // h10->GetXaxis()->CenterTitle(); + c4->cd(3); - TH1F *h13 = new TH1F("h13", "rise time", 100, -10, 10); + TH1F *h13 = new TH1F("h13", "time difference at the middle point of front edge with the correction on the edge slope", 100, -10, 10); 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",""); h13->Fit("gaus","","",-5,5); gStyle->SetOptFit(); + // c4->Print(Form("../macros/picsDRS4/file%s/time_front_corr4%s", foldername, ext)); } } diff --git a/macros/histCorrNew02.C b/macros/histCorrNew02.C new file mode 100644 index 0000000000000000000000000000000000000000..10e55df49f706f62d2303801cfb53d376c983900 --- /dev/null +++ b/macros/histCorrNew02.C @@ -0,0 +1,195 @@ +#include "TH2F.h" +#include "TH3F.h" +#include "TStyle.h" + +void histCorrNew02 ( +//02 means it is used for channels 0 and 2 + + const char *filename = "analysis_07_8.root", + const char *foldername = "7_8/chpair02", +// 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 = 1, + const Bool_t can5 = 1 /*, const Bool_t can6 = 0*/) +{ + using std::cout; + using std::endl; + gSystem->Load("../libData.so"); + TFile *f = new TFile(Form("../data/dataDSR4/%s", filename)); + TTree *t = (TTree*)f->Get("atree"); + + //gStyle->SetCanvasDefH(900); + //gStyle->SetCanvasDefW(1500); + + if(can1){ + + TCanvas *c1 = new TCanvas("c1", "Correlation pictures for non-collimated data: delta t and integrals"); + c1->Divide(2,2); + + c1->cd(1); + TH2F *h1 = new TH2F("h1", "front time tau vs charge TF 0 ", 200, 0 ,0.5e-9, 100, 5, 15 ); + t->Draw(" Ach0.fTimeFront - Ach2.fTimeFront : Ach0.fChargeTF >> h1","","col"); + //x + h1->GetXaxis()->SetTitle("Charge [C]"); + h1->GetXaxis()->CenterTitle(); + //y + h1->GetYaxis()->SetTitle("tau_TF [ns]"); + h1->GetYaxis()->CenterTitle(); + + c1->Update(); + + c1->cd(2); + TH2F *h2 = new TH2F("h2", "front time tau vs charge TF 2 ", 200, 0, 0.5e-9, 200, 5 ,15); + t->Draw(" Ach0.fTimeFront - Ach2.fTimeFront : Ach2.fChargeTF >> h2","","col"); + //x + h2->GetXaxis()->SetTitle("Charge [C]"); + h2->GetXaxis()->CenterTitle(); + //y + h2->GetYaxis()->SetTitle("tau_TF [V]"); + h2->GetYaxis()->CenterTitle(); + + c1->Update(); + + c1->cd(3); + TH2F *h3 = new TH2F("h3", "charge TF 2 vs charge TF 0", 200, 0 ,0.5e-9, 200, 0, 0.5e-9); + t->Draw(" Ach0.fChargeTF : Ach2.fChargeTF >> h3","","col"); + //x + h3->GetXaxis()->SetTitle("Charge_0 [C]"); + h3->GetXaxis()->CenterTitle(); + //y + h3->GetYaxis()->SetTitle("Charge_2 [C]"); + h3->GetYaxis()->CenterTitle(); + + c1->Update(); + + c1->Print(Form("../macros/picsDRS4/file%s/time_front_corr1%s", foldername, ext)); + } + + if(can2) { + TCanvas *c2 = new TCanvas("c2", "Correlation pictures for non-collimated data: delta t and amplitudes"); + c2->Divide(2,2); + + c2->cd(1); + TH2F *h4 = new TH2F("h4", "front time tau vs amplitude 0", 200, 0, 0.5, 200, 5 ,15); + t->Draw("Ach0.fTimeFront - Ach2.fTimeFront : Ach0.fAmpMax >> h4","","col"); + //x + h4->GetXaxis()->SetTitle("Max_ampl_{0} [V]"); + h4->GetXaxis()->CenterTitle(); + //y + h4->GetYaxis()->SetTitle("tau_TF"); + h4->GetYaxis()->CenterTitle(); + + c2->cd(2); + TH2F *h5 = new TH2F("h5", "front time tau vs amplitude 2", 200, 0, 0.5, 200, 5 ,15); + t->Draw("Ach0.fTimeFront - Ach2.fTimeFront : Ach2.fAmpMax >> h5","","col"); + //x + h5->GetXaxis()->SetTitle("Max_ampl_{2} [V]"); + h5->GetXaxis()->CenterTitle(); + //y + h5->GetYaxis()->SetTitle("tau_TF"); + h5->GetYaxis()->CenterTitle(); + + c2->Update(); + + c2->cd(3); + TH2F *h6 = new TH2F("h6", "amplitude 0 vs amplitude 2", 200, 0 ,0.1, 200, 0, 0.2); + t->Draw("Ach0.fAmpMax : Ach2.fAmpMax >> h6","","col"); + //x + h6->GetXaxis()->SetTitle("Max_ampl_{2} [V]"); + h6->GetXaxis()->CenterTitle(); + //y + h6->GetYaxis()->SetTitle("Max_ampl_{0} [V]"); + h6->GetYaxis()->CenterTitle(); + + c2->Print(Form("../macros/picsDRS4/file%s/time_front_corr2%s", foldername, ext)); + } + + if(can3) { + TCanvas *c3 = new TCanvas ("c3", "Correlation pictures for non-collimated data: time difference"); + c3->Divide(2,2); + + c3->cd(1); + TH1F *h10 = new TH1F("h10", "delta t (front edge fit)", 100, 0 , 25); + t->Draw("Ach0.fTimeFront - Ach2.fTimeFront >> h10","Ach0.fTimeFront>100. && Ach0.fTimeFront < 150 && Ach2.fTimeFront>100 && Ach2.fTimeFront < 150",""); + h10->Fit("gaus", "","",5,13); + gStyle->SetOptFit(); + h10->GetXaxis()->SetTitle("delta t [ns]"); + h10->GetXaxis()->CenterTitle(); + + c3->cd(2); + TH1F *h7 = new TH1F("h7", "delta t (front edge fit) with edge slope correction", 100, 0, 25); + // t->Draw("Ach0.fTimeFront - Ach2.fTimeFront >> h7", + // "Ach0.fTimeFront>100. && Ach0.fTimeFront < 150 && Ach2.fTimeFront>100 && Ach2.fTimeFront < 150 && Ach0.fEdgeSlope > 0.01 && Ach2.fEdgeSlope > 0.01",""); + t->Draw("Ach0.fTimeFront - Ach2.fTimeFront >> h7","Ach0.fTimeFront>100. && Ach0.fTimeFront < 150 && Ach2.fTimeFront>100 && Ach2.fTimeFront < 150 && Ach0.fEdgeSlope > 0.005 && Ach2.fEdgeSlope > 0.001",""); + h7->Fit("gaus", "","",5,13); + gStyle->SetOptFit(); + h7->GetXaxis()->SetTitle("delta t [ns]"); + h7->GetXaxis()->CenterTitle(); + + c3->cd(3); + TH1F *h8 = new TH1F("h8", "delta t (front edge fit) with charge correction", 100, 0 , 25); + t->Draw("Ach0.fTimeFront - Ach2.fTimeFront >> h8", + "Ach0.fTimeFront>100. && Ach0.fTimeFront < 150 && Ach2.fTimeFront>100 && Ach2.fTimeFront < 150 && Ach0.fChargeTF > 0.05e-9 && Ach2.fChargeTF > 0.025e-9",""); + h8->Fit("gaus","","",5,13); + gStyle->SetOptFit(); + h8->GetXaxis()->SetTitle("delta t [ns]"); + h8->GetXaxis()->CenterTitle(); + + c3->cd(4); + TH1F *h9 = new TH1F("h9", "delta t (front edge fit) with rise time correction", 100, 0 , 25); + + //for the bigger rise times - no peak + t->Draw("Ach0.fTimeFront - Ach2.fTimeFront >> h9","Ach0.fTimeFront> 100 && Ach0.fTimeFront<150 && Ach2.fTimeFront> 100 && Ach2.fTimeFront<150 && (Ach0.fTime90 - Ach0.fTime10) > 1.5 && (Ach0.fTime90 - Ach0.fTime10)<3 && (Ach2.fTime90 - Ach2.fTime10) > 1.5 && (Ach2.fTime90 - Ach2.fTime10)<3",""); + + //for the smaller rise times - peak !LOW STATISTICS! + //t->Draw("Ach0.fTimeFront - Ach2.fTimeFront >> h9","Ach0.fTimeFront> 100 && Ach0.fTimeFront<150 && Ach2.fTimeFront> 100 && Ach2.fTimeFront<150 && (Ach0.fTime90 - Ach0.fTime10) > 0.5 && (Ach0.fTime90 - Ach0.fTime10)<1.5 && (Ach2.fTime90 - Ach2.fTime10) > 0.3 && (Ach2.fTime90 - Ach2.fTime10)<1.3",""); + + h9->Fit("gaus","","",5,13); + gStyle->SetOptFit(); + h9->GetXaxis()->SetTitle("delta t [ns]"); + h9->GetXaxis()->CenterTitle(); + + c3->Print(Form("../macros/picsDRS4/file%s/time_front_corr3%s", foldername, ext)); + } + + if(can4) { + TCanvas *c4 = new TCanvas ("c4", "Correlation pictures for non-collimated data: time difference"); + c4->Divide(2,2); + + c4->cd(1); + TH1F *h11 = new TH1F("h11", "rise time for ch0", 100, 0 , 5); + t->Draw("Ach0.fTime90 - Ach0.fTime10 >> h11","",""); + //gStyle->SetLineColor(kRed); + + c4->cd(2); + TH1F *h12 = new TH1F("h12", "rise time for ch2", 100, 0 , 5); + t->Draw("Ach2.fTime90 - Ach2.fTime10 >> h12","",""); + + + 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, 0, 20); + 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); + gStyle->SetOptFit(); + c4->Print(Form("../macros/picsDRS4/file%s/time_front_corr4%s", foldername, ext)); + + } + + if(can5) { + TCanvas *c5 = new TCanvas ("c5", "Edge slopes"); + c5->Divide(2,2); + + c5->cd(1); + TH1F *h14 = new TH1F("h14", "edge slope distr for ch0", 100, 0 , 0.2); + t->Draw("Ach0.fEdgeSlope >> h14","",""); + //gStyle->SetLineColor(kRed); + + c5->cd(2); + TH1F *h15 = new TH1F("h15", "edge slope distr for ch2", 100, 0 , 0.2); + t->Draw("Ach2.fEdgeSlope >> h15","",""); + c5->Print(Form("../macros/picsDRS4/file%s/time_front_corr5%s", foldername, ext)); + + } +} diff --git a/macros/histCorrNew03.C b/macros/histCorrNew03.C new file mode 100644 index 0000000000000000000000000000000000000000..905d06360b9cb6a8eae0b15df5792d88644dce64 --- /dev/null +++ b/macros/histCorrNew03.C @@ -0,0 +1,195 @@ +#include "TH2F.h" +#include "TH3F.h" +#include "TStyle.h" + +void histCorrNew03 ( +//03 means it is used for channels 0 and 3 + + const char *filename = "analysis_07_8.root", + const char *foldername = "7_8/chpair03", +// 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 = 1, + const Bool_t can5 = 1 /*, const Bool_t can6 = 0*/) +{ + using std::cout; + using std::endl; + gSystem->Load("../libData.so"); + TFile *f = new TFile(Form("../data/dataDSR4/%s", filename)); + TTree *t = (TTree*)f->Get("atree"); + + //gStyle->SetCanvasDefH(900); + //gStyle->SetCanvasDefW(1500); + + if(can1){ + + TCanvas *c1 = new TCanvas("c1", "Correlation pictures for non-collimated data: delta t and integrals"); + c1->Divide(2,2); + + c1->cd(1); + TH2F *h1 = new TH2F("h1", "front time tau vs charge TF 0 ", 200, 0 ,0.5e-9, 100, 5, 15 ); + t->Draw(" Ach0.fTimeFront - Ach3.fTimeFront : Ach0.fChargeTF >> h1","","col"); + //x + h1->GetXaxis()->SetTitle("Charge [C]"); + h1->GetXaxis()->CenterTitle(); + //y + h1->GetYaxis()->SetTitle("tau_TF [ns]"); + h1->GetYaxis()->CenterTitle(); + + c1->Update(); + + c1->cd(2); + TH2F *h2 = new TH2F("h2", "front time tau vs charge TF 3 ", 200, 0, 0.5e-9, 200, 5 ,15); + t->Draw(" Ach0.fTimeFront - Ach3.fTimeFront : Ach3.fChargeTF >> h3","","col"); + //x + h2->GetXaxis()->SetTitle("Charge [C]"); + h2->GetXaxis()->CenterTitle(); + //y + h2->GetYaxis()->SetTitle("tau_TF [V]"); + h2->GetYaxis()->CenterTitle(); + + c1->Update(); + + c1->cd(3); + TH2F *h3 = new TH2F("h3", "charge TF 3 vs charge TF 0", 200, 0 ,0.5e-9, 200, 0, 0.5e-9); + t->Draw(" Ach0.fChargeTF : Ach3.fChargeTF >> h3","","col"); + //x + h3->GetXaxis()->SetTitle("Charge_0 [C]"); + h3->GetXaxis()->CenterTitle(); + //y + h3->GetYaxis()->SetTitle("Charge_3 [C]"); + h3->GetYaxis()->CenterTitle(); + + c1->Update(); + + c1->Print(Form("../macros/picsDRS4/file%s/time_front_corr1%s", foldername, ext)); + } + + if(can2) { + TCanvas *c2 = new TCanvas("c2", "Correlation pictures for non-collimated data: delta t and amplitudes"); + c2->Divide(2,2); + + c2->cd(1); + TH2F *h4 = new TH2F("h4", "front time tau vs amplitude 0", 200, 0, 0.5, 200, 5 ,15); + t->Draw("Ach0.fTimeFront - Ach3.fTimeFront : Ach0.fAmpMax >> h4","","col"); + //x + h4->GetXaxis()->SetTitle("Max_ampl_{0} [V]"); + h4->GetXaxis()->CenterTitle(); + //y + h4->GetYaxis()->SetTitle("tau_TF"); + h4->GetYaxis()->CenterTitle(); + + c2->cd(2); + TH2F *h5 = new TH2F("h5", "front time tau vs amplitude 3", 200, 0, 0.5, 200, 5 ,15); + t->Draw("Ach0.fTimeFront - Ach3.fTimeFront : Ach3.fAmpMax >> h5","","col"); + //x + h5->GetXaxis()->SetTitle("Max_ampl_{3} [V]"); + h5->GetXaxis()->CenterTitle(); + //y + h5->GetYaxis()->SetTitle("tau_TF"); + h5->GetYaxis()->CenterTitle(); + + c2->Update(); + + c2->cd(3); + TH2F *h6 = new TH2F("h6", "amplitude 0 vs amplitude 3", 200, 0 ,0.1, 200, 0, 0.2); + t->Draw("Ach0.fAmpMax : Ach3.fAmpMax >> h6","","col"); + //x + h6->GetXaxis()->SetTitle("Max_ampl_{3} [V]"); + h6->GetXaxis()->CenterTitle(); + //y + h6->GetYaxis()->SetTitle("Max_ampl_{0} [V]"); + h6->GetYaxis()->CenterTitle(); + + c2->Print(Form("../macros/picsDRS4/file%s/time_front_corr2%s", foldername, ext)); + } + + if(can3) { + TCanvas *c3 = new TCanvas ("c3", "Correlation pictures for non-collimated data: time difference"); + c3->Divide(2,2); + + c3->cd(1); + TH1F *h10 = new TH1F("h10", "delta t (front edge fit)", 100, -15 , 15); + t->Draw("Ach0.fTimeFront - Ach3.fTimeFront >> h10","Ach0.fTimeFront>100. && Ach0.fTimeFront < 150 && Ach3.fTimeFront>100 && Ach3.fTimeFront < 150",""); + h10->Fit("gaus", "","",-5,3); + gStyle->SetOptFit(); + h10->GetXaxis()->SetTitle("delta t [ns]"); + h10->GetXaxis()->CenterTitle(); + + c3->cd(2); + TH1F *h7 = new TH1F("h7", "delta t (front edge fit) with edge slope correction", 100, -15, 15); + // t->Draw("Ach0.fTimeFront - Ach3.fTimeFront >> h7", + // "Ach0.fTimeFront>100. && Ach0.fTimeFront < 150 && Ach3.fTimeFront>100 && Ach2.fTimeFront < 150 && Ach0.fEdgeSlope > 0.01 && Ach3.fEdgeSlope > 0.01",""); + t->Draw("Ach0.fTimeFront - Ach3.fTimeFront >> h7","Ach0.fTimeFront>100. && Ach0.fTimeFront < 150 && Ach3.fTimeFront>100 && Ach3.fTimeFront < 150 && Ach0.fEdgeSlope > 0.005 && Ach3.fEdgeSlope > 0.001",""); + h7->Fit("gaus", "","",-5,3); + gStyle->SetOptFit(); + h7->GetXaxis()->SetTitle("delta t [ns]"); + h7->GetXaxis()->CenterTitle(); + + c3->cd(3); + TH1F *h8 = new TH1F("h8", "delta t (front edge fit) with charge correction", 100, -15 , 15); + t->Draw("Ach0.fTimeFront - Ach3.fTimeFront >> h8", + "Ach0.fTimeFront>100. && Ach0.fTimeFront < 150 && Ach3.fTimeFront>100 && Ach3.fTimeFront < 150 && Ach0.fChargeTF > 0.05e-9 && Ach3.fChargeTF > 0.025e-9",""); + h8->Fit("gaus","","",-5,3); + gStyle->SetOptFit(); + h8->GetXaxis()->SetTitle("delta t [ns]"); + h8->GetXaxis()->CenterTitle(); + + c3->cd(4); + TH1F *h9 = new TH1F("h9", "delta t (front edge fit) with rise time correction", 100, -15, 15); + + //for the bigger rise times - no peak + t->Draw("Ach0.fTimeFront - Ach3.fTimeFront >> h9","Ach0.fTimeFront> 100 && Ach0.fTimeFront<150 && Ach3.fTimeFront> 100 && Ach3.fTimeFront<150 && (Ach0.fTime90 - Ach0.fTime10) > 1.5 && (Ach0.fTime90 - Ach0.fTime10)<3 && (Ach3.fTime90 - Ach3.fTime10) > 1.5 && (Ach3.fTime90 - Ach3.fTime10)<3",""); + + //for the smaller rise times - peak !LOW STATISTICS! + //t->Draw("Ach0.fTimeFront - Ach3.fTimeFront >> h9","Ach0.fTimeFront> 100 && Ach0.fTimeFront<150 && Ach3.fTimeFront> 100 && Ach3.fTimeFront<150 && (Ach0.fTime90 - Ach0.fTime10) > 0.5 && (Ach0.fTime90 - Ach0.fTime10)<1.5 && (Ach3.fTime90 - Ach3.fTime10) > 0.3 && (Ach3.fTime90 - Ach3.fTime10)<1.3",""); + + h9->Fit("gaus","","",-5,3); + gStyle->SetOptFit(); + h9->GetXaxis()->SetTitle("delta t [ns]"); + h9->GetXaxis()->CenterTitle(); + + c3->Print(Form("../macros/picsDRS4/file%s/time_front_corr3%s", foldername, ext)); + } + + if(can4) { + TCanvas *c4 = new TCanvas ("c4", "Correlation pictures for non-collimated data: time difference"); + c4->Divide(2,2); + + c4->cd(1); + TH1F *h11 = new TH1F("h11", "rise time for ch0", 100, 0 , 5); + t->Draw("Ach0.fTime90 - Ach0.fTime10 >> h11","",""); + //gStyle->SetLineColor(kRed); + + c4->cd(2); + TH1F *h12 = new TH1F("h12", "rise time for ch3", 100, 0 , 5); + t->Draw("Ach3.fTime90 - Ach3.fTime10 >> h12","",""); + + + 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, -5, 5); + t->Draw("( Ach0.fTime10 + (Ach0.fTime90 - Ach0.fTime10)*0.5 ) - ( Ach3.fTime10 + (Ach3.fTime90 - Ach3.fTime10)*0.5 )>> h13","Ach0.fEdgeSlope > 0.01 && Ach3.fEdgeSlope > 0.006",""); + h13->Fit("gaus","","",-5,3); + gStyle->SetOptFit(); + c4->Print(Form("../macros/picsDRS4/file%s/time_front_corr4%s", foldername, ext)); + + } + + if(can5) { + TCanvas *c5 = new TCanvas ("c5", "Edge slopes"); + c5->Divide(2,2); + + c5->cd(1); + TH1F *h14 = new TH1F("h14", "edge slope distr for ch0", 100, 0 , 0.2); + t->Draw("Ach0.fEdgeSlope >> h14","",""); + //gStyle->SetLineColor(kRed); + + c5->cd(2); + TH1F *h15 = new TH1F("h15", "edge slope distr for ch3", 100, 0 , 0.2); + t->Draw("Ach3.fEdgeSlope >> h15","",""); + c5->Print(Form("../macros/picsDRS4/file%s/time_front_corr5%s", foldername, ext)); + + } +}