diff --git a/dataClasses/AEvent.cpp b/dataClasses/AEvent.cpp index d3153b7ae2f98df0855bac8c0f96cda237382d49..368374cbf7904dc8813acc45deda04e544fd9ccd 100644 --- a/dataClasses/AEvent.cpp +++ b/dataClasses/AEvent.cpp @@ -55,7 +55,8 @@ void AEvent::ProcessEvent() { SetLED(); // SetGraphs(); SetCFD(); - SetChargeCFD(); +// SetChargeCFD(); + SetChargeLED(); return; @@ -68,7 +69,7 @@ void AEvent::Reset() { fTime[i] = 0; fAmpCFD[i] = 0; } - + fTimeLED = 0.; fEdgeSlope=0.; fEdgeXi=0.; fEdgeSlope=-100.; @@ -79,6 +80,7 @@ void AEvent::Reset() { fTimeCFD = 0.; fZeroLevel = 0.; fChargeCFD = 0.; + fChargeLED = 0.; } void AEvent::SetInputEvent(RawEvent** event) { @@ -219,7 +221,7 @@ Double_t AEvent::FindZeroLevel() { return correction; } -void AEvent::SetChargeCFD(Int_t tmin, Int_t tmax) { +void AEvent::SetChargeCFD(Int_t tmin, Int_t tmax) { // tmin = -3, tmax = 17 Double_t integral = 0.; //voltage Double_t time_sig = 0; //approximate signal duration in seconds @@ -237,6 +239,34 @@ void AEvent::SetChargeCFD(Int_t tmin, Int_t tmax) { } +void AEvent::SetChargeLED(Int_t tmin, Int_t tmax) { // tmin = -3, tmax = 17 + + Double_t integral = 0.; //voltage + Double_t time_sig = 0; //approximate signal duration in seconds + const Double_t res = 50.; //resistance 50 Om + time_sig = (double)(-tmin + tmax)*(1e-9); + +/* for(Int_t i = 0; i < fNPoints; i++) { + if( fTime[i] > (fTimeLED + tmin) && fTime[i] < (fTimeLED + tmax) ) { + integral = integral + fAmpPos[i]; + } + }*/ + + Int_t imin = 0, imax = 0; + + Int_t i = 0; + while ( fTime[i] < (fTimeLED + tmin) && (i < (fGraphSignal->GetN()-1)) ) { imin = i; i++; } + i = 0; + while ( fTime[i] < (fTimeLED + tmax) && (i < (fGraphSignal->GetN()-1)) ) { imax = i; i++; } + + integral = fGraphSignal->Integral(imin, imax); + + fChargeLED = integral*time_sig/res; + + return; + +} + Double_t AEvent::GetfCFD() { return fTimeCFD; } @@ -284,11 +314,12 @@ void AEvent::SetMaxAmplitudes() { void AEvent::SetLED(Double_t threshold) { Double_t time = 0; - const Double_t timeStep = 0.1; - while( time < 200. && fGraphSignal->Eval(time) <= threshold ) { + const Double_t timeStep = 0.05; + while( time < fTimeAmpMax && fGraphSignal->Eval(time) <= threshold ) { fTimeLED = time; time = time + timeStep; } - //fTimeLED = time; + //fTimeLED = time; найти номера точек которые лежат на 3 нс раньше и на 20 нс позже чем точка с временем timeled (искать точки в пределах условных) + // сделать через функцию getpoint и цикл по точкам от } diff --git a/dataClasses/AEvent.h b/dataClasses/AEvent.h index 90c31a819514df1d7fc20e09581cc6df208e1a61..b0c33631bc1327f8614248c310301f86daf99df6 100644 --- a/dataClasses/AEvent.h +++ b/dataClasses/AEvent.h @@ -46,7 +46,8 @@ private: TArrayD fAmpCFD; //array for CFD amplitudes (attenuated, inversed and delayed) Double_t fTimeCFD; //zero-crossing time - Double_t fChargeCFD; //charge of the signal in Coulomb + Double_t fChargeCFD; //! + Double_t fChargeLED; //charge of the signal in Coulomb Double_t fTimeLED; //time of LED threshold crossing @@ -122,7 +123,13 @@ public: //in range of (tmin,tmax) in ns) //CFD time is taken as a start point - void SetLED(Double_t threshold = 0.015); + void SetChargeLED(Int_t tmin = -3, Int_t tmax = 17); + + + //void SetLED(Double_t threshold = 0.001); + + void SetLED(Double_t threshold = 0.002); + //leading edge discriminator private: diff --git a/macros/histCorr.C b/macros/histCorr.C index 41846dc5610c6ac1a21bbedc57c7c5bfe57f9826..3ac72af814cbfc636be2b2c645f34df387e72bf4 100644 --- a/macros/histCorr.C +++ b/macros/histCorr.C @@ -1,14 +1,14 @@ //#include "TCanvas.h" void histCorr( -// const char *filename = "analysis_07_8.root", +// const char *filename = "Neurad_7_08_NEW.root", const char *filename = "analysis_08_2.root", -// const char *foldername = "7_8", - const char *foldername = "8_2", + const char *foldername = "7_8", +// 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 = 1) + 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) { gSystem->Load("../libData.so"); TFile *f = new TFile(Form("../data/dataDSR4/%s", filename)); @@ -156,7 +156,7 @@ void histCorr( TCanvas *c4 = new TCanvas("c4", "Correlation pictures: XiSquares"); TH2F *h11 = new TH2F("h11", "Time difference between two channels vs XiSquare of edge",100, -0., 5., 100, 0., 0.005); - t->Draw("Ach1.fEdgeXi : (Ach1.fTime90 - Ach1.fTime10) >> h11","","col"); + t->Draw("Ach0.fEdgeXi : (Ach0.fTime90 - Ach0.fTime10) >> h11","","col"); //t->Draw("Ach1.fEdgeXi : (Ach1.fTime90 - Ach1.fTime10) >> h11","(Ach1.fTime90 - Ach1.fTime10)>0","col"); //x h11->GetXaxis()->SetTitle("\\Delta \\tau_{1}^{(rise)} [ns]"); @@ -201,24 +201,63 @@ void histCorr( c5->Update(); //c5->Print(Form("../macros/picsDRS4/file%s/TimeDiffCFD_0.7_3%s", foldername, ext)); - } - if (can5) { - TCanvas *c5 = new TCanvas("c5", "Sigma"); - c5->cd(); - TH1F *h11 = new TH1F("h11", "sigma", 1023, -10, 10); + if (can6) { + TCanvas *c6 = new TCanvas("c6", "leading edge vs charge"); + c6->Divide(2,2); - t->Draw("Ach1.fAmpPos >> h11","Ach1.fTime >0","col"); + 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", "hist led - cfd", 100, -5, 200.); + //t->Draw("Ach0.fTimeCFD - Ach0.fTimeLED >> h20","Ach0.fTimeCFD - Ach0.fTimeLED > 0.3 && Ach0.fTimeCFD - Ach0.fTimeLED <1.3",""); + t->Draw("Ach0.fTimeLED >> h20","Ach0.fTimeLED > 120 && Ach0.fTimeLED < 150"); + //t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");; //x - //h10->GetXaxis()->SetTitle("\\Delta \\tau_{1}^{(rise)} [ns]"); - //h10->GetXaxis()->CenterTitle(); + /* h13->GetYaxis()->SetTitle("fChargeCFD"); + h13->GetYaxis()->CenterTitle(); //y - //h10->GetYaxis()->SetTitle("fEdgeXi"); - //h10->GetYaxis()->CenterTitle(); - c5->Update(); + 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); + t->Draw("Ach0.fTimeCFD : Ach0.fTimeLED >> h14","","col"); + //t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");; + //x + h14->GetYaxis()->SetTitle("fTimeCFD"); + h14->GetYaxis()->CenterTitle(); + //y + h14->GetXaxis()->SetTitle("fTimeLED"); + h14->GetXaxis()->CenterTitle(); + c6->Update(); + + c6->cd(2); + TH2F *h15 = new TH2F("h15", "leading edge vs charge",100, 100., 180.,100, -0.02e-10, 1e-10); + t->Draw("Ach1.fChargeCFD : Ach1.fTimeLED >> h15","Ach1.fChargeCFD>0","col"); + //t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");; + //x + h15->GetYaxis()->SetTitle("fChargeCFD"); + h15->GetYaxis()->CenterTitle(); + //y + h15->GetXaxis()->SetTitle("fTimeLED"); + h15->GetXaxis()->CenterTitle(); + c6->Update(); + + c6->cd(4); + TH2F *h16 = new TH2F("h16", "FtimeCFD vs charge", 100, 100., 180.,100, 0, 1e-10); + t->Draw("Ach1.fChargeCFD : Ach1.fTimeCFD >> h16","Ach1.fChargeCFD>3e-12","col"); + //t->Draw("Ach0.fChargeCFD : Ach0.fChargeCFD >> h13","","col");; + //x + h16->GetYaxis()->SetTitle("fChargeCFD"); + h16->GetYaxis()->CenterTitle(); + //y + h16->GetXaxis()->SetTitle("fTimeCFD"); + h16->GetXaxis()->CenterTitle(); + c6->Update(); //c4->Print(Form("../macros/picsDRS4/file%s/XiSquares%s", foldername, ext)); - } + } diff --git a/macros/testShowGraphs.cxx b/macros/testShowGraphs.cxx index 7ef6eb0b20675742ba9a0517788901c75b308310..24884955f8888f6e6f2a7b2ad7d1c97781ec9ef6 100644 --- a/macros/testShowGraphs.cxx +++ b/macros/testShowGraphs.cxx @@ -5,13 +5,19 @@ void testShowGraphs() const Long64_t kFirstEvent = 128; - TFile fr("../data/dataDSR4/analysis_08_2.root"); + + TFile fr("../data/dataDSR4/Neurad_7_08_NEW.root"); // TFile fr("../data/dataDSR4/analysis_07_8.root"); +<<<<<<< HEAD // TFile fr("../data/dataDSR4/Neurad_081216_2NEW.root"); // TFile fr("../data/dataTektronix/exp18.root"); +======= +// 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"); @@ -49,19 +55,28 @@ void testShowGraphs() // 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(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 c1->cd(k+1); gr[k]->Draw("AL*"); diff --git a/macros/unname.gif b/macros/unname.gif deleted file mode 100644 index f900914b8b4a15b7846977ffa0a4d0864f208c2e..0000000000000000000000000000000000000000 Binary files a/macros/unname.gif and /dev/null differ