diff --git a/dataClasses/AEvent.cpp b/dataClasses/AEvent.cpp index 2d97aa58938625f5ab45379335815384484af331..972e6100ff2f648559d3ed44c352d1f03328a0a2 100644 --- a/dataClasses/AEvent.cpp +++ b/dataClasses/AEvent.cpp @@ -81,6 +81,7 @@ void AEvent::Reset() { } fEdgeSlope=0.; + fEdgeXi=0.; fEdgeSlope=-100.; fTime10=0.; fTime90=0.; @@ -212,6 +213,7 @@ void AEvent::FindFrontProperties() { // fGraphSignal->Fit(fit1,"RQ","goff"); fGraphSignal->Fit(fit1,"RQN","goff"); fEdgeSlope = fit1->GetParameter(1); + fEdgeXi = fit1->GetChisquare(); delete fit1; } @@ -279,6 +281,10 @@ Double_t AEvent::GetEdgeSlope() { return fEdgeSlope; } +Double_t AEvent::GetEdgeXi() { + return fEdgeXi; +} + void AEvent::SetMaxAmplitudes() { Double_t maxAmp = 0.; Double_t maxAmpT = 0.; diff --git a/dataClasses/AEvent.h b/dataClasses/AEvent.h index e6d996cb3fab4123fb13825228c20b0510520566..a3ead24a132478add8c8cecc19c72855ae3c64ea 100644 --- a/dataClasses/AEvent.h +++ b/dataClasses/AEvent.h @@ -39,6 +39,7 @@ private: Double_t fAmpMax; Double_t fTimeAmpMax; Double_t fZeroLevel; + Double_t fEdgeXi; 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 fTime90; //time of 10% of rising edge amplitude in ns @@ -73,6 +74,8 @@ public: Double_t GetEdgeSlope(); //returns slope coefficient for the rising edge of the signal + Double_t GetEdgeXi(); + Double_t GetfCFD(); Double_t GetOnefTime(Int_t i); Double_t GetOnefAmpPos(Int_t i); diff --git a/macros/histCorr.C b/macros/histCorr.C index 27fd1e8455738f3b0db237ee84c141406d83ef01..4c900e3b47625872c30def1bcbc2358fd35c5f7f 100644 --- a/macros/histCorr.C +++ b/macros/histCorr.C @@ -1,10 +1,10 @@ //#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"); // 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"); if (can1) { @@ -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.); 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"); //x 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 = c3->Update(); 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 h8->GetXaxis()->SetTitle("\\Delta \\tau_{0}^{(rise)} [ns]"); h8->GetXaxis()->CenterTitle(); @@ -114,7 +115,7 @@ void histCorr(const Bool_t can1 = 1, const Bool_t can2 = 1, const Bool_t can3 = c3->Update(); 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 h9->GetXaxis()->SetTitle("\\Delta \\tau_{0}^{(rise)} [ns]"); h9->GetXaxis()->CenterTitle(); @@ -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()->CenterTitle(); 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(); +} + } diff --git a/macros/testShowGraphs.cxx b/macros/testShowGraphs.cxx index c0ca2a46bf69539c60a689d1339334ca9e20610f..af320168f569eb9a8f9ca6637da1056823582c48 100644 --- a/macros/testShowGraphs.cxx +++ b/macros/testShowGraphs.cxx @@ -7,7 +7,7 @@ void testShowGraphs() // TFile fr("../data/dataDSR4/analysis_07_1.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"); TTree *tr = (TTree*)fr.Get("atree");