Commit 26e240a4 authored by Kostyleva D.A's avatar Kostyleva D.A

Commit to merge. Merge branch 'master' of http://er.jinr.ru:90/vratislav.chudoba/NeuRad_tests

parents 182bd869 07c6d669
......@@ -301,6 +301,10 @@ Double_t AEvent::GetfCFD() {
return fTimeCFD;
}
Double_t AEvent::GetfLED() {
return fTimeLED;
}
Double_t AEvent::GetOnefTime(Int_t i) {
return fTime[i];
}
......
......@@ -82,6 +82,8 @@ public:
Double_t GetfCFD();
Double_t GetfLED();
Double_t GetOnefTime(Int_t i);
Double_t GetOnefAmpPos(Int_t i);
......
//#include "TCanvas.h"
#include "TH2F.h"
#include "TH3F.h"
#include "TStyle.h"
void histCorr(
// const char *filename = "Neurad_7_08_NEW.root",
// const char *filename = "analysis_08_2.root",
const char *filename1 = "analysis_08_2.root",
const char *filename = "analysis_07_8.root",
const char *foldername = "7_8",
const char *foldername = "report",
// const char *foldername = "8_2",
// const char *ext = ".eps",
const char *ext = ".gif",
const Bool_t can1 = 0, const Bool_t can2 = 0,
const Bool_t can3 = 0, const Bool_t can4 = 0,
const Bool_t can5 = 0, const Bool_t can6 = 1)
const Bool_t can5 = 1, const Bool_t can6 = 1)
{
using std::cout;
using std::endl;
gSystem->Load("../libData.so");
TFile *f = new TFile(Form("../data/dataDSR4/%s", filename));
// TFile *f = new TFile("../data/dataDSR4/analysis_08_2.root");
TTree *t = (TTree*)f->Get("atree");
if (can1) {
TCanvas *c1 = new TCanvas("c1", "Correlation pictures: delta t from CFD vs something");
c1->Divide(2,2);
TFile *f1 = new TFile(Form("../data/dataDSR4/%s", filename1));
// TFile *f = new TFile("../data/dataDSR4/analysis_08_2.root");
TTree *t1 = (TTree*)f1->Get("atree");
// 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);
gStyle->SetCanvasDefH(900);
gStyle->SetCanvasDefW(1500);
// gStyle->SetCanvas
if (can1) { // t1 - коллимированные данные!!!
TCanvas *c1 = new TCanvas("c5", "Changing CFD parameters");
c1->Divide(2,2);
c1->cd(1);
t->Draw("Ach0.fChargeCFD : ( Ach0.fTimeCFD - Ach1.fTimeCFD ) >> h1","Ach0.fChargeCFD > 0.2e-9","col");
//x
h1->GetXaxis()->SetTitle("\\Delta \\tau_{0-1} [ns]");
TH1F *h1 = new TH1F("h1", "delta tau_CFD for NONcollimated data",1000 , -200., 200);
//t->Draw("Ach0.fTimeCFD - Ach3.fTimeCFD >> h1","(Ach0.fTimeCFD - Ach3.fTimeCFD)>0 && (Ach0.fTimeCFD - Ach3.fTimeCFD)<8","");
t->Draw("Ach0.fTimeCFD - Ach3.fTimeCFD >> h1","","");
h1->GetXaxis()->SetRangeUser(-65, 8);
h1->GetXaxis()->SetTitle("delta tauCFD [ns]");
h1->GetXaxis()->CenterTitle();
//y
h1->GetYaxis()->SetTitle("Q_{0} [C]");
h1->GetYaxis()->CenterTitle();
c1->Update();
c1->cd(2);
t->Draw("Ach1.fChargeCFD : ( Ach0.fTimeCFD - Ach1.fTimeCFD ) >> h2","Ach1.fChargeCFD>0.05e-9","col");
h2->GetXaxis()->SetTitle("\\Delta \\tau_{0-1} [ns]");
TH1F *h2 = new TH1F("h2", "delta tau_LED for NONcollimated data",1000, -200., 200);
//t->Draw("Ach0.fTimeLED - Ach3.fTimeLED >> h2","(Ach0.fTimeLED - Ach3.fTimeLED)>0 && (Ach0.fTimeLED - Ach3.fTimeLED)<8","");
t->Draw("Ach0.fTimeLED - Ach3.fTimeLED >> h2","","");
h2->GetXaxis()->SetRangeUser(-65, 8);
h2->GetXaxis()->SetTitle("delta tauLED [ns]");
h2->GetXaxis()->CenterTitle();
//y
h2->GetYaxis()->SetTitle("Q_{1} [C]");
h2->GetYaxis()->CenterTitle();
c1->Update();
c1->cd(3);
t->Draw("Ach0.fAmpMax: ( Ach0.fTimeCFD - Ach1.fTimeCFD ) >> h3","","col");
//x
h3->GetXaxis()->SetTitle("\\Delta \\tau_{0-1} [ns]");
TH1F *h3 = new TH1F("h3", "delta tau_CFD for collimated data",1000 , 0, 200);
t1->Draw("Ach0.fTimeCFD - Ach1.fTimeCFD >> h3","(Ach0.fTimeCFD - Ach1.fTimeCFD)>0 && (Ach0.fTimeCFD - Ach1.fTimeCFD)<150","");
//t1->Draw("Ach0.fTimeCFD - Ach1.fTimeCFD >> h3","","");
h3->GetXaxis()->SetRangeUser(0, 150);
h3->GetXaxis()->SetTitle("delta tauCFD [ns]");
h3->GetXaxis()->CenterTitle();
//y
h3->GetYaxis()->SetTitle("Max_ampl_{0} [V]");
h3->GetYaxis()->CenterTitle();
c1->Update();
c1->cd(4);
t->Draw("Ach1.fAmpMax: ( Ach0.fTimeCFD - Ach1.fTimeCFD ) >> h4","","col");
//x
h4->GetXaxis()->SetTitle("\\Delta \\tau_{0-1} [ns]");
TH1F *h4 = new TH1F("h4", "delta tau_LED for collimated data",1000 , -200., 200);
t1->Draw("Ach0.fTimeLED - Ach1.fTimeLED >> h4","(Ach0.fTimeLED - Ach1.fTimeLED)>-2 && (Ach0.fTimeLED - Ach1.fTimeLED)<15","");
//t1->Draw("Ach0.fTimeLED - Ach1.fTimeLED >> h4","","");
h4->GetXaxis()->SetRangeUser(-2,15);
h4->GetXaxis()->SetTitle("delta tauLED [ns]");
h4->GetXaxis()->CenterTitle();
//y
h4->GetYaxis()->SetTitle("Max_ampl_{1} [V]");
h4->GetYaxis()->CenterTitle();
c1->Show();
c1->Update();
//c1->Print(Form("../macros/picsDRS4/file%s/TimeDiffCFD%s", foldername, ext));
//c1->Print(Form("../macros/picsDRS4/%s/deltaT%s", foldername, ext));
}
if (can2) {
TCanvas *c2 = new TCanvas("c2", "Correlation pictures: Integrals and amplitudes");
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);
TH2F *h5 = new TH2F("h5", "maxapl of the first channel vs maxamp of the second channel", 300, 0 ,0.1, 300, 0, 0.2);
c2->cd(1);
t->Draw("Ach0.fChargeCFD : Ach1.fChargeCFD >> h5","","col1");
t1->Draw("Ach0.fAmpMax : Ach1.fAmpMax >> h5","","col");
//x
h5->GetXaxis()->SetTitle("Q_{1} [C]");
h5->GetXaxis()->SetTitle("Max_ampl_{1} [V]");
h5->GetXaxis()->CenterTitle();
//y
h5->GetYaxis()->SetTitle("Q_{0} [C]");
h5->GetYaxis()->SetTitle("Max_ampl_{0} [V]");
h5->GetYaxis()->CenterTitle();
c2->Update();
c2->cd(3);
t->Draw("Ach0.fAmpMax : Ach1.fAmpMax >> h6","","col");
TH2F *h6 = new TH2F("h6", "tau(fTimeLed0-fTimeLed1) vs amplitude of the trigered channel", 200, 0 ,0.5, 200, 5, 15);
c2->cd(2);
t1->Draw("Ach0.fTimeLED - Ach1.fTimeLED : Ach0.fAmpMax >> h6","","col");
//x
h6->GetXaxis()->SetTitle("Max_ampl_{1} [V]");
h6->GetXaxis()->SetTitle("Max_ampl_{0} [V]");
h6->GetXaxis()->CenterTitle();
//y
h6->GetYaxis()->SetTitle("Max_ampl_{0} [V]");
h6->GetYaxis()->SetTitle("tau_LED [V]");
h6->GetYaxis()->CenterTitle();
c2->Update();
TH2F *h7 = new TH2F("h7", "tau(fTimeLed0-fTimeLed1) vs summ of amplitudes", 200, 0 ,0.5, 200, 5, 15);
c2->cd(3);
t1->Draw("Ach0.fTimeLED - Ach1.fTimeLED : Ach0.fAmpMax + Ach1.fAmpMax >> h7","","col");
//x
h7->GetXaxis()->SetTitle("summ_Amps [V]");
h7->GetXaxis()->CenterTitle();
//y
h7->GetYaxis()->SetTitle("tau_LED [V]");
h7->GetYaxis()->CenterTitle();
c2->Update();
TH2F *h8 = new TH2F("h8", "tau(fTimeCFD0-fTimeCFD1) vs summ of amplitudes", 200, 0 ,0.5, 200, -150, 150);
c2->cd(4);
t1->Draw("Ach0.fTimeCFD - Ach1.fTimeCFD : Ach0.fAmpMax + Ach1.fAmpMax >> h8","","col");
//x
h8->GetXaxis()->SetTitle("summ_Amps [V]");
h8->GetXaxis()->CenterTitle();
//y
h8->GetYaxis()->SetTitle("tau_CFD [V]");
h8->GetYaxis()->CenterTitle();
c2->Update();
c2->Print(Form("../macros/picsDRS4/file%s/IntergAmpl%s", foldername, ext));
// c2->Print("../macros/picsDRS4/file7_8/IntergAmpl.eps");
//c2->Print(Form("../macros/picsDRS4/%s/tauVSAmpl%s", foldername, ext));
}
if (can3) {
TCanvas *c3 = new TCanvas("c3", "Correlation pictures: rising edge times");
TCanvas *c3 = new TCanvas("c3", "Correlation pictures: Integrals and amplitudes");
c3->Divide(2,2);
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.);
TH1F *h9 = new TH1F("h9", "Delta tau", 100, -10., 30.);
TH1F *h10 = new TH1F("h10", "Time difference between 90 and 10 > 0 and chi square < 0.0005", 100, 0., 5.);
TH2F *h9 = new TH2F("h9", "tau_led vs chargeLed KOLLIMATED", 200, 0 ,5e-10, 200, 5, 15);
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) && (Ach1.fEdgeXi < 0.0015)","col");
// t->Draw("Ach0.fTime90 - Ach0.fTime10 >> h7","","col");
t1->Draw("Ach0.fTimeLED - Ach1.fTimeLED : Ach0.fChargeLED >> h9","","col");
//x
h7->GetXaxis()->SetTitle("\\Delta \\tau_{0}^{(rise)} [ns]");
h7->GetXaxis()->CenterTitle();
c3->Update();
h9->GetXaxis()->SetTitle("Charge [kl]");
h9->GetXaxis()->CenterTitle();
//y
h9->GetYaxis()->SetTitle("tauLED [ns]");
h9->GetYaxis()->CenterTitle();
TH2F *h10 = new TH2F("h10", "tau_led vs chargeLed NONKOLLIMATED", 200, 0 ,8e-10, 200, -10, 5);
c3->cd(3);
t->Draw(" Ach1.fChargeCFD : (Ach1.fTime90 - Ach1.fTime10) >> h8","(Ach1.fTime90 - Ach1.fTime10)>0","col");
t->Draw("Ach0.fTimeLED - Ach3.fTimeLED : Ach0.fChargeLED >> h10","","col");
//x
h8->GetXaxis()->SetTitle("\\Delta \\tau_{0}^{(rise)} [ns]");
h8->GetXaxis()->CenterTitle();
h10->GetXaxis()->SetTitle("Charge [kl]");
h10->GetXaxis()->CenterTitle();
//y
h8->GetYaxis()->SetTitle("Q_{0} [C]");
h8->GetYaxis()->CenterTitle();
h10->GetYaxis()->SetTitle("tauLED [ns]");
h10->GetYaxis()->CenterTitle();
c3->Update();
TH2F *h11 = new TH2F("h11", "tauLED vs summCharge COLLIMATED", 200, 0 ,1e-9, 200, 5, 15);
c3->cd(2);
// 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","");
t1->Draw("Ach0.fTimeLED - Ach1.fTimeLED : Ach0.fChargeLED + Ach1.fChargeLED >> h11","","col");
//x
h9->GetXaxis()->SetTitle("\\Delta \\tau_{0-1} [ns]");
h9->GetXaxis()->CenterTitle();
TF1 *fGaus = new TF1("f1", "gaus", 8.5, 13.);
h9->Fit(fGaus, "R");
c3->Update();
h11->GetXaxis()->SetTitle("Summ_Charge [kl]");
h11->GetXaxis()->CenterTitle();
//y
h11->GetYaxis()->SetTitle("tau_LED [V]");
h11->GetYaxis()->CenterTitle();
c3->Update();
TH2F *h12 = new TH2F("h12", "tau_led vs summCharge NONKOLLIMATED", 200, 0 ,8e-10, 200, -10, 5);
c3->cd(4);
t->Draw("Ach1.fTime90 - Ach1.fTime10 >> h10","((Ach1.fTime90-Ach1.fTime10)>=0)","");
t->SetLineColor(kRed);
t->Draw("Ach1.fTime90 - Ach1.fTime10 ","((Ach1.fTime90-Ach1.fTime10)>=0) && (Ach1.fEdgeXi < 0.0005)","same"); //????????
h10->GetXaxis()->SetTitle("\\Delta \\tau_{1}^{(rise)} [ns]");
h10->GetXaxis()->CenterTitle();
t->Draw("Ach0.fTimeLED - Ach3.fTimeLED : Ach0.fChargeLED + Ach3.fChargeLED >> h12","","col");
//x
h12->GetXaxis()->SetTitle("Summ_Charge [kl]");
h12->GetXaxis()->CenterTitle();
//y
h12->GetYaxis()->SetTitle("tauLED [ns]");
h12->GetYaxis()->CenterTitle();
c3->Update();
c3->Print(Form("../macros/picsDRS4/file%s/RisingEdge%s", foldername, ext));
// c3->Print("../macros/picsDRS4/file7_8/RisingEdge.eps");
c3->Print(Form("../macros/picsDRS4/%s/tauVSCHARGE%s", foldername, ext));
}
if (can4) {
......@@ -174,117 +205,84 @@ void histCorr(
if (can5) {
TCanvas *c5 = new TCanvas("c5", "Changing CFD parameters");
c5->Divide(1,2);
c5->Divide(2,2);
c5->cd(1);
TH1F *h12 = new TH1F("h12", "Delta tau CFD",100, -10., 30.);
TH1F *h12 = new TH1F("h12", "tau_CFD triggered channel for NONcollimated data",1000, 0., 200);
t->Draw("Ach0.fTimeCFD >> h12","Ach0.fTimeCFD>132 && Ach0.fTimeCFD<142","");
h12->GetXaxis()->SetRangeUser(120, 150);
h12->GetXaxis()->SetTitle("tauCFD_{0} [ns]");
h12->GetXaxis()->CenterTitle();
// c5->Divide(1,2);
// c5->cd(1);
t->Draw("Ach0.fTimeCFD - Ach1.fTimeCFD >> h12","Ach1.fChargeCFD>0.05e-9 && Ach1.fChargeCFD<0.5e-9","");
c5->cd(2);
TH1F *h13 = new TH1F("h13", "tau LED triggered channel for NONcollimated data",1000, 0., 200);
h12->GetXaxis()->SetTitle("\\Delta \\tau_{0-1} [ns]");
h12->GetXaxis()->CenterTitle();
TF1 *fGaus = new TF1("f1", "gaus", 8.5, 13.);
h12->Fit(fGaus, "R");
gStyle->SetOptFit();
t->Draw("Ach0.fTimeLED >> h13","Ach0.fTimeLED>132 && Ach0.fTimeLED<142","");
h13->GetXaxis()->SetRangeUser(120, 150);
h13->GetXaxis()->SetTitle("tauLED_{0} [ns]");
h13->GetXaxis()->CenterTitle();
c5->cd(2);
TH3F *h3d = new TH3F("h3d","3d histo", 100, -10, 30, 125, 0, 5e-9, 125, 0, 5e-9);
t->Draw("Ach1.fChargeCFD : Ach0.fChargeCFD : (Ach0.fTimeCFD - Ach1.fTimeCFD) >> h3d","","");
c5->cd(3);
h3d->GetXaxis()->SetTitle("\\Delta \\tau_{0-1} [ns]");
h3d->GetXaxis()->CenterTitle();
TH1F *h14 = new TH1F("h14", "tau_CFD nontriggered channel for NONcollimated data",1000 , 0., 200);
h3d->GetYaxis()->SetTitle("Q_{0} [C]");
h3d->GetYaxis()->CenterTitle();
t->Draw("Ach1.fTimeCFD >> h14","Ach1.fTimeCFD > 120 && Ach1.fTimeCFD<180","");
h14->GetXaxis()->SetRangeUser(120, 150);
h14->GetXaxis()->SetTitle("tauCFD_{0} [ns]");
h14->GetXaxis()->CenterTitle();
c5->cd(4);
TH1F *h15 = new TH1F("h15", "tau LED nontriggered channel for NONcollimated data",1000 , 0., 200);
h3d->GetZaxis()->SetTitle("Q_{1} [C]");
h3d->GetZaxis()->CenterTitle();
t->Draw("Ach1.fTimeLED >> h15","Ach1.fTimeLED>120 && Ach1.fTimeLED<180","");
h15->GetXaxis()->SetRangeUser(120, 150);
h15->GetXaxis()->SetTitle("tauLED_{0} [ns]");
h15->GetXaxis()->CenterTitle();
c5->Update();
//c5->Print(Form("../macros/picsDRS4/file%s/TimeDiffCFD_0.7_3%s", foldername, ext));
c5->Print(Form("../macros/picsDRS4/%s/NONcollimatedT%s", foldername, ext));
}
if (can6) {
TCanvas *c6 = new TCanvas("c6", "leading edge vs charge");
TCanvas *c6 = new TCanvas("c6", "Changing CFD parameters");
c6->Divide(2,2);
c6->cd(1);
//TH2F *h13 = new TH2F("h13", "leading edge vs charge",100, 130., 145., 100, -2e-9, 6e-9);
TH1F *h20 = new TH1F("h20", "delta Tau CFD", 100, -20., 0.);
//t->Draw("Ach0.fTimeCFD - Ach0.fTimeLED >> h20","Ach0.fTimeCFD - Ach0.fTimeLED > 0.3 && Ach0.fTimeCFD - Ach0.fTimeLED <1.3","");
t->Draw("Ach1.fTimeCFD - Ach0.fTimeCFD >> h20","Ach0.fTimeCFD >0. && Ach1.fTimeCFD >0.");
//t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");;
//x
/* h13->GetYaxis()->SetTitle("fChargeCFD");
h13->GetYaxis()->CenterTitle();
//y
h13->GetXaxis()->SetTitle("fTimeLED");
h13->GetXaxis()->CenterTitle();*/
c6->Update();
c6->cd(3);
// TH2F *h14 = new TH2F("h14", "fTIMECFD vs fTIMELED",100, 110., 140., 100, 110, 160);
// TH1F *h14 = new TH1F("h14", "delta Tau LED", 100, -20., 0.);
TH1F *h14 = new TH1F("h14", "delta Tau LED", 50, -8., 10.);
// TH1F *h140 = new TH1F("h140", "delta Tau LED", 100, -20., 0.);
TH1F *h140 = new TH1F("h140", "delta Tau LED", 50, -8., 10.);
// t->Draw("Ach0.fTimeLED - Ach0.fTimeLED >> h14","","");
// t->Draw("Ach2.fTimeLED - Ach0.fTimeLED >> h14","","");
t->Draw("Ach1.fTimeLED - Ach0.fTimeLED >> h14","","");
// t->SetLineColor(kRed);
// cout << t->Draw("Ach0.fTimeLED - Ach0.fTimeLED >> h140","Ach1.fChargeLED > 0.04e-9","same") << endl;
// cout << t->Draw("Ach2.fTimeLED - Ach0.fTimeLED >> h140","Ach2.fChargeLED > 0.04e-9","same") << endl;
cout << t->Draw("Ach1.fTimeLED - Ach0.fTimeLED >> h140","Ach1.fChargeLED > 0.04e-9","same") << endl;
h140->SetLineColor(kRed);
//t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");;
//x
h14->GetYaxis()->SetTitle("N");
h14->GetYaxis()->CenterTitle();
//y
h14->GetXaxis()->SetTitle("delta tau");
h14->GetXaxis()->CenterTitle();
TH1F *h16 = new TH1F("h16", "tau_CFD triggered channel for collimated data",1000, 0., 200);
// h14->Fit("gaus", "", "", -13, -6);
// h140->Fit("gaus", "", "", -13, -6);
h14->Fit("gaus", "", "", -2, 6);
h140->Fit("gaus", "", "", -2, 6);
t1->Draw("Ach0.fTimeCFD >> h16","Ach0.fTimeCFD>132 && Ach0.fTimeCFD<142","");
h16->GetXaxis()->SetRangeUser(120, 150);
h16->GetXaxis()->SetTitle("tauCFD_{0} [ns]");
h16->GetXaxis()->CenterTitle();
gStyle->SetOptFit();
c6->cd(2);
TH1F *h17 = new TH1F("h17", "tau LED triggered channel for collimated data",1000, 0., 200);
c6->Update();
t1->Draw("Ach0.fTimeLED >> h17","Ach0.fTimeLED>132 && Ach0.fTimeLED<142","");
h17->GetXaxis()->SetRangeUser(120, 150);
h17->GetXaxis()->SetTitle("tauLED_{0} [ns]");
h17->GetXaxis()->CenterTitle();
c6->cd(2);
TH2F *h15 = new TH2F("h15", "leading edge vs charge",50, 120., 140.,200, -0.02e-10, 4e-10);
t->Draw("Ach1.fChargeLED : Ach1.fTimeLED >> h15","Ach1.fChargeLED>0","col");
// t->Draw("Ach1.fChargeLED : Ach1.fTimeLED","Ach1.fChargeLED>0.02e-10 && Ach1.fChargeLED<4e-10 && Ach1.fTimeLED>120. && Ach1.fTimeLED<140.","");
//t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");;
//x
h15->GetYaxis()->SetTitle("fChargeLED");
h15->GetYaxis()->CenterTitle();
//y
h15->GetXaxis()->SetTitle("fTimeLED");
h15->GetXaxis()->CenterTitle();
c6->Update();
c6->cd(3);
TH1F *h18 = new TH1F("h18", "tau_CFD nontriggered channel for collimated data",1000 , 0., 200);
t1->Draw("Ach1.fTimeCFD >> h18","Ach1.fTimeCFD > 120 && Ach1.fTimeCFD<180","");
h18->GetXaxis()->SetRangeUser(120, 150);
h18->GetXaxis()->SetTitle("tauCFD_{0} [ns]");
h18->GetXaxis()->CenterTitle();
c6->cd(4);
TH2F *h16 = new TH2F("h16", "delta timeLED vs charge", 200, -20., 0.,100, 0, 10e-10);
// t->Draw("Ach1.fChargeLED : Ach1.fTimeLED - Ach0.fTimeLED >> h16","Ach1.fChargeLED>3e-12","col");
t->Draw("Ach1.fChargeLED : Ach1.fTimeLED - Ach0.fTimeLED >> h16","Ach1.fTimeLED - Ach0.fTimeLED > -20. && Ach1.fTimeLED - Ach0.fTimeLED < 0. && Ach1.fChargeLED<10e-10","col");
//t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");;
//x
h16->GetYaxis()->SetTitle("fChargeLED");
h16->GetYaxis()->CenterTitle();
//y
h16->GetXaxis()->SetTitle("delta tau LED");
h16->GetXaxis()->CenterTitle();
TH1F *h19 = new TH1F("h19", "tau LED nontriggered channel for collimated data",1000 , 0., 200);
t1->Draw("Ach1.fTimeLED >> h19","Ach1.fTimeLED>120 && Ach1.fTimeLED<180","");
h19->GetXaxis()->SetRangeUser(120, 150);
h19->GetXaxis()->SetTitle("tauLED_{0} [ns]");
h19->GetXaxis()->CenterTitle();
c6->Update();
//c4->Print(Form("../macros/picsDRS4/file%s/XiSquares%s", foldername, ext));
c6->Print(Form("../macros/picsDRS4/%s/collimatedT%s", foldername, ext));
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
#include <TTree.h>
#include <TGraph.h>
#include <TFile.h>
#include <TSystem.h>
#include <TCanvas.h>
#include "TStyle.h"
void testShowGraphs()
{
using std::cout;
using std::endl;
gStyle->SetCanvasDefH(900);
gStyle->SetCanvasDefW(1500);
const char *foldername = "7_8";
const char *ext = ".gif";
gSystem->Load("../libData.so");
const Long64_t kFirstEvent = 128;
// TFile fr("../data/dataDSR4/Neurad_7_08_NEW.root");
// TFile fr("../data/dataDSR4/analysis_07_8.root");
<<<<<<< HEAD
<<<<<<< HEAD
// TFile fr("../data/dataDSR4/Neurad_081216_2NEW.root");
// TFile fr("../data/dataTektronix/exp18.root");
=======
=======
TFile fr("../data/dataDSR4/analysis_08_2.root");
>>>>>>> 58f61cb195c6b08755455386b15990ce4c27b599
// TFile fr("../data/dataDSR4/Neurad_081216_2NEW.root");
// TFile fr("../data/dataTektronix/exp18.root");
>>>>>>> 09d9ad17f40ac0af9d228137f715f25ee9ea15ae
// TFile fr("../data/dataTektronix/analysisExp7.root");
TTree *tr = (TTree*)fr.Get("atree");
AEvent *revent = new AEvent();
cout << tr->SetBranchAddress("Ach0.",&revent) << endl;
tr->SetBranchAddress("Ach0.",&revent);
TGraph *gr[13];
Double_t t10[13];
Double_t t90[13];
// cout << "warning" << endl;
cout << tr->GetEntries() << endl;
//loop over events
for (Long64_t i = 0; i < 13; i++) {
gr[i] = 0;
t10[i] = 0;
t90[i] = 0;
// cout << "warning 1" << endl;
// cout << i+kFirstEvent << endl;
tr->GetEntry(i+kFirstEvent);
// tr->GetEntry(i);
// cout << "warning 2" << endl;
gr[i] = new TGraph(*revent->GetGraphSignal());
t10[i] = revent->GetT_10();
t90[i] = revent->GetT_90();
......@@ -56,40 +60,28 @@ void testShowGraphs()
}//for over events
// cout << "warning 3" << endl;
TCanvas *c1 = new TCanvas("c1","test",10,10,1000,600);
<<<<<<< HEAD
//c1->Divide(3,2);
c1->Divide(3,4);
c1->Divide(2,2);
=======
//c1->Divide(3,2);
c1->Divide(3,4);
>>>>>>> 09d9ad17f40ac0af9d228137f715f25ee9ea15ae
TF1 *f1 = new TF1("f1name", "[0]+x*[1]");
// TF1 *f1 = new TF1("pol1", );
<<<<<<< HEAD
for (Int_t k = 0; k < 6; k++) {
// for (Int_t k = 0; k < 12; k++) {
=======
for (Int_t k = 0; k < 12; k++) {
>>>>>>> 09d9ad17f40ac0af9d228137f715f25ee9ea15ae
for (Int_t k = 0; k < 4; k++) {
c1->cd(k+1);
gr[k]->GetXaxis()->SetRangeUser(130, 175);
gr[k]->GetXaxis()->SetTitle("Time [ns]");
gr[k]->GetXaxis()->CenterTitle();
gr[k]->GetYaxis()->SetTitle("Signal [V]");
gr[k]->GetYaxis()->CenterTitle();
gr[k]->Draw("AL*");
//cout << t10[k] << "\t" << t90[k] << endl;
//f1->SetRange(t10[k], t90[k]);
//gr[k]->Fit(f1, "RQ");
}
c1->Print(Form("../macros/picsDRS4/file%s/signals%s", foldername, ext));
// c1->cd(2);
// tr->Draw("gAmp.Draw()","","goff",1,124);
}
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