Commit 6f2d0c78 authored by Muzalevsky I.A's avatar Muzalevsky I.A

now we can obtain XiSquare of Edge using AEvent

parent 3bb4c319
...@@ -81,6 +81,7 @@ void AEvent::Reset() { ...@@ -81,6 +81,7 @@ void AEvent::Reset() {
} }
fEdgeSlope=0.; fEdgeSlope=0.;
fEdgeXi=0.;
fEdgeSlope=-100.; fEdgeSlope=-100.;
fTime10=0.; fTime10=0.;
fTime90=0.; fTime90=0.;
...@@ -212,6 +213,7 @@ void AEvent::FindFrontProperties() { ...@@ -212,6 +213,7 @@ void AEvent::FindFrontProperties() {
// fGraphSignal->Fit(fit1,"RQ","goff"); // fGraphSignal->Fit(fit1,"RQ","goff");
fGraphSignal->Fit(fit1,"RQN","goff"); fGraphSignal->Fit(fit1,"RQN","goff");
fEdgeSlope = fit1->GetParameter(1); fEdgeSlope = fit1->GetParameter(1);
fEdgeXi = fit1->GetChisquare();
delete fit1; delete fit1;
} }
...@@ -279,6 +281,10 @@ Double_t AEvent::GetEdgeSlope() { ...@@ -279,6 +281,10 @@ Double_t AEvent::GetEdgeSlope() {
return fEdgeSlope; return fEdgeSlope;
} }
Double_t AEvent::GetEdgeXi() {
return fEdgeXi;
}
void AEvent::SetMaxAmplitudes() { void AEvent::SetMaxAmplitudes() {
Double_t maxAmp = 0.; Double_t maxAmp = 0.;
Double_t maxAmpT = 0.; Double_t maxAmpT = 0.;
......
...@@ -39,6 +39,7 @@ private: ...@@ -39,6 +39,7 @@ private:
Double_t fAmpMax; Double_t fAmpMax;
Double_t fTimeAmpMax; Double_t fTimeAmpMax;
Double_t fZeroLevel; Double_t fZeroLevel;
Double_t fEdgeXi;
Double_t fEdgeSlope; //slope coefficient for the rising edge of the signal Double_t fEdgeSlope; //slope coefficient for the rising edge of the signal
Double_t fTime10; //time of 10% of rising edge amplitude in ns Double_t fTime10; //time of 10% of rising edge amplitude in ns
Double_t fTime90; //time of 10% of rising edge amplitude in ns Double_t fTime90; //time of 10% of rising edge amplitude in ns
...@@ -73,6 +74,8 @@ public: ...@@ -73,6 +74,8 @@ public:
Double_t GetEdgeSlope(); Double_t GetEdgeSlope();
//returns slope coefficient for the rising edge of the signal //returns slope coefficient for the rising edge of the signal
Double_t GetEdgeXi();
Double_t GetfCFD(); Double_t GetfCFD();
Double_t GetOnefTime(Int_t i); Double_t GetOnefTime(Int_t i);
Double_t GetOnefAmpPos(Int_t i); Double_t GetOnefAmpPos(Int_t i);
......
//#include "TCanvas.h" //#include "TCanvas.h"
void histCorr(const Bool_t can1 = 1, const Bool_t can2 = 1, const Bool_t can3 = 1) void histCorr(const Bool_t can1 = 0, const Bool_t can2 = 0, const Bool_t can3 = 0, const Bool_t can4 = 1)
{ {
gSystem->Load("../libData.so"); gSystem->Load("../libData.so");
// TFile *f = new TFile("../data/dataDSR4/analysis_07_8.root"); // TFile *f = new TFile("../data/dataDSR4/analysis_07_8.root");
TFile *f = new TFile("../data/dataDSR4/analysis_08_2.root"); TFile *f = new TFile("../data/dataDSR4/test18.root");
TTree *t = (TTree*)f->Get("atree"); TTree *t = (TTree*)f->Get("atree");
if (can1) { if (can1) {
...@@ -96,7 +96,8 @@ void histCorr(const Bool_t can1 = 1, const Bool_t can2 = 1, const Bool_t can3 = ...@@ -96,7 +96,8 @@ void histCorr(const Bool_t can1 = 1, const Bool_t can2 = 1, const Bool_t can3 =
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.);
c3->cd(1); c3->cd(1);
t->Draw("Ach0.fTime90 - Ach0.fTime10 >> h7","(Ach0.fTime90-Ach0.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"); // t->Draw("Ach0.fTime90 - Ach0.fTime10 >> h7","","col");
//x //x
h7->GetXaxis()->SetTitle("\\Delta \\tau_{0}^{(rise)} [ns]"); h7->GetXaxis()->SetTitle("\\Delta \\tau_{0}^{(rise)} [ns]");
...@@ -104,7 +105,7 @@ void histCorr(const Bool_t can1 = 1, const Bool_t can2 = 1, const Bool_t can3 = ...@@ -104,7 +105,7 @@ void histCorr(const Bool_t can1 = 1, const Bool_t can2 = 1, const Bool_t can3 =
c3->Update(); c3->Update();
c3->cd(3); c3->cd(3);
t->Draw(" Ach0.fChargeCFD : (Ach0.fTime90 - Ach0.fTime10) >> h8","(Ach0.fTime90 - Ach0.fTime10)>0","col"); t->Draw(" Ach1.fChargeCFD : (Ach1.fTime90 - Ach1.fTime10) >> h8","(Ach1.fTime90 - Ach1.fTime10)>0","col");
//x //x
h8->GetXaxis()->SetTitle("\\Delta \\tau_{0}^{(rise)} [ns]"); h8->GetXaxis()->SetTitle("\\Delta \\tau_{0}^{(rise)} [ns]");
h8->GetXaxis()->CenterTitle(); h8->GetXaxis()->CenterTitle();
...@@ -114,7 +115,7 @@ void histCorr(const Bool_t can1 = 1, const Bool_t can2 = 1, const Bool_t can3 = ...@@ -114,7 +115,7 @@ void histCorr(const Bool_t can1 = 1, const Bool_t can2 = 1, const Bool_t can3 =
c3->Update(); c3->Update();
c3->cd(2); c3->cd(2);
t->Draw(" (Ach1.fTime90 - Ach1.fTime10) : (Ach0.fTime90 - Ach0.fTime10) >> h9","(Ach0.fTime90 - Ach0.fTime10)>0","col"); t->Draw(" (Ach1.fTime90 - Ach1.fTime10) : (Ach1.fTime90 - Ach1.fTime10) >> h9","(Ach1.fTime90 - Ach1.fTime10)>0","col");
//x //x
h9->GetXaxis()->SetTitle("\\Delta \\tau_{0}^{(rise)} [ns]"); h9->GetXaxis()->SetTitle("\\Delta \\tau_{0}^{(rise)} [ns]");
h9->GetXaxis()->CenterTitle(); h9->GetXaxis()->CenterTitle();
...@@ -122,6 +123,28 @@ void histCorr(const Bool_t can1 = 1, const Bool_t can2 = 1, const Bool_t can3 = ...@@ -122,6 +123,28 @@ void histCorr(const Bool_t can1 = 1, const Bool_t can2 = 1, const Bool_t can3 =
h9->GetYaxis()->SetTitle("\\Delta \\tau_{1}^{(rise)} [ns]"); h9->GetYaxis()->SetTitle("\\Delta \\tau_{1}^{(rise)} [ns]");
h9->GetYaxis()->CenterTitle(); h9->GetYaxis()->CenterTitle();
c3->Update(); c3->Update();
c3->cd(4);
t->Draw("Ach1.fTime90 - Ach1.fTime10","((Ach1.fTime90-Ach1.fTime10)>=0)","col");
t->SetLineColor(kRed);
t->Draw("Ach1.fTime90 - Ach1.fTime10","((Ach1.fTime90-Ach1.fTime10)>=0) && (Ach1.fEdgeXi < 0.0005)","same");
c3->Update();
} }
if (can4) {
TCanvas *c4 = new TCanvas("c4", "Correlation pictures: rising edge times");
TH2F *h10 = new TH2F("h10", "Time difference between two channels vs XiSquare of edge",100, -0., 5., 100, 0., 0.005);
t->Draw("Ach1.fEdgeXi : (Ach1.fTime90 - Ach1.fTime10) >> h10","(Ach1.fTime90 - Ach1.fTime10)>0","col");
//x
h10->GetXaxis()->SetTitle("\\Delta \\tau_{0}^{(rise)} [ns]");
h10->GetXaxis()->CenterTitle();
//y
h10->GetYaxis()->SetTitle("fEdgeXi");
h10->GetYaxis()->CenterTitle();
c4->Update();
}
} }
...@@ -7,7 +7,7 @@ void testShowGraphs() ...@@ -7,7 +7,7 @@ void testShowGraphs()
// TFile fr("../data/dataDSR4/analysis_07_1.root"); // TFile fr("../data/dataDSR4/analysis_07_1.root");
// TFile fr("../data/dataDSR4/analysis_07_8.root"); // TFile fr("../data/dataDSR4/analysis_07_8.root");
TFile fr("../data/dataDSR4/analysis_08_2.root"); TFile fr("../data/dataTektronix/exp18.root");
// TFile fr("../data/dataTektronix/analysisExp7.root"); // TFile fr("../data/dataTektronix/analysisExp7.root");
TTree *tr = (TTree*)fr.Get("atree"); TTree *tr = (TTree*)fr.Get("atree");
......
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